From d703a55859ffc63341eb4a9ec9f4941f5064d2a3 Mon Sep 17 00:00:00 2001 From: Freddie Akeroyd Date: Tue, 28 Apr 2026 14:29:22 +0100 Subject: [PATCH 1/2] Import upstream 5.9.5.2 --- vendor/.appveyor.yml | 61 +- vendor/.cirrus.yml | 9 +- vendor/.gitattributes | 7 + vendor/.github/workflows/buildtest.yml | 29 + vendor/.github/workflows/codechecker.yml | 77 + vendor/.gitignore | 6 + vendor/.travis.yml | 217 - vendor/AGENT.txt | 4 +- vendor/CHANGES | 132 + vendor/ChangeLog | 8217 ++++- vendor/FAQ | 2 +- vendor/INSTALL | 6 +- vendor/Makefile.in | 32 +- vendor/Makefile.rules | 39 +- vendor/Makefile.top | 8 +- vendor/NEWS | 174 +- vendor/README | 2 +- vendor/README.win32 | 99 +- vendor/agent/Makefile.depend | 680 +- vendor/agent/Makefile.in | 17 +- vendor/agent/agent_global_vars.h | 1 - vendor/agent/agent_handler.c | 2 +- vendor/agent/agent_index.c | 42 +- vendor/agent/agent_read_config.c | 46 +- vendor/agent/agent_registry.c | 25 +- vendor/agent/agent_sysORTable.c | 4 +- vendor/agent/agent_trap.c | 190 +- vendor/agent/auto_nlist.c | 8 +- vendor/agent/helpers/Makefile.depend | 138 +- vendor/agent/helpers/Makefile.in | 2 +- vendor/agent/helpers/baby_steps.c | 14 +- vendor/agent/helpers/cache_handler.c | 38 +- vendor/agent/helpers/debug_handler.c | 2 +- vendor/agent/helpers/instance.c | 18 +- vendor/agent/helpers/null.c | 2 +- vendor/agent/helpers/old_api.c | 41 +- vendor/agent/helpers/row_merge.c | 2 +- vendor/agent/helpers/scalar.c | 16 +- vendor/agent/helpers/scalar_group.c | 9 +- vendor/agent/helpers/stash_cache.c | 12 +- vendor/agent/helpers/table.c | 18 +- vendor/agent/helpers/table_array.c | 19 +- vendor/agent/helpers/table_container.c | 16 +- vendor/agent/helpers/table_data.c | 2 +- vendor/agent/helpers/table_dataset.c | 5 +- vendor/agent/helpers/table_iterator.c | 23 +- vendor/agent/helpers/table_row.c | 2 +- vendor/agent/helpers/table_tdata.c | 2 +- vendor/agent/helpers/watcher.c | 8 +- vendor/agent/kernel.c | 62 +- vendor/agent/kernel.h | 4 +- vendor/agent/mib_modules.c | 12 +- vendor/agent/mibgroup/Makefile.depend | 972 +- vendor/agent/mibgroup/Rmon.h | 14 +- vendor/agent/mibgroup/Rmon/agutil.c | 2 +- vendor/agent/mibgroup/Rmon/agutil_api.h | 2 +- vendor/agent/mibgroup/Rmon/alarm.c | 10 +- vendor/agent/mibgroup/Rmon/alarmTable.c | 29 +- vendor/agent/mibgroup/Rmon/alarmTable.h | 9 +- vendor/agent/mibgroup/Rmon/event.c | 10 +- vendor/agent/mibgroup/Rmon/event.h | 6 +- vendor/agent/mibgroup/Rmon/history.c | 10 +- vendor/agent/mibgroup/Rmon/rows.c | 14 +- vendor/agent/mibgroup/Rmon/statistics.c | 10 +- vendor/agent/mibgroup/Rmon/test_alarm.sh | 2 +- vendor/agent/mibgroup/agent/extend.c | 32 +- vendor/agent/mibgroup/agent/extend.h | 6 +- vendor/agent/mibgroup/agent/nsDebug.c | 3 + vendor/agent/mibgroup/agent/nsLogging.c | 6 + .../agent/mibgroup/agent/nsVacmAccessTable.c | 16 +- .../agent/mibgroup/agent/nsVacmAccessTable.h | 2 +- vendor/agent/mibgroup/agent_mibs.h | 14 +- vendor/agent/mibgroup/agentx.h | 4 +- vendor/agent/mibgroup/agentx/agentx_config.c | 2 +- vendor/agent/mibgroup/agentx/agentx_config.h | 2 +- vendor/agent/mibgroup/agentx/client.c | 16 +- vendor/agent/mibgroup/agentx/client.h | 2 +- vendor/agent/mibgroup/agentx/master.c | 10 +- vendor/agent/mibgroup/agentx/master.h | 8 +- vendor/agent/mibgroup/agentx/master_admin.c | 12 +- vendor/agent/mibgroup/agentx/master_admin.h | 2 +- vendor/agent/mibgroup/agentx/protocol.c | 18 +- vendor/agent/mibgroup/agentx/protocol.h | 2 +- vendor/agent/mibgroup/agentx/subagent.c | 20 +- vendor/agent/mibgroup/agentx/subagent.h | 10 +- vendor/agent/mibgroup/default_modules.h | 52 +- .../agent/mibgroup/deliver/deliverByNotify.c | 34 +- .../agent/mibgroup/deliver/deliverByNotify.h | 13 +- vendor/agent/mibgroup/disman.h | 6 +- vendor/agent/mibgroup/disman/event-mib.h | 2 +- vendor/agent/mibgroup/disman/event.h | 50 +- .../mibgroup/disman/event/mteEventConf.h | 2 +- .../mibgroup/disman/event/mteEventTable.c | 4 +- .../agent/mibgroup/disman/event/mteTrigger.c | 4 +- .../mibgroup/disman/event/mteTriggerConf.c | 3 +- .../mibgroup/disman/event/mteTriggerConf.h | 2 +- .../disman/event/mteTriggerDeltaTable.c | 5 +- .../disman/event/mteTriggerExistenceTable.c | 6 +- .../mibgroup/disman/event/mteTriggerTable.h | 2 +- .../mibgroup/disman/expr/expErrorTable.c | 23 +- .../mibgroup/disman/expr/expErrorTable.h | 2 +- .../mibgroup/disman/expr/expExpressionTable.c | 25 +- .../mibgroup/disman/expr/expExpressionTable.h | 2 +- .../mibgroup/disman/expr/expObjectTable.c | 23 +- .../mibgroup/disman/expr/expObjectTable.h | 1 + vendor/agent/mibgroup/disman/expr/expValue.c | 11 +- .../mibgroup/disman/expr/expValueTable.c | 24 +- .../mibgroup/disman/expr/expValueTable.h | 3 +- vendor/agent/mibgroup/disman/expression-mib.h | 10 +- vendor/agent/mibgroup/disman/expression.h | 20 +- .../disman/expression/expErrorTable.c | 4 +- .../disman/expression/expErrorTable.h | 2 +- .../disman/expression/expExpressionTable.c | 9 +- .../disman/expression/expExpressionTable.h | 2 +- .../disman/expression/expObjectTable.c | 4 +- .../disman/expression/expObjectTable.h | 2 +- .../disman/expression/expValueTable.c | 4 +- .../disman/expression/expValueTable.h | 2 +- .../agent/mibgroup/disman/mteObjectsTable.c | 4 +- .../agent/mibgroup/disman/mteObjectsTable.h | 2 +- .../mibgroup/disman/mteTriggerBooleanTable.c | 4 +- .../mibgroup/disman/mteTriggerBooleanTable.h | 2 +- .../mibgroup/disman/mteTriggerDeltaTable.c | 4 +- .../mibgroup/disman/mteTriggerDeltaTable.h | 2 +- .../disman/mteTriggerExistenceTable.c | 4 +- .../disman/mteTriggerExistenceTable.h | 2 +- .../agent/mibgroup/disman/mteTriggerTable.c | 11 +- .../agent/mibgroup/disman/mteTriggerTable.h | 6 +- .../disman/mteTriggerThresholdTable.c | 4 +- .../disman/mteTriggerThresholdTable.h | 2 +- vendor/agent/mibgroup/disman/nslookup-mib.h | 6 +- .../mibgroup/disman/nslookup/lookupCtlTable.c | 29 +- .../mibgroup/disman/nslookup/lookupCtlTable.h | 2 - .../disman/nslookup/lookupResultsTable.c | 3 + vendor/agent/mibgroup/disman/old-event-mib.h | 50 +- vendor/agent/mibgroup/disman/ping-mib.h | 8 +- .../agent/mibgroup/disman/ping/pingCtlTable.c | 49 +- .../agent/mibgroup/disman/ping/pingCtlTable.h | 4 +- .../disman/ping/pingProbeHistoryTable.c | 4 +- .../mibgroup/disman/ping/pingResultsTable.c | 8 +- vendor/agent/mibgroup/disman/schedule.h | 6 +- .../mibgroup/disman/schedule/schedConf.c | 17 +- .../mibgroup/disman/schedule/schedConf.h | 2 +- .../mibgroup/disman/schedule/schedCore.c | 19 +- .../mibgroup/disman/schedule/schedCore.h | 12 +- .../mibgroup/disman/schedule/schedTable.c | 2 +- .../mibgroup/disman/schedule/schedTable.h | 4 +- vendor/agent/mibgroup/disman/traceroute-mib.h | 10 +- .../disman/traceroute/traceRouteCtlTable.c | 48 +- .../disman/traceroute/traceRouteHopsTable.c | 4 +- .../traceroute/traceRouteProbeHistoryTable.c | 4 +- .../traceroute/traceRouteResultsTable.c | 4 +- vendor/agent/mibgroup/etherlike-mib.h | 4 +- .../etherlike-mib/data_access/dot3stats.h | 2 +- .../data_access/dot3stats_linux.c | 971 +- .../mibgroup/etherlike-mib/dot3StatsTable.h | 12 +- .../dot3StatsTable/dot3StatsTable.c | 5 +- .../dot3StatsTable_data_access.c | 139 +- .../dot3StatsTable_data_access.h | 13 +- .../dot3StatsTable/dot3StatsTable_interface.c | 10 +- .../dot3StatsTable/ioctl_imp_common.h | 2 +- vendor/agent/mibgroup/examples.h | 8 +- vendor/agent/mibgroup/examples/example.c | 4 +- vendor/agent/mibgroup/examples/example.h | 2 +- .../mibgroup/examples/netSnmpHostsTable.c | 3 +- .../mibgroup/examples/netSnmpHostsTable.h | 6 +- .../examples/netSnmpHostsTable_checkfns.c | 2 +- .../examples/netSnmpHostsTable_checkfns.h | 2 +- vendor/agent/mibgroup/examples/notification.c | 2 +- .../agent/mibgroup/examples/ucdDemoPublic.c | 9 +- .../agent/mibgroup/examples/ucdDemoPublic.h | 2 +- vendor/agent/mibgroup/hardware/cpu.h | 24 +- .../mibgroup/hardware/cpu/cpu_kerndata.h | 2 +- .../agent/mibgroup/hardware/cpu/cpu_kinfo.h | 2 +- .../agent/mibgroup/hardware/cpu/cpu_kstat.c | 7 +- .../agent/mibgroup/hardware/cpu/cpu_kstat.h | 2 +- .../agent/mibgroup/hardware/cpu/cpu_linux.c | 6 +- .../agent/mibgroup/hardware/cpu/cpu_linux.h | 2 +- vendor/agent/mibgroup/hardware/cpu/cpu_mach.h | 2 +- .../agent/mibgroup/hardware/cpu/cpu_nlist.h | 2 +- vendor/agent/mibgroup/hardware/cpu/cpu_null.h | 2 +- vendor/agent/mibgroup/hardware/cpu/cpu_pcp.h | 2 +- .../mibgroup/hardware/cpu/cpu_perfstat.h | 2 +- .../agent/mibgroup/hardware/cpu/cpu_pstat.h | 2 +- .../agent/mibgroup/hardware/cpu/cpu_sysctl.c | 2 +- .../agent/mibgroup/hardware/cpu/cpu_sysctl.h | 2 +- .../agent/mibgroup/hardware/cpu/cpu_sysinfo.h | 2 +- vendor/agent/mibgroup/hardware/fsys.h | 10 +- .../mibgroup/hardware/fsys/fsys_getfsstats.c | 12 +- .../mibgroup/hardware/fsys/fsys_mntctl.c | 8 +- .../mibgroup/hardware/fsys/fsys_mntent.c | 148 +- vendor/agent/mibgroup/hardware/fsys/hw_fsys.c | 152 +- vendor/agent/mibgroup/hardware/fsys/hw_fsys.h | 21 + .../agent/mibgroup/hardware/fsys/mnttypes.h | 76 - vendor/agent/mibgroup/hardware/memory.h | 22 +- .../agent/mibgroup/hardware/memory/hw_mem.c | 95 +- .../mibgroup/hardware/memory/memory_darwin.c | 15 +- .../mibgroup/hardware/memory/memory_freebsd.c | 2 +- .../mibgroup/hardware/memory/memory_irix.c | 6 +- .../mibgroup/hardware/memory/memory_linux.c | 20 +- .../mibgroup/hardware/memory/memory_linux.h | 2 +- .../mibgroup/hardware/memory/memory_netbsd.c | 4 +- vendor/agent/mibgroup/hardware/sensors.h | 10 +- .../mibgroup/hardware/sensors/dummy_sensors.c | 7 +- .../mibgroup/hardware/sensors/dummy_sensors.h | 2 +- .../mibgroup/hardware/sensors/kstat_sensors.h | 2 +- .../mibgroup/hardware/sensors/lmsensors_v2.h | 2 +- .../mibgroup/hardware/sensors/lmsensors_v3.h | 2 +- .../mibgroup/hardware/sensors/picld_sensors.h | 2 +- vendor/agent/mibgroup/header_complex.c | 6 +- vendor/agent/mibgroup/host.h | 28 +- .../agent/mibgroup/host/data_access/swinst.c | 8 +- .../agent/mibgroup/host/data_access/swinst.h | 14 +- .../mibgroup/host/data_access/swinst_apt.c | 4 +- .../host/data_access/swinst_pkginfo.c | 6 +- .../mibgroup/host/data_access/swinst_rpm.c | 31 +- .../agent/mibgroup/host/data_access/swrun.c | 13 +- .../agent/mibgroup/host/data_access/swrun.h | 28 +- .../mibgroup/host/data_access/swrun_kinfo.c | 6 +- .../host/data_access/swrun_procfs_psinfo.c | 4 +- .../agent/mibgroup/host/hrSWInstalledTable.h | 2 +- vendor/agent/mibgroup/host/hrSWRunPerfTable.h | 2 +- vendor/agent/mibgroup/host/hrSWRunTable.h | 4 +- vendor/agent/mibgroup/host/hr_device.c | 8 +- vendor/agent/mibgroup/host/hr_disk.c | 40 +- vendor/agent/mibgroup/host/hr_disk.h | 2 +- vendor/agent/mibgroup/host/hr_filesys.c | 42 +- vendor/agent/mibgroup/host/hr_network.c | 2 +- vendor/agent/mibgroup/host/hr_network.h | 4 +- vendor/agent/mibgroup/host/hr_other.c | 2 +- vendor/agent/mibgroup/host/hr_other.h | 2 +- vendor/agent/mibgroup/host/hr_partition.c | 4 +- vendor/agent/mibgroup/host/hr_partition.h | 2 +- vendor/agent/mibgroup/host/hr_print.c | 28 +- vendor/agent/mibgroup/host/hr_print.h | 4 +- vendor/agent/mibgroup/host/hr_proc.c | 4 +- vendor/agent/mibgroup/host/hr_proc.h | 4 +- vendor/agent/mibgroup/host/hr_storage.c | 62 +- vendor/agent/mibgroup/host/hr_storage.h | 2 +- vendor/agent/mibgroup/host/hr_swinst.c | 30 +- vendor/agent/mibgroup/host/hr_swrun.c | 76 +- vendor/agent/mibgroup/host/hr_system.c | 54 +- vendor/agent/mibgroup/host/hrh_filesys.c | 90 +- vendor/agent/mibgroup/host/hrh_filesys.h | 10 +- vendor/agent/mibgroup/host/hrh_storage.c | 127 +- vendor/agent/mibgroup/host/hrh_storage.h | 8 +- vendor/agent/mibgroup/host_res.h | 10 +- vendor/agent/mibgroup/if-mib.h | 2 +- .../mibgroup/if-mib/data_access/interface.c | 63 +- .../mibgroup/if-mib/data_access/interface.h | 20 +- .../if-mib/data_access/interface_ioctl.c | 242 +- .../if-mib/data_access/interface_ioctl.h | 9 +- .../if-mib/data_access/interface_iphlpapi.c | 4 +- .../if-mib/data_access/interface_linux.c | 328 +- .../if-mib/data_access/interface_openbsd.c | 4 +- .../if-mib/data_access/interface_solaris2.c | 4 +- .../if-mib/data_access/interface_sysctl.c | 6 +- vendor/agent/mibgroup/if-mib/ifTable.h | 2 +- .../agent/mibgroup/if-mib/ifTable/ifTable.c | 95 +- .../agent/mibgroup/if-mib/ifTable/ifTable.h | 20 +- .../if-mib/ifTable/ifTable_constants.h | 3 + .../if-mib/ifTable/ifTable_data_access.c | 128 +- .../if-mib/ifTable/ifTable_data_access.h | 12 - .../if-mib/ifTable/ifTable_interface.c | 120 +- .../if-mib/ifTable/ifTable_interface.h | 3 +- vendor/agent/mibgroup/if-mib/ifXTable.h | 2 +- .../agent/mibgroup/if-mib/ifXTable/ifXTable.c | 4 +- .../agent/mibgroup/if-mib/ifXTable/ifXTable.h | 10 +- .../if-mib/ifXTable/ifXTable_interface.c | 8 +- vendor/agent/mibgroup/ip-forward-mib.h | 2 +- .../ip-forward-mib/data_access/route.h | 14 +- .../ip-forward-mib/data_access/route_common.c | 8 +- .../ip-forward-mib/data_access/route_ioctl.c | 29 +- .../ip-forward-mib/data_access/route_linux.c | 12 +- .../data_access/route_solaris.c | 15 +- .../ip-forward-mib/inetCidrRouteTable.h | 2 +- .../inetCidrRouteTable/inetCidrRouteTable.c | 4 +- .../inetCidrRouteTable/inetCidrRouteTable.h | 14 +- .../inetCidrRouteTable_data_access.c | 13 +- .../inetCidrRouteTable_interface.c | 29 +- .../ip-forward-mib/ipCidrRouteTable.h | 2 +- .../ipCidrRouteTable/ipCidrRouteTable.c | 4 +- .../ipCidrRouteTable/ipCidrRouteTable.h | 8 +- .../ipCidrRouteTable_data_access.c | 13 +- .../ipCidrRouteTable_interface.c | 11 +- vendor/agent/mibgroup/ip-mib.h | 2 +- .../agent/mibgroup/ip-mib/data_access/arp.h | 10 +- .../mibgroup/ip-mib/data_access/arp_netlink.c | 2 +- .../ip-mib/data_access/defaultrouter.h | 10 +- .../ip-mib/data_access/defaultrouter_common.c | 9 +- .../ip-mib/data_access/defaultrouter_linux.c | 9 +- .../data_access/defaultrouter_solaris2.c | 2 +- .../ip-mib/data_access/defaultrouter_sysctl.c | 2 +- .../mibgroup/ip-mib/data_access/ipaddress.h | 11 +- .../ip-mib/data_access/ipaddress_common.c | 9 +- .../ip-mib/data_access/ipaddress_ioctl.c | 5 +- .../ip-mib/data_access/ipaddress_linux.c | 31 +- .../ip-mib/data_access/ipaddress_linux.h | 4 +- .../ip-mib/data_access/ipaddress_private.h | 2 - .../ip-mib/data_access/ipaddress_sysctl.c | 10 +- .../ip-mib/data_access/ipv6scopezone.h | 4 +- .../ip-mib/data_access/ipv6scopezone_common.c | 8 +- .../ip-mib/data_access/ipv6scopezone_linux.c | 5 + .../ip-mib/data_access/scalars_common.h | 6 +- .../ip-mib/data_access/scalars_sysctl.c | 31 +- .../mibgroup/ip-mib/data_access/systemstats.h | 10 +- .../ip-mib/data_access/systemstats_common.c | 8 +- .../ip-mib/data_access/systemstats_linux.c | 52 +- .../ip-mib/data_access/systemstats_sysctl.c | 27 +- .../mibgroup/ip-mib/inetNetToMediaTable.h | 8 +- .../inetNetToMediaTable/inetNetToMediaTable.c | 4 +- .../inetNetToMediaTable/inetNetToMediaTable.h | 19 +- .../inetNetToMediaTable_data_access.c | 14 +- .../inetNetToMediaTable_interface.c | 23 +- .../mibgroup/ip-mib/ipAddressPrefixTable.h | 2 +- .../ipAddressPrefixTable.h | 6 +- .../ipAddressPrefixTable_data_access.c | 22 +- .../ipAddressPrefixTable_interface.c | 9 +- vendor/agent/mibgroup/ip-mib/ipAddressTable.h | 2 +- .../ip-mib/ipAddressTable/ipAddressTable.c | 16 +- .../ip-mib/ipAddressTable/ipAddressTable.h | 17 +- .../ipAddressTable_data_access.c | 46 +- .../ipAddressTable/ipAddressTable_interface.c | 20 +- .../mibgroup/ip-mib/ipDefaultRouterTable.h | 2 +- .../ipDefaultRouterTable.h | 8 +- .../ipDefaultRouterTable_data_access.c | 22 +- .../ipDefaultRouterTable_interface.c | 9 +- vendor/agent/mibgroup/ip-mib/ipIfStatsTable.h | 8 +- .../ip-mib/ipIfStatsTable/ipIfStatsTable.h | 6 +- .../ipIfStatsTable_data_access.c | 20 +- .../ipIfStatsTable/ipIfStatsTable_interface.c | 8 +- .../mibgroup/ip-mib/ipSystemStatsTable.h | 8 +- .../ipSystemStatsTable/ipSystemStatsTable.h | 6 +- .../ipSystemStatsTable_data_access.c | 20 +- .../ipSystemStatsTable_interface.c | 8 +- vendor/agent/mibgroup/ip-mib/ip_scalars.c | 2 + vendor/agent/mibgroup/ip-mib/ip_scalars.h | 2 +- .../mibgroup/ip-mib/ipv4InterfaceTable.h | 2 +- .../ipv4InterfaceTable/ipv4InterfaceTable.c | 4 +- .../ipv4InterfaceTable/ipv4InterfaceTable.h | 12 +- .../ipv4InterfaceTable_data_access.c | 4 +- .../ipv4InterfaceTable_interface.c | 4 +- .../mibgroup/ip-mib/ipv6InterfaceTable.h | 2 +- .../ipv6InterfaceTable/ipv6InterfaceTable.c | 4 +- .../ipv6InterfaceTable/ipv6InterfaceTable.h | 8 +- .../ipv6InterfaceTable_data_access.c | 4 +- .../ipv6InterfaceTable_interface.c | 4 +- .../mibgroup/ip-mib/ipv6ScopeZoneIndexTable.h | 2 +- .../ipv6ScopeZoneIndexTable.h | 6 +- .../ipv6ScopeZoneIndexTable_data_access.c | 13 +- .../ipv6ScopeZoneIndexTable_interface.c | 9 +- vendor/agent/mibgroup/kernel_sunos5.c | 41 +- vendor/agent/mibgroup/kernel_sunos5.h | 40 +- vendor/agent/mibgroup/mibII.h | 44 +- vendor/agent/mibgroup/mibII/at.c | 3 + vendor/agent/mibgroup/mibII/at.h | 20 +- .../mibgroup/mibII/data_access/at_hpux.c | 30 +- .../mibgroup/mibII/data_access/at_iphlpapi.c | 2 +- .../mibgroup/mibII/data_access/at_solaris.c | 2 +- .../mibgroup/mibII/data_access/at_sysctl.c | 12 +- .../mibgroup/mibII/data_access/at_unix.c | 2 +- vendor/agent/mibgroup/mibII/icmp.c | 10 +- vendor/agent/mibgroup/mibII/icmp.h | 12 +- vendor/agent/mibgroup/mibII/ifTable.h | 2 +- vendor/agent/mibgroup/mibII/interfaces.c | 148 +- vendor/agent/mibgroup/mibII/interfaces.h | 10 +- vendor/agent/mibgroup/mibII/ip.c | 44 +- vendor/agent/mibgroup/mibII/ip.h | 16 +- vendor/agent/mibgroup/mibII/ipAddr.c | 45 +- vendor/agent/mibgroup/mibII/ipAddr.h | 2 +- .../agent/mibgroup/mibII/ipCidrRouteTable.h | 8 +- vendor/agent/mibgroup/mibII/ipv6.c | 201 +- vendor/agent/mibgroup/mibII/ipv6.h | 8 +- vendor/agent/mibgroup/mibII/kernel_linux.c | 4 +- vendor/agent/mibgroup/mibII/kernel_sysctl.c | 10 + vendor/agent/mibgroup/mibII/mibII_common.h | 42 +- vendor/agent/mibgroup/mibII/mta_sendmail.c | 14 +- vendor/agent/mibgroup/mibII/mta_sendmail.h | 4 +- vendor/agent/mibgroup/mibII/route_headers.h | 50 +- vendor/agent/mibgroup/mibII/route_write.c | 28 +- vendor/agent/mibgroup/mibII/route_write.h | 2 +- vendor/agent/mibgroup/mibII/setSerialNo.c | 31 +- vendor/agent/mibgroup/mibII/snmp_mib.h | 2 +- vendor/agent/mibgroup/mibII/system_mib.c | 12 +- vendor/agent/mibgroup/mibII/system_mib.h | 2 +- vendor/agent/mibgroup/mibII/tcp.c | 108 +- vendor/agent/mibgroup/mibII/tcp.h | 10 +- vendor/agent/mibgroup/mibII/tcpTable.c | 54 +- vendor/agent/mibgroup/mibII/tcpTable.h | 4 +- vendor/agent/mibgroup/mibII/udp.c | 14 +- vendor/agent/mibgroup/mibII/udp.h | 10 +- vendor/agent/mibgroup/mibII/udpTable.c | 45 +- vendor/agent/mibgroup/mibII/udpTable.h | 4 +- vendor/agent/mibgroup/mibII/vacm_conf.c | 14 +- vendor/agent/mibgroup/mibII/vacm_conf.h | 2 +- vendor/agent/mibgroup/mibII/vacm_context.c | 2 +- vendor/agent/mibgroup/mibII/vacm_vars.c | 76 +- vendor/agent/mibgroup/mibII/vacm_vars.h | 10 +- vendor/agent/mibgroup/mibII/var_route.c | 61 +- vendor/agent/mibgroup/mibII/var_route.h | 11 +- vendor/agent/mibgroup/mibincl.h | 8 +- vendor/agent/mibgroup/misc/ipfwacc.c | 4 +- vendor/agent/mibgroup/misc/ipfwacc.h | 4 +- vendor/agent/mibgroup/notification-log-mib.h | 4 +- .../notification-log-mib/notification_log.c | 4 +- vendor/agent/mibgroup/notification.h | 6 +- .../mibgroup/notification/notification_data.h | 6 +- .../snmpNotifyFilterProfileTable.c | 11 +- .../snmpNotifyFilterProfileTable.h | 2 +- .../snmpNotifyFilterProfileTable_data.c | 5 +- .../snmpNotifyFilterProfileTable_data.h | 2 +- .../mibgroup/notification/snmpNotifyTable.c | 10 +- .../mibgroup/notification/snmpNotifyTable.h | 6 +- .../notification/snmpNotifyTable_data.c | 9 +- .../notification/snmpNotifyTable_data.h | 6 +- vendor/agent/mibgroup/rmon-mib.h | 4 +- .../rmon-mib/data_access/etherstats.h | 2 +- .../rmon-mib/data_access/etherstats_linux.c | 10 +- .../agent/mibgroup/rmon-mib/etherStatsTable.h | 12 +- .../etherStatsTable/etherStatsTable.h | 3 - .../etherStatsTable_data_access.c | 10 +- .../etherStatsTable_data_set.c | 18 +- .../etherStatsTable_interface.c | 13 +- vendor/agent/mibgroup/sctp-mib.h | 6 +- .../agent/mibgroup/sctp-mib/sctpAssocTable.c | 6 +- vendor/agent/mibgroup/sctp-mib/sctpScalars.h | 10 +- .../mibgroup/sctp-mib/sctpScalars_freebsd.c | 4 +- vendor/agent/mibgroup/sctp-mib/sctpTables.h | 28 +- .../mibgroup/sctp-mib/sctpTables_freebsd.c | 2 +- vendor/agent/mibgroup/smux.h | 2 +- vendor/agent/mibgroup/smux/smux.c | 27 +- vendor/agent/mibgroup/smux/smux.h | 4 +- vendor/agent/mibgroup/smux/snmp_bgp.c | 16 +- vendor/agent/mibgroup/smux/snmp_bgp.h | 2 +- vendor/agent/mibgroup/smux/snmp_ospf.c | 16 +- vendor/agent/mibgroup/smux/snmp_ospf.h | 2 +- vendor/agent/mibgroup/smux/snmp_rip2.c | 16 +- vendor/agent/mibgroup/smux/snmp_rip2.h | 2 +- vendor/agent/mibgroup/smux_gated.h | 6 +- vendor/agent/mibgroup/snmp-notification-mib.h | 4 +- .../snmpNotifyFilterTable.h | 2 +- .../snmpNotifyFilterTable.c | 4 +- .../snmpNotifyFilterTable.h | 49 +- .../snmpNotifyFilterTable_data_access.c | 8 +- .../snmpNotifyFilterTable_data_storage.c | 5 +- .../snmpNotifyFilterTable_data_storage.h | 1 + .../snmpNotifyFilterTable_interface.c | 45 +- .../agent/mibgroup/snmp-usm-dh-objects-mib.h | 4 +- .../snmp-usm-dh-objects-mib/usmDHParameters.h | 2 +- .../usmDHParameters/usmDHParameters.c | 1 + .../usmDHUserKeyTable.h | 2 +- .../usmDHUserKeyTable/usmDHUserKeyTable.h | 16 +- .../usmDHUserKeyTable_data_access.c | 4 +- .../usmDHUserKeyTable_data_get.c | 15 +- .../usmDHUserKeyTable_data_set.c | 38 +- .../usmDHUserKeyTable_data_set.h | 2 - .../usmDHUserKeyTable_interface.c | 11 +- vendor/agent/mibgroup/snmpv3/snmpEngine.h | 4 +- vendor/agent/mibgroup/snmpv3/snmpMPDStats.h | 2 +- vendor/agent/mibgroup/snmpv3/usmConf.h | 2 +- vendor/agent/mibgroup/snmpv3/usmStats.h | 2 +- vendor/agent/mibgroup/snmpv3/usmUser.c | 6 +- vendor/agent/mibgroup/snmpv3/usmUser.h | 4 +- vendor/agent/mibgroup/snmpv3mibs.h | 10 +- vendor/agent/mibgroup/struct.h | 2 +- vendor/agent/mibgroup/target.h | 10 +- .../mibgroup/target/snmpTargetAddrEntry.c | 2 +- .../mibgroup/target/snmpTargetAddrEntry.h | 4 +- .../target/snmpTargetAddrEntry_data.c | 11 +- .../target/snmpTargetAddrEntry_data.h | 1 + .../mibgroup/target/snmpTargetParamsEntry.c | 4 +- .../target/snmpTargetParamsEntry_data.c | 2 +- vendor/agent/mibgroup/target/target.c | 2 +- vendor/agent/mibgroup/target/target.h | 4 +- .../agent/mibgroup/target/target_counters.c | 2 +- vendor/agent/mibgroup/tcp-mib.h | 6 +- .../mibgroup/tcp-mib/data_access/tcpConn.h | 16 +- .../tcp-mib/data_access/tcpConn_common.c | 9 +- .../tcp-mib/data_access/tcpConn_freebsd4.c | 12 +- .../tcp-mib/data_access/tcpConn_linux.c | 8 +- .../tcp-mib/data_access/tcpConn_netbsd.c | 8 +- .../tcp-mib/data_access/tcpConn_openbsd.c | 12 +- vendor/agent/mibgroup/tcp-mib/tcpConnTable.h | 8 +- .../mibgroup/tcp-mib/tcpConnectionTable.h | 4 +- .../tcpConnectionTable/tcpConnectionTable.c | 4 +- .../tcpConnectionTable/tcpConnectionTable.h | 36 +- .../tcpConnectionTable_data_access.c | 11 +- .../tcpConnectionTable_interface.c | 11 +- .../agent/mibgroup/tcp-mib/tcpListenerTable.h | 2 +- .../tcpListenerTable/tcpListenerTable.h | 6 +- .../tcpListenerTable_data_access.c | 45 +- .../tcpListenerTable_interface.c | 9 +- vendor/agent/mibgroup/testhandler.c | 71 +- vendor/agent/mibgroup/testhandler.h | 5 +- vendor/agent/mibgroup/tlstm-mib.h | 12 +- .../mibgroup/tlstm-mib/snmpTlstmAddrTable.h | 2 +- .../snmpTlstmAddrTable/snmpTlstmAddrTable.c | 161 +- .../snmpTlstmAddrTable/snmpTlstmAddrTable.h | 1 + .../tlstm-mib/snmpTlstmCertToTSNTable.h | 2 +- .../snmpTlstmCertToTSNTable.c | 511 +- .../snmpTlstmCertToTSNTable.h | 1 + .../mibgroup/tlstm-mib/snmpTlstmParamsTable.h | 2 +- .../snmpTlstmParamsTable.c | 154 +- .../snmpTlstmParamsTable.h | 2 + .../mibgroup/tlstm-mib/snmpTlstmSession.h | 2 +- vendor/agent/mibgroup/tsm-mib.h | 6 +- vendor/agent/mibgroup/tsm-mib/snmpTsmStats.h | 2 +- vendor/agent/mibgroup/tunnel.h | 6 +- vendor/agent/mibgroup/tunnel/tunnel.c | 1 + vendor/agent/mibgroup/ucd-snmp/disk.c | 933 - vendor/agent/mibgroup/ucd-snmp/disk.h | 31 - vendor/agent/mibgroup/ucd-snmp/disk_hw.c | 486 +- vendor/agent/mibgroup/ucd-snmp/disk_hw.h | 4 +- vendor/agent/mibgroup/ucd-snmp/diskio.c | 59 +- vendor/agent/mibgroup/ucd-snmp/diskio.h | 4 +- vendor/agent/mibgroup/ucd-snmp/dlmod.c | 4 +- vendor/agent/mibgroup/ucd-snmp/dlmod.h | 4 +- vendor/agent/mibgroup/ucd-snmp/errormib.c | 54 +- vendor/agent/mibgroup/ucd-snmp/errormib.h | 2 +- vendor/agent/mibgroup/ucd-snmp/extensible.c | 58 +- vendor/agent/mibgroup/ucd-snmp/extensible.h | 8 +- vendor/agent/mibgroup/ucd-snmp/file.c | 8 +- vendor/agent/mibgroup/ucd-snmp/file.h | 2 +- vendor/agent/mibgroup/ucd-snmp/hpux.c | 6 +- vendor/agent/mibgroup/ucd-snmp/lmSensors.h | 4 +- vendor/agent/mibgroup/ucd-snmp/lmsensorsMib.c | 108 +- vendor/agent/mibgroup/ucd-snmp/lmsensorsMib.h | 6 +- vendor/agent/mibgroup/ucd-snmp/loadave.c | 68 +- vendor/agent/mibgroup/ucd-snmp/loadave.h | 2 +- vendor/agent/mibgroup/ucd-snmp/logmatch.c | 13 +- vendor/agent/mibgroup/ucd-snmp/logmatch.h | 4 +- vendor/agent/mibgroup/ucd-snmp/memory.c | 12 +- vendor/agent/mibgroup/ucd-snmp/memory.h | 3 +- vendor/agent/mibgroup/ucd-snmp/memory_aix4.c | 4 +- vendor/agent/mibgroup/ucd-snmp/memory_aix4.h | 2 +- .../agent/mibgroup/ucd-snmp/memory_darwin7.c | 20 +- .../agent/mibgroup/ucd-snmp/memory_darwin7.h | 2 +- vendor/agent/mibgroup/ucd-snmp/memory_dynix.h | 2 +- .../agent/mibgroup/ucd-snmp/memory_freebsd2.c | 4 +- vendor/agent/mibgroup/ucd-snmp/memory_hpux.c | 4 +- .../agent/mibgroup/ucd-snmp/memory_netbsd1.c | 19 +- .../agent/mibgroup/ucd-snmp/memory_netbsd1.h | 2 +- .../agent/mibgroup/ucd-snmp/memory_solaris2.c | 4 +- .../agent/mibgroup/ucd-snmp/memory_solaris2.h | 2 +- vendor/agent/mibgroup/ucd-snmp/pass.c | 10 +- vendor/agent/mibgroup/ucd-snmp/pass.h | 8 +- vendor/agent/mibgroup/ucd-snmp/pass_common.c | 4 +- vendor/agent/mibgroup/ucd-snmp/pass_persist.c | 162 +- vendor/agent/mibgroup/ucd-snmp/pass_persist.h | 6 +- vendor/agent/mibgroup/ucd-snmp/proc.c | 26 +- vendor/agent/mibgroup/ucd-snmp/proc.h | 2 +- vendor/agent/mibgroup/ucd-snmp/proxy.c | 45 +- vendor/agent/mibgroup/ucd-snmp/proxy.h | 13 +- vendor/agent/mibgroup/ucd-snmp/versioninfo.c | 8 +- vendor/agent/mibgroup/ucd-snmp/versioninfo.h | 6 +- vendor/agent/mibgroup/ucd-snmp/vmstat.h | 2 +- vendor/agent/mibgroup/ucd-snmp/vmstat_aix4.h | 2 +- vendor/agent/mibgroup/ucd-snmp/vmstat_bsdi4.c | 4 +- vendor/agent/mibgroup/ucd-snmp/vmstat_bsdi4.h | 2 +- .../agent/mibgroup/ucd-snmp/vmstat_darwin7.c | 6 +- .../agent/mibgroup/ucd-snmp/vmstat_darwin7.h | 2 +- vendor/agent/mibgroup/ucd-snmp/vmstat_dynix.c | 2 +- vendor/agent/mibgroup/ucd-snmp/vmstat_dynix.h | 2 +- .../agent/mibgroup/ucd-snmp/vmstat_freebsd2.c | 6 +- .../agent/mibgroup/ucd-snmp/vmstat_freebsd2.h | 2 +- vendor/agent/mibgroup/ucd-snmp/vmstat_hpux.h | 2 +- vendor/agent/mibgroup/ucd-snmp/vmstat_linux.c | 46 +- vendor/agent/mibgroup/ucd-snmp/vmstat_linux.h | 4 +- .../agent/mibgroup/ucd-snmp/vmstat_netbsd1.c | 4 +- .../agent/mibgroup/ucd-snmp/vmstat_netbsd1.h | 2 +- .../agent/mibgroup/ucd-snmp/vmstat_solaris2.h | 4 +- vendor/agent/mibgroup/ucd_snmp.h | 32 +- vendor/agent/mibgroup/udp-mib.h | 4 +- .../udp-mib/data_access/udp_endpoint.h | 16 +- .../data_access/udp_endpoint_freebsd4.c | 8 +- .../udp-mib/data_access/udp_endpoint_netbsd.c | 4 +- .../data_access/udp_endpoint_openbsd.c | 8 +- .../data_access/udp_endpoint_solaris2.c | 2 +- .../agent/mibgroup/udp-mib/udpEndpointTable.h | 2 +- .../udpEndpointTable/udpEndpointTable.h | 6 +- .../udpEndpointTable_data_access.c | 4 +- .../udpEndpointTable_interface.c | 9 +- vendor/agent/mibgroup/util_funcs.c | 286 +- vendor/agent/mibgroup/util_funcs.h | 10 +- vendor/agent/mibgroup/util_funcs/Exit.c | 2 +- .../mibgroup/util_funcs/get_pid_from_inode.c | 9 +- .../mibgroup/util_funcs/get_pid_from_inode.h | 10 +- .../mibgroup/util_funcs/header_simple_table.c | 31 +- vendor/agent/mibgroup/util_funcs/restart.c | 8 +- vendor/agent/mibgroup/utilities.h | 6 +- vendor/agent/mibgroup/utilities/execute.c | 20 +- vendor/agent/mibgroup/utilities/execute.h | 2 +- vendor/agent/mibgroup/utilities/iquery.c | 2 +- vendor/agent/mibgroup/utilities/iquery.h | 4 +- vendor/agent/mibgroup/utilities/override.c | 2 + vendor/agent/mibgroup/winExtDLL.c | 142 +- vendor/agent/netsnmp_close_fds.c | 11 +- vendor/agent/snmp_agent.c | 84 +- vendor/agent/snmp_perl.c | 4 + vendor/agent/snmp_vars.c | 49 +- vendor/agent/snmpd.c | 137 +- vendor/apps/Makefile.depend | 191 +- vendor/apps/Makefile.in | 10 +- vendor/apps/encode_keychange.c | 24 +- vendor/apps/snmpbulkget.c | 19 +- vendor/apps/snmpbulkwalk.c | 19 +- vendor/apps/snmpdelta.c | 99 +- vendor/apps/snmpdf.c | 19 +- vendor/apps/snmpget.c | 23 +- vendor/apps/snmpgetnext.c | 19 +- vendor/apps/snmpnetstat/Makefile.depend | 61 +- vendor/apps/snmpnetstat/ffs.c | 48 +- vendor/apps/snmpnetstat/ffs.h | 2 +- vendor/apps/snmpnetstat/if.c | 911 +- vendor/apps/snmpnetstat/inet.c | 523 +- vendor/apps/snmpnetstat/inet6.c | 393 +- vendor/apps/snmpnetstat/inetx.c | 676 +- vendor/apps/snmpnetstat/main.c | 434 +- vendor/apps/snmpnetstat/main.h | 11 +- vendor/apps/snmpnetstat/netstat.h | 123 +- vendor/apps/snmpnetstat/route.c | 644 +- vendor/apps/snmpnetstat/routex.c | 520 +- vendor/apps/snmpnetstat/winstub.c | 32 +- vendor/apps/snmpnetstat/winstub.h | 12 +- vendor/apps/snmppcap.c | 74 +- vendor/apps/snmpping.c | 12 +- vendor/apps/snmpps.c | 41 +- vendor/apps/snmpset.c | 20 +- vendor/apps/snmpstatus.c | 20 +- vendor/apps/snmptable.c | 40 +- vendor/apps/snmptest.c | 29 +- vendor/apps/snmptls.c | 3 +- vendor/apps/snmptranslate.c | 13 +- vendor/apps/snmptrap.c | 25 +- vendor/apps/snmptrapd.c | 140 +- vendor/apps/snmptrapd_auth.c | 6 +- vendor/apps/snmptrapd_handlers.c | 38 +- vendor/apps/snmptrapd_log.c | 247 +- vendor/apps/snmptrapd_sql.c | 69 +- vendor/apps/snmpusm.c | 71 +- vendor/apps/snmpvacm.c | 19 +- vendor/apps/snmpwalk.c | 19 +- vendor/apps/sshtosnmp.c | 90 +- vendor/ci/before.sh | 38 - vendor/ci/build.bat | 12 +- vendor/ci/build.sh | 49 +- vendor/ci/install.sh | 93 + vendor/ci/net-snmp-configure | 311 +- vendor/ci/net-snmp-run-perl-tests | 3 +- vendor/ci/net-snmp-run-python-tests | 6 +- vendor/ci/net-snmp-run-tests | 43 +- vendor/ci/openssl.bat | 2 +- vendor/ci/perl.bat | 4 +- vendor/ci/test.sh | 34 + vendor/ci/wolfssl.sh | 20 + vendor/config.guess | 1295 +- vendor/config.sub | 2593 +- vendor/configure | 27533 ++++++++++------ vendor/configure.ac | 6 +- vendor/configure.d/config_modules_agent | 30 +- vendor/configure.d/config_modules_lib | 8 +- vendor/configure.d/config_modules_transports | 7 +- vendor/configure.d/config_net_snmp_config_h | 62 +- vendor/configure.d/config_os_functions | 32 +- vendor/configure.d/config_os_headers | 85 +- vendor/configure.d/config_os_libs1 | 79 +- vendor/configure.d/config_os_libs2 | 350 +- vendor/configure.d/config_os_misc2 | 7 +- vendor/configure.d/config_os_misc4 | 108 +- vendor/configure.d/config_os_progs | 61 +- vendor/configure.d/config_os_struct_members | 85 +- vendor/configure.d/config_project_paths | 2 +- vendor/configure.d/config_project_perl_python | 70 +- vendor/configure.d/config_project_types | 45 +- vendor/configure.d/config_project_with_enable | 21 +- vendor/dist/autoconf-version | 2 +- vendor/dist/makerelease.xml | 12 +- vendor/dist/net-snmp.spec | 73 +- vendor/dist/snmpd.service | 2 +- vendor/dist/snmptrapd.service | 2 +- vendor/dist/svnup | 130 - vendor/doxygen.conf | 6 +- vendor/include/net-snmp/agent/agent_handler.h | 13 +- vendor/include/net-snmp/agent/agent_trap.h | 7 + vendor/include/net-snmp/agent/hardware/fsys.h | 16 +- .../include/net-snmp/agent/hardware/memory.h | 1 + vendor/include/net-snmp/agent/snmp_agent.h | 2 +- vendor/include/net-snmp/agent/snmp_vars.h | 3 - vendor/include/net-snmp/agent/table.h | 2 +- vendor/include/net-snmp/agent/watcher.h | 4 +- vendor/include/net-snmp/config_api.h | 8 +- .../include/net-snmp/data_access/interface.h | 8 +- .../include/net-snmp/data_access/ip_scalars.h | 2 + vendor/include/net-snmp/library/asn1.h | 17 + vendor/include/net-snmp/library/cert_util.h | 7 - vendor/include/net-snmp/library/container.h | 18 +- .../net-snmp/library/container_binary_array.h | 5 +- vendor/include/net-snmp/library/data_list.h | 8 +- .../include/net-snmp/library/default_store.h | 2 +- vendor/include/net-snmp/library/factory.h | 72 - vendor/include/net-snmp/library/file_utils.h | 4 +- vendor/include/net-snmp/library/int64.h | 4 +- vendor/include/net-snmp/library/libsnmp.h | 18 +- vendor/include/net-snmp/library/mib.h | 4 +- vendor/include/net-snmp/library/mt_support.h | 2 +- vendor/include/net-snmp/library/openssl_aes.h | 3 +- .../include/net-snmp/library/openssl_config.h | 12 + vendor/include/net-snmp/library/parse.h | 5 +- vendor/include/net-snmp/library/read_config.h | 5 +- vendor/include/net-snmp/library/scapi.h | 15 +- .../net-snmp/library/snmpAAL5PVCDomain.h | 2 +- .../net-snmp/library/snmpDTLSUDPDomain.h | 6 +- .../include/net-snmp/library/snmpIPXDomain.h | 2 +- .../net-snmp/library/snmpIPv4BaseDomain.h | 4 +- .../net-snmp/library/snmpIPv6BaseDomain.h | 4 +- .../include/net-snmp/library/snmpSSHDomain.h | 6 +- .../net-snmp/library/snmpSocketBaseDomain.h | 2 +- .../include/net-snmp/library/snmpTCPDomain.h | 8 +- .../net-snmp/library/snmpTCPIPv6Domain.h | 8 +- .../net-snmp/library/snmpTLSTCPDomain.h | 8 +- .../net-snmp/library/snmpUDPBaseDomain.h | 2 +- .../include/net-snmp/library/snmpUDPDomain.h | 6 +- .../net-snmp/library/snmpUDPIPv4BaseDomain.h | 8 +- .../net-snmp/library/snmpUDPIPv6Domain.h | 15 +- .../net-snmp/library/snmpUDPsharedDomain.h | 6 +- .../include/net-snmp/library/snmpUnixDomain.h | 8 +- vendor/include/net-snmp/library/snmp_alarm.h | 4 +- vendor/include/net-snmp/library/snmp_api.h | 15 +- vendor/include/net-snmp/library/snmp_debug.h | 2 - vendor/include/net-snmp/library/snmp_enum.h | 2 - .../include/net-snmp/library/snmp_logging.h | 14 +- .../net-snmp/library/snmp_parse_args.h | 4 +- .../include/net-snmp/library/snmp_transport.h | 8 +- vendor/include/net-snmp/library/snmpusm.h | 2 + vendor/include/net-snmp/library/system.h | 2 +- vendor/include/net-snmp/library/tools.h | 11 +- vendor/include/net-snmp/mib_api.h | 12 - vendor/include/net-snmp/net-snmp-config.h.in | 776 +- vendor/include/net-snmp/net-snmp-features.h | 10 +- vendor/include/net-snmp/net-snmp-includes.h | 2 +- vendor/include/net-snmp/output_api.h | 2 - vendor/include/net-snmp/system/dragonfly.h | 1 + vendor/include/net-snmp/system/dynix.h | 2 +- vendor/include/net-snmp/system/freebsd15.h | 3 + vendor/include/net-snmp/system/freebsd16.h | 3 + vendor/include/net-snmp/system/netbsd.h | 3 + vendor/include/net-snmp/system/openbsd.h | 1 + vendor/include/net-snmp/system/openbsd7.h | 3 + vendor/include/net-snmp/system/openbsd8.h | 3 + vendor/include/net-snmp/types.h | 10 +- vendor/include/net-snmp/utilities.h | 2 +- vendor/install-sh | 435 +- vendor/local/Makefile.in | 4 +- vendor/local/gittools/shell-functions | 2 +- .../mfd-access-container-cached-defines.m2i | 8 +- .../mfd-access-unsorted-external-defines.m2i | 8 +- .../mib2c-conf.d/mfd-interactive-setup.m2c | 4 +- vendor/local/mib2c-conf.d/mfd-interface.m2c | 4 +- vendor/local/mib2c-conf.d/mfd-persistence.m2i | 13 +- vendor/local/mib2c-conf.d/mfd-top.m2c | 10 +- vendor/local/mib2c-conf.d/parent-set.m2i | 4 +- vendor/local/mib2c-update | 112 +- vendor/local/mib2c.check_values.conf | 2 +- vendor/local/mib2c.container.conf | 8 +- vendor/local/mib2c.iterate_access.conf | 4 +- vendor/local/mib2c.table_data.conf | 10 +- vendor/local/net-snmp-cert | 4 +- vendor/local/snmp-bridge-mib | 2 +- vendor/man/agentxtrap.1.def | 4 +- vendor/man/encode_keychange.1.def | 2 +- vendor/man/mib2c-update.1.def | 4 +- vendor/man/mib2c.1.def | 8 +- vendor/man/mib2c.conf.5.in | 2 +- vendor/man/net-snmp-create-v3-user.1.def | 17 +- vendor/man/netsnmp_agent_api.3.def | 10 +- vendor/man/netsnmp_config_api.3.def | 16 +- vendor/man/netsnmp_mib_api.3.def | 12 +- vendor/man/snmpd.8.def | 8 +- vendor/man/snmpd.conf.5.def | 98 +- vendor/man/snmpd.examples.5.def | 6 +- vendor/man/snmptrap.1.def | 31 +- .../mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt | 27 +- vendor/mibs/IANAifType-MIB.txt | 78 +- vendor/mibs/LM-SENSORS-MIB.txt | 23 +- vendor/mibs/Makefile.mib | 11 +- vendor/mibs/SNMP-SSH-TM-MIB.txt | 329 + vendor/mibs/SNMP-TLS-TM-MIB.txt | 1115 +- vendor/mibs/UCD-SNMP-MIB.txt | 23 +- vendor/mibs/rfclist | 12 +- vendor/net-snmp-config.in | 2 +- vendor/net-snmp-create-v3-user.in | 46 +- vendor/perl/ASN/ASN.pm | 2 +- vendor/perl/ASN/ASN.xs | 4 + vendor/perl/AnyData_SNMP/Storage.pm | 2 +- vendor/perl/MakefileSubs.pm | 10 + vendor/perl/OID/OID.pm | 2 +- vendor/perl/OID/OID.xs | 21 +- vendor/perl/SNMP/Makefile.PL | 12 +- vendor/perl/SNMP/SNMP.pm | 2 +- vendor/perl/SNMP/SNMP.xs | 120 +- vendor/perl/TrapReceiver/TrapReceiver.pm | 10 +- vendor/perl/TrapReceiver/TrapReceiver.xs | 4 + vendor/perl/agent/Support/Support.pm | 2 +- vendor/perl/agent/agent.pm | 4 +- vendor/perl/agent/agent.xs | 84 +- .../perl/agent/default_store/default_store.pm | 2 +- .../perl/agent/default_store/default_store.xs | 4 + vendor/perl/default_store/default_store.pm | 2 +- vendor/perl/default_store/default_store.xs | 4 + vendor/perl/manager/INSTALL | 4 +- vendor/python/netsnmp/client_intf.c | 567 +- vendor/python/netsnmp/tests/test.py | 132 + vendor/python/setup.py | 11 +- vendor/sedscript.in | 2 +- vendor/snmplib/Makefile.depend | 434 +- vendor/snmplib/Makefile.in | 5 +- vendor/snmplib/asn1.c | 27 +- vendor/snmplib/callback.c | 17 +- vendor/snmplib/cert_util.c | 142 +- vendor/snmplib/container.c | 82 +- vendor/snmplib/container_binary_array.c | 180 +- vendor/snmplib/container_iterator.c | 46 +- vendor/snmplib/container_list_ssll.c | 149 +- vendor/snmplib/container_null.c | 10 +- vendor/snmplib/default_store.c | 40 +- vendor/snmplib/dir_utils.c | 18 +- vendor/snmplib/factory.h | 26 + vendor/snmplib/file_utils.c | 16 +- vendor/snmplib/gettimeofday.c | 4 +- vendor/snmplib/inet_ntop.c | 6 +- vendor/snmplib/inet_pton.c | 6 +- vendor/snmplib/int64.c | 8 +- vendor/snmplib/keytools.c | 21 +- vendor/snmplib/large_fd_set.c | 25 +- vendor/snmplib/lcd_time.c | 8 +- vendor/snmplib/md5.c | 4 +- vendor/snmplib/mib.c | 279 +- vendor/snmplib/mt_support.c | 8 +- vendor/snmplib/openssl/openssl_aes_cfb.c | 18 +- vendor/snmplib/openssl/openssl_aes_core.c | 5 +- vendor/snmplib/parse.c | 535 +- vendor/snmplib/read_config.c | 137 +- vendor/snmplib/scapi.c | 65 +- vendor/snmplib/sd-daemon.c | 9 +- vendor/snmplib/snmp-tc.c | 18 +- vendor/snmplib/snmp.c | 4 +- vendor/snmplib/snmp_alarm.c | 12 +- vendor/snmplib/snmp_api.c | 231 +- vendor/snmplib/snmp_auth.c | 16 +- vendor/snmplib/snmp_client.c | 41 +- vendor/snmplib/snmp_debug.c | 32 +- vendor/snmplib/snmp_enum.c | 146 +- vendor/snmplib/snmp_logging.c | 41 +- vendor/snmplib/snmp_openssl.c | 151 +- vendor/snmplib/snmp_parse_args.c | 38 +- vendor/snmplib/snmp_secmod.c | 6 +- vendor/snmplib/snmp_service.c | 3 + vendor/snmplib/snmp_transport.c | 64 +- vendor/snmplib/snmpksm.c | 14 +- vendor/snmplib/snmpusm.c | 271 +- vendor/snmplib/snmpv3.c | 88 +- vendor/snmplib/snprintf.c | 2 +- vendor/snmplib/strlcat.c | 2 +- vendor/snmplib/strlcpy.c | 2 +- vendor/snmplib/strtol.c | 4 +- vendor/snmplib/strtoul.c | 4 +- vendor/snmplib/system.c | 125 +- vendor/snmplib/text_utils.c | 10 +- vendor/snmplib/tools.c | 31 +- vendor/snmplib/transports/snmpAAL5PVCDomain.c | 8 +- vendor/snmplib/transports/snmpAliasDomain.c | 6 +- .../snmplib/transports/snmpCallbackDomain.c | 19 +- vendor/snmplib/transports/snmpDTLSUDPDomain.c | 26 +- vendor/snmplib/transports/snmpIPBaseDomain.c | 85 +- .../transports}/snmpIPBaseDomain.h | 8 +- vendor/snmplib/transports/snmpIPXDomain.c | 10 +- .../snmplib/transports/snmpIPv4BaseDomain.c | 31 +- .../snmplib/transports/snmpIPv6BaseDomain.c | 30 +- vendor/snmplib/transports/snmpSSHDomain.c | 85 +- vendor/snmplib/transports/snmpSTDDomain.c | 11 +- .../snmplib/transports/snmpSocketBaseDomain.c | 10 +- vendor/snmplib/transports/snmpTCPBaseDomain.c | 14 +- vendor/snmplib/transports/snmpTCPDomain.c | 25 +- vendor/snmplib/transports/snmpTCPIPv6Domain.c | 19 +- vendor/snmplib/transports/snmpTLSBaseDomain.c | 190 +- vendor/snmplib/transports/snmpTLSTCPDomain.c | 22 +- vendor/snmplib/transports/snmpUDPBaseDomain.c | 21 +- vendor/snmplib/transports/snmpUDPDomain.c | 28 +- .../transports/snmpUDPIPv4BaseDomain.c | 23 +- vendor/snmplib/transports/snmpUDPIPv6Domain.c | 367 +- .../snmplib/transports/snmpUDPsharedDomain.c | 16 +- vendor/snmplib/transports/snmpUnixDomain.c | 10 +- vendor/snmplib/vacm.c | 12 +- vendor/testing/RUNFULLTESTS | 6 +- .../default/T0142snmpv2csetnull_simple | 31 + .../default/T0222snmpv3bulkget_simple | 4 +- .../default/T032snmpv3engineidchange_simple | 74 + .../default/T055agentv1mintrap_simple | 2 - .../default/T056agentv2cmintrap_simple | 2 - .../fulltests/default/T113agentxtrap_simple | 4 +- .../default/T114agentxagentxtrap_simple | 4 +- .../default/T181trap2sinkclientaddr6_simple | 1 + .../default/T183trapsessclientaddr6_simple | 1 + .../default/T185trapsesssource6_simple | 1 + .../default/T200snmpv2cwalkall_simple | 2 - .../fulltests/snmpv3/T010scapitest_capp.c | 8 +- .../fulltests/snmpv3/T020hashtests_capp.c | 4 +- .../fulltests/snmpv3/T040keymanagetest_capp.c | 4 +- .../fulltests/snmpv3/T050etimetest_capp.c | 7 +- vendor/testing/fulltests/support/clib_build | 2 +- vendor/testing/fulltests/support/myip | 6 +- .../fulltests/support/simple_TESTCONF.sh | 14 +- .../fulltests/support/simple_eval_tools.sh | 15 +- vendor/testing/fulltests/support/simple_run | 2 +- vendor/testing/fulltests/tls/T300TlsPerl.t | 9 +- .../unit-tests/T001defaultstore_clib.c | 4 +- .../unit-tests/T002containers_clib.c | 2 +- .../fulltests/unit-tests/T004snmp_enum_clib.c | 31 +- .../T011snmp_old_api_registration_cagentlib.c | 1 + .../unit-tests/T012binary_array_oid_clib.c | 13 +- .../unit-tests/T013binary_array_string_clib.c | 2 +- .../unit-tests/T014gethostbyaddr_clib.c | 6 +- .../unit-tests/T016read_config_clib.c | 2 +- .../unit-tests/T018read_config_capp.c | 2 +- .../T021netsnmp_sprint_integer_clib.c | 53 + .../T021netsnmp_sprint_realloc_no_type_clib.c | 2 +- .../T022netsnmp_parse_ep_str_clib.c | 6 +- .../unit-tests/T026read_config_clib.c | 21 + .../fulltests/unit-tests/T027read_mib_clib.c | 43 + ...030snmp_handler_unregistration_cagentlib.c | 30 + .../fulltests/unit-tests/T102pdu_build_clib.c | 11 +- .../unit-tests/T104agentx_parse_cagentlib.c | 2 + .../unit-tests/T105trap_parse_clib.c | 44 + vendor/win32/Configure | 2 + vendor/win32/build.pl | 59 +- vendor/win32/mib_module_includes.h | 4 +- .../win32/net-snmp/agent/mib_module_config.h | 2 +- vendor/win32/net-snmp/net-snmp-config.h | 74 +- vendor/win32/net-snmp/net-snmp-config.h.in | 74 +- 939 files changed, 45064 insertions(+), 27787 deletions(-) create mode 100644 vendor/.gitattributes create mode 100644 vendor/.github/workflows/buildtest.yml create mode 100644 vendor/.github/workflows/codechecker.yml delete mode 100644 vendor/.travis.yml delete mode 100644 vendor/agent/mibgroup/ucd-snmp/disk.c delete mode 100644 vendor/agent/mibgroup/ucd-snmp/disk.h delete mode 100644 vendor/ci/before.sh create mode 100644 vendor/ci/install.sh create mode 100644 vendor/ci/test.sh create mode 100644 vendor/ci/wolfssl.sh delete mode 100644 vendor/dist/svnup delete mode 100644 vendor/include/net-snmp/library/factory.h create mode 100644 vendor/include/net-snmp/library/openssl_config.h create mode 100644 vendor/include/net-snmp/system/freebsd15.h create mode 100644 vendor/include/net-snmp/system/freebsd16.h create mode 100644 vendor/include/net-snmp/system/openbsd7.h create mode 100644 vendor/include/net-snmp/system/openbsd8.h create mode 100644 vendor/mibs/SNMP-SSH-TM-MIB.txt create mode 100644 vendor/snmplib/factory.h rename vendor/{include/net-snmp/library => snmplib/transports}/snmpIPBaseDomain.h (83%) create mode 100644 vendor/testing/fulltests/default/T0142snmpv2csetnull_simple create mode 100644 vendor/testing/fulltests/default/T032snmpv3engineidchange_simple create mode 100644 vendor/testing/fulltests/unit-tests/T021netsnmp_sprint_integer_clib.c create mode 100644 vendor/testing/fulltests/unit-tests/T026read_config_clib.c create mode 100644 vendor/testing/fulltests/unit-tests/T027read_mib_clib.c create mode 100644 vendor/testing/fulltests/unit-tests/T030snmp_handler_unregistration_cagentlib.c create mode 100644 vendor/testing/fulltests/unit-tests/T105trap_parse_clib.c diff --git a/vendor/.appveyor.yml b/vendor/.appveyor.yml index da83d79..50638ac 100644 --- a/vendor/.appveyor.yml +++ b/vendor/.appveyor.yml @@ -1,5 +1,9 @@ image: - - Visual Studio 2019 + - Ubuntu + - Ubuntu1604 + - Ubuntu2004 + - macos-monterey + - Visual Studio 2022 environment: CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/ @@ -7,11 +11,51 @@ environment: - BUILD: MSVCDYNAMIC64 - BUILD: MSVCSTATIC64 - BUILD: INSTALLER - - BUILD: MinGW32 - BUILD: MSYS2 - BUILD: MinGW64 - - BUILD: Cygwin32 - - BUILD: Cygwin64 + +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 @@ -19,10 +63,13 @@ artifacts: clone_depth: 5 install: - - 'call "ci\openssl.bat"' + - cmd: 'ci\openssl.bat' + - sh: 'sudo ci/install.sh' build_script: - - 'call "ci\build.bat"' + - cmd: 'ci\build.bat' + - sh: 'ci/build.sh' test_script: - - 'call "ci\test.bat"' + - cmd: 'ci\test.bat' + - sh: 'if [ $(uname) != Darwin ]; then ci/test.sh; fi' diff --git a/vendor/.cirrus.yml b/vendor/.cirrus.yml index 980a86b..2169e6f 100644 --- a/vendor/.cirrus.yml +++ b/vendor/.cirrus.yml @@ -2,11 +2,10 @@ env: CIRRUS_CLONE_DEPTH: 5 freebsd_instance: - image: freebsd-12-0-release-amd64 - image: freebsd-11-2-release-amd64 - image: freebsd-11-1-release-amd64 - image: freebsd-10-4-release-amd64 + image_family: freebsd-14-0-snap + image_family: freebsd-13-1 + image_family: freebsd-13-0 task: - install_script: ci/before.sh + install_script: sudo ci/install.sh script: ci/build.sh diff --git a/vendor/.gitattributes b/vendor/.gitattributes new file mode 100644 index 0000000..4f06a0e --- /dev/null +++ b/vendor/.gitattributes @@ -0,0 +1,7 @@ +* eol=lf +*.bat eol=crlf +/win32/dist/README* eol=crlf +*.gif -text +*.jpg -text +*.bin -text +*.bmp -text diff --git a/vendor/.github/workflows/buildtest.yml b/vendor/.github/workflows/buildtest.yml new file mode 100644 index 0000000..612516f --- /dev/null +++ b/vendor/.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-ipv6, disable-set, mini, read-only, without-nl, wolfssl, Android] + + 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/vendor/.github/workflows/codechecker.yml b/vendor/.github/workflows/codechecker.yml new file mode 100644 index 0000000..4dbee08 --- /dev/null +++ b/vendor/.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@main + + - 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/vendor/.gitignore b/vendor/.gitignore index 470d3cb..bfc8990 100644 --- a/vendor/.gitignore +++ b/vendor/.gitignore @@ -15,6 +15,7 @@ *.swp *~ .libs/ +__pycache__ agent/*.exe agent/mibgroup/agent_module_dot_conf.h agent/mibgroup/agent_module_includes.h @@ -100,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 @@ -110,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 @@ -118,6 +123,7 @@ stamp-h TAGS testing/failed_tests testing/testing/ +testing/fuzzing/ win32/*/debug win32/*/release win32/bin diff --git a/vendor/.travis.yml b/vendor/.travis.yml deleted file mode 100644 index 2c47df6..0000000 --- a/vendor/.travis.yml +++ /dev/null @@ -1,217 +0,0 @@ -language: c - -os: - - linux - - osx - -# See also https://docs.travis-ci.com/user/reference/osx/ -osx_image: - - xcode12 - - xcode11.6 - - xcode11.5 - - xcode11.4 - - xcode11.3 - - xcode11.2 - - xcode11.1 - - xcode11 - # Apparently when building with Xcode 10, the internal crypto code is - # selected. The SNMPv3 tests fail when built with the internal crypto code - # (snmpd reports "security service 3 error parsing ScopedPDU"). - # - xcode10.3 - # - xcode10.2 - # - xcode10.1 - # - xcode10 - - xcode9.4 - - xcode9.3 - - xcode9.2 - - xcode9.1 - - xcode9 - - xcode8.3 - - xcode8 - - xcode7.3 - -env: - - MODE=regular - - MODE=disable-set - - MODE=mini - - MODE=minimalist - - MODE=read-only - -jobs: - exclude: - - osx_image: xcode11.6 - env: MODE=disable-set - - osx_image: xcode11.6 - env: MODE=mini - - osx_image: xcode11.6 - env: MODE=minimalist - - osx_image: xcode11.6 - env: MODE=read-only - - osx_image: xcode11.5 - env: MODE=disable-set - - osx_image: xcode11.5 - env: MODE=mini - - osx_image: xcode11.5 - env: MODE=minimalist - - osx_image: xcode11.5 - env: MODE=read-only - - osx_image: xcode11.4 - env: MODE=disable-set - - osx_image: xcode11.4 - env: MODE=mini - - osx_image: xcode11.4 - env: MODE=minimalist - - osx_image: xcode11.4 - env: MODE=read-only - - osx_image: xcode11.3 - env: MODE=disable-set - - osx_image: xcode11.3 - env: MODE=mini - - osx_image: xcode11.3 - env: MODE=minimalist - - osx_image: xcode11.3 - env: MODE=read-only - - osx_image: xcode11.2 - env: MODE=disable-set - - osx_image: xcode11.2 - env: MODE=mini - - osx_image: xcode11.2 - env: MODE=minimalist - - osx_image: xcode11.2 - env: MODE=read-only - - osx_image: xcode11.1 - env: MODE=disable-set - - osx_image: xcode11.1 - env: MODE=mini - - osx_image: xcode11.1 - env: MODE=minimalist - - osx_image: xcode11.1 - env: MODE=read-only - - osx_image: xcode11 - env: MODE=disable-set - - osx_image: xcode11 - env: MODE=mini - - osx_image: xcode11 - env: MODE=minimalist - - osx_image: xcode11 - env: MODE=read-only - - osx_image: xcode10.3 - env: MODE=disable-set - - osx_image: xcode10.3 - env: MODE=mini - - osx_image: xcode10.3 - env: MODE=minimalist - - osx_image: xcode10.3 - env: MODE=read-only - - osx_image: xcode10.2 - env: MODE=disable-set - - osx_image: xcode10.2 - env: MODE=mini - - osx_image: xcode10.2 - env: MODE=minimalist - - osx_image: xcode10.2 - env: MODE=read-only - - osx_image: xcode10.1 - env: MODE=disable-set - - osx_image: xcode10.1 - env: MODE=mini - - osx_image: xcode10.1 - env: MODE=minimalist - - osx_image: xcode10.1 - env: MODE=read-only - - osx_image: xcode10 - env: MODE=disable-set - - osx_image: xcode10 - env: MODE=mini - - osx_image: xcode10 - env: MODE=minimalist - - osx_image: xcode10 - env: MODE=read-only - - osx_image: xcode9.4 - env: MODE=disable-set - - osx_image: xcode9.4 - env: MODE=mini - - osx_image: xcode9.4 - env: MODE=minimalist - - osx_image: xcode9.4 - env: MODE=read-only - - osx_image: xcode9.3 - env: MODE=disable-set - - osx_image: xcode9.3 - env: MODE=mini - - osx_image: xcode9.3 - env: MODE=minimalist - - osx_image: xcode9.3 - env: MODE=read-only - - osx_image: xcode9.2 - env: MODE=disable-set - - osx_image: xcode9.2 - env: MODE=mini - - osx_image: xcode9.2 - env: MODE=minimalist - - osx_image: xcode9.2 - env: MODE=read-only - - osx_image: xcode9.1 - env: MODE=disable-set - - osx_image: xcode9.1 - env: MODE=mini - - osx_image: xcode9.1 - env: MODE=minimalist - - osx_image: xcode9.1 - env: MODE=read-only - - osx_image: xcode9 - env: MODE=disable-set - - osx_image: xcode9 - env: MODE=mini - - osx_image: xcode9 - env: MODE=minimalist - - osx_image: xcode9 - env: MODE=read-only - - osx_image: xcode8.3 - env: MODE=disable-set - - osx_image: xcode8.3 - env: MODE=mini - - osx_image: xcode8.3 - env: MODE=minimalist - - osx_image: xcode8.3 - env: MODE=read-only - - osx_image: xcode8 - env: MODE=disable-set - - osx_image: xcode8 - env: MODE=mini - - osx_image: xcode8 - env: MODE=minimalist - - osx_image: xcode8 - env: MODE=read-only - - osx_image: xcode7.3 - env: MODE=disable-set - - osx_image: xcode7.3 - env: MODE=mini - - osx_image: xcode7.3 - env: MODE=minimalist - - osx_image: xcode7.3 - env: MODE=read-only - -addons: - apt: - packages: - - dpkg - - gcc - - libatm-dev - - libperl-dev - - libsensors4-dev - - libssh2-1-dev - - libssl-dev - - make - - perl-modules - - pkg-config - - python-dev - - python-setuptools - - python3-dev - - python3-setuptools - -sudo: required - -before_script: ci/before.sh - -script: ci/build.sh diff --git a/vendor/AGENT.txt b/vendor/AGENT.txt index 37eb279..9496f8c 100644 --- a/vendor/AGENT.txt +++ b/vendor/AGENT.txt @@ -555,7 +555,7 @@ and GAUGE types among others), and set the return paramaters write_method and var_len appropriately. These settings can then be corrected for those cases when either or both of these assumptions are wrong. Examples of this can be seen in the example module. -EXAMPLEINTEGER is writeable, so this branch sets the write_method parameter, +EXAMPLEINTEGER is writable, so this branch sets the write_method parameter, and EXAMPLEOBJECTID is not an integer, so this branch sets the var_len parameter. In the case of EXAMPLESTRING, both assumptions are wrong, so this branch needs to set both these parameters explicitly. @@ -700,7 +700,7 @@ also sets default values for the other two return parameters. memcpy( (char *)name,(char *)newname, ((int)vp->namelen + 1) * sizeof(oid)); *length = vp->namelen + 1; - *write_method = 0; // Non-writeable + *write_method = 0; // Non-writable *var_len = sizeof(long); // default to integer results return(MATCH_SUCCEEDED); diff --git a/vendor/CHANGES b/vendor/CHANGES index b5f2ae1..5de2e42 100644 --- a/vendor/CHANGES +++ b/vendor/CHANGES @@ -3,6 +3,138 @@ 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.5.2* + + building: + - Fix an issue with needing limits.h included. + - update to autoconf 2.72 + +*5.9.5.1*: + +Only a version numbering fix. + +*5.9.5*: + + snmptrapd: + - fixed a critical vulnerability triggered by a specially crafted trap + + snmpd: + - Make UCD-SNMP::dskTable dynamic if includeAllDisks is set.") added + a verification that drops all filesystems not present in other_fs[] + table. So add 'ubifs' in other_fs[] to fix it. + + configure: + - Change the default OpenSSL path into /usr Change the default + OpenSSL path from /usr/local/ssl into /usr since that is the + default location for all current Linux distributions. + + unspecified: + - Remove redundant declarations These changes aim to remove redundant + declarations from the Net-SNMP source code. They are most easily + exposed with adding -Wredundant-decls to CPPFLAGS for the gcc + compiler. Redundant declarations in other used modules and mib2c + generated code are left in place. The changes consist of: - Removal + of duplicate declarations in header files, other or the same. - + Removal of duplicate declarations in source files, where the + prototype already exists in the appropriate header file. - Fixing + declaration of register log handler functions. - Use of forward + declared struct, rather than extern function or char. " prefix to + subject and ran autoreconf ] + + Add: + - Wredundant-decls to the developer options + + Remove: + - Wredundant-decls from the developer options Revert commit + ad80e335b8af because this option causes a lot of noise for the Perl + header files. + + Win32: + - WinExtDLL: Fix the build Fix the following build error: + mibgroup/winExtDLL.c:360:14: error: implicit declaration of + function 'should_init' [-Wimplicit-function-declaration] 360 | + if (!should_init(dll_basename)) { | ^~~~~~~~~~~ + +*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*: + skipped due to a last minute library versioning found bug -- use 5.9.3 instead + +*5.9.1*: + General: Many bug fixes + *5.9* snmplib: - Add IPv6 support to DTLSUDP transport diff --git a/vendor/ChangeLog b/vendor/ChangeLog index 607e434..47ae9eb 100644 --- a/vendor/ChangeLog +++ b/vendor/ChangeLog @@ -1,5 +1,8206 @@ # -*- text -*- +---------------------------------------------------------------------- + +Changes: V5.9.5.1 -> V5.9.5.2 + +commit ca81dd88ec95021ab466ef7ab877314473b7b086 +Author: Wes Hardaker +Date: Tue Dec 23 08:49:00 2025 -0800 + + autoconf 2.72 + +commit 13f217faec21afa741054ff631197490b8a38927 +Author: Wes Hardaker +Date: Tue Dec 23 08:48:54 2025 -0800 + + update autoconf version to 2.72 + +commit 0ea9eb90b2e3eb4ca43018b75ef5b780b3dd136c +Author: Wes Hardaker +Date: Tue Dec 23 07:47:30 2025 -0800 + + autoconf + +commit 4d6831c19f73470b7e271133c53316bc45d046e5 +Author: Wes Hardaker +Date: Tue Dec 23 07:45:51 2025 -0800 + + Version number update: 5.9.5.2 + +commit cd87c89a87b5900a2c32f480eb3b9dca4803403c +Author: Wes Hardaker +Date: Tue Dec 23 07:42:14 2025 -0800 + + system -> informational + +commit a25c3828dbfa50c631811427fa3af318d72a4ecb +Author: Wes Hardaker +Date: Tue Dec 23 07:37:26 2025 -0800 + + don't force firefox use + +commit adf2b5298833f6438fafb88e5318236d0dea4ce1 +Author: Wes Hardaker +Date: Tue Dec 23 07:36:25 2025 -0800 + + include limits.h for LONG_MAX + +---------------------------------------------------------------------- + +Changes: V5.9.5 -> V5.9.5.1 + +commit 83d4a87b693697fd67d39f885d4c254525645858 +Author: Wes Hardaker +Date: Tue Dec 23 06:34:37 2025 -0800 + + fix broken version mismatch from older 5.9.4 to newer 5.9.5.1 + +commit 1a45f84238207ee52bec7c8cab083da33d5e2541 +Author: Wes Hardaker +Date: Tue Dec 23 06:32:10 2025 -0800 + + Version number update: 5.9.5.1 + +commit 9940489b8653061474551c9d6acce2f80ef21704 +Author: Wes Hardaker +Date: Mon Dec 22 15:29:28 2025 -0800 + + trimming and modifying + +commit 6e9c67ef7e1cca1216a54139c2781ef736a2fbaf +Author: Wes Hardaker +Date: Mon Dec 22 15:25:36 2025 -0800 + + news for 5.9.5 + +---------------------------------------------------------------------- + +Changes: V5.9.4 -> V5.9.5 + +commit 917f17c0b363273c048b97279093b4470dac39a1 +Author: Wes Hardaker +Date: Sat Dec 20 06:37:43 2025 -0800 + + Version number update: 5.9.5 + +commit 43da3ad35ace5d28e71212dd31c18ef9b6ba4726 +Author: Andreas Hasenkopf +Date: Fri Nov 7 11:19:38 2025 +0100 + + Fix segfaults when `varbind` cannot be constructed + + For multiple reasons, `varbind` can be a null pointer, which causes segmentation faults. + + With this change, the value is checked and the segmentation fault avoided. + + Co-authored-by: kain88-de + Co-authored-by: spt29 + +commit 67d0989141ff4697a57afe16aa99afee0588ebed +Author: Kuzin Andrey +Date: Tue Nov 11 16:26:24 2025 +0300 + + Fix: Unused variable warning in cpu_linux.c + + mibgroup/hardware/cpu/cpu_linux.c: In function 'init_cpu_linux': + mibgroup/hardware/cpu/cpu_linux.c:40:22: warning: unused variable 'cp' [-Wunused-variable] + 40 | char buf[1024], *cp; + | ^~ + + Move it to local scope. + +commit 49210f5e2df6b11865b3cc5e52329b93f6df4901 +Author: Kuzin Andrey +Date: Tue Nov 11 16:23:42 2025 +0300 + + Fix: Possible unix socket path overflow with strncpy() + + Compilation warning: + + sd-daemon.c: In function 'netsnmp_sd_notify': + sd-daemon.c:316:9: warning: '__builtin_strncpy' specified bound 108 equals destination size [-Wstringop-truncation] + 316 | strncpy(sockaddr.un.sun_path, e, sizeof(sockaddr.un.sun_path)); + | ^ + +commit 8a0608a37aaacfeb22faf5097d3bf227831990ec +Author: Kuzin Andrey +Date: Tue Nov 11 16:22:56 2025 +0300 + + Fix: Add wrapers on const values to use in hosts_ctl() + + To prevent compilation warnings in snmp_agent.c and snmptrapd.c about discard 'const' qualifier: + + snmp_agent.c:1082:29: warning: passing argument 2 of 'hosts_ctl' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] + 1082 | if (hosts_ctl(name, STRING_UNKNOWN, sbuf, STRING_UNKNOWN)) { + | ^~~~~~~~~~~~~~ + In file included from snmp_agent.c:94: + /usr/include/tcpd.h:131:42: note: expected 'char *' but argument is of type 'const char *' + 131 | extern int hosts_ctl(char *daemon, char *client_name, char *client_addr, + | ~~~~~~^~~~~~~~~~~ + snmp_agent.c:1082:51: warning: passing argument 4 of 'hosts_ctl' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] + 1082 | if (hosts_ctl(name, STRING_UNKNOWN, sbuf, STRING_UNKNOWN)) { + | ^~~~~~~~~~~~~~ + /usr/include/tcpd.h:132:23: note: expected 'char *' but argument is of type 'const char *' + 132 | char *client_user); + | ~~~~~~^~~~~~~~~~~ + +commit 311171416e4da6a1561bbab6e8cbe5291ad1b7ea +Author: Anton Moryakov +Date: Tue Nov 4 21:38:52 2025 +0300 + + fix prevent buffer overflow in ASN_OCTET_STR index allocation + + In register_index(), when generating sequential string indices from + 'prev_idx_ptr', the code used a flawed algorithm that could lead to + buffer overflow by writing beyond the end of new_index->varbind->buf. + + The loop condition relied on buf[i] without proper bounds checking, + and the fallback logic for growing the string wrote to buf[i+1] + without validating available space. + + Rewrite the octet string increment logic to: + - Properly check array bounds using i >= 0 + - Use memmove to shift string left when growing + - Validate buffer capacity before extending + - Update val_len correctly + + Now returns NULL if buffer is full, preventing memor + + Signed-off-by: Anton Moryakov + +commit 201f8198c60b716c7c9dee6fe63cbbbc3838295b +Author: Bart Van Assche +Date: Sun Nov 9 06:18:18 2025 -0800 + + snmptrapd: Fix an integer overflow + + Do not add one to the trap type if doing this would cause an integer overflow. + + Fixes: https://issues.oss-fuzz.com/issues/459029273 + +commit b4e6f826d9ddcc2d72eac432746807e1234266db +Author: Bart Van Assche +Date: Sun Nov 2 14:48:55 2025 -0800 + + snmptrapd: Fix out-of-bounds trapOid[] accesses + + Fixes: https://issues.oss-fuzz.com/issues/457106694 + Fixes: https://issues.oss-fuzz.com/issues/458668421 + Fixes: https://issues.oss-fuzz.com/issues/458876071 + +commit d49392bb982954aa3d31516f04b2d9784b5f204a +Author: Anton Moryakov +Date: Tue Nov 4 14:40:09 2025 +0300 + + libsnmp: Reject invalid input in asn_realloc_rbuild_string() + + Return error if str == NULL && strlength != 0 in asn_realloc_rbuild_string + to prevent potential NULL dereference and enforce valid input. + + Signed-off-by: Anton Moryakov + [ bvanassche: modified patch description ] + +commit fc35391bb9d774d2ffa221df934a8ffdac91994b +Author: Bart Van Assche +Date: Sun Nov 2 15:17:48 2025 -0800 + + snmplib/snmpksm: Free memory when exiting + +commit 35d216b57ea2e9abf1cc42077bcf60a4bae0b29e +Author: Bart Van Assche +Date: Sat Nov 1 13:47:37 2025 -0700 + + snmptrapd: Do not write outside the bounds of trapOid[] + +commit b1f75132b1ed51743c862564065792fe20819b84 +Author: wangxiaomeng +Date: Fri Oct 31 11:18:53 2025 +0800 + + libsnmp: Need check env_var before read mib + +commit 1ef83cd90c65fae94debaed124d431d090813a1c +Author: wangxiaomeng +Date: Thu Oct 30 14:27:52 2025 +0800 + + snmp_agent.c: Fix crash caused by buf being a null pointer + +commit 8683cca83726ca0159ff9450f4673e0e0fc4d2d2 +Author: Wes Hardaker +Date: Fri Dec 19 05:56:16 2025 -0800 + + check trap variable type to ensure it's an OID + +commit e3c550b890b249c3512063ee471b8a3067ec3d24 +Author: Bart Van Assche +Date: Tue Oct 14 20:28:16 2025 -0700 + + ci, Windows: Bump the OpenSSL version number + +commit 6592b9b64950ef2d38af0d7de4cff81d571b0b18 +Author: Ryan Steinmetz +Date: Sat Sep 27 09:42:09 2025 +0200 + + Fix build for FreeBSD 15. + Patch taken from FreeBSD ports collection. + +commit c8332ca8cce7e49189981066010b9e80e215aa0e +Author: GenericRikka +Date: Thu Sep 11 02:50:40 2025 +0200 + + Added include/net-snmp/system/freebsd16.h + + (cherry picked from commit 106cac2f04fc40c7f7a0f813b4bee88693dd9402) + +commit f3a3e9fb98e428c2d974cf4b6ad7ec15bc188340 +Author: Moshe Kaplan +Date: Thu Jul 24 13:27:50 2025 -0400 + + tunnel.c: Avoid leaking tunnel->ifname + + Fixes coverity 454603 + (cherry picked from commit afd81d3965b9feb8f24e1e02c4e8e3b334693c58) + +commit 79c453845aabb99bf2278db9c95633e35a6cc6d9 +Author: Bart Van Assche +Date: Sun Jun 22 16:10:58 2025 -0700 + + Perl: add the compiler flag -Wno-old-style-definition + + (cherry picked from commit 02bee0fe32a4136ade3de137eef6c5acdfeed508) + +commit e5e1f96ded3d4f30d1ca223a80b9b0df6dc27115 +Author: Bart Van Assche +Date: Sun Jun 22 16:00:51 2025 -0700 + + snmpd, testing: Fix a few MinGW compiler warnings + + (cherry picked from commit dcabf00b29245249b717309957c0db6e232f1a0c) + +commit ad4537a2af54d85772496c3f542f60c1a8eb7e69 +Author: AntonMoryakov +Date: Tue Jun 10 13:54:26 2025 +0300 + + loadave.c: fix out-of-bounds access in loadave_parse_config + + Static analysis reported a potential buffer overflow when accessing maxload[i - 1] for i = 0. + + The issue was fixed by: + - Adding a check to ensure i > 0 before accessing maxload[i - 1] + - Using NETSNMP_DEFMAXLOADAVE as a default value for the first element (i == 0) + - Ensuring that the code does not attempt to access memory outside of the maxload array + + This change makes the code more robust and avoids undefined behavior. + + Signed-off-by: Anton Moryakov + (cherry picked from commit be3f27119346acbcc2e200bb6e33e98677a47b2d) + +commit 604ebdc0b3f841f613572dc4e9cc161b2d3d587c +Author: Bart Van Assche +Date: Thu Jun 5 09:00:45 2025 +0800 + + testing: Add a registration handler test with context name + + (cherry picked from commit 7a55b3332037302c4fd7d5378d435318704834a4) + +commit bd5539a5757f172adcb5b504ec069b8f5ad396ee +Author: Bart Van Assche +Date: Mon Jun 9 16:07:51 2025 -0700 + + snmpd: Fix a use-after-free in unregister_mib_context() + + See also https://github.com/net-snmp/net-snmp/issues/983. + + (cherry picked from commit b64bde54177ff2ed3110febcef189b5fdccb47ff) + +commit fbc1b7f94ea4fa8d1853df9ab08f4a21fa125f2b +Author: Demon +Date: Tue Jun 3 21:26:43 2025 +0800 + + win32: add build support for Windows on ARM + + (cherry picked from commit 23cfd15bf05aad242af958831b2b472e24e0ce04) + +commit 1a6aab4c913a505905ba8de1f2f4943e2f561d84 +Author: Bart Van Assche +Date: Sat Sep 13 15:29:08 2025 -0700 + + ci: Switch to the latest version of the Android SDK + +commit bcc2cccf6ecf0ebf2ec684c3854da9cfb6f8fc3b +Author: Bart Van Assche +Date: Fri Jun 20 10:59:29 2025 -0700 + + MinGW64: ci/build.sh: Switch from pkg-config to pkgconf + + pkgconf is the preferred and modern choice for MinGW64. + +commit e71597f537eeefe9c585be40262759e61cb9b4ce +Author: Bart Van Assche +Date: Mon Jun 2 15:48:35 2025 +0800 + + Revert "snmpd: Exclude certain MIBs if the Netlink library is not available" + + This reverts commit a6042e0f08e3b70cc0e3d810ba120d86758f27d8. + + On the V5-9-patches branch, fewer MIBs depend on libnl than on the master + branch. Hence this revert. + + Fixes: https://github.com/net-snmp/net-snmp/issues/980 + +commit b88a7334a1468daebff0d1d763a0a7d26e7e701d +Author: Bart Van Assche +Date: Sat May 31 12:18:48 2025 -0700 + + snmpd, Perl: Fix most compiler warnings for MODE=read-only + + This patch includes only one functional change, namely in the Perl function + snmp_set(). This patch prevents that in read-only mode snmp_set() passes an + uninitialized pointer to Safefree(). + +commit 0687955e879d916f8edd567763e088d2e7c37603 +Author: Bart Van Assche +Date: Wed May 28 08:36:12 2025 -0700 + + ci/build.sh: Dump config.log if configure fails + +commit d4af272b3f3d7119c7ffa305fc2de6e8b7333c9b +Author: Niels Baggesen +Date: Wed May 28 16:48:10 2025 +0200 + + Fix warning when compiling with --disable-ipv6 + +commit 573e3215057cfbc7bff22a13c72a0b8979434830 +Author: Bart Van Assche +Date: Sun May 25 14:52:56 2025 -0700 + + ci: Add MODE=without-nl + +commit a6042e0f08e3b70cc0e3d810ba120d86758f27d8 +Author: Bart Van Assche +Date: Fri May 23 15:08:12 2025 -0700 + + snmpd: Exclude certain MIBs if the Netlink library is not available + + On Linux a significant number of MIB implementations depends on the Netlink + library. Exclude these MIBs if the Netlink library is not available. + +commit e185504a84fff20fbc31ebbc24f8fbc15ae44eb1 +Author: Bart Van Assche +Date: Sat May 24 15:46:00 2025 -0700 + + configure: Test earlier for the Netlink library + + Prepare for making the MIB choice dependent on the presence of the Netlink + library. + +commit 29faa0ccb8d93f561af878da3e7baf0979fcf3b1 +Author: Bart Van Assche +Date: Fri May 23 14:11:45 2025 -0700 + + configure: Exit with exit code 1 if MIB module debugging is enabled + + No Makefile is generated if MIB module debugging is enabled. Hence exit with + exit code 1. + +commit 7182fb805a38910a85b0810e569ae19bf3786fbf +Author: Bart Van Assche +Date: Sun May 25 14:27:24 2025 -0700 + + ci/build.sh: Query the branch name instead of hard-coding it + +commit 628ccedea713287484dbed91fe698e313ec6d812 +Author: Bart Van Assche +Date: Sat May 17 14:45:18 2025 +0000 + + apps, snmpd: Move declarations in front of statements + + (cherry picked from commit 4473ead5cdecaa6df23a10062a701acaef61c299) + +commit 2588df7628d423558afec54296b3d419e48dfac5 +Author: Bart Van Assche +Date: Thu May 22 08:58:56 2025 -0700 + + configure: Fix the -Wdeclaration-after-statement test + +commit af34dcbe34fc5a825787a2157aed47d8e2e8bd8c +Author: Bart Van Assche +Date: Wed May 21 16:18:40 2025 -0700 + + ci: Add MODE=disable-ipv6 + +commit 0c0e19346e57287367e5baa3c60f1617c91a9819 +Author: Bart Van Assche +Date: Wed May 21 16:42:12 2025 -0700 + + testing: Skip IPv6 tests if IPv6 support is disabled + +commit a1ec55476213f92915d8186e6cb793d562e9a733 +Author: Bart Van Assche +Date: Wed May 21 16:27:18 2025 -0700 + + libsnmp: Fix --disable-ipv6 support + +commit 7536a8d6d363898e0f511aa81cf2dc000c452b89 +Author: Bart Van Assche +Date: Thu May 15 13:25:09 2025 -0700 + + configure: Enable -Wdeclaration-after-statement + +commit d9aad5695ed8964c142867a6d7888c9dd90c7361 +Author: Bart Van Assche +Date: Thu May 15 15:03:04 2025 -0700 + + libsnmp, perl, apps: Fix -Wdeclaration-after-statement warnings + +commit 5e2e029b262a3cba48ae801c259b85c5c749b013 +Author: Bart Van Assche +Date: Thu May 15 08:47:53 2025 -0700 + + ci/build.sh: Only build fuzz-tests on the master branch + +commit d896cdd5d554ba06e09ae5a8777b917be9fd113e +Author: Bart Van Assche +Date: Thu May 15 08:38:30 2025 -0700 + + ci/net-snmp-configure: Add missing package names + +commit 414394bddea52eafcae65e7bd7b0563c295b614d +Author: Bart Van Assche +Date: Sat Mar 8 13:48:16 2025 -0800 + + ci/build.sh: Fix the CI build + + Only build the fuzz tests in regular mode. Fix the name of the Makefile target. + + Fixes: 8c9ec0108c24 ("move fuzz-test target to just inside testing") + +commit c0cb4ef50ef2eff6006de47218f1d0db345e808e +Author: Niels Baggesen +Date: Thu May 15 16:09:54 2025 +0200 + + testing: Fix OpenBSD warnings about strcpy(), sprintf() when running tests + + [ bvanassche: modified patch description / added parentheses around sizeof arguments ] + +commit ed24f12728587737f5f8c08da1f171901cf9709b +Author: Niels Baggesen +Date: Thu May 15 16:07:39 2025 +0200 + + libsnmp: Use libssh2_session_handshake() when available + + libssh2 v1.2.8 deprecated libssh2_session_startup, + use libssh2_session_handshake when available. + + [ bvanassche: modified patch description ] + +commit 741eb2dcfecf560a39454c7b93d56dff9a89a7c4 +Author: Bart Van Assche +Date: Thu Apr 3 19:57:37 2025 -0700 + + libsnmp: Do not truncate AGENT-CAPABILITIES descriptions + + Fixes: https://github.com/net-snmp/net-snmp/issues/957 + (cherry picked from commit 36e0bdd1a0e6c9073c2da6c837ecfc38c4854586) + +commit c6ad7dffd7d81e5d603722a5053a3aed51cf5512 +Author: Bart Van Assche +Date: Tue Apr 1 09:48:26 2025 -0700 + + Perl: Revert "fix resource leaks in the SNMP::Session destructor and SNMP::NODE::FETCH" + + Revert commit 581698a162b47b08f8571c7e1b8991df0764e5d3 because it introduced + the following crash: + + __snmp_xs_cb (SNMP.so + 0xab9c) + snmp_sess_close (libnetsnmp.so.40 + 0x39419) + XS_SnmpSessionPtr_DESTROY (SNMP.so + 0x16dc0) + Perl_pp_entersub (libperl.so.5.32 + 0x108437) + Perl_call_sv (libperl.so.5.32 + 0x7b18a) + S_curse.lto_priv.0 (libperl.so.5.32 + 0x110920) + Perl_sv_clear (libperl.so.5.32 + 0x111068) + Perl_sv_free2 (libperl.so.5.32 + 0x10ff52) + Perl_free_tmps (libperl.so.5.32 + 0x13a66f) + XS_SNMP__main_loop (SNMP.so + 0x17e97) + Perl_pp_entersub (libperl.so.5.32 + 0x108437) + Perl_runops_standard (libperl.so.5.32 + 0x1001a0) + perl_run (libperl.so.5.32 + 0x7e90c) + main (perl + 0x134a) + __libc_start_call_main (libc.so.6 + 0x295d0) + __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x29680) + _start (perl + 0x1385) + + Fixes: https://github.com/net-snmp/net-snmp/issues/955 + (cherry picked from commit 823b8d2eca1916ae80295959d2704b546d6a0006) + +commit 656e39a2fe7125bf8c37a24e78427d5a373a8f7d +Author: Klaus Holst Jacobsen +Date: Fri Mar 28 10:01:07 2025 +0100 + + Better testing for syslog.h presence + + (cherry picked from commit 695ac0e1f8964e441d17282d9c475cc548f56f5d) + +commit 9870561812c4f15e7ca63ea1b5e5db7d25b66708 +Author: Bart Van Assche +Date: Mon Mar 31 09:58:35 2025 -0700 + + Perl: Suppress a warning message + + Suppress the following warning message: + + Attempt to call undefined import method with arguments ("AF_INET6" ...) + via package "Socket6" (Perhaps you forgot to load the package?) at (eval 5) + line 1. + + Fixes: https://github.com/net-snmp/net-snmp/issues/954 + +commit 19f0bb03152c2449b59663376958496edffe1531 +Author: Niels Baggesen +Date: Mon Mar 17 16:36:04 2025 +0100 + + Add error checking to schedConf.c. + + This fixes issue #864 (Out-of-bounds access in _sched_convert_bits + function due to invalid cron_spec input) + +commit 49ee547aad51dc716aca6b2390f8fe430a0a7723 +Author: Bart Van Assche +Date: Sat Mar 8 13:49:16 2025 -0800 + + libsnmp: Fix a memory leak in an error path of parse_enumlist() + + Fixes: https://issues.oss-fuzz.com/issues/401658592 + (cherry picked from commit 4618b65571b44591418d2080b2b4aa6ba43e2291) + +commit 48aaf0905d7fcafbc6ccc7f227958e08260e2ce3 +Author: Anton Moryakov +Date: Tue Feb 4 00:04:16 2025 +0300 + + agent: mibgroup: mibII: fix prevent use-after-free in write_vacmAccessStatus + + (cherry picked from commit 96faf0eb33e647916b6c3817ddda6dd02c7c4f25) + +commit 595f9af35731461c276b716d21414fad50370056 +Author: Maxim Korotkov +Date: Wed Mar 5 12:36:15 2025 +0300 + + snmplib: add deallocation of container name + The function netsnmp_binary_array_release() does not deallocate dynamic char array. + + (cherry picked from commit dc2842c37a2ffbd26433c55c0de103251564944b) + +commit b2802e60ee381a774ff85ea59000f432b9621353 +Author: Stuart Henderson +Date: Sat Mar 8 13:10:11 2025 +0000 + + support openbsd8 + + (cherry picked from commit 7ffa1ced101b45fd2d45ea7ffb6a6353b9ab5186) + +commit 98c1925cb1221f25c5fc53960fa122c5ed314239 +Author: Bart Van Assche +Date: Wed Mar 5 19:33:33 2025 -0800 + + Perl: Disable -Wmaybe-uninitialized for .xs files + + (cherry picked from commit d5254345f45f0c15e961e37b5f6a8194b004183d) + +commit 9ae0e684c050c06fe0426bf821677a11d234dd05 +Author: Bart Van Assche +Date: Tue Mar 4 06:18:57 2025 -0800 + + libsnmp: Fix a memory leak in the MIB parser + + Fixes: https://issues.oss-fuzz.com/issues/383154227 + (cherry picked from commit 2ee581b2ece557069e0f5a2e5cd65e3e6bf415c1) + +commit 0532cb5af7f2460fd14d697ccd3ddf987aaa63ab +Author: Bart Van Assche +Date: Mon Mar 3 12:18:50 2025 -0800 + + testing/fulltests/unit-tests/T004snmp_enum_clib: Add more checks + + (cherry picked from commit 2e98a911a994e7ce18c9a0f0051549a9dbd64842) + +commit 237a8377c8ee8af3e59b3cef96cfeb68f08dba4f +Author: Bart Van Assche +Date: Mon Mar 3 12:18:34 2025 -0800 + + libsnmp: Make clear_snmp_enum() free all lists + + Fixes: 2da22610f90b ("libsnmp: Make init_snmp_enum() faster") + (cherry picked from commit 1d0895eaf1b919ea63da2e6d51e9fd138b38b8dc) + +commit 22c70efcc08f0da2525bc5d8f922ff99dfa4777b +Author: Bart Van Assche +Date: Mon Mar 3 09:42:50 2025 -0800 + + libsnmp: Rework se_add_pair_to_slist() + + Call se_add_pair_to_list() after having inserted 'sptr' into 'sliststorage' + instead of before. + + (cherry picked from commit 080bcc445b67cd9dfc5c9f579182529aedbdf968) + +commit 31546ccaad857e28dcc7f214f363a2a3efaba145 +Author: Bart Van Assche +Date: Mon Mar 3 09:24:02 2025 -0800 + + libsnmp: Fix a memory leak in se_add_pair_to_list() + + Fixes: https://issues.oss-fuzz.com/issues/398401924 + (cherry picked from commit 2ed9186eb0473c6d4b72503d764f7b13ab1573ff) + +commit 8a5d51e627173dfde092f2a32aca6fe2ebf602f6 +Author: Bart Van Assche +Date: Sun Mar 2 15:36:04 2025 -0800 + + libsnmp: Fix a NULL pointer dereference in snmp_config_when() + + (cherry picked from commit 87bd1ec3620c37ff4e7602c13966d65371378244) + +commit 9f6de1c98e04ddb4f254fc25f3cd7779d001a274 +Author: Bart Van Assche +Date: Sun Mar 2 15:23:07 2025 -0800 + + libsnmp: Fix a buffer overflow + + Fixes: https://issues.oss-fuzz.com/issues/399458050 + (cherry picked from commit 4082593d733e2e03aaac74c62801f76449402651) + +commit 69b6025ab60ea67e0cfc7f37938d343149dedd63 +Author: Bart Van Assche +Date: Sun Mar 2 15:12:24 2025 -0800 + + libsnmp: Use netsnmp_memdup() instead of open-coding it + + (cherry picked from commit e49ee4990168e9aa02a2aeb02857385f868ff948) + +commit b7d5bbbb84239f0c22b5c227344b0a6a535cfd69 +Author: Bart Van Assche +Date: Tue Feb 25 13:04:11 2025 -0800 + + libsnmp: Make init_snmp_enum() faster + + Call calloc() once instead of 5 * 32 + 1 = 161 times. + + (cherry picked from commit 2da22610f90b8a64c930af02d88f07f3a596905f) + +commit 781e1bc319d23c61a00e62297b8926a866aaa6fd +Author: Bart Van Assche +Date: Tue Feb 25 09:20:34 2025 -0800 + + libsnmp: Fix a buffer overflow in setup_engineID() + + The following code triggers a buffer overflow if an oldEngineID has been + specified that is shorter than 4 bytes: + + if (localEngineIDType == ENGINEID_TYPE_NETSNMP_RND) + memcpy(bufp, &netsnmpoid, sizeof(netsnmpoid)); /* XXX Must be 4 bytes! */ + else + memcpy(bufp, &enterpriseid, sizeof(enterpriseid)); /* XXX Must be 4 bytes! */ + + Fix this by rejecting oldEngineID's shorter than four bytes. + + (cherry picked from commit 0b49a5de9ad4c3875e42ea223ff61de7d3e26963) + +commit 2985da1608f6731906944c4018fefe73b91997b7 +Author: Bart Van Assche +Date: Mon Feb 24 12:12:08 2025 -0800 + + libsnmp: Fix a heap buffer overflow in se_find_list() + + Fixes: https://issues.oss-fuzz.com/issues/398356443 + Fixes: d7e6be1d59f7 ("generic snmp enum list support") + (cherry picked from commit a147b834d49e656f6216701b8769b4b6261e72d5) + +commit 0b37269ca32393aeb314b2b726a345960701b464 +Author: Bart Van Assche +Date: Mon Feb 24 12:11:22 2025 -0800 + + libsnmp: Declare local variables 'static' + + (cherry picked from commit 8305b51e4d80158052b9cc279b798c227d81b9af) + +commit d845bdd100f454caf0bfd8ef28cf421d8fb26c16 +Author: Bart Van Assche +Date: Mon Feb 24 11:03:13 2025 -0800 + + libsnmp: Simplify se_add_pair() + + Introduce se_find_list_ptr(). Simplify se_add_pair(). Remove se_store_in_list() + because this patch removes the last user of that function. No functionality has + been changed. + + (cherry picked from commit 5f79b7f37febd7fafbddcc0f2aff3e81a3a439a2) + +commit 6a955cac13afa9ed9cdc778c7961756108259490 +Author: Bart Van Assche +Date: Sun Feb 23 10:10:15 2025 -0800 + + libsnmp: Simplify se_add_pair_to_list() + + Move the memory allocation code in front of an if-statement instead of + duplicating it in each branch of that if-statement. + + (cherry picked from commit f23617df54f4d09d346bbc3452528abe3cc7947e) + +commit 61325b5cae0e5b2243fc078c6da71924dad0fa11 +Author: Bart Van Assche +Date: Sun Feb 23 10:01:12 2025 -0800 + + libsnmp: Make 'optind' handling more robust + + Fixes: https://issues.oss-fuzz.com/issues/398067543 + (cherry picked from commit 2b3e0837830e14c7747ac1e175017c733d9d62b3) + +commit 90d06e589b77c3875595716700d69f6b6c4136f1 +Author: Bart Van Assche +Date: Fri Feb 21 15:04:30 2025 -0800 + + libsnmp: Fix another stack buffer overflow in se_read_conf() + + Additionally, make some recently modified code easier to read. + + Fixes: https://oss-fuzz.com/issue/6271135411142656 + (cherry picked from commit b4d94476f02769a92be7d2122bc8926f39aa6980) + +commit 6af1dd2e6ab3820d949e24bc640bdcd75a05e48f +Author: Bart Van Assche +Date: Tue Feb 18 06:31:10 2025 -0800 + + libsnmp: Fix the code for resetting getopt() + + Although the getopt() man page mentions that 'optind' should be set to + 1 to reset getopt(), the glibc implementation only resets the getopt() + state if 'optind' is set to zero. + + Fixes: https://issues.oss-fuzz.com/issues/396777457 + (cherry picked from commit cbedf0cba170b967ab312ebc794eabdd6f67c6d5) + +commit d1372b63fdf0d7fceb67c9527cf31d1219f84da0 +Author: Bart Van Assche +Date: Sun Feb 16 13:31:48 2025 -0800 + + Perl: SNMP: Suppress a compiler warning + + Suppress the following Clang compiler warning: + + SNMP.xs: In function ‘__snprint_value.isra’: + SNMP.xs:449:21: warning: argument 1 is null but the corresponding size argument 3 value is [4095, 4096] [-Wnonnull] + 449 | strlcpy(buf, ep->label, buf_len); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + In file included from /usr/lib/x86_64-linux-gnu/perl/5.38/CORE/perl.h:1715, + from SNMP.xs:12: + /usr/include/string.h:506:15: note: in a call to function ‘strlcpy’ declared with attribute ‘access (write_only, 1, 3)’ + 506 | extern size_t strlcpy (char *__restrict __dest, + | ^~~~~~~ + + (cherry picked from commit 562a8bba9ebbc8621b8c299db6264c2d5685a721) + +commit c1ae498b04cdc43ebb6e5348dcf51fe061c1dec4 +Author: Bart Van Assche +Date: Sun Feb 16 08:45:02 2025 -0800 + + libsnmp: Fix a stack buffer overflow in se_read_conf() + + Fixes: https://issues.oss-fuzz.com/issues/396958482 + (cherry picked from commit 2342de96b4968969e2f01f3970905963053b0504) + +commit 858157c225f8db6e41683a154b30f557a1501e5c +Author: Bart Van Assche +Date: Sun Feb 16 07:56:17 2025 -0800 + + libsnmp: Fix a NULL pointer dereference in netsnmp_ds_handle_config() + + This has been detected by fuzzing netsnmp_parse_args(). + + (cherry picked from commit 0a08ddf75e2234ea93aed1b2bccd9e387444e69b) + +commit e2712fe7e0d3dabb340c3770c27f233361fae6a1 +Author: Bart Van Assche +Date: Sun Feb 16 07:51:11 2025 -0800 + + libsnmp: Fix missing argument handling in netsnmp_parse_args() + + This may fix https://oss-fuzz.com/issue/4664325096931328 (not sure). + + (cherry picked from commit 578b1f50062677d6db1dc0e134226457b627ea11) + +commit 44c2edb218c303d0fc5f8e83483887246dfac749 +Author: Bart Van Assche +Date: Sat Feb 15 19:02:12 2025 -0800 + + libsnmp: Fix an out-of-bounds access in netsnmp_hex_to_binary() + + isxdigit() accepts arguments in the range -1..255. Make sure that the value + passed to isxdigit() is in that range. This has been found by reading the + source code. + + (cherry picked from commit ed6247a54085c13b1c327e46afe73d248e6afef0) + +commit 007b9c7e8a77c0b8b7e761895517923b00923304 +Author: Bart Van Assche +Date: Fri Feb 14 08:01:36 2025 -0800 + + libsnmp: Fix a memory leak in netsnmp_transport_filter_add() + + Fixes: https://issues.oss-fuzz.com/issues/396459485 + (cherry picked from commit db989be9abc201d60691a0926e5a76f66f843fc3) + +commit 5c27b38d84cd480a0dc1dc09e93ce78e4663b99c +Author: Bart Van Assche +Date: Wed Feb 12 15:49:24 2025 -0800 + + libsnmp: Fix a NULL pointer dereference in netsnmp_ds_parse_boolean() + + Fixes: https://issues.oss-fuzz.com/issues/395969086 + (cherry picked from commit 930f44e2ef4972047f3394c28c655fd15e04c706) + +commit e02bab233ca1ccff6b90eda7b644967c7b6917de +Author: Bart Van Assche +Date: Wed Feb 12 15:45:58 2025 -0800 + + libsnmp: Fix an out-of-bounds access in snmp_log_options() + + Fixes: https://issues.oss-fuzz.com/issues/395921931 + (cherry picked from commit c90280f310aa8f9fd0442128244a8672bdfdb80e) + +commit 0b3d8eeba0df795676754ae7207726d3efb38a2e +Author: Bart Van Assche +Date: Wed Feb 12 15:41:35 2025 -0800 + + libsnmp: Fix a memory leak in netsnmp_parse_args() + + Fixes: https://issues.oss-fuzz.com/issues/395969087 + (cherry picked from commit 0ab82d4c6cae3dd9f901ae292c2f60bbea32515a) + +commit 9c2aeb5cb12a75f366303623c522f6ed72afd944 +Author: Bart Van Assche +Date: Wed Feb 12 07:35:48 2025 -0800 + + libsnmp: Fix a heap buffer overflow + + Fixes: https://issues.oss-fuzz.com/issues/396102403 + (cherry picked from commit 50d5c3d007cf9b4f56a29b79a8a2e736115eb6cb) + +commit c58525e2cfc4c18c8ccf51345f9b523b9507ad8a +Author: Bart Van Assche +Date: Wed Feb 12 07:30:44 2025 -0800 + + libsnmp: Declare local functions 'static' + + (cherry picked from commit 8cf375fb612dcaa635a063d92b962be260a6a0ea) + +commit 6644fd92260abedf52921101419bc3f341fddeb8 +Author: Bart Van Assche +Date: Wed Feb 12 09:13:27 2025 -0800 + + ci, Windows: Bump the OpenSSL version number + +commit bdb611307f1fa9336b9455409e748bf709f31677 +Author: Egil Kvaleberg +Date: Fri Jan 31 21:26:37 2025 +0100 + + Document that we are now using configure.ac + + (cherry picked from commit 1109b6fd408e1c8b03e6ccfdcbe70c2ad0412c13) + +commit 8d4f4d623f5f90ad7ca7227a1cacce23a0e52802 +Author: Egil Kvaleberg +Date: Fri Jan 31 21:24:20 2025 +0100 + + Avoid latest Rpi compiler complaining about possibly uninitialized variable. + The code seems ok. + + (cherry picked from commit 5db02cfd10b4a198cfcd23658f17f0d8f737a8ab) + +commit 3d41fcf7eb0d4590a6583fa024d27cd7fc75f6fa +Author: Yuan +Date: Wed Jan 22 16:31:47 2025 +0800 + + Fix include stdint.h missing to get SIZE_MAX + + This fixes commit d33578d for ubuntu building. + + Signed-off-by: zodf0055980 + (cherry picked from commit ba627e15aafd49341d94d35989b1b9703918dfa9) + +commit a043a06540dc595dc17a56504de969d3700264f6 +Author: Bart Van Assche +Date: Mon Jan 20 19:23:56 2025 -0800 + + libsnmp: Fix an integer overflow in asn_parse_signed_int64() + + This was detected by Coverity (ID 454617). + + (cherry picked from commit 33b25d6e181ba949791885109a5dadeaa9046865) + +commit eed6600c62ac18599cdf562db4cb0de1974b1f41 +Author: Bart Van Assche +Date: Sun Jan 19 19:06:38 2025 -0800 + + libsnmp: Simplify include/net-snmp/types.h + + (cherry picked from commit 6a95ad887b04758e5b76e5d3d0c8546257e5efd5) + +commit eb9a6282d8ef14902c8f7ed1c9c9da43d0640fdb +Author: Bart Van Assche +Date: Sun Jan 19 19:15:26 2025 -0800 + + libsnmp: Fix the netsnmp_gethomedir() declaration + + Fixes: 1c6e66b3122b ("libsnmp: Fix homedir lookup also for configuration") + (cherry picked from commit 0e27a7d8c2f9c84fc641cc61cf24791da8a8198f) + +commit 8067e9ff12fbf706323f3faef5b9146e57158b58 +Author: Klaus Holst Jacobsen +Date: Fri Jan 17 10:12:23 2025 +0100 + + Added qnx support + + (cherry picked from commit 2145ebd07f5b6ec6c4eee505ffa2431f3c361087) + +commit a1d35a12cdb62aa7c71866715843a38f64e0eefc +Author: Denis Kamenskii +Date: Fri Oct 4 11:45:35 2024 +0300 + + notificationFilter: Fix mask data copying + + This change is fixing incorrect filterMask copying when adding a new snmpNotifyFilter + + (cherry picked from commit 571696608c260d81d1d686234fea02a132bbe65a) + +commit 0b940b98005498419d24d14fbdfb2137946d321c +Author: Jon DeVree +Date: Sat Jan 18 10:04:03 2025 -0500 + + Add missing 'diskio_exclude_md' to manpage + + Fixes: 2fc3de6b5 ("Added option to exclude *md* devices in diskio.") + (cherry picked from commit bb21b69d75df050754efb5476e74eb4f630e5d11) + +commit e29c40dbddb827e4b9324c0105cfc9a35e7557ac +Author: Jon DeVree +Date: Sat Jan 18 10:03:18 2025 -0500 + + Fix typo in manpage: LInux => Linux + + Additionally, ending a line with a period seems to insert an extra space + into the resulting text. Re-wrap the line to avoid having a period as + the last character. + + (cherry picked from commit dc7f4d53afd687b3a70ec0d16b80b8ced0afbac7) + +commit e0fb35640459f62a7773cee09c34949b19d82a88 +Author: Orgad Shaneh +Date: Wed Dec 18 07:40:40 2024 +0200 + + libsnmp: Fix homedir lookup also for configuration + + (cherry picked from commit 1c6e66b3122b7fd878d17f40664adf831d1a2c7a) + +commit ef137dbd3c183db0acce4fcb60ab67245b092b26 +Author: Niels Baggesen +Date: Fri Jan 24 16:14:20 2025 +0100 + + Normalized line endings + +commit a17027209a0101b66dc7ab50670d0146677e2545 +Author: Orgad Shaneh +Date: Tue Dec 17 12:03:57 2024 +0200 + + Add gitattributes file to use eol=lf for almost all files + + This fixes autoreconf on MSYS2 and possibly other issues. + + (cherry picked from commit d17282ed842364d83be83d1a45ad95dd986cdb0a) + +commit 572661f8265516c397b7691aa4ae1b8cfa05a34b +Author: Orgad Shaneh +Date: Tue Dec 17 20:59:59 2024 +0200 + + libsnmp: Support $HOME in MIBDIRS also on Windows + + (cherry picked from commit 75829eb857f2468001050fda26af843bcb9475db) + +commit 5a94f2831e8b22ffd962af9db6f7d0959c0dde51 +Author: Bart Van Assche +Date: Wed Dec 11 07:56:25 2024 -0800 + + libsnmp: Use asprintf() in parse_trapDefinition() + + No functionality has been changed. + + (cherry picked from commit 46980afe4a4b5ce9820bd4419064d18e28fe215b) + +commit b7119b2d578e782300d372a2e5e1c6327977e2eb +Author: Bart Van Assche +Date: Wed Dec 11 07:21:17 2024 -0800 + + snmplib/parse.c: Make error handling more systematic + + No functionality has been changed. + + (cherry picked from commit b057efbf770fbd964a8f6fd1e27912f584a6a8ee) + +commit 078e165b17376e95c705341affad628e86d865ac +Author: Bart Van Assche +Date: Sat Dec 7 15:13:29 2024 -0800 + + libsnmp: Fix a memory leak in free_objgroup() + + Fixes: 84aba8f8f878 ("libsnmp: Fix a memory leak in the MIB parser") + Fixes: https://issues.oss-fuzz.com/issues/380322456 + (cherry picked from commit 9425b05b663c55e12bc4fccec45a520c333ee343) + +commit d6e918eadc41eb3a364ce946495e92151221b63c +Author: Bart Van Assche +Date: Sat Dec 7 15:09:09 2024 -0800 + + libsnmp: Clean up compliance_lookup() + + Convert an if-else statement into an early return. Remove a superfluous + cast. + + (cherry picked from commit d1bf740f9d328c2264f7a0abfb1970f41ccf9c4e) + +commit 11169c7d027b61150cda413a48bae62a36364723 +Author: Bart Van Assche +Date: Tue Dec 3 09:26:40 2024 +0800 + + MIB-II: Suppress a Coverity warning about an uninitialized variable + + (cherry picked from commit e780c985bf74ab7cda1fc6f4cb57435e980ee255) + +commit db42a6041317853be0d91b525ba9b2efccf7dc4c +Author: Bart Van Assche +Date: Tue Dec 3 09:24:49 2024 +0800 + + snmptrapd: Suppress a Coverity warning about an uninitialized variable + + (cherry picked from commit 9100bf8550c7c0baebdb1fd31e89d5fcee628fc4) + +commit 4feaa89057bb0b17e05832f655d4b12281a8b761 +Author: Bart Van Assche +Date: Tue Dec 3 09:22:26 2024 +0800 + + libsnmp: Suppress Coverity warnings about time_t truncation + + (cherry picked from commit e81a0edac75e568cddf7a1f595c4d7108c0a0bca) + +commit 0f81e94dffe932c545d36dff6ddf9d14cb6297d7 +Author: Bart Van Assche +Date: Sat Nov 30 13:31:15 2024 -0800 + + snmpd: Fix a potential integer overflow + + Make sure that avgvarbind > 0. This was detected by Coverity. + + (cherry picked from commit 2c24c784e08d194f62d08beea77fd2bef275577f) + +commit 92aa03f0381bac095fce1698a72e174b845d590c +Author: Bart Van Assche +Date: Sat Nov 30 13:28:37 2024 -0800 + + IP-MIB: Suppress a Coverity complaint + + Suppress a Coverity complaint about assigning -1 to entry->index. + + (cherry picked from commit 9e92b038386a63c5731a4717248ab65fedc6ad9b) + +commit 185611aebabc9362a55cc55e05bbc16e32b87e1f +Author: Bart Van Assche +Date: Tue Nov 26 15:16:17 2024 -0800 + + libsnmp: Rework an integer overflow check + + Rework an integer overflow check such that it no longer triggers a Coverity + complaint. + + Fixes: 993728c977d4 ("libsnmp: Handle integer overflows in asn_predict_length()") + (cherry picked from commit d33578d0bd1675a6f3d2a9d6788994e8bb1e7cef) + +commit 11c79b623f49b88f9006a3f3630a18aa5fd85c87 +Author: Bart Van Assche +Date: Tue Nov 19 14:47:27 2024 -0800 + + libsnmp: Split read_module_internal() to make it easier to read + + (cherry picked from commit 65375083382a4cd8a3913628f32596139f8f9eb8) + +commit f2ff0be44cc2c646f852d5c669a20d44e048e473 +Author: Bart Van Assche +Date: Tue Nov 19 14:58:52 2024 -0800 + + libsnmp: Use asprintf() in netsnmp_init_mib() instead of open-coding it + + Additionally, combine two SNMP_FREE(env_var) statements into a single + statement. + + (cherry picked from commit e0be85dca5e8ab3a16702b6c48d6a401052e3ec9) + +commit 2058b0ccf6f111d90c4434c3db337961285196e3 +Author: Bart Van Assche +Date: Tue Nov 19 14:34:22 2024 -0800 + + libsnmp: Declare variables with file scope 'static' + + Additionally, zero-initialize variables with file scope implicitly instead + of explicitly. + + (cherry picked from commit e1897a0baaa36ef5ad73c5653960c2ab239a64dc) + +commit 402f4a00e68222b9558fb3d5fac1ac782e5b2ba3 +Author: Bart Van Assche +Date: Wed Nov 6 12:22:18 2024 -0800 + + DISMAN-MIB: Suppress a Coverity complaint about integer truncation + + (cherry picked from commit f91020b7b7ccef4746e61a62c1acd5e7f2ee73bf) + +commit 1d67d78bfe7bcb02ca195ca9abf2bbd733939875 +Author: Bart Van Assche +Date: Wed Nov 6 12:20:28 2024 -0800 + + DISMAN-MIB: Suppress a Coverity complaint about integer truncation + + (cherry picked from commit 4e327e5838b2f8a07023c591c773602e4d299e44) + +commit 1f22bab84f6104859488488b878097248d3c598d +Author: Bart Van Assche +Date: Wed Nov 6 12:16:30 2024 -0800 + + libsnmp: Rework an integer overflow check + + Rework an integer overflow check such that it no longer triggers a Coverity + complaint. + + Fixes: 993728c977d4 ("libsnmp: Handle integer overflows in asn_predict_length()") + (cherry picked from commit e500d823c1242d3859f671ec5dd51c9fc6b9eeb5) + +commit 8473bf2a7f3938c7089e53f17e04edf3f2fab418 +Author: Bart Van Assche +Date: Tue Nov 5 06:55:06 2024 -0800 + + snmplib: Make get_module_node() check the strdup() return value + + Fixes: https://github.com/net-snmp/net-snmp/issues/887 + (cherry picked from commit 801955c017327d711bce51ac4535557b11a98e39) + +commit b78ba9198686a9ac7b0f2aa5c87c6904752350f0 +Author: Bart Van Assche +Date: Tue Nov 5 06:34:34 2024 -0800 + + snmplib/transports/snmpUnixDomain: Fix a socket leak in an error path + + Fixes: https://github.com/net-snmp/net-snmp/issues/888 + (cherry picked from commit 973a14ae0101d2b5fde67732208a3949f9ae9667) + +commit b9eb7d242552319e0fc5495cf7d5ef89698ca412 +Author: Bart Van Assche +Date: Thu Sep 26 09:24:38 2024 -0700 + + libsnmp: Remove an incorrect assert statement + + See also https://github.com/net-snmp/net-snmp/issues/856. + + (cherry picked from commit d8c83ff96144f0bb0945a3640ce7ac5995b91c74) + +commit 56ce8ccab4b27c0799a88a580fde1ef788869c88 +Author: Nathan Monfils +Date: Fri Aug 9 17:00:55 2024 +0200 + + Update snmp-create-v3-user man date + + What a jump! + + (cherry picked from commit ec00e19d475a2aa49c73651e93bb524d0a55fe9f) + +commit 638501c2781e9ace83f27e790d7b4592adf6d57e +Author: Nathan Monfils +Date: Fri Aug 9 16:50:29 2024 +0200 + + Update man page for net-snmp-create-v3-user + + Missing option for authentication algorithm and missing parameters for encryption algorithms have been documented. + + Although case does not matter for `-A` and `-X` (which seems to be its own can of worms that needs to be kept for compatibility), I've switched them around to match the usage string of `net-snmp-create-v3-user --help`. + + (cherry picked from commit 7d0da6c40db63611648115ad8dc4e5f00485ba1d) + +commit 27912791e1128dc9cfed9e8e9209c46d4cc2cbc7 +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. + + (cherry picked from commit 09e42bbc4efcffb44bf50f150447bd25077d133b) + +commit 5ae20aad09846149fb2a7affbb9b9af32f08752b +Author: Ivan Antonyuck +Date: Tue Jul 30 15:42:00 2024 +0300 + + Update net-snmp-create-v3-user.in + + net-snmp-create-v3-user has an ability to use AES128, but does not advertise it + (cherry picked from commit 3fab3b3b9031e97b85954d9dd6b60c546ca7cb9c) + +commit 501cc8bd0e7143c8e1aeee5142f4fd865c759da5 +Author: Maxim Korotkov +Date: Tue Dec 19 17:05:55 2023 +0300 + + agent: mibgroup: avoid potential NULL dereference + + The "while" loop shifts the pointer, + which can cause it to be NULL. + Fixes: 8baf64d4ae616(Re-worked Schedule MIB implementation.) + Found by RASU JSC + + Signed-off-by: Maxim Korotkov + (cherry picked from commit 8ab403e1595d3eca3d922daeb69d2dc454c8f9ef) + +commit eac92fb1e34fb9413d4cadc45444a2a43290909b +Author: Simon Aldrich +Date: Mon Jul 8 22:49:36 2024 +0100 + + Correct uS to μs for microseconds + + (cherry picked from commit 90a70ebd82ae1b545e7a58c1b3eb10981cb85adc) + +commit 5977b47543202ff68977aae806ceca6cf42144c0 +Author: Simon Aldrich +Date: Mon Jul 8 22:31:49 2024 +0100 + + Correct misleading header comment about retry timeouts + + (cherry picked from commit d305715470ea8d0e6b1ae899a03f58939629d23e) + +commit 07a197022d0b1b597ff135352cd677eb25ea4c04 +Author: Bart Van Assche +Date: Sat Jun 29 15:05:03 2024 -0700 + + snmpd, snmptrapd: Fix Coverity complaints about integer overflows + + (cherry picked from commit c1a34f3cbc1bf33fb65b125852541b8336e977cf) + +commit 012cb784b1fa6cfa807c272c774d9357fc5bfa8e +Author: Bart Van Assche +Date: Sat Jun 29 15:01:26 2024 -0700 + + libsnmp: Handle integer overflows in asn_predict_length() + + (cherry picked from commit 993728c977d416b15ea74ae8b0b03ebdf1c07ec8) + +commit 2625be874235a1f8a2bc1bf070a23092ed903a6d +Author: Bart Van Assche +Date: Sat Jun 29 14:48:49 2024 -0700 + + UCD-SNMP-MIB: Fix a potential integer overflow + + This was detected by Coverity. + + (cherry picked from commit f4005f4b8da27dc88e2001fbc2a884c16cf5fc11) + +commit 08db791adcac3bb3fa7f5fa95ccdfcbc5b21cac7 +Author: Bart Van Assche +Date: Sat Jun 29 14:45:23 2024 -0700 + + snmptrapd: Fix an integer underflow + + This was detected by Coverity. + + (cherry picked from commit 449c27cf9f36306b906e1e282a832f6545c4f532) + +commit f2ce30e252b3f63fc28097da99c9f92823329cd2 +Author: Bart Van Assche +Date: Sat Jun 29 14:43:43 2024 -0700 + + snmpd, apps: Handle mktime() failures + + This was detected by Coverity. + + (cherry picked from commit 3a4c6307086207eb5a69f88823063c934c02a692) + +commit dfab20a13e27eed063226c038008342855344640 +Author: Maxim Korotkov +Date: Tue Dec 19 17:44:45 2023 +0300 + + agent: helpers: added allocation fail check + + Fixes: e2ea345fa783(Agent helper module for support of scalar objects.) + + Found by RASU JSC + + Signed-off-by: Maxim Korotkov + (cherry picked from commit 600b37a14105f73c2414b83b66297933cebbdec7) + +commit c9ac9f1c92600c1a568493f4a69c462e7fb115a7 +Author: Wei Xing <2112860871@qq.com> +Date: Fri May 24 01:53:59 2024 +0800 + + dump space around the "=" + + (cherry picked from commit 0aac3305b43f5eed38bd9aa53e44fdfc828d7cb3) + +commit 753bd7b6182aaa2326f3bad7d7aa8227bfe51b77 +Author: Niels Baggesen +Date: Sat Nov 30 20:29:14 2024 +0100 + + Update LM-SENSORS-MIB to support negative temperatures + + This fixes #752 + +commit 7949884b3fcab6da8c70b5e7c056da184c701195 +Author: Bart Van Assche +Date: Tue Nov 26 15:34:05 2024 -0800 + + CHANGES: Remove -Wredundant-decls from the developer options + + Revert commit ad80e335b8af because this option causes a lot of noise for the + Perl header files. + +commit e39d80bc5b2ef01afc8b6872546cba61ce6a8538 +Author: Bart Van Assche +Date: Sat Nov 23 17:06:00 2024 -0800 + + libsnmp: Clean up parse_enumlist() + + Fix code formatting and indentation. Remove a superfluous cast. No functionality + has been changed. + +commit b8ec69597c9031d75f5b1602be350833fda882de +Author: Maxim Korotkov +Date: Wed Dec 14 12:46:49 2022 +0300 + + snmplib: Fix memory leaks in the parse_enumlist() error path + + Found by RASU JSC with ISP RAS Svace + + Signed-off-by: Maxim Korotkov + [ bvanassche: renamed error label, fixed indentation and a potential null pointer + dereference ] + +commit 8f54853716dcb9447387931870341cf01d6b1bb8 +Author: Bart Van Assche +Date: Tue Nov 12 09:35:44 2024 -0800 + + libsnmp: Fix netsnmp_add_loghandler() + + Fixes: https://github.com/net-snmp/net-snmp/issues/696 + Fixes: 00ef569e00d1 ("Fix 5.5.x branch structure (part 2)") + +commit cfc58d3e9cae01013a3baa70913681c31876c6e6 +Author: Bart Van Assche +Date: Mon Nov 11 17:13:18 2024 -0800 + + libsnmp: Declare local variables 'static' + + Additionally, switch from explicit to implicit zero-initializing of + variables with file scope. + +commit fbdf2ed2e0bb06050d314e008a34d9ecdb84be17 +Author: Bart Van Assche +Date: Mon Oct 28 09:21:45 2024 -0700 + + libsnmp: Fix a buffer overflow in setup_engineID() + + See also https://github.com/net-snmp/net-snmp/issues/732. + +commit 88199e67c5f9ac2f5e72fc3f28b6b19d3321eb60 +Author: Bart Van Assche +Date: Thu Oct 24 09:40:27 2024 -0700 + + apps: Restore support for systems where tv_sec does not have the time_t type + +commit 0fcc15cca99a400b9beac47ee32d49e90ceca517 +Author: Bart Van Assche +Date: Wed Oct 23 11:18:05 2024 -0700 + + apps, libsnmp, snmpd: Check the localtime() return value + + See also https://github.com/net-snmp/net-snmp/issues/867. + +commit dc3884fd3a4cb2f915df73dbcfc25267f69a790b +Author: Bart Van Assche +Date: Wed Oct 23 10:07:28 2024 -0700 + + apps/snmpdelta: Prevent that a localtime() triggers a crash + + See also https://github.com/net-snmp/net-snmp/issues/867. + +commit fc847a802d7600adfc9ad2ebb29fe485a19c920b +Author: Bart Van Assche +Date: Wed Oct 23 10:00:19 2024 -0700 + + ci, Windows: Bump the OpenSSL version number + +commit 512ed48b8c35191b97e3bdcd7f3dab21200a0ba9 +Author: Niels Baggesen +Date: Mon Oct 7 09:30:47 2024 +0200 + + Port sshtosnmp to FreeBSD. + + Completes 3346619 (libsnmp: Port the SSH domain transport to FreeBSD) + +commit f2b6880b1bb30332aec48986799f659e6e6690ed +Author: Niels Baggesen +Date: Thu Aug 22 08:23:54 2024 +0200 + + Fix ipv6.c for DragonflyBSD (#841) + + Fixes: ebb758e3 (x Fix var_udp6 and var_tcp6 on FreeBSD) + +commit 34ec1fafd562292d8f511901c38009c8a3031625 +Author: Bart Van Assche +Date: Thu Jul 11 13:05:52 2024 -0700 + + DISMAN-EXPRESSION-MIB, DISMAN-EVENT-MIB: Simplify the security name duplication code + + Use netsnnmp_memdup() instead of calloc() + memcpy(). + +commit d1e107882230cbf53b19e6af1dc2d1878017e6e4 +Author: Bart Van Assche +Date: Wed Jul 10 13:31:09 2024 -0700 + + snmpd: Terminate security names with NUL + + Some code, e.g. netsnmp_iquery_session(), assumes that security names are + NUL-terminated. Guarantee that this is the case. This patch fixes an address + sanitizer error. + +commit bd6b09460ec268115cdd6f269f1cab8c69759c33 +Author: Bart Van Assche +Date: Tue Jun 18 13:12:38 2024 -0700 + + ci/install.sh: Install libmariadb-dev-compat for mysql_config + +commit 7c94ff08aacddae8dd5c068652b70288e84a152d +Author: Mark Johnston +Date: Tue Jun 11 10:04:06 2024 -0400 + + snmpd: Always open libkvm in "safe mode" on FreeBSD + + By specifying /dev/null as the path to kvm_openfiles(), we can get a + libkvm descriptor which does not hold /dev/kmem open. None of the code + shipped with net-snmp needs a /dev/kmem handle. + + Make this change for both the NETSNMP_NO_KMEM_USAGE and + !NETSNMP_NO_KMEM_USAGE cases, per a suggestion from + Bart Van Assche . + +commit 21bd3a00cf3efc1ef5b72d1e60d631ecfce3608f +Author: Bart Van Assche +Date: Fri Jun 14 14:52:47 2024 -0700 + + ci/perl.bat: Bump the Perl version + +commit 7ab06fdcb5d6066d0243af6203c54c24d5dcd795 +Author: Niels Baggesen +Date: Tue Jun 11 10:08:08 2024 +0200 + + Better test and info for libnl-3 presence + +commit 10e4846eebb20f4d58dca3d8e6c80e5c19bd2b83 +Author: Bart Van Assche +Date: Mon Jun 10 17:29:44 2024 -0700 + + ci, Windows: Bump the OpenSSL version number + +commit 98b8a5698594c0389dd66170aeb09425ae720852 +Author: Bart Van Assche +Date: Mon Jun 10 15:43:39 2024 -0700 + + Darwin: MIB-II: Fix the build for OS/X versions prior to 10.6.0 + + Fix compilation of Net-SNMP 5.9.4 on older versions of Mac OS X (prior to + 10.6.0). This patch fixes the following build errors: + + mibgroup/mibII/kernel_sysctl.c: In function ‘sysctl_read_icmp6_stat’: + mibgroup/mibII/kernel_sysctl.c:108: error: ‘MLD_LISTENER_QUERY’ undeclared (first use in this function) + mibgroup/mibII/kernel_sysctl.c:108: error: (Each undeclared identifier is reported only once + mibgroup/mibII/kernel_sysctl.c:108: error: for each function it appears in.) + mibgroup/mibII/kernel_sysctl.c:109: error: ‘MLD_LISTENER_REPORT’ undeclared (first use in this function) + mibgroup/mibII/kernel_sysctl.c:131: error: ‘MLD_LISTENER_DONE’ undeclared (first use in this function) + make[1]: *** [mibgroup/mibII/kernel_sysctl.lo] Error 1 + + Fixes: https://github.com/net-snmp/net-snmp/issues/822 + +commit e11dadfb5fa3798cad4de3222ba04378728beefd +Author: Bart Van Assche +Date: Tue May 21 16:11:31 2024 -0700 + + libsnmp: Reduce code duplication + + Merge netsnmp_tcpbase_session_init() and netsnmp_udpbase_session_init() into + a single function. + +commit ed917bfdb0e07f41c817b3f5efc255a6ce538df2 +Author: Teus Benschop +Date: Tue May 21 16:04:10 2024 -0700 + + libsnmp: Copy the listening port number into snmp_session.local_port + + [ bvanassche: removed trailing whitespace ] + +commit d30d63523bfd9ccc85175e484fea821815273237 +Author: Bart Van Assche +Date: Wed May 15 10:08:04 2024 -0600 + + snmptrapd: Fix compilation against recent versions of the MySQL library + + Fix the following build error: + + snmptrapd_sql.c:541:50: error: assignment to ‘_Bool *’ from incompatible pointer type ‘char *’ [-Wincompatible-pointer-types] + 541 | _tbind[TBIND_v3_SECURITY_ENGINE].is_null = &_no_v3; + + Fixes: https://github.com/net-snmp/net-snmp/issues/815 + +commit e73c892e51dbbf3b75a9a19a2e7bbc269eeb05be +Author: Bart Van Assche +Date: Wed May 15 14:54:52 2024 -0600 + + CHANGES: Win32: winExtDLL: Fix the build + + Fix the following build error: + + mibgroup/winExtDLL.c:360:14: error: implicit declaration of function 'should_init' [-Wimplicit-function-declaration] + 360 | if (!should_init(dll_basename)) { + | ^~~~~~~~~~~ + +commit 3d6b7457ee34be30fe51b5e303521ece5d28feda +Author: Bart Van Assche +Date: Wed May 15 10:20:09 2024 -0600 + + ci/install.sh: Add the libmariadb-dev package + + In recent Debian distributions the MariaDB client library has been moved + from libmariadbclient-dev to libmariadb-dev. + +commit 8f3cedfa723cfe1df5264cf174e9a3c279d9266e +Author: Teus Benschop +Date: Wed May 8 10:21:10 2024 -0700 + + libsnmp: Copy the listening port number into snmp_session.local_port + + This is useful if the MIB behavior should depend on the listening port. + Listening port information can be retrieved as follows in a MIB + implementation: reqinfo->asp->session->local_port. + + [ bvanassche: added IPv6 support and added a patch description ] + +commit 771966122e2fa7beca54febdd223464676c72fd3 +Author: Bart Van Assche +Date: Tue May 7 11:30:47 2024 -0700 + + EtherLike-MIB: Fail compilation on Linux if libnl-3 has not been found + + Commit 5b89350912eb ("EtherLike-MIB: Optimize the Linux implementation") + made libnl-3 a dependency of the EtherLike-MIB implementation on Linux. + Hence fail the build on Linux if libnl-3 has not been found. + +commit 9a8583119350b5db74163621acf11650e1187d79 +Author: Bart Van Assche +Date: Tue May 7 11:03:59 2024 -0700 + + configure: Fix a source code comment + +commit ebb758e337a52c75a06b2448ebb44a6c78a8600e +Author: Mark Johnston +Date: Tue Apr 30 13:53:57 2024 -0400 + + Fix var_udp6 and var_tcp6 on FreeBSD + +commit 3fa4c3157bb866c97876cc6ae236a5e122f228ef +Author: Bart Van Assche +Date: Thu Apr 25 07:00:48 2024 +0200 + + ci/install.sh: Minor improvements + +commit db30d3a47bc11429fbff5374af6da3601a493f4d +Author: Niels Baggesen +Date: Mon Apr 8 21:32:26 2024 +0200 + + Fix apparently transposed arguments to calloc. + Detected by gcc 14 on Fedora 40 (BETA) + +commit 84f819c815d6644a5e916a3b8f56cd4d0b6f151d +Author: Niels Baggesen +Date: Mon Apr 8 21:09:55 2024 +0200 + + snmp_openssl.c: reorder some declaration to avoid warnings about + redundant declarations. + +commit 1a10dbc83c0a2e5622943d65d46ef0a0c7048831 +Author: Niels Baggesen +Date: Mon Apr 8 20:57:59 2024 +0200 + + For the ARM architecture, char is unsigned. Repair the detected bad + comparisons between char and -1. + +commit 148dd13682e8e0218c39778d433a8ff073fc78a3 +Author: Niels Baggesen +Date: Mon Apr 8 20:53:12 2024 +0200 + + Remove some duplicated declarations. + +commit c728c3cd64ad10c2b73dc3e284b0b2f6dfdd2502 +Author: Niels Baggesen +Date: Mon Apr 8 20:50:43 2024 +0200 + + EtherLike-MIB: remove a now unused variable. + +commit be35c9dd9af9582a1c40dff9c6994dc2743a2ff2 +Author: Niels Baggesen +Date: Mon Apr 8 20:47:43 2024 +0200 + + Fix commit 5b89350 (EtherLike-MIB: Optimize the Linux implementation) + for *BSD by adding an "#if defined(linux)" that was lost during backport. + +commit 5cabd6f570aa6b0d741250b157c5a5d886c8b3b5 +Author: Bart Van Assche +Date: Fri Feb 2 07:26:59 2024 -0800 + + EtherLike-MIB: Declare local variables and functions static + +commit 05f56d3ec9e6c07dab12241ce3aa048d3dccd839 +Author: Martin Rys +Date: Sun Mar 3 01:19:51 2024 +0100 + + snmpd/snmptrapd.service: Remove dead syslog.target + + (cherry picked from commit 99237462ace151c3d706aa31f6060b491dacd2fa) + +commit 1268bc0dbcfa598fe67c3781f6c854b54d828490 +Author: Thomas Egerer +Date: Thu Feb 29 21:18:32 2024 +0100 + + libsnmp: Reassign timeout value for select(2) + + As select may update the timeout value, the code may not sleep for + 100 ms. If timeout is updated, the code will only sleep for 1 ms once + and the immediately return from select(2). + Reassign the timeout value in the loop shouldn't be harmful even on + systems that don't update the timeout value. + + Signed-off-by: Thomas Egerer + (cherry picked from commit 741f066026e8bb97bac6bd3f43ed2cc1cdfd14b6) + +commit 468c5b2b40b0fbb9a47b21ec82eae51eee9dae27 +Author: ashamedbit +Date: Tue Feb 27 00:33:00 2024 -0500 + + Fix leak in snmpusm.c + + (cherry picked from commit c691ab06862bc2d83bba851c65321f60aad5f0b3) + +commit 08d557ff094d01b511ec67efa2d5fc3d51a5a566 +Author: ashamedbit +Date: Mon Feb 26 02:34:58 2024 -0500 + + Fix leaks in snmpv3.c + + (cherry picked from commit 70c4d95873b161768d08c0fd4d42f3a47ef1d002) + +commit 5b89350912ebd52e978d65c7a697d2183f509d51 +Author: Bart Van Assche +Date: Sun Feb 4 16:58:24 2024 -0800 + + EtherLike-MIB: Optimize the Linux implementation + + Query netlink statistics once instead of one time per network interface. + This should fix https://github.com/net-snmp/net-snmp/issues/780. + + (cherry picked from commit ac6cd58ff9e0bf2ec5f336e50f79338455e21b91) + +commit 4609cd24c5d65ed41f14bee1d95d5381c02bbfda +Author: Bart Van Assche +Date: Sun Aug 1 20:34:02 2021 -0700 + + configure: Detect libnl-route-3 + +commit f1b9e4b0849e0c0a81232459a24137adbc946054 +Author: Bart Van Assche +Date: Sun Feb 4 16:22:13 2024 -0800 + + ci: Only replace /etc/hosts on Darwin + +commit 26f52c35c1c29acbc0a60a0b6ba5783b6f719985 +Author: Bart Van Assche +Date: Sat Feb 3 14:26:29 2024 -0800 + + ci, Windows: Bump the OpenSSL version number + +commit 7fc7edf676c527a0cfb661f9000a3d22738cf8e6 +Author: Philippe Troin +Date: Sat Feb 3 10:30:30 2024 -0800 + + Add Linux 6.7 compatibility parsing /proc/net/snmp + + Linux 6.7 adds a new OutTransmits field to Ip in /proc/net/snmp. + This breaks the hard-coded assumptions about the Ip line length. + Add compatibility to parse Linux 6.7 Ip header while keep support + for previous versions. + +commit 934a7649eddfed2905f2fd43d2acd0a57365bde2 +Author: Bart Van Assche +Date: Tue Jan 30 09:54:32 2024 -0800 + + EtherLike-MIB: Optimize interface_dot3stats_get_errorcounters() + + This patch may fix an infinite loop. See also + https://github.com/net-snmp/net-snmp/issues/780. + +commit f6500b2ed87236b7a2a4c10a891aae2ae4317b0b +Author: Bart Van Assche +Date: Mon Jan 29 15:33:58 2024 -0800 + + EtherLike-MIB: Simplify dot3stats_interface_name_list_free() + + Change the return type from 'int' into 'void'. + +commit ad80e335b8afab15e5aa2bb1fbf8af8c539138fd +Author: Bart Van Assche +Date: Mon Jan 29 14:32:41 2024 -0800 + + CHANGES: Add -Wredundant-decls to the developer options + +commit da5728052f7f1a4ca6764fdf1f740f222175d60a +Author: Bart Van Assche +Date: Mon Jan 29 14:57:24 2024 -0800 + + CHANGES: Remove more redundant redeclarations + + Prepare for enabling -Wredundant-decls. + +commit 4963dd110f7cf41d28a66624b7ac84c8c90296ed +Author: Jaap Keuter +Date: Sun Jan 28 22:03:02 2024 +0100 + + CHANGES: Remove redundant declarations + + These changes aim to remove redundant declarations from the Net-SNMP + source code. They are most easily exposed with adding -Wredundant-decls + to CPPFLAGS for the gcc compiler. + Redundant declarations in other used modules and mib2c generated code are + left in place. + + The changes consist of: + - Removal of duplicate declarations in header files, other or the same. + - Removal of duplicate declarations in source files, where the prototype + already exists in the appropriate header file. + - Fixing declaration of register log handler functions. + - Use of forward declared struct, rather than extern function or char. + + [ bvanassche: added "CHANGES: " prefix to subject and ran autoreconf ] + +commit 7f90a81c778c5a50f72b0f4d7e9551cd4a04fedf +Author: Bart Van Assche +Date: Wed Jan 10 11:01:10 2024 -0800 + + libsnmp: Fix authorization protocol parsing + + Fixes: 09ac3f2f68b2 ("more sha2 support changes") + Fixes: https://github.com/net-snmp/net-snmp/issues/771 + +commit abb479727a0911f00080680a62521396275a1a06 +Author: Bart Van Assche +Date: Wed Jan 10 07:29:49 2024 -0800 + + Revert "SIGHUP for handling agent port change" + + Reverts commit da96150d1eb85e6a4a995dab04eaaabd15c7d8c9 because of the + issues mentioned in the description of this commit. + + See also https://github.com/net-snmp/net-snmp/pull/769. + +commit da96150d1eb85e6a4a995dab04eaaabd15c7d8c9 +Author: Vivekaditya98 <49593894+Vivekaditya98@users.noreply.github.com> +Date: Tue Jan 9 08:03:29 2024 +0000 + + SIGHUP for handling agent port change + + Fix - When the reconfig flag is set, we "shudown master agent" which closes + the socket listening on 161 and "init_master_agent" would establish the + socket on new port without changing the PID of "snmpd". + + Use-case where its failing - Though this change works for most of the + cases, its failing in a peculiar case where when we send SIGHUP while + parallely the snmpwalk is in progress. When we send SIGHUP in this usecase, + the socket is closed by "shutdown_master_agent" but a new socket is never + re-established by "init_master_agent" no matter how many sighups we sent, + the snmp-server is down permanently. + Going to the root of the problem, I see that the bind is successful as kernel + returns 0 but netstat(-nlpu) never reports that socket. + +commit dfde22f5d955eb4b96ccce5c70dc838fe3406322 +Author: Niels Baggesen +Date: Tue Jan 9 20:22:53 2024 +0100 + + Fix complaints about using unsafe functions (OpenBSD, NetBSD) + sprintf => snprintf, strcpy => strlcpy, strcat => strlcat + +commit 18134035cc099774d6a811da64265b18f2159575 +Author: Niels Baggesen +Date: Tue Jan 9 20:13:05 2024 +0100 + + Check for netgroup.h, required for OpenBSD. + +commit dce25f15577a96301481ad6df8855c7d871571a8 +Author: Niels Baggesen +Date: Tue Jan 9 20:09:53 2024 +0100 + + Protect variable declaration same as the use of it. + +commit 2258b6b49cac729063045f585cbebdd5214fc117 +Author: Bart Van Assche +Date: Fri Jan 5 12:51:28 2024 -0800 + + ci: Upgrade Github checkout action + +commit 0077eaadfe6cc4d3f93ce03c93db452b1a32988c +Author: Bart Van Assche +Date: Fri Jan 5 09:12:21 2024 -0800 + + ci: Add an Android build target + +commit c50900fc1076d691453cca648169c176b14761a7 +Author: Bart Van Assche +Date: Fri Jan 5 10:55:33 2024 -0800 + + ci: Fix shellcheck warnings + +commit afae87ba742831c9348177b83cf7728c6871afdc +Author: Bart Van Assche +Date: Fri Jan 5 10:44:58 2024 -0800 + + snmplib/openssl: Fix compiler warnings about function pointer casts + +commit 99d8377ff34963540659a4f43c7522f3607d8d42 +Author: Bart Van Assche +Date: Fri Jan 5 10:43:52 2024 -0800 + + apps/snmpusm: Fix a compiler warning + + Do not define usmDHParameters nor usmDHParameters_len if these symbols won't + be used. + +commit 8df53c47975f262e0bfc378c70f058fc73d9d926 +Author: Bart Van Assche +Date: Thu Jan 4 13:19:33 2024 -0800 + + ci: Disable the Python modules if MODE=wolfssl + +commit 7edcdd265cb99a4e77200afe4ce2edff4905eef7 +Author: Bart Van Assche +Date: Thu Jan 4 11:38:16 2024 -0800 + + ci/net-snmp-configure: Restrict the TLSTM-MIB to OpenSSL + +commit cadcb0ca78cf0ea9db3a3c6d69ed0ad11b9d4751 +Author: Bart Van Assche +Date: Sun Jul 31 16:33:57 2022 -0700 + + libsnmp: Fix the wolfSSL build + + Use the ASN_* definitions from the wolfSSL headers when building with wolfSSL. + Remove #ifdefs that refer to OpenSSL header file guard macros. Add missing + include directives. Add support for EVP_MD_CTX_init() returning void. Enable + logging of wolfSSL error messages. Disable OpenSSL code that has no wolfSSL + equivalent. + +commit 28c00ab9454b499f6e66863c7db7efb6662af3b9 +Author: Bart Van Assche +Date: Thu Jan 4 10:54:56 2024 -0800 + + ci: Improve the test for DTLS support + +commit 7c2ac00e03bfaae6047712bb840d8bdb7eb9ffb2 +Author: Bart Van Assche +Date: Thu Jan 4 10:44:29 2024 -0800 + + Windows: Suppress a compiler warning related to ERR_get_error_all() + + This patch fixes the following warning when building with MSVC: + + ..\..\snmplib\transports\snmpTLSBaseDomain.c(70): warning C4996: 'ERR_get_error_line_data': Since OpenSSL 3.0 + +commit 39e7514ad7b3ccd4f2dcd1e1302ed72eeaf962e7 +Author: Bart Van Assche +Date: Thu Jan 4 10:38:04 2024 -0800 + + libsnmp: Improve the ERR_get_error_all() backport + +commit 392a06265a7bf6ee45f5a65faf0feebfea502828 +Author: Bart Van Assche +Date: Thu Jan 4 09:50:49 2024 -0800 + + configure: Check explicitly for the presence of openssl/{err,ssl}.h + + Additionally, remove the check for the header file. + +commit 3592dbf1dea3866b651c7e5097bdc81abc0bd0e7 +Author: Bart Van Assche +Date: Thu Jan 4 06:59:59 2024 -0800 + + ci/net-snmp-configure: Remove support for branches that are no longer supported + +commit cf5c36c4f57fe299eb378ffe32edbe67b5c43b7d +Author: Bart Van Assche +Date: Fri Jul 29 19:43:55 2022 -0700 + + NEWS: configure: Add --with-wolfssl + + Add support for building and linking with the wolfSSL library instead of + OpenSSL. Other changes that have been included in this patch are: + - Only enable AES support if EVP_aes_128_cfb() is available. + - Add support for detecting SSL functions if these have been defined as + macros. + +commit 2f0cb7a8895d206d73cbf2b96d20e4ca98e151a5 +Author: Bart Van Assche +Date: Sun Jul 31 07:18:04 2022 -0700 + + CHANGES: configure: Change the default OpenSSL path into /usr + + Change the default OpenSSL path from /usr/local/ssl into /usr since that is + the default location for all current Linux distributions. + +commit bac9c094578840ad3d6bd22369697ece2875bdd7 +Author: Bart Van Assche +Date: Fri Jul 29 19:43:52 2022 -0700 + + configure: Simplify the OpenSSL detection code + + Use a single variable to represent that EVP_md5 has been found in a library + instead of two. + +commit f7fbfdbc8078d64d772e9e09684a75cab197e86e +Author: Bart Van Assche +Date: Mon Aug 1 21:14:58 2022 -0700 + + configure: Do not echo the security module list + +commit 57cc8100a534323b17679d3992090ca3beed62b3 +Author: Bart Van Assche +Date: Fri Dec 29 17:25:14 2023 -0800 + + win32/dist/build-binary.pl: Fix OpenSSL library paths + +commit 5fd4e1caffaca55d58fa1104168c3ab3c8637abf +Author: Bart Van Assche +Date: Fri Dec 29 15:59:47 2023 -0800 + + HOST-RESOURCES-MIB: Remove dead code + + This patch fixes the following Coverity warning: + + CID 379751 (#1 of 1): Logically dead code (DEADCODE)dead_error_begin: Execution cannot reach this statement: config_perror("Missing moun.... + +commit 1dfc114f6b5b01c7616becb4be623f8799064905 +Author: Bart Van Assche +Date: Fri Dec 29 15:57:35 2023 -0800 + + Python: Remove dead code + + This patch fixes the following Coverity warning: + + CID 379753 (#1 of 1): Logically dead code (DEADCODE)dead_error_line: Execution cannot reach the expression NULL inside this statement: (vars = (response ? respons.... + +commit 99332c80b68248cb60023d12297135dc9c6c8abf +Author: Bart Van Assche +Date: Wed Dec 27 14:58:15 2023 -0800 + + Windows: Update the OpenSSL library paths + + Apparently the paths in which OpenSSL binaries are installed have changed. + Hence, also change these paths in Net-SNMP. + +commit 83fa8f661a050aff37fdcbf09f918360929ee8de +Author: Bart Van Assche +Date: Wed Dec 27 16:45:09 2023 -0800 + + ci: Remove MinGW32 + + Downloading the MinGW32 installer fails. Additionally, the most recent + upload to https://sourceforge.net/projects/mingw/files/ happened in 2017, + six years ago. Hence remove MinGW32 from .appveyor.yml. + +commit 9f6e94928458d93e12d0c69fdde0ec2606e75c72 +Author: Bart Van Assche +Date: Wed Dec 27 16:04:18 2023 -0800 + + ci/perl.bat: Bump the Perl version + +commit ecf028eb6d2b706607dd26a39beb27c17f475fc8 +Author: Bart Van Assche +Date: Sun Dec 17 16:11:06 2023 -0800 + + UCD-SNMP-MIB: Fix a memory leak in an error path of _expand_disk_array() + +commit 70601631a4eaa504b34e1d071138e626fe068e36 +Author: Christophe Leroy +Date: Sat Dec 23 19:36:27 2023 +0100 + + Add 'ubifs' to other_fs + + ubifs used to be automatically taken into account in + UCD-SNMP-MIB::dskTable but commit e3fc76e0ae ("CHANGES: snmpd: + Make UCD-SNMP::dskTable dynamic if includeAllDisks is set.") added + a verification that drops all filesystems not present in other_fs[] + table. + + So add 'ubifs' in other_fs[] to fix it. + +commit 47a550defd0209d57d34e50290942fb6b1c286f5 +Author: Bart Van Assche +Date: Thu Dec 21 18:52:35 2023 -0800 + + DISMAN-EVENT-MIB: Unbreak the MSVC build + + Fixes: e5d60f0c46c5 ("DISMAN-EVENT-MIB: Initialize 'name' and 'name_buf'") + +commit 9226f4f2aded71c64f4d9e3416b783457ee95695 +Author: Bart Van Assche +Date: Thu Dec 21 17:23:39 2023 -0800 + + ci, Windows: Bump the OpenSSL version + +commit b4598662a39ff6974119c900ea56a4d020eac366 +Author: Bart Van Assche +Date: Wed Dec 20 13:08:06 2023 -0800 + + Android: Fix the build + + Include for the fd_set type. In the configure script, + check whether 'unsigned long' is the underlying type of fd_set. Use + u_long instead of ulong. + +commit 7f5fb8083d31834fec8bc89603f3d02115516fed +Author: Niels Baggesen +Date: Wed Dec 13 21:04:39 2023 +0100 + + Update the parser to warn about duplicate OBJECTs, TEXTUAL-CONVENTIONs and values in enums + + Duplicate enum label 'byte' at line 550 in ...lwapp/CISCO-LWAPP-SI-MIB.my. First at line 549 + Duplicate TEXTUAL-CONVENTION 'CucsStorageControllerId' at line 48175 in .../CISCO-UNIFIED-COMPUTING-TC-MIB.my. First at line 48117 + +commit 43f0e3fdc8de03a5e7a0f864694744558ca5da03 +Author: Niels Baggesen +Date: Wed Dec 13 21:00:48 2023 +0100 + + snmptest: plug a possible memory leak. + +commit bfc27f6182f41173834c97baacead26f116d6b79 +Author: Niels Baggesen +Date: Wed Dec 13 20:59:05 2023 +0100 + + Update SNMP-TLS-TM-MIB.txt to RFC 9456 version. + +commit 8570eb2b40dd342fb4e2e2f0a34fe0eef400079a +Author: Niels Baggesen +Date: Fri Nov 24 13:22:19 2023 +0100 + + Allow TLS protocols higher than TLS10. + Modern TLS versions will not connect using these old versions. + +commit 694b3869e6a2514a7b1073e4b5f7a15ce0c8e668 +Author: Niels Baggesen +Date: Fri Nov 24 13:15:52 2023 +0100 + + Fix matching of certs by using SHA1 fingerprints. + PR#278 changed default for certs to SHA512, but now matching certs fails. Change the fingerprint reuqests to use SHA1 explicit. + +commit e5d60f0c46c58b99130e8ae8098dc5b192091ef6 +Author: Bart Van Assche +Date: Thu Nov 23 14:12:28 2023 -0800 + + DISMAN-EVENT-MIB: Initialize 'name' and 'name_buf' + + This patch suppresses the following two Coverity reports: + + CID 407579: Uninitialized variables (UNINIT) + Using uninitialized value "*name_buf" when calling "memcpy". [Note: The source code implementation of the function has been overridden by a builtin model.] + + CID 407578: Uninitialized variables (UNINIT) + Using uninitialized value "name_buf_len". + +commit eacb48436f24daa2e33d91c36c17ff71e442557e +Author: Bart Van Assche +Date: Sat Nov 11 09:54:03 2023 -0800 + + configure: Run autoreconf + + Fixes: 7779e40f6e1d ("snmpd: Unbreak the build") + +commit 1755a85c648e497099d3278986dee37065d35e04 +Author: Bart Van Assche +Date: Sat Nov 11 09:51:30 2023 -0800 + + libsnmp: Optimize read_config_save_objid() + + Make this function slightly faster by eliminating a strlen() call. + Declare the 'oid' input parameter const. Remove a superfluous cast. + +commit ea6c54f508ca8897961f4faa8d7b04793151db78 +Author: Bart Van Assche +Date: Sat Nov 4 16:32:22 2023 -0700 + + IF-MIB: Fix the test for skipping PCI bus scanning + + Reported-by: https://github.com/abutcher-gh + Fixes: 8c301c1e0600 ("IF-MIB: Do not scan for PCI devices if no PCI bus is available") + +commit a59d03aa1ecec19eaf9515896f6095bfbe77fb7c +Author: Moshe Kaplan +Date: Mon Oct 16 22:04:22 2023 -0400 + + snmpusm.c: Improve error handling + + Check that line is not NULL before passing it to `atoi`. + Fixes #734 + +commit ba844b797ce90cd00a8e28844f1090c5c37ac103 +Author: Moshe Kaplan +Date: Tue Oct 17 13:17:04 2023 -0400 + + snmp_transport.c: Remove redundant if statement + + Found with cppcheck + +commit 98d2c46a1087c6cec627b243f189b0f305c9cec2 +Author: Moshe Kaplan +Date: Tue Oct 17 11:55:18 2023 -0400 + + agent_global_vars.h: Remove redundant forward declaration + + Detected with SonarCloud + +commit 24e233bbb2fd9b7debf8cfcf775ccd9f63f3b845 +Author: Moshe Kaplan +Date: Sat Oct 14 22:55:13 2023 -0400 + + lookupCtlTable.c: Check mallocs + +commit a51a0f1685e7d3159736fa44aa470c821db076b5 +Author: Moshe Kaplan +Date: Thu Oct 12 14:44:41 2023 -0400 + + snmpusm.c: Fix segfault when parsing config file createUser line + + snmpusm.c: Fix segfault when parsing config file createUser line + If no authentication profile is specified, use the default. + + Fixes #416 + +commit 73695f05d58f8c50c93e2eca62268087f743a261 +Author: Moshe Kaplan +Date: Thu Oct 12 10:17:17 2023 -0400 + + ucdDemoPublic.c: Fix memory leak (Coverity 85639) + + ucdDemoPublic.c: Fix memory leak (Coverity 85639) + Avoid leaking engineID + +commit 11c075958db84e9382df0d24eabe63a6f4211fa8 +Author: Tomas Klacko +Date: Tue Oct 3 13:02:59 2023 -0700 + + libsnmp: Add support for IPV6_RECVPKTINFO + + Fixes: https://github.com/net-snmp/net-snmp/pull/718 + + [ bvanassche: combined three patches into one, inserted a blank line and + removed superfluous parentheses ] + +commit 237370c9193700f0a60736c175a3c66d072058f9 +Author: Moshe Kaplan +Date: Mon Oct 9 00:05:38 2023 -0400 + + T011snmp_old_api_registration_cagentlib.c: Avoid leaking session object + + Avoid leaking session object, so another test passes with leak sanitizer enabled + +commit f263a62936f488c088bb5240fe634c9b671c4b41 +Author: Moshe Kaplan +Date: Mon Oct 9 00:45:03 2023 -0400 + + T102pdu_build_clib.c: Fix memory leaks + + T102pdu_build_clib.c: Fix memory leaks + +commit abc227f9867fba913822ffb3d399a8f7b9bfdf81 +Author: Moshe Kaplan +Date: Mon Sep 18 21:25:50 2023 -0400 + + snmpv3.c: Avoid leaking memory if -E or -e is repeated + + snmpv3.c: Avoid leaking memory if -E or -e is repeated + + Fixes #703 + +commit 8d7f09fff3057b8073f7fcda26565c0eb8b0c607 +Author: Moshe Kaplan +Date: Mon Sep 18 13:44:42 2023 -0400 + + snmpv3.c: Avoid leaking memory if -X or -A is repeated + + snmpv3.c: Avoid leaking memory if -X or -A is repeated + +commit 938ad6d934b99c2bcc49ddd72ac84894bebcb6a3 +Author: Bart Van Assche +Date: Mon Sep 18 12:14:09 2023 -0700 + + libsnmp: Fix a crash in netsnmp_parse_args() + + Prevent that the following command triggers a segmentation fault: + + apps/snmpget -LF0 + + See also https://github.com/net-snmp/net-snmp/issues/695. + +commit 929736d251213c3af1fd0806e3f872876d4c0dec +Author: Bart Van Assche +Date: Mon Sep 18 12:25:36 2023 -0700 + + libsnmp: Fix recently introduced compiler warnings + + Fixes: 8e8d56b7b947 ("libsnmp: Fix a crash in netsnmp_parse_args()") + +commit 9fed14fb19548160ed08573f68bb9d503b338362 +Author: Moshe Kaplan +Date: Mon Sep 18 12:21:15 2023 -0400 + + snmpv3.c: Avoid leaking memory if command-line arg is repeated + + snmpv3.c: Avoid leaking memory if command-line args are repeated + + Specifically, -n, -u, -K, and -k + +commit b9ca6975456fc3a7674fca47b24f9ad4cd99be61 +Author: Niels Baggesen +Date: Wed Oct 25 07:49:15 2023 +0200 + + Fix a backporting glitch + +commit e9c4e72b32951e30c303fb081703e18ac8d477ec +Author: Michael Veksler +Date: Mon Jun 12 09:14:21 2023 +0300 + + libsnmp: Fix SNMPv3 multithreading support for snmp_sess_open() + + Fixes: https://github.com/net-snmp/net-snmp/pull/586 + + [ bvanassche: Reduced the number of arguments of usm_build_probe_pdu() to two ] + +commit b5b2483fdd83c578c8cb0d9a72899c3b8bd5d70a +Author: Bart Van Assche +Date: Sat Oct 7 14:56:15 2023 -0700 + + apps: Remove the code again that clears netsnmp_session objects + + Removing this code is safe now that _sess_copy() duplicates all memory that + is freed by netsnmp_cleanup_session(). + +commit 668baac9f54727bca9e1983cd328a4d4d2430c90 +Author: Bart Van Assche +Date: Sun Oct 8 07:34:06 2023 -0700 + + libsnmp: Make _sess_copy() duplicate all security related information + +commit 56795de0a9cd1987007ac9b90868c7972c77f57f +Author: Bart Van Assche +Date: Sun Oct 8 06:50:25 2023 -0700 + + MinGW: Unbreak the Perl module build + +commit 8aac5c1be01d4f91ce3c0da3afb5cebfbdc73538 +Author: Bart Van Assche +Date: Sat Oct 7 19:43:45 2023 -0700 + + configure: Enable -Wcast-function-type + +commit 2d396db5aac06cb870922b6ccf26d5d5e7e0b614 +Author: Bart Van Assche +Date: Sat Oct 7 15:00:57 2023 -0700 + + libsnmp, MIBs, snmpd: Remove function casts + + This patch resolves a number of undefined behavior complaints reported + by the clang UndefinedBehaviorSanitizer. + +commit af1b7f77975bbb2fcbdb3f005f8cb010d1d33cd3 +Author: Adam Gajda +Date: Mon Oct 2 16:40:31 2023 +0200 + + Fix configuration of NETSNMP_FD_MASK_TYPE + +commit 21b612e1cb02350448568240dfce7d213820e081 +Author: Bart Van Assche +Date: Thu Sep 28 10:47:45 2023 -0700 + + UCD-SNMP proxy: Fix an uninitialized variable dereference + + Fixes: f975916a847d ("apps: Use netsnmp_cleanup_session()") + +commit 1c6105cb46e13d2218e701b13ca1bb1c0c73d102 +Author: Moshe Kaplan +Date: Tue Sep 26 19:49:00 2023 -0400 + + netsnmp_config_api.3.def: Spelling and grammar + + netsnmp_config_api.3.def: Spelling and grammar + +commit 07cccb8d940daf5b41f5783b9c460248ac5c21e7 +Author: Moshe Kaplan +Date: Tue Sep 26 17:14:05 2023 -0400 + + More spelling and grammar fixes + +commit 8e3d6ba0c7449b579abf0f3867a72990f07c1fda +Author: Moshe Kaplan +Date: Tue Sep 26 13:48:35 2023 -0400 + + Fix many typos + +commit 69ebaf36c9b5ab1938a4137c4c5ae85af706f85f +Author: Bart Van Assche +Date: Tue Sep 26 21:27:06 2023 -0700 + + DISMAN-MIB: Use u_char for bitmasks + + Additionally, change schedWeekDay into a one element array to suppress a + Coverity complaint. + +commit b0a32da4b2ba7295ded1d7a6514e2d0a250787c1 +Author: Moshe Kaplan +Date: Tue Sep 26 13:23:07 2023 -0400 + + snmpusm.c: fix text phrasing + + "active" to "activate" + +commit 81bf153c9c84c79e87485772fd89891c4f445d4c +Author: Bart Van Assche +Date: Sun Sep 24 15:16:11 2023 -0700 + + apps: Use netsnmp_cleanup_session() + + The changes compared to an earlier attempt (commit 21b16eba6024 ("apps: Use + netsnmp_cleanup_session()")) are as follows: + - netsnmp_cleanup_session() is now called for all session objects allocated + on the stack instead of only for a subset of these objects. + - A copy of strings is assigned to netsnmp_session members. + - If an snmp_close() call is followed by a netsnmp_cleanup_session() call, + the netsnmp_session object is cleared to prevent a double free. + + This patch should not reintroduce + https://github.com/net-snmp/net-snmp/issues/707. + +commit 84aba8f8f878b977e98c46af0584723885660a3e +Author: Bart Van Assche +Date: Sun Sep 17 16:06:57 2023 -0700 + + libsnmp: Fix a memory leak in the MIB parser + + Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62448 + +commit 62401c9c77d99ff2da2871e5a49e68b3cd21b87e +Author: Emil Bartczak +Date: Tue Dec 15 21:37:25 2020 +0100 + + Fix the crash of snmpd when snmptrapd terminates the TCP connection. + + See also: https://github.com/net-snmp/net-snmp/issues/187 + + Re-opening of TCP connection with snmptrapd is still not supported. + +commit b1a4288289ba2bc38b074a0c922178e5bf488411 +Author: Bart Van Assche +Date: Sun Dec 4 15:53:54 2022 -0800 + + testing/fulltests/unit-tests/T105trap_parse_clib: Fix a memory leak + +commit 65a9d0f29be11f3e6ca75eb228ab116d71f92aca +Author: Bart Van Assche +Date: Thu Sep 28 12:33:52 2023 -0700 + + ci, Windows: Bump the OpenSSL version number + +commit 803569fbfa22108eb4a1ab8314e39e642d97e28c +Author: Bart Van Assche +Date: Mon Sep 25 13:47:01 2023 -0700 + + libsnmp: Micro-optimize netsnmp_cleanup_session() + + Clear the entire netsnmp_session object at once instead of clearing + this struct pointer by pointer. + +commit edce16ae77498a43b1937bb895ca79c761a6f616 +Author: Bart Van Assche +Date: Mon Sep 25 13:43:36 2023 -0700 + + libsnmp: Reduce the indentation level in snmp_free_session() + +commit 7779e40f6e1d31fa184a1e7423302408706f7bb3 +Author: Bart Van Assche +Date: Sun Sep 10 06:54:42 2023 -0700 + + snmpd: Unbreak the build + + malloc_trim() is defined by glibc but is not available on BSD systems. + + Fixes: 585d35cc51e3 ("agent: release memory back to the system after freeing cache data") + + Conflicts: + configure.d/config_os_functions + +commit b5566290c92d8f83fde14b3f4bbfb18b025fc0c8 +Author: Nicolae Busuioc +Date: Tue Sep 19 12:31:48 2023 +0200 + + Adding by default server cipher order + +commit a56518ab60b2b86a2084374d9c3439b9a7e832e1 +Author: Bart Van Assche +Date: Mon Sep 18 08:21:50 2023 -0700 + + libsnmp: Fix a crash in netsnmp_parse_args() + + Prevent that netsnmp_parse_args() crashes if one of the following + argument lists is passed: -IS or -Is. + + Fixes: https://github.com/net-snmp/net-snmp/issues/692 + +commit 0e82772dc55a26200d0d6c09c53d884d082596b8 +Author: Bart Van Assche +Date: Wed Sep 13 06:57:01 2023 -0700 + + libsnmp: Fix a memory leak in the MIB parser + + This patch should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62295 . + +commit 33466199a979765e8396245ed14a3a748eb3cd8c +Author: Bart Van Assche +Date: Mon Sep 11 23:00:14 2023 +0000 + + libsnmp: Port the SSH domain transport to FreeBSD + +commit 27cd9e0d0c2683059ebcc3b9e233b02531b77c72 +Author: Bart Van Assche +Date: Mon Sep 11 16:06:07 2023 -0700 + + configure: Fix the IFNET_NEEDS_KERNEL_STRUCTURES test + +commit e5b2bfe282b28c6a572251040ec509ffcbb5ff45 +Author: Bart Van Assche +Date: Mon Sep 11 16:03:54 2023 -0700 + + MIB-II: Declare functions that are used in multiple source files + +commit c567f34b566d5e5d2eb039a0731f80829550ba60 +Author: Bart Van Assche +Date: Mon Sep 11 16:03:18 2023 -0700 + + FreeBSD: Add a missing include directive + +commit 33be698855b6671e29a84fad22cdd9ee18baf003 +Author: Bart Van Assche +Date: Mon Sep 11 16:02:09 2023 -0700 + + snmpd: Suppress a compiler warning + + Prevent that the compiler complains about casting a pointer to an integer of + a different size. + +commit 050782fc7fa8dc12185f898b9fde58958dba3dbc +Author: Bart Van Assche +Date: Sun Sep 10 16:39:10 2023 -0700 + + libsnmp: Fix memory leaks in MIB parsing code + + See also https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60833 . + +commit 7d1733f9535f89183a31120ef5b4123ee3faa4b3 +Author: Bart Van Assche +Date: Sun Sep 10 16:33:49 2023 -0700 + + libsnmp: Simplify the code for parsing a MIB + + parse() only has one caller and that caller passes NULL as second argument. + Hence, remove the second argument of parse() and remove the code that depends + on the second argument being not NULL. Reduce the scope of the 'nnp' variable. + +commit 9e608f44ed645baa8f0721a08951dccfac6ac3a0 +Author: Moshe Kaplan +Date: Sat Sep 9 23:44:33 2023 -0400 + + snmpget.c: Avoid leak if parsing OID fails + + snmpget.c: Avoid leak if parsing OID fails. This leak would not normally cause any problems, but might make investigating other leaks more difficult + +commit 47ffd72dc8c5b0e8ba0aafa51c467f3bb62607bc +Author: Moshe Kaplan +Date: Sun Sep 10 01:08:26 2023 -0400 + + encode_keychange.1.def: Fix typo + +commit 4e7ce92fbdf1886cb09c9eea3edcb2f43cc91bb3 +Author: Ilyes Ben Hamouda +Date: Wed Jul 5 16:26:30 2023 +0200 + + agent: release memory back to the system after freeing cache data + + The heap memory increases, when retrieving IP-FORWARD MIB objects, in + proportion to the number of entries in the routing table. + It is not given back to the system when freed due to a glibc limitation + (See the link below). + + The IP-FORWARD MIB implementation as well as other MIB implementations + use data caching. + Cache management depends on cache flags. For instance, based on + NETSNMP_CACHE_AUTO_RELOAD flag, some caches are reloaded automatically, + while others are reloaded on request. + Each cache has also a timeout. The timeout is checked on cache access. + If expired, the cache is reloaded. + A garbage collector also checks the timeout expiry every minute to + release cache resources. + + Call malloc_trim() to return freed memory to the system after the + garbage collector has freed cache data only if the cache will not be + automatically reloaded. + + In the best-case scenario, malloc_trim will only be called once after + cache accesses have been completed. + + Worst-case, the GC detects the timeout expiry just before a request. + Hence, there will be a wasteful trim, as the cache will be immediately + loaded later. There is a way to avoid this behavior by introducing + NETSNMP_CACHE_RESET_TIMER_ON_USE flag which will reset cache timeout + on each cache access but this may lead to a stale cache if the polling + happens too fast. + + Avoid introducing this flag since it depends on polling period. + + Note: malloc_trim has a linear complexity, it seems to be safe but it may + softly degrade performance when frequently called. + + Link: https://sourceware.org/bugzilla/show_bug.cgi?id=15321 + + Signed-off-by: Ilyes Ben Hamouda + +commit 4f6e1a352a690c0a46012b39234c1479cbe81bfd +Author: Ilyes Ben Hamouda +Date: Mon Jul 3 17:09:13 2023 +0200 + + agent: keep cache flags unchanged + + Cache flags are managed by the MIB implementation. + + Do not clear/set NETSNMP_CACHE_AUTO_RELOAD flag to ensure + scheduling auto-reload only once. This is already managed + by netsnmp_cache_timer_start() via cache timer_id check. + + Instead, check the timer_id validity in the cache handler + before calling netsnmp_cache_timer_start() to avoid warnings + if auto-reload is already scheduled. + + Fixes: e6e11ebcc493 ("Only schedule automatic loading once for any given cache.") + + Signed-off-by: Ilyes Ben Hamouda + +commit e6a092041424b5f5fd5345602ce6f489a0409ace +Author: Ilyes Ben Hamouda +Date: Mon Jul 3 16:54:32 2023 +0200 + + agent: clear the timer_id on cache timer stop + + The timer_id is set when the cache timer is started. + However, it is not cleared when the cache timer is stopped, + preventing it from being restarted later. + + Clear the cache timer_id after unregistering the alarm + in netsnmp_cache_timer_stop(). + + Fixes #588 + + Fixes: 543d4b22666c ("- always consider cache w/timeout of -1 as expired (load cache every request)") + + Signed-off-by: Ilyes Ben Hamouda + +commit adf8b254d08b330f89988a791e3b8f007f34c570 +Author: Moshe Kaplan +Date: Wed Aug 30 22:54:49 2023 -0400 + + pingCtlTable.c: Validate create_pingCtlTable_data() allocations + + Ensure all memory allocations within create_pingCtlTable_data() were successful + +commit b050271f6b0a78558627d7f17737248072ec85f8 +Author: Bart Van Assche +Date: Sat Apr 22 17:54:35 2023 -0700 + + libsnmp: Do not pass NULL to memcmp() + +commit f701087096dc337a9ff36a747f3a53e1aacef2f6 +Author: Bart Van Assche +Date: Thu Sep 21 07:43:31 2023 -0700 + + Revert "apps: Use netsnmp_cleanup_session()" + + This reverts commit 21b16eba60245bc84149d338a9700e5915bda292. + + Fixes: https://github.com/net-snmp/net-snmp/issues/707 + +commit 85c6aba35d96802a580ec88fe57b2813cc766e84 +Author: Bart Van Assche +Date: Thu Sep 21 07:43:26 2023 -0700 + + Revert "apps/snmpusm: fix a memory leak" + + Prepare for reverting patch "apps: Use netsnmp_cleanup_session()". + + This reverts commit d6a1af15777981a20778260c25245f36bf7c25a6. + +commit 2230933c7fab36875af219f2bddc31544efabda4 +Author: Niels Baggesen +Date: Mon Sep 11 19:26:43 2023 +0200 + + Prepare for FreeBSD 15 + +commit 57b0a196af58222b1877421a234a7638206a84c5 +Author: Niels Baggesen +Date: Mon Sep 11 19:24:33 2023 +0200 + + Restore the NEWS/CHANGES for 5.9.2 as released with 5.9.3 + + skipped due to a last minute library versioning found bug -- use 5.9.3 instead + +commit db0f7f83b820b6be91b25417d1e21fa32895f937 +Author: Bart Van Assche +Date: Sat Sep 9 15:00:43 2023 -0700 + + snmpd: Fix nsLogMaxLevel handling + + From the nsLogMaxLevel description in mibs/NET-SNMP-AGENT-MIB.txt: "The + maximum priority level for which this logging entry should be applied." + Make the implementation match the description. + + See also https://github.com/net-snmp/net-snmp/issues/681 . + +commit 8c18c7442b68cae57812b4e340bee257d664c841 +Author: Bart Van Assche +Date: Fri Sep 1 09:52:23 2023 -0700 + + configure: Fix the version number + + Fixes: 7d38b8299e26 ("version update for 5.9.4") + +commit 4034ce072d0398a204c3552525424bc4a2bdebcf +Author: Niels Baggesen +Date: Thu Aug 31 19:06:58 2023 +0200 + + Fix bad protypes in sctpScalars_freebsd.c + +commit f12d5668122c7ea59fce9f5818bd8787f9b9af39 +Author: Niels Baggesen +Date: Thu Aug 31 19:03:44 2023 +0200 + + Another stab at fixing -Op (issue #554) + +commit 889daaffcea38eeb0dc8c6d2a944a1a61fd2838e +Author: Niels Baggesen +Date: Thu Aug 31 18:55:35 2023 +0200 + + Fix T032snmpv3engineidchange_simple for non Linux-systems. + FreeBSD (and other BSDs) need a value after "sed -i". + BSDs getopt does not allow mixing options and other arguments. + +commit e59866aeba64463e71933f92d066f38145d4f2b6 +Author: Niels Baggesen +Date: Thu Aug 31 18:54:42 2023 +0200 + + FreeBSD 14 needs another header to compile ipv6.c + +commit 619aeb7ea461d69578121e50b8e481bbca35307a +Author: Bart Van Assche +Date: Wed Aug 16 17:07:39 2023 -0700 + + configure: Remove the rpmdbOpen() check + + Commit 8e08fc520246 ("Tweak RPM handling to work with library version 4.9") + removed all rpmdbOpen() calls. Hence remove the rpmdbOpen() configure test. + + Conflicts: + configure + +commit 8c4db403d24c979c03fd40133e150c7c4af7738a +Author: Bart Van Assche +Date: Wed Aug 16 17:05:15 2023 -0700 + + HOST-RESOURCES-MIB: Declare the pkg_directory[] arrays static + +commit d8c5227fb75c9bf5ec159a1f226daa8ed64b7f52 +Author: Josef Řídký +Date: Wed Aug 9 16:51:28 2023 +0200 + + Add support for RPM SQLite DB background. + + From RPM 4.16 the SQLite support is available for RPM DB. + After https://fedoraproject.org/wiki/Changes/Sqlite_Rpmdb, rpm changed + it's background DB from Berkeley to SQLite in Fedora. + Net-SNMP is using hard coded paths to determine where RPM DB files are. + + This update is adding check for rpmdb.sqlite file in order to be able + invalidate internal cache after system package change. + + Closes #596 + + Conflicts: + agent/mibgroup/host/data_access/swinst_rpm.c + +commit fdf72da85b11f5cc7de5e237dd4ac79d8d0685dc +Author: Josef Řídký +Date: Wed Aug 30 20:33:42 2023 +0200 + + Fix regression of memory leak when using RPMDB macros. + + This change is fixing memory leak when using RPMDB macros. The fix was + introduced in PR #49 but was overwritten over time. Fix is needed in + agent/mibgroup/host/hr_swinst.c only as the regression in the + agent/mibgroup/host/data_access/swinst_rpm.c was fixed few weeks ago. + +commit 44fc3ca6695b079aac12953d9a3112dfd46d241a +Author: Moshe Kaplan +Date: Wed Aug 30 16:16:46 2023 -0400 + + master_admin.c: Validate that init_agent_snmp_session() was successful + + master_admin.c: Validate that init_agent_snmp_session() was successful + +commit 010c79470d9f7cb569bff34d35235a4b721a3e59 +Author: Moshe Kaplan +Date: Wed Aug 30 16:41:06 2023 -0400 + + snmp_agent.c: Ensure init_agent_snmp_session() was successful + +commit d8fea848f2b076e4d3cb6f5e071a1c83a896bb5b +Author: Moshe Kaplan +Date: Wed Aug 30 21:25:49 2023 -0400 + + mib2c-update.1.def: Typos + +commit e74da2c26ae7f726b460604460b82f683d2e16e9 +Author: Moshe Kaplan +Date: Wed Aug 30 21:22:33 2023 -0400 + + agentxtrap.1.def: Typos and grammar + +commit d3e146daa7cd8d1de45f192686fcda481f3466e7 +Author: Moshe Kaplan +Date: Wed Aug 30 21:20:25 2023 -0400 + + snmpd.conf.5.def: Fix misspellings and grammar typos + Conflicts: + man/snmpd.conf.5.def + +commit cce21c09044d6166a8c96f197c2b039424e32ad2 +Author: Moshe Kaplan +Date: Wed Aug 30 17:43:57 2023 -0400 + + tools.c: Ensure memory allocations were successful + Conflicts: + snmplib/tools.c + +commit a29971a426c8c3b42f7f48217f100379d5855bed +Author: Moshe Kaplan +Date: Wed Aug 30 17:30:34 2023 -0400 + + snmp_transport.c: Validate memory allocations + + Ensure malloc() and strdup() were successful + +commit 7d509eeb4f13130f70b056b0e7a5fdd31e0cc284 +Author: Moshe Kaplan +Date: Wed Aug 30 17:24:20 2023 -0400 + + snmp_service.c: Validate that malloc() was successful + +commit f62068c24cddd15eed8c382fd01723decf30b0b3 +Author: Moshe Kaplan +Date: Wed Aug 30 17:09:03 2023 -0400 + + snmp_enum.c: Validate that strdup() was successful + +commit c074fcc2f694a1e69eae72fa04c09a2eda4d3416 +Author: Moshe Kaplan +Date: Wed Aug 30 17:02:54 2023 -0400 + + read_config.c: Validate that strdup() was successful + +commit df73ab4c9288e9e55985c9ad833337488ac421b9 +Author: Moshe Kaplan +Date: Wed Aug 30 16:52:48 2023 -0400 + + parse.c: Validate that strdup() was successful + +commit bc08d8f81af4a5316642dbfc36fd325052372ed7 +Author: Moshe Kaplan +Date: Wed Aug 30 16:46:20 2023 -0400 + + container_binary_array.c: Validate that netsnmp_binary_array_initialize() was successful + +commit 668c63277c9a63cc56aaeaff71bef5fe0e153e03 +Author: Moshe Kaplan +Date: Wed Aug 30 21:27:10 2023 -0400 + + mib2c.1.def: Hyphens, missing word + +commit b861ae4f2af5f97a6ebdedca70fd778d76f6c28f +Author: Moshe Kaplan +Date: Wed Aug 30 21:28:36 2023 -0400 + + mib2c.conf.5.in: Grammar + +commit 6edfda9d063b7d5680f7e8bb31d84c0d71f2c0ca +Author: Moshe Kaplan +Date: Wed Aug 30 21:30:06 2023 -0400 + + net-snmp-create-v3-user.1.def: Grammary + +commit 1c0450789808d08ada9af37d690053fa3fd96941 +Author: Moshe Kaplan +Date: Wed Aug 30 21:32:01 2023 -0400 + + netsnmp_agent_api.3.def: Spelling and grammar + +commit 3e2fefdd59ecb7b39105470ec82a338577bd8532 +Author: Moshe Kaplan +Date: Wed Aug 30 21:34:23 2023 -0400 + + netsnmp_mib_api.3.def: Spelling and grammar + +commit 64c30c268997b28c64e717d673e74ac336c8d08d +Author: Moshe Kaplan +Date: Wed Aug 30 15:41:41 2023 -0400 + + agent_registry.c: Avoid memory leak if strdup fails + +commit 76e05bb509e03cf61a4c57d82ec16d171835a7e3 +Author: Moshe Kaplan +Date: Wed Aug 30 16:10:46 2023 -0400 + + old_api.c: Check result of netsnmp_duplicate_variable() + +commit 105f0b6f9fa93ad678e0bf2fd6dc207fd2cf8e70 +Author: Loïc Sang +Date: Wed Aug 30 11:32:52 2023 +0200 + + snmplib: do not filter internal request + + sourceFilterType and sourceFilterAddress options in snmpd.conf. However, + once activated, internal requests are also blocked. The filtering is + based on IP in the string returned by the function "fmtaddr". Internal + requests do not have a source IP, instead of an IP address, the function + returns a string that starts with "callback" following a file descriptor + numero. These internal requests are generated by alarms to define event + triggers. If they are blocked, no traps will be sent. + + Therefore, do not filter internal requests by checking if the string + returned by "fmtaddr" starts with "callback". + + Fixes: 9d28612ac03b ("add packet filtering by source ip") + Signed-off-by: Loïc Sang + +commit 5205b5c485b1e1e7266e6281c03aef10a9239cfe +Author: Moshe Kaplan +Date: Sun Aug 27 23:40:59 2023 -0400 + + snmpTlstmCertToTSNTable.c: Fix memory leak (Coverity 85750) + + snmpTlstmCertToTSNTable.c: Fix memory leak (Coverity 85750) + + Avoid leaking memory referenced in watcher if netsnmp_create_handler_registration fails. + +commit d22037ee0289d8c86ccdf29c7c15df89842446e8 +Author: Moshe Kaplan +Date: Sun Aug 27 21:26:14 2023 -0400 + + read_config.c: Remove dead store + + Remove dead store detected by clang. + + read_config.c:1454:26: warning: Value stored to 'ctmp' during its initialization is never read [deadcode.DeadStores] + struct config_files *ctmp = config_files; + +commit 02572006fce8650f2ddfb0feec24a12fd9ee6b69 +Author: Moshe Kaplan +Date: Sun Aug 27 21:54:16 2023 -0400 + + snmpNotifyTable_data.c: Fix memory leak (Coverity 266308) + + snmpNotifyTable_data.c: Fix memory leak (Coverity 266308) + + Avoid leaking memory referenced in nptr if netsnmp_memdup_nt fails. + +commit e2bc7ce863a49150843d7eb5371fbfde5a75df68 +Author: Moshe Kaplan +Date: Sun Aug 27 00:49:29 2023 -0400 + + lookupCtlTable.c: Fix memory leak (Coverity 85698-2) + + lookupCtlTable.c: Fix memory leak (Coverity 85698-2) + Avoid leaking memory referenced in address if IPv4 DNS lookup fails. + +commit 935828c35b55ca563e8446c4463e910200410413 +Author: Moshe Kaplan +Date: Sun Aug 27 00:52:41 2023 -0400 + + lookupCtlTable.c: Fix memory leak (Coverity 85698-3) + + lookupCtlTable.c: Fix memory leak (Coverity 85698-3) + Avoid leaking memory referenced in address if IPv6 DNS lookup fails. + +commit 2eb675f46d15f24bc9c244a038d98ec741008571 +Author: Moshe Kaplan +Date: Sun Aug 27 00:59:56 2023 -0400 + + lookupCtlTable.c: Fix memory leak (Coverity 85732) + + Avoid leaking memory referenced in StorageTmp if invalid data is passed in. + +commit 647c0c022f5917abbf2161a7fe8a727eb24413a7 +Author: Moshe Kaplan +Date: Sun Aug 27 10:16:10 2023 -0400 + + subagent.c: Fix memory leak (Coverity 357928) + + Avoid leaking memory referenced in smagic if snmp_clone_pdu fails. + +commit 18ceaa4610a71af1b4ece5b3a3f29f03b9e46d89 +Author: Moshe Kaplan +Date: Fri Aug 18 11:20:46 2023 -0400 + + mteTrigger.c: Fix copy-paste bug (Coverity 85524) + + mteTrigger.c: Fix copy-paste bug (Coverity 85524) + + Examine the proper variable when determining whether or not fire a fall event. + +commit 9fec75b95648d10435bc74c236850902f7bc8829 +Author: Moshe Kaplan +Date: Fri Aug 18 11:25:47 2023 -0400 + + mteTrigger.c: Fix copy-paste bug (Coverity 85536) + + mteTrigger.c: Fix copy-paste bug (Coverity 85524) + + Examine the proper variable when determining whether or not fire a fall event. + +commit 6257bf2ee570480c364d2af33bc014f56594c0f7 +Author: Moshe Kaplan +Date: Mon Aug 21 10:58:23 2023 -0400 + + expValue.c: Fix memory leak (Coverity 85691) + + expValue.c: Fix memory leak (Coverity 85691) + + Avoid leaking memory referenced in var if invalid parameters are passed in by only allocating memory if parameters are valid. + +commit bab2a8685d337a328f01d98e44ac204f3e8edb0b +Author: Moshe Kaplan +Date: Mon Aug 21 10:50:45 2023 -0400 + + nsDebug.c: Fix memory leak (Coverity 85684) + + nsDebug.c: Fix memory leak (Coverity 85684) + + Free memory allocation referenced in table_info that is not free()'d in the event of a failure + +commit 49edf5d413b6423b6080354e92a55d60264f1237 +Author: Moshe Kaplan +Date: Thu Aug 24 21:08:45 2023 -0400 + + snmpv3.c: Confirm snmpv3_generate_engineID() was successful before using data from it + + If snmpv3_generate_engineID() fails, it returns NULL, possibly without modifying the passed-in engineIDLen parameter. This change examines the return value from snmpv3_generate_engineID() before examining the possibly-uninitialized engineIDLen. + +commit cce53ea81b018959543ce997cc5f888285fea7c9 +Author: Moshe Kaplan +Date: Thu Aug 24 20:28:08 2023 -0400 + + snmpUnixDomain.c: Free memory if recvfrom fails + + Free memory if recvfrom() fails. + +commit 0a9e32e8a09b9ca9293d5e5306e3838371c6b058 +Author: Moshe Kaplan +Date: Thu Aug 24 16:53:44 2023 -0400 + + icmp.c: Avoid uninitialized variable error + + Set the variable msg_stats_table_info to a default value of NULL, to avoid potentially accessing the pointer when it's uninitialized + +commit afd94ebfbcaf94e752bc756cf7a525edd36fd1b8 +Author: Bart Van Assche +Date: Mon Aug 21 17:17:04 2023 -0700 + + apps/snmptrapd_handlers: Remove a superfluous pointer check + + Because the third argument passed to command_handler() is never NULL, remove + a NULL check for that argument. This patch addresses the following Coverity + report: + + CID 399166 (#1 of 1): Dereference before null check (REVERSE_INULL) + check_after_deref: Null-checking handler suggests that it may be null, but it + has already been dereferenced on all paths leading to the check. + +commit 3be30527999a6a0be08f618b3d055a6738dd6e49 +Author: Moshe Kaplan +Date: Mon Aug 21 12:12:17 2023 -0400 + + netSnmpHostsTable.c: Fix memory leak (Coverity 344583) + + netSnmpHostsTable.c: Fix memory leak (Coverity 344583) + + Free memory allocation referenced in my_handler that is not free()'d in the event of a failure. + +commit b9ef1a8cf115deb79cb1cb05e6604dd1c7e35361 +Author: Moshe Kaplan +Date: Mon Aug 21 12:07:12 2023 -0400 + + route_linux.c: Fix memory leak (Coverity 344582) + + route_linux.c: Fix memory leak (Coverity 344582) + + Avoid leaking memory referenced in entry if the IPv6 data is formatted incorrectly. + +commit 68b5cff8703bd575c39071e0486c1614ce494d98 +Author: Moshe Kaplan +Date: Mon Aug 21 12:01:36 2023 -0400 + + deliverByNotify.c: Fix memory leak (Coverity 144379) + + Avoid leaking memory referenced in vars if it fails to issue the query. + +commit 4554b2a8cbd8ed6229a90c885f650929aa3063cf +Author: Moshe Kaplan +Date: Mon Aug 21 11:45:51 2023 -0400 + + table_dataset.c: Fix memory leak (Coverity 144371) + + Free memory allocation referenced in table_info that is not free()'d in the event of a failure + +commit 7184031472d10d64e182ab136fa0c73b4253f0f6 +Author: Moshe Kaplan +Date: Mon Aug 21 11:27:58 2023 -0400 + + lookupCtlTable.c: Fix memory leak (Coverity 85698-4) + + Avoid leaking memory referenced in address if an invalid argument is passed in. + +commit 47e1d54e24b250aa7e8dac2de051a4dbcead81de +Author: Moshe Kaplan +Date: Mon Aug 21 09:43:15 2023 -0400 + + snmpNotifyFilterProfileTable_data.c: Fix memory leaks (Coverity 85636) + + snmpNotifyFilterProfileTable_data.c: Fix memory leaks (Coverity 85636) + + Free memory allocation referenced in StorageTmp that is not free()'d in the event of a failure + +commit 9566c0c3f15a04672dc4fd64e8e6a6f24520584c +Author: Moshe Kaplan +Date: Mon Aug 21 10:38:29 2023 -0400 + + icmp.c: Fix memory leaks (Coverity 85667) + + icmp.c: Fix memory leaks (Coverity 85667) + + Free memory allocation referenced in msg_stats_table_info that is not free()'d in the event of a failure + +commit 8acc1cfb80ff5a806ee8fa11c1e133fa1574bbdf +Author: Bart Van Assche +Date: Sun Aug 20 16:46:15 2023 -0700 + + SNMP-TLS-TM-MIB: Remove two superfluous assignments + + This patch addresses the following Coverity complaint: + + CID 399070 (#1 of 1): Unused value (UNUSED_VALUE)assigned_pointer: Assigning value NULL to table_row here, but that stored value is overwritten before it can be used. + +commit d9fa80fb9ec9678cc7e155d6b913382fc0b52c78 +Author: Bart Van Assche +Date: Sun Aug 20 16:43:12 2023 -0700 + + SNMP-TLS-TM-MIB: Remove a superfluous assignment + + This patch addresses the following Coverity complaint: + + CID 399071 (#1 of 1): Unused value (UNUSED_VALUE)assigned_pointer: Assigning value NULL to table_row here, but that stored value is overwritten before it can be used. + +commit d10463d533506bd8f2f7567c06976dc125f99f5a +Author: Bart Van Assche +Date: Sun Aug 20 16:37:08 2023 -0700 + + SNMP-TLS-TM-MIB: Remove a superfluous assignment + + This patch addresses the following Coverity complaint: + + CID 399073 (#1 of 1): Unused value (UNUSED_VALUE)assigned_pointer: Assigning value NULL to row here, but that stored value is overwritten before it can be used. + +commit 1d4de81b9b9540888ee76ad80da6fc5a5fc5ccc2 +Author: Bart Van Assche +Date: Sun Aug 20 16:28:37 2023 -0700 + + DISMAN-MIB: traceRouteCtlTable: Remove a superfluous assignment + + This patch addresses an issue detected by Coverity. + +commit fe152211938a37bc30276f70cad0fec1f57f9792 +Author: Bart Van Assche +Date: Sun Aug 20 16:52:50 2023 -0700 + + deliverByNotify: Use 64 bits for time variables + + This patch addresses the following Coverity report: + + CID 380298 (#1 of 1): Use of 32-bit time_t (Y2K38_SAFETY)1. store_truncates_time_t: A time_t value is stored in an integer with too few bits to accommodate it. The expression time(NULL) is cast to int. + +commit 94cf9460142dbf6ec4db2cf4ce4c2a3963d7c5e1 +Author: Bart Van Assche +Date: Sun Aug 20 16:39:01 2023 -0700 + + apps: snmptable: Remove a superfluous assignment + + This patch addresses the following Coverity complaint: + + CID 399072 (#1 of 1): Unused value (UNUSED_VALUE)assigned_pointer: Assigning value NULL to vars here, but that stored value is overwritten before it can be used. + +commit 876c71e81bd71387356b291d11c5780d08c2c71f +Author: Bart Van Assche +Date: Sun Aug 20 16:34:30 2023 -0700 + + snmpd: Remove a superfluous assignment + + This patch addresses the following Coverity complaint: + + CID 399074 (#1 of 1): Unused value (UNUSED_VALUE)assigned_pointer: Assigning value NULL to last_loop_context here, but that stored value is overwritten before it can be used. + +commit b99ddb332fa941bf3fa3f60fb20aafd98dd6d75c +Author: Bart Van Assche +Date: Sun Aug 20 16:31:41 2023 -0700 + + snmpd: Remove a superfluous assignment + + This patch addresses the following Coverity complaint: + + CID 399075 (#1 of 1): Unused value (UNUSED_VALUE)assigned_pointer: Assigning value NULL to row here, but that stored value is overwritten before it can be used. + +commit d4529cd3f4de93ae137ee13fc90a14e29af6d415 +Author: Bart Van Assche +Date: Sun Aug 20 17:05:54 2023 -0700 + + libsnmp: TLS transport: Fix memory leaks in error paths + + This patch addresses the following Coverity complaint about 'the_ctx': + + CID 373922 (#2 of 2): Resource leak (RESOURCE_LEAK)6. leaked_storage: Variable the_ctx going out of scope leaks the storage it points to. + +commit eee541aa54bb35b2f18a7acd7f589fbae6c31bd0 +Author: Moshe Kaplan +Date: Fri Aug 18 13:43:27 2023 -0400 + + lookupResultsTable.c: Fix memory leaks + + lookupResultsTable.c: Fix memory leaks (coverity 85588) + + Free memory allocation referenced in StorageTmp that is not free()'d in the event of a failure + +commit efbd198d80193c6a1ca010d94394c785710abdc8 +Author: Moshe Kaplan +Date: Fri Aug 18 13:54:04 2023 -0400 + + pingCtlTable.c: Fix memory leaks (Coverity 85603) + + pingCtlTable.c: Fix memory leaks (Coverity 85603) + + Free allocated memory if an error occurs. + + Revert "pingCtlTable.c: Fix memory leaks (Coverity 85603)" + + This reverts commit 0d3cb33ca5841e620c99f33b6e7b2b1b5c0fff60. + + re-add + +commit e5712d3bb7db696493bc29cb7d292797659aa9f4 +Author: Moshe Kaplan +Date: Fri Aug 18 14:06:31 2023 -0400 + + pingResultsTable.c: Fix memory leaks (coverity 85662) + +commit 8f8d71e46e28410696263d50aaccabaf39de09a4 +Author: minfrin +Date: Thu Oct 13 22:29:37 2022 +0100 + + apps/sshtosnmp: Avoid EINVAL when passing credentials over SSH unix domain socket + + Attempts to connect on RHEL9 machines would fail on sendmsg(). + + Align the socket path with the SSH transport. + + [ bvanassche: edited patch description ] + +commit f8a5cfb4ecf8a52ee14f92d5a3fb9e966dde07bc +Author: Bart Van Assche +Date: Sun Aug 6 17:49:12 2023 -0700 + + libsnmp: Filter out non-ASCII characters from the output + + Fixes: https://github.com/net-snmp/net-snmp/pull/580 + +commit 397de4a963dc94d318bf3229d16725455d490947 +Author: Bart Van Assche +Date: Sat Jul 22 17:34:31 2023 -0700 + + libsnmp: Fix a memory leak in read_mib() + + Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39320 + +commit 28929671ed268b22f1c4b41dc597c1522a2a2f71 +Author: Bart Van Assche +Date: Sat Jul 22 17:28:59 2023 -0700 + + testing/T027read_mib_clib: Add a test case + +commit 47ca9e62d91249ee5f423b8477ee806b411f59e6 +Author: Feroz Ahmed +Date: Wed Aug 16 12:08:24 2023 +0000 + + Added tests to validate SIGHUP for exactEngineID change + + This test validates commit 45a6422 + +commit 999d9aa75bf830eaa28654a7cbf627c9497aae51 +Author: Feroz Ahmed +Date: Sat Aug 12 07:09:37 2023 +0000 + + Handle SIGHUP for engine-id change + + SNMP operations continue to work with old engine-id with SIGHUP. + +commit 726c8aeff776c4cd494815c8a16b50dc8ef2cf2a +Author: Bart Van Assche +Date: Sun Aug 6 18:36:41 2023 -0700 + + ci, Windows: Bump the OpenSSL version number + + +---------------------------------------------------------------------- + +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 @@ -17070,7 +25271,7 @@ Date: Thu Aug 1 22:55:45 2013 +0200 Sanitize. - Change to use SNMPv3 since that is writeable in V5-6-patches. + Change to use SNMPv3 since that is writable in V5-6-patches. Change to check values on index 'A' Remove the check for embedded NUL in indices. @@ -79882,7 +88083,7 @@ Changes: V5.5.pre2 -> V5.5.pre3 * perl/agent/agent.xs: - fix the ASN_OPAQUE patch that was commited without proper diff + fix the ASN_OPAQUE patch that was committed without proper diff context 2009-04-24 07:31 tanders @@ -83742,7 +91943,7 @@ Changes: V5.4 -> V5.5.pre1 * agent/agent_read_config.c, agent/agent_trap.c: - reverting accidentaly commited files + reverting accidentally committed files 2008-05-06 08:34 jsafranek @@ -121194,7 +129395,7 @@ Changes: V5.0.9 -> V5.1 * include/net-snmp/system/hpux.h: - restore accidentaly deleted hpux define; add comment + restore accidentally deleted hpux define; add comment 2003-11-02 04:55 nba @@ -153751,7 +161952,7 @@ Changes: V5.0.9 -> V5.1 * apps/snmpwalk.c: - (snmpwalk.c): - - New ability to peform a get on the requested OID when either no + - New ability to perform a get on the requested OID when either no results are returned or when the user requests an inclusive option. - New ability to print number of variables found at the end. @@ -166306,7 +174507,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 @@ -202542,7 +210743,7 @@ hardaker 7 Dec 99 09:32:02 hardaker 7 Dec 99 13:45:59 - (snmpwalk.c): - - New ability to peform a get on the requested OID when either no + - New ability to perform a get on the requested OID when either no results are returned or when the user requests an inclusive option. - New ability to print number of variables found at the end. @@ -210410,7 +218611,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/vendor/FAQ b/vendor/FAQ index 43ca38d..970872c 100644 --- a/vendor/FAQ +++ b/vendor/FAQ @@ -1,7 +1,7 @@ Frequently Asked Questions (FAQ) for the UCD/Net-SNMP package ============================================================= FAQ Author: Dave Shield - Net-SNMP Version: 5.9 + Net-SNMP Version: 5.9.5.2 Net-SNMP/UCD-SNMP Project Leader: Wes Hardaker Email: net-snmp-coders@lists.sourceforge.net diff --git a/vendor/INSTALL b/vendor/INSTALL index 24f8d6c..be24bea 100644 --- a/vendor/INSTALL +++ b/vendor/INSTALL @@ -81,8 +81,8 @@ diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. - The file `configure.in' is used to create `configure' by a program -called `autoconf'. You only need `configure.in' if you want to change + The file `configure.ac' is used to create `configure' by a program +called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: @@ -127,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/vendor/Makefile.in b/vendor/Makefile.in index 912f6b2..bb4ada9 100644 --- a/vendor/Makefile.in +++ b/vendor/Makefile.in @@ -6,27 +6,27 @@ 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 darwin11.h darwin12.h \ - darwin13.h darwin14.h darwin15.h darwin16.h darwin17.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 freebsd13.h freebsd14.h freebsd.h \ generic.h \ - hpux.h irix.h linux.h mingw32.h mingw32msvc.h mips.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 \ + openbsd4.h openbsd5.h openbsd6.h openbsd7.h openbsd8.h \ + openbsd.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 @@ -114,8 +114,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 @@ -123,14 +123,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 @@ -181,7 +181,7 @@ perlmodules: perlmakefiles subdirs perlmakefiles: perl/Makefile net-snmp-config-x -perl/Makefile: perl/Makefile.PL +perl/Makefile: perl/Makefile.PL subdirs dir=`pwd` && \ cd perl && \ if false; then \ @@ -456,6 +456,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/vendor/Makefile.rules b/vendor/Makefile.rules index e714f91..a84253c 100644 --- a/vendor/Makefile.rules +++ b/vendor/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 \ @@ -298,7 +295,7 @@ install_pkgconfig: $(INSTALL_PKGCONFIG) for i in $(INSTALL_PKGCONFIG); do \ echo "installing $$i in $(INSTALL_PREFIX)$(libdir)/pkgconfig"; \ done; \ - $(INSTALL) $(INSTALL_PKGCONFIG) $(INSTALL_PREFIX)$(libdir)/pkgconfig; \ + $(INSTALL_DATA) $(INSTALL_PKGCONFIG) $(INSTALL_PREFIX)$(libdir)/pkgconfig; \ fi uninstall_pkgconfig: @@ -438,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/vendor/Makefile.top b/vendor/Makefile.top index 6315401..7273b06 100644 --- a/vendor/Makefile.top +++ b/vendor/Makefile.top @@ -69,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). @@ -81,12 +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. # -# Most recent change: 40 for the v5.8.1 release. -LIBCURRENT = 40 +# Most recent change: 45 for the PR#586 - snmpv3 for multithread. +LIBCURRENT = 45 LIBAGE = 0 LIBREVISION = 0 -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) diff --git a/vendor/NEWS b/vendor/NEWS index a287f89..1ad189f 100644 --- a/vendor/NEWS +++ b/vendor/NEWS @@ -3,6 +3,134 @@ 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.5.2* + + building: + - Fix an issue with needing limits.h included. + - update to autoconf 2.72 + +*5.9.5.1* + +Only a version numbering fix. + +*5.9.5* + + snmptrapd: + - fixed a critical vulnerability (CVE-2025-68615) which can be triggered + by a specially crafted trap + + snmplib: + - Add support for IPV6_RECVPKTINFO + - Port the SSH domain transport to FreeBSD + - Improve error handling in parse_enumlist and other parsing functions + - Filter out non-ASCII characters from output + - Fix multiple memory leaks in MIB parsing, OID handling, and transport filters + - Fix multiple buffer overflows triggered when creating ASN packets + - Fix handling of large/negative values (integer underflows/overflows) + - Fix segmentation faults when `varbind` cannot be constructed or buf is null + - Fix crash in netsnmp_parse_args when passing invalid argument lists + - Fix SNMPv3 multithreading support for snmp_sess_open() + + snmpd: + - Make UCD-SNMP::dskTable dynamic if includeAllDisks is set.") added + a verification that drops all filesystems not present in other_fs[] + table. So add 'ubifs' in other_fs[] to fix it. + - Fix SIGHUP handling for engineID changes and agent port changes + - Fix a use-after-free in unregister_mib_context() + - Fix regression of memory leak when using RPMDB macros + - Improve cache management: clear timer_id on stop, keep cache flags unchanged + - Always open libkvm in "safe mode" on FreeBSD + - Fix crash when snmptrapd subagent terminates the TCP connection + + apps: + - snmpusm: Improve error handling and fix memory leaks + - sshtosnmp: Avoid EINVAL when passing credentials over SSH unix domain socket + - snmptest: Plug a possible memory leak + - snmpget: Avoid leak if parsing OID fails + + MIBs: + - EtherLike-MIB: Optimize Linux implementation to use netlink statistics + - IP-MIB: Add Linux 6.7 compatibility for parsing /proc/net/snmp + - LM-SENSORS-MIB: Support negative temperatures + - SNMP-TLS-TM-MIB: Update to RFC 9456 and allow TLS protocols higher than TLS1.0 + - HOST-RESOURCES-MIB: Add support for RPM SQLite DB background + + building: + - Add support for Windows on ARM + - Support OpenBSD 8, FreeBSD 15/16, and DragonflyBSD + - Fix build for OS/X versions prior to 10.6.0 + - Windows: Bump OpenSSL version and fix library paths + - MinGW64: Switch from pkg-config to pkgconf + - Add --with-wolfssl Add support for building and linking with the + wolfSSL library instead of OpenSSL. Other changes that have been + included in this patch are: - Only enable AES support if + EVP_aes_128_cfb() is available. - Add support for detecting SSL + functions if these have been defined as macros. + +*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*: + skipped due to a last minute library versioning found bug -- use 5.9.3 instead + +*5.9.1*: + General: Many bug fixes + *5.9* snmplib: - Add IPv6 support to DTLSUDP transport CHANGES: snmplib: use new @@ -33,13 +161,13 @@ listing of all changes made to the code. - 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 + - 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 + - sendMessageMaxSize + - disableSNMPv1 / disableSNMPv2c - new api for dynamic debug log level (netsnmp_set_debug_log_level) snmpd: @@ -51,10 +179,10 @@ listing of all changes made to the code. - 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 + - 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 @@ -109,7 +237,7 @@ listing of all changes made to the code. building: - PATCH: 2091156: correctly declare dependencies in Makefile. 'make - -j ' should work now. Backport this to V5-4 as it is needed for + -j ' should work now. Backport this to V5-4 as it is needed for correct operation in the single threaded case of make miblib as well. @@ -248,7 +376,7 @@ listing of all changes made to the code. extensions and dependencies for code reuse. - New transport functions: f_config, f_open, f_copy and f_setup_session - Transports can now specify session defaults - - E.G. dtlsudp: auto-sets the SNMP version and the security model. + - E.G. dtlsudp: auto-sets the SNMP version and the security model. - [PATCH 2942940]: Add a new function, netsnmp_parse_args, that is like snmp_parse_args but takes an additional bitmask, flags, to affect the behaviour. Also remove the magic handling of some @@ -257,10 +385,10 @@ listing of all changes made to the code. - new experimental row creation API which uses a state machine to try really hard to create a row from a given varbind list - netsnmp_container enhancements: - - added a free_item function - - added a CONTAINER_FREE_ALL macro/function - - added an interface for duplicating a container (CONTAINER_DUP) - - added a remove function to container_iterators + - added a free_item function + - added a CONTAINER_FREE_ALL macro/function + - added an interface for duplicating a container (CONTAINER_DUP) + - added a remove function to container_iterators - added an ability to set options on binary_array containers - new snmp token logOption allows specifying log destinations via configuration conf files @@ -614,10 +742,10 @@ listing of all changes made to the code. Ports: Linux: - new experimental tables - - tcpConnectionTable, tcpListenerTable - - ipAddressPrefixTable - - udpEndpointTable - - ipv4InterfaceTable, ipv6InterfaceTable + - tcpConnectionTable, tcpListenerTable + - ipAddressPrefixTable + - udpEndpointTable + - ipv4InterfaceTable, ipv6InterfaceTable - inetCidrRouteTable supports dynamic ipv4 route creation/deletion - added ipv6IpForwarding.0 and ipv6IpDefaultHopLimit.0 (read-write) @@ -693,17 +821,17 @@ listing of all changes made to the code. mib2c: - a number of new or updated configuration templates: - - mib2c.iterate.conf: the iterator-based table config + - mib2c.iterate.conf: the iterator-based table config now produces fuller template code than before. - - mib2c.table_data.conf and mib2c.container.conf: + - mib2c.table_data.conf and mib2c.container.conf: two new "internal-row" style configs - - mib2c.mfd.conf: "MIBs for Dummies" (or MFD) - intended to + - mib2c.mfd.conf: "MIBs for Dummies" (or MFD) - intended to reduce the SNMP knowledge needed to develop MIB modules and add flexibility at the same time. Run "mib2c -S mfd_interactive_setup=1 -c mib2c.mfd.conf OID" and follow its guided instructions to help you tailor its results to meet your needs. - - mib2c.genhtml.conf: Generates an easier-to-read HTML view of + - mib2c.genhtml.conf: Generates an easier-to-read HTML view of a MIB tree structure. (See http://www.Net-SNMP.org/mibs/ for example output.) - more node tags available for conf file writers @@ -1144,7 +1272,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/vendor/README b/vendor/README index 7ef0f2f..a67f439 100644 --- a/vendor/README +++ b/vendor/README @@ -1,4 +1,4 @@ - README file for net-snmp Version: 5.9 + README file for net-snmp Version: 5.9.5.2 DISCLAIMER diff --git a/vendor/README.win32 b/vendor/README.win32 index 4639b87..e2ed25d 100644 --- a/vendor/README.win32 +++ b/vendor/README.win32 @@ -4,9 +4,7 @@ * *************************************************************************** -This guide describes how to build Net-SNMP with Microsoft Visual Studio, -Cygwin, MinGW or Mingw-w64. 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: @@ -25,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 Microsoft Visual Studio, MinGW and Cygwin +Notes on preprocessor defines Acknowledgements @@ -41,7 +38,7 @@ Acknowledgements * *************************************************************************** -All applications build with Microsoft Studio, Cygwin, MinGW and Mingw-w64. +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. @@ -53,10 +50,6 @@ All applications build with Microsoft Studio, Cygwin, MinGW and Mingw-w64. - 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. @@ -109,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 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'. @@ -138,6 +134,20 @@ Limitations 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 ------------------------------------------ @@ -146,7 +156,7 @@ When installing Net-SNMP using the binary available from the web site, select 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 @@ -178,8 +188,7 @@ 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, @@ -693,17 +702,6 @@ 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 - -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: - -http://sources.redhat.com/cygwin/ - - MinGW and Mingw-w64 The MinGW projects provide a Windows native version of gcc. The tool chain @@ -721,40 +719,6 @@ 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. - -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 @@ -1114,22 +1078,21 @@ 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 Microsoft Visual Studio, MinGW and Cygwin +* Notes on preprocessor defines * -*************************************************************************** +******************************* When adding Windows specific code, proceed as follows: -- Add a configure test in the appropriate file under configure.d for MinGW - and Cygwin. +- 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. -Try to avoid to add #ifdef's that use the WIN32, _MSC_VER, mingw32 and/or -cygwin macros. These macros are defined as follows: +Try to avoid to add #ifdef's that use the WIN32, _MSC_VER and/or mingw32 +macros. These macros are defined as follows: Define: Description: ------- ------------ @@ -1144,8 +1107,6 @@ __MINGW32__ Defined by MinGW and Mingw-w64 __MINGW64__ Defined by Mingw-w64 only -cygwin Defined by Cygwin only - *************************************************************************** * diff --git a/vendor/agent/Makefile.depend b/vendor/agent/Makefile.depend index 1b96851..22dda94 100644 --- a/vendor/agent/Makefile.depend +++ b/vendor/agent/Makefile.depend @@ -1,6 +1,9 @@ # DO NOT DELETE THIS LINE -- make depend depends on it. ./agent_handler.lo: ../include/net-snmp/net-snmp-config.h +./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 @@ -30,7 +33,9 @@ ./agent_handler.lo: ../include/net-snmp/library/snmpTCPDomain.h ./agent_handler.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -49,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 @@ -71,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 @@ -139,7 +143,9 @@ ./agent_index.lo: ../include/net-snmp/library/snmpTCPDomain.h ./agent_index.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -158,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 @@ -179,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 @@ -252,7 +257,9 @@ ./agent_read_config.lo: ../include/net-snmp/library/snmpTCPDomain.h ./agent_read_config.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -271,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 @@ -292,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 @@ -337,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 @@ -353,7 +413,32 @@ ./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/tunnel/tunnel.h mibgroup/ucd-snmp/pass.h ./agent_read_config.lo: mibgroup/snmpv3/snmpEngine.h ./agent_read_config.lo: mibgroup/snmpv3/snmpMPDStats.h ./agent_read_config.lo: mibgroup/snmpv3/usmStats.h mibgroup/snmpv3/usmUser.h @@ -363,20 +448,16 @@ ./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/snmpNotifyTable_data.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 @@ -390,68 +471,77 @@ ./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/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/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/memory/hw_mem.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 @@ -469,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 @@ -496,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 @@ -556,7 +611,9 @@ ./agent_registry.lo: ../include/net-snmp/library/snmpTCPDomain.h ./agent_registry.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -575,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 @@ -596,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 @@ -668,7 +724,9 @@ ./agent_sysORTable.lo: ../include/net-snmp/library/snmpTCPDomain.h ./agent_sysORTable.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -688,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 @@ -709,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 @@ -779,7 +836,9 @@ ./agent_trap.lo: ../include/net-snmp/library/snmpTCPDomain.h ./agent_trap.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -796,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 @@ -819,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 @@ -889,7 +947,9 @@ ./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 @@ -908,7 +968,6 @@ ./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/factory.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 @@ -928,8 +987,8 @@ ./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/snmptsm.h -./kernel.lo: ../include/net-snmp/library/snmpusm.h kernel.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 @@ -960,7 +1019,9 @@ ./mib_modules.lo: ../include/net-snmp/library/snmpTCPDomain.h ./mib_modules.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -980,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 @@ -1001,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 @@ -1042,13 +1102,66 @@ ./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/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 +./mib_modules.lo: mibgroup/disman/event/mteTriggerExistenceTable.h +./mib_modules.lo: mibgroup/disman/event/mteTriggerBooleanTable.h +./mib_modules.lo: mibgroup/disman/event/mteTriggerThresholdTable.h +./mib_modules.lo: mibgroup/disman/event/mteTriggerConf.h +./mib_modules.lo: mibgroup/disman/event/mteEvent.h +./mib_modules.lo: ../agent/mibgroup/disman/event/mteTrigger.h +./mib_modules.lo: mibgroup/disman/event/mteEventTable.h +./mib_modules.lo: mibgroup/disman/event/mteEventSetTable.h +./mib_modules.lo: mibgroup/disman/event/mteEventNotificationTable.h +./mib_modules.lo: mibgroup/disman/event/mteEventConf.h +./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/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/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 @@ -1056,7 +1169,31 @@ ./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/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 @@ -1064,18 +1201,15 @@ ./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/icmp.h -./mib_modules.lo: mibgroup/mibII/udp.h mibgroup/mibII/ipv6.h -./mib_modules.lo: mibgroup/ucd-snmp/disk_hw.h ../agent/mibgroup/mibdefs.h -./mib_modules.lo: mibgroup/ucd-snmp/proc.h mibgroup/ucd-snmp/versioninfo.h -./mib_modules.lo: mibgroup/ucd-snmp/pass.h 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/snmpNotifyTable_data.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 @@ -1088,38 +1222,24 @@ ./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/disman/event/mteTrigger.h -./mib_modules.lo: mibgroup/disman/event/mteTriggerTable.h -./mib_modules.lo: mibgroup/disman/event/mteTriggerDeltaTable.h -./mib_modules.lo: mibgroup/disman/event/mteTriggerExistenceTable.h -./mib_modules.lo: mibgroup/disman/event/mteTriggerBooleanTable.h -./mib_modules.lo: mibgroup/disman/event/mteTriggerThresholdTable.h -./mib_modules.lo: mibgroup/disman/event/mteTriggerConf.h -./mib_modules.lo: mibgroup/disman/event/mteEvent.h -./mib_modules.lo: ../agent/mibgroup/disman/event/mteTrigger.h -./mib_modules.lo: mibgroup/disman/event/mteEventTable.h -./mib_modules.lo: mibgroup/disman/event/mteEventSetTable.h -./mib_modules.lo: mibgroup/disman/event/mteEventNotificationTable.h -./mib_modules.lo: mibgroup/disman/event/mteEventConf.h -./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/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/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 +./mib_modules.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_constants.h +./mib_modules.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_interface.h +./mib_modules.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h +./mib_modules.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access.h +./mib_modules.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.h +./mib_modules.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_constants.h +./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 @@ -1128,26 +1248,50 @@ ./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 +./mib_modules.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access.h +./mib_modules.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.h +./mib_modules.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_constants.h +./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/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/memory/hw_mem.h ./mib_modules.lo: mibgroup/hardware/fsys/hw_fsys.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: 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 @@ -1165,12 +1309,6 @@ ./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/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 @@ -1192,35 +1330,6 @@ ./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-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h -./mib_modules.lo: ../include/net-snmp/data_access/route.h -./mib_modules.lo: ../agent/mibgroup/mibII/route_headers.h -./mib_modules.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_constants.h -./mib_modules.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_interface.h -./mib_modules.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h -./mib_modules.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access.h -./mib_modules.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.h -./mib_modules.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_constants.h -./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/tcp-mib/tcpConnectionTable/tcpConnectionTable.h -./mib_modules.lo: ../include/net-snmp/data_access/tcpConn.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 -./mib_modules.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access.h -./mib_modules.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.h -./mib_modules.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_constants.h -./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/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: ../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 @@ -1253,7 +1362,9 @@ ./object_monitor.lo: ../include/net-snmp/library/snmpTCPDomain.h ./object_monitor.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1273,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 @@ -1294,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 @@ -1363,7 +1473,9 @@ ./snmp_agent.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmp_agent.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1382,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 @@ -1403,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 @@ -1475,7 +1586,9 @@ ./snmp_perl.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmp_perl.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1495,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 @@ -1516,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 @@ -1557,8 +1669,8 @@ ./snmp_perl.lo: ../include/net-snmp/agent/snmp_get_statistic.h snmp_perl.h ./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 ../include/net-snmp/types.h -./snmp_vars.lo: ../include/net-snmp/library/oid.h +./snmp_vars.lo: ../include/net-snmp/definitions.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 @@ -1582,7 +1694,9 @@ ./snmp_vars.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmp_vars.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1602,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 @@ -1623,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 @@ -1698,7 +1811,9 @@ ./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 @@ -1717,7 +1832,6 @@ ./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 @@ -1737,8 +1851,8 @@ ./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/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 @@ -1779,7 +1893,7 @@ ./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: mibgroup/util_funcs/restart.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 @@ -1810,7 +1924,9 @@ ./helpers/all_helpers.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/all_helpers.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1829,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 @@ -1850,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 @@ -1919,7 +2034,9 @@ ./helpers/baby_steps.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/baby_steps.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1938,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 @@ -1959,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 @@ -2026,7 +2142,9 @@ ./helpers/bulk_to_next.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/bulk_to_next.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2046,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 @@ -2067,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 @@ -2135,7 +2252,9 @@ ./helpers/cache_handler.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/cache_handler.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2154,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 @@ -2175,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 @@ -2242,7 +2360,9 @@ ./helpers/debug_handler.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/debug_handler.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2262,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 @@ -2283,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 @@ -2351,7 +2470,9 @@ ./helpers/instance.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/instance.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2370,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 @@ -2391,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 @@ -2459,7 +2579,9 @@ ./helpers/mode_end_call.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/mode_end_call.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2478,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 @@ -2499,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 @@ -2566,7 +2687,9 @@ ./helpers/multiplexer.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/multiplexer.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2586,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 @@ -2607,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 @@ -2674,7 +2796,9 @@ ./helpers/null.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/null.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2694,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 @@ -2715,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 @@ -2782,7 +2905,9 @@ ./helpers/old_api.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/old_api.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2802,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 @@ -2823,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 @@ -2891,7 +3015,9 @@ ./helpers/read_only.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/read_only.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2911,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 @@ -2932,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 @@ -3000,7 +3125,9 @@ ./helpers/row_merge.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/row_merge.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -3019,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 @@ -3040,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 @@ -3107,7 +3233,9 @@ ./helpers/scalar.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/scalar.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -3127,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 @@ -3148,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 @@ -3215,7 +3342,9 @@ ./helpers/scalar_group.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/scalar_group.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -3235,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 @@ -3256,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 @@ -3323,7 +3451,9 @@ ./helpers/serialize.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/serialize.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -3343,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 @@ -3364,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 @@ -3432,7 +3561,9 @@ ./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -3451,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 @@ -3472,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 @@ -3540,7 +3670,9 @@ ./helpers/stash_cache.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/stash_cache.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -3559,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 @@ -3580,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 @@ -3650,7 +3781,9 @@ ./helpers/stash_to_next.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/stash_to_next.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -3669,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 @@ -3690,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 @@ -3760,7 +3892,9 @@ ./helpers/table.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/table.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -3779,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 @@ -3800,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 @@ -3868,7 +4001,9 @@ ./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 @@ -3887,7 +4022,6 @@ ./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 @@ -3908,8 +4042,8 @@ ./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/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 @@ -3976,7 +4110,9 @@ ./helpers/table_container.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/table_container.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -3995,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 @@ -4016,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 @@ -4084,7 +4219,9 @@ ./helpers/table_data.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/table_data.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -4103,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 @@ -4124,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 @@ -4192,7 +4328,9 @@ ./helpers/table_dataset.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/table_dataset.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -4211,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 @@ -4232,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 @@ -4300,7 +4437,9 @@ ./helpers/table_iterator.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/table_iterator.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -4319,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 @@ -4340,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 @@ -4409,7 +4547,9 @@ ./helpers/table_row.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/table_row.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -4428,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 @@ -4449,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 @@ -4517,7 +4656,9 @@ ./helpers/table_tdata.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/table_tdata.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -4536,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 @@ -4557,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 @@ -4625,7 +4765,9 @@ ./helpers/watcher.lo: ../include/net-snmp/library/snmpTCPDomain.h ./helpers/watcher.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -4644,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 @@ -4665,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 @@ -4732,7 +4873,9 @@ ./mibgroup/header_complex.lo: ../include/net-snmp/library/snmpTCPDomain.h ./mibgroup/header_complex.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -4752,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 @@ -4773,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 @@ -4843,7 +4985,9 @@ ./mibgroup/testhandler.lo: ../include/net-snmp/library/snmpTCPDomain.h ./mibgroup/testhandler.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -4862,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 @@ -4883,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 @@ -4952,7 +5095,9 @@ ./mibgroup/util_funcs.lo: ../include/net-snmp/library/snmpTCPDomain.h ./mibgroup/util_funcs.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -4971,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 @@ -4992,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 diff --git a/vendor/agent/Makefile.in b/vendor/agent/Makefile.in index b5d692d..44f8818 100644 --- a/vendor/agent/Makefile.in +++ b/vendor/agent/Makefile.in @@ -15,7 +15,7 @@ mysubdir=agent # # what to install # -SUBDIRS=helpers mibgroup +SUBDIRS=helpers FTSUBDIRS=mibgroup helpers INSTALLSBINPROGS= @SNMPD@ @@ -273,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 @@ -300,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) @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) @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) diff --git a/vendor/agent/agent_global_vars.h b/vendor/agent/agent_global_vars.h index ad44243..98f3a2d 100644 --- a/vendor/agent/agent_global_vars.h +++ b/vendor/agent/agent_global_vars.h @@ -11,7 +11,6 @@ struct snmp_session; struct netsnmp_agent_session_s; -struct netsnmp_agent_session_s; /* Global variable declarations. */ diff --git a/vendor/agent/agent_handler.c b/vendor/agent/agent_handler.c index 769701f..cba644a 100644 --- a/vendor/agent/agent_handler.c +++ b/vendor/agent/agent_handler.c @@ -18,7 +18,7 @@ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif diff --git a/vendor/agent/agent_index.c b/vendor/agent/agent_index.c index dd98c08..266a1c5 100644 --- a/vendor/agent/agent_index.c +++ b/vendor/agent/agent_index.c @@ -3,33 +3,33 @@ * * Maintain a registry of index allocations * (Primarily required for AgentX support, - * but it could be more widely useable). + * but it could be more widely usable). */ #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 @@ -346,21 +346,33 @@ register_index(netsnmp_variable_list * varbind, int flags, break; case ASN_OCTET_STR: if (prev_idx_ptr) { + size_t maxlen = sizeof(new_index->varbind->buf); i = new_index->varbind->val_len - 1; - while (new_index->varbind->buf[i] == 'z') { + + while (i >= 0 && new_index->varbind->buf[i] == 'z') { new_index->varbind->buf[i] = 'a'; i--; - if (i < 0) { - i = new_index->varbind->val_len; - new_index->varbind->buf[i] = 'a'; - new_index->varbind->buf[i + 1] = 0; + } + + if (i >= 0) { + new_index->varbind->buf[i]++; + } else { + /* All 'z's — need to grow */ + if (new_index->varbind->val_len + 1 < maxlen) { + memmove(new_index->varbind->buf + 1, new_index->varbind->buf, + new_index->varbind->val_len); + new_index->varbind->buf[0] = 'a'; + new_index->varbind->val_len++; + } else { + /* Buffer full — cannot grow */ + free(new_index); + return NULL; } } - new_index->varbind->buf[i]++; - } else + } else { strcpy((char *) new_index->varbind->buf, "aaaa"); - new_index->varbind->val_len = - strlen((char *) new_index->varbind->buf); + new_index->varbind->val_len = 4; + } break; case ASN_OBJECT_ID: if (prev_idx_ptr) { diff --git a/vendor/agent/agent_read_config.c b/vendor/agent/agent_read_config.c index 13dcc9e..1e5bec6 100644 --- a/vendor/agent/agent_read_config.c +++ b/vendor/agent/agent_read_config.c @@ -10,15 +10,15 @@ #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 @@ -27,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 @@ -64,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 @@ -163,7 +163,7 @@ netsnmp_parse_agent_user(const char *token, char *cptr) if (info) netsnmp_set_agent_user_id(info->pw_uid); else - config_perror("User not found in passwd database"); + config_perror("User not found in password database"); endpwent(); #endif } @@ -214,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)); } @@ -349,8 +348,7 @@ snmpd_register_const_config_handler(const char *token, { DEBUGMSGTL(("snmpd_register_app_config_handler", "registering .conf token for \"%s\"\n", token)); - register_app_config_handler(token, (void(*)(const char *, char *))parser, - releaser, help); + register_const_app_config_handler(token, parser, releaser, help); } #ifdef NETSNMP_FEATURE_REQUIRE_SNMPD_UNREGISTER_CONFIG_HANDLER @@ -366,7 +364,7 @@ snmpd_unregister_config_handler(const char *token) #endif /* NETSNMP_FEATURE_REMOVE_SNMPD_UNREGISTER_CONFIG_HANDLER */ /* - * this function is intended for use by mib-modules to store permenant + * this function is intended for use by mib-modules to store permanent * configuration information generated by sets or persistent counters */ void diff --git a/vendor/agent/agent_registry.c b/vendor/agent/agent_registry.c index 72cf288..c4523d0 100644 --- a/vendor/agent/agent_registry.c +++ b/vendor/agent/agent_registry.c @@ -30,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 @@ -159,6 +159,10 @@ get_context_lookup_cache(const char *context) { ptr = SNMP_MALLOC_TYPEDEF(lookup_cache_context); ptr->next = thecontextcache; ptr->context = strdup(context); + if (!ptr->context) { + free(ptr); + return NULL; + } thecontextcache = ptr; } else { return NULL; @@ -357,6 +361,11 @@ add_subtree(netsnmp_subtree *new_tree, const char *context_name) ptr->next = context_subtrees; ptr->first_subtree = new_tree; ptr->context_name = strdup(context_name); + if (!ptr->context_name) { + free(ptr); + return NULL; + } + context_subtrees = ptr; return ptr->first_subtree; @@ -1776,9 +1785,13 @@ unregister_mib_context(oid * name, size_t len, int priority, snmp_call_callbacks(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_UNREGISTER_OID, ®_parms); + /* + * netsnmp_subtree_free() may free the 'context' pointer. Hence, call + * invalidate_lookup_cache() before calling netsnmp_subtree_free(). + */ + invalidate_lookup_cache(context); netsnmp_subtree_free(myptr); netsnmp_set_lookup_cache_size(old_lookup_cache_val); - invalidate_lookup_cache(context); return MIB_UNREGISTERED_OK; } diff --git a/vendor/agent/agent_sysORTable.c b/vendor/agent/agent_sysORTable.c index f628060..b11037a 100644 --- a/vendor/agent/agent_sysORTable.c +++ b/vendor/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/vendor/agent/agent_trap.c b/vendor/agent/agent_trap.c index 635a3a8..d63c66b 100644 --- a/vendor/agent/agent_trap.c +++ b/vendor/agent/agent_trap.c @@ -25,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 @@ -92,11 +92,6 @@ struct trap_sink { struct trap_sink *sinks = NULL; -#ifndef NETSNMP_DISABLE_SNMPV1 -static int _v1_sessions = 0; -#endif /* NETSNMP_DISABLE_SNMPV1 */ -static int _v2_sessions = 0; - const oid objid_enterprisetrap[] = { NETSNMP_NOTIFICATION_MIB }; const oid trap_version_id[] = { NETSNMP_SYSTEM_MIB }; const int enterprisetrap_len = OID_LENGTH(objid_enterprisetrap); @@ -159,65 +154,6 @@ free_trap_session(struct trap_sink *sp) free(sp); } -static void -_trap_version_incr(int version) -{ - switch (version) { -#ifndef NETSNMP_DISABLE_SNMPV1 - case SNMP_VERSION_1: - ++_v1_sessions; - break; -#endif -#ifndef NETSNMP_DISABLE_SNMPV2C - case SNMP_VERSION_2c: -#endif - case SNMP_VERSION_3: - ++_v2_sessions; - break; -#ifdef USING_AGENTX_PROTOCOL_MODULE - case AGENTX_VERSION_1: - /* agentx registers in sinks, no need to count */ - break; -#endif - default: - snmp_log(LOG_ERR, "unknown snmp version %d\n", version); - } - return; -} - -static void -_trap_version_decr(int version) -{ - switch (version) { -#ifndef NETSNMP_DISABLE_SNMPV1 - case SNMP_VERSION_1: - if (--_v1_sessions < 0) { - snmp_log(LOG_ERR,"v1 session count < 0! fixed.\n"); - _v1_sessions = 0; - } - break; -#endif -#ifndef NETSNMP_DISABLE_SNMPV2C - case SNMP_VERSION_2c: -#endif - case SNMP_VERSION_3: - if (--_v2_sessions < 0) { - snmp_log(LOG_ERR,"v2 session count < 0! fixed.\n"); - _v2_sessions = 0; - } - break; -#ifdef USING_AGENTX_PROTOCOL_MODULE - case AGENTX_VERSION_1: - /* agentx registers in sinks, no need to count */ - break; -#endif - default: - snmp_log(LOG_ERR, "unknown snmp version %d\n", version); - } - return; -} - - #ifndef NETSNMP_NO_TRAP_STATS static void _dump_trap_stats(netsnmp_session *sess) @@ -247,9 +183,9 @@ _dump_trap_stats(netsnmp_session *sess) #endif /* NETSNMP_NO_TRAP_STATS */ int -netsnmp_add_notification_session(netsnmp_session * ss, int pdutype, - int confirm, int version, const char *name, - const char *tag, const char* profile) +netsnmp_add_closable_notification_session(netsnmp_session *ss, int close_sess, 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", @@ -265,6 +201,7 @@ netsnmp_add_notification_session(netsnmp_session * ss, int pdutype, struct agent_add_trap_args args; DEBUGMSGTL(("trap", "adding callback trap sink (%p)\n", ss)); args.ss = ss; + args.close_sess = close_sess; args.confirm = confirm; args.nameData = name; args.nameLen = (NULL == name) ? 0 : strlen(name); @@ -295,11 +232,22 @@ netsnmp_add_notification_session(netsnmp_session * ss, int pdutype, sinks = new_sink; } - _trap_version_incr(version); - return 1; } +/* This is a wrapper to netsnmp_add_closable_notification_session + for backward compatibility + */ +int +netsnmp_add_notification_session(netsnmp_session *ss, int pdutype, + int confirm, int version, const char *name, + const char *tag, const char* profile) +{ + return netsnmp_add_closable_notification_session(ss, 1, pdutype, confirm, + version, name, + tag, profile); +} + /* * xxx needs update to support embedded NUL. * xxx should probably also be using and unregister callback, similar to @@ -326,12 +274,36 @@ netsnmp_unregister_notification(const char *name, u_char len) "netsnmp_unregister_notification not supported\n")); } +int +handle_disconnect_packet(int operation, netsnmp_session *session, int reqid, + netsnmp_pdu *pdu, void *magic) +{ + if (NETSNMP_CALLBACK_OP_DISCONNECT == operation) { + netsnmp_transport *t = snmp_sess_transport(snmp_sess_pointer(session)); + char *addr_string = NULL; + + if (t && (addr_string = netsnmp_transport_peer_string(t, t->remote, t->remote_length))) { + snmp_log(LOG_WARNING, + "send_trap: session closed by snmptrap (%s)\n", addr_string); + free(addr_string); + } else { + snmp_log(LOG_WARNING, + "send_trap: session %8p closed by snmptrap\n", session); + } + snmp_log(LOG_WARNING, + "send_trap: re-opening of TCP connection is not supported.\n"); + + netsnmp_unregister_notification(session->paramName, strlen(session->paramName)); + } + return 1; +} + 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); + return netsnmp_add_closable_notification_session(ss, 0, pdutype, confirm, version, + NULL, NULL, NULL); } #ifndef NETSNMP_FEATURE_REMOVE_REMOVE_TRAP_SESSION @@ -348,7 +320,6 @@ remove_trap_session(netsnmp_session * ss) } else { sinks = sp->next; } - _trap_version_decr(ss->version); /* * I don't believe you *really* want to close the session here; * it may still be in use for other purposes. In particular this @@ -393,9 +364,10 @@ netsnmp_create_v1v2_notification_session(const char *sink, const char* sinkport, } snmp_sess_init(&session); + session.callback = handle_disconnect_packet; session.version = version; if (com) { - session.community = (u_char *) NETSNMP_REMOVE_CONST(char *, com); + session.community = (u_char *)strdup(com); session.community_len = strlen(com); } @@ -424,7 +396,7 @@ netsnmp_create_v1v2_notification_session(const char *sink, const char* sinkport, client_addr = "localhost"; tspec.source = client_addr; } - session.localname = NETSNMP_REMOVE_CONST(char *,tspec.source); + session.localname = tspec.source ? strdup(tspec.source) : NULL; tspec.application = "snmptrap"; if (NULL == sinkport) @@ -441,13 +413,18 @@ netsnmp_create_v1v2_notification_session(const char *sink, const char* sinkport, /** diagnose snmp_open errors with the input netsnmp_session pointer */ snmp_sess_perror("snmpd: netsnmp_create_notification_session", &session); + netsnmp_cleanup_session(&session); /* transport freed by snmp_add */ return NULL; } - rc = netsnmp_add_notification_session(sesp, pdutype, - (pdutype == SNMP_MSG_INFORM), - version, name, tag, profile); + netsnmp_cleanup_session(&session); + + rc = netsnmp_add_closable_notification_session(sesp, + !(t->flags & NETSNMP_TRANSPORT_FLAG_STREAM), + pdutype, + (pdutype == SNMP_MSG_INFORM), + version, name, tag, profile); if (0 == rc) return NULL; @@ -500,7 +477,6 @@ snmpd_free_trapsinks(void) DEBUGMSGTL(("trap", "freeing trap sessions\n")); while (sp) { sinks = sinks->next; - _trap_version_decr(sp->version); free_trap_session(sp); sp = sinks; } @@ -1035,11 +1011,11 @@ netsnmp_send_traps(int trap, int specific, } } #ifndef NETSNMP_DISABLE_SNMPV1 - if (template_v1pdu && _v1_sessions) + if (template_v1pdu) snmp_call_callbacks(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_SEND_TRAP1, template_v1pdu); #endif - if (template_v2pdu && _v2_sessions) + if (template_v2pdu) snmp_call_callbacks(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_SEND_TRAP2, template_v2pdu); snmp_free_pdu(template_v1pdu); @@ -1632,15 +1608,17 @@ netsnmp_create_v3user_notification_session(const char *dest, const char *user, snmp_sess_init(&session); + session.callback = handle_disconnect_packet; + session.version = SNMP_VERSION_3; - session.peername = NETSNMP_REMOVE_CONST(char*,dest); + session.peername = strdup(dest); - session.securityName = NETSNMP_REMOVE_CONST(char*,user); + session.securityName = strdup(user); session.securityNameLen = strlen(user); - if (NULL != context) { - session.contextName = NETSNMP_REMOVE_CONST(char*,context); + if (context) { + session.contextName = strdup(context); session.contextNameLen = strlen(context); } @@ -1716,20 +1694,20 @@ netsnmp_create_v3user_notification_session(const char *dest, const char *user, goto bail; } - if (netsnmp_add_notification_session(ss, pdutype, - (pdutype == SNMP_MSG_INFORM), - ss->version, notif_name, notif_tag, - notif_profile) != 1) { + if (netsnmp_add_closable_notification_session(ss, + !(transport->flags & NETSNMP_TRANSPORT_FLAG_STREAM), + 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; + return NULL; } bail: /** free any allocated mem in session */ - SNMP_FREE(session.securityAuthProto); - SNMP_FREE(session.securityPrivProto); + netsnmp_cleanup_session(&session); return ss; } @@ -1822,6 +1800,7 @@ snmpd_parse_config_trapsess(const char *word, char *cptr) free(argv[argn - 1]); goto cleanup; } + session.callback = handle_disconnect_packet; ss = snmp_add(&session, transport, NULL, NULL); for (; argn > 0; argn--) free(argv[argn - 1]); @@ -1853,13 +1832,14 @@ snmpd_parse_config_trapsess(const char *word, char *cptr) NETSNMP_DS_LIB_DISABLE_V1)) traptype = SNMP_MSG_TRAP; #endif - netsnmp_add_notification_session(ss, traptype, - (traptype == SNMP_MSG_INFORM), - ss->version, name, tag, profile); + netsnmp_add_closable_notification_session(ss, + !(transport->flags & NETSNMP_TRANSPORT_FLAG_STREAM), + traptype, + (traptype == SNMP_MSG_INFORM), + ss->version, name, tag, profile); cleanup: - if (session.securityEngineIDLen > 0) - SNMP_FREE(session.securityEngineID); + netsnmp_cleanup_session(&session); SNMP_FREE(clientaddr_save); SNMP_FREE(profile); SNMP_FREE(name); diff --git a/vendor/agent/auto_nlist.c b/vendor/agent/auto_nlist.c index 2cdf3a8..42a98b9 100644 --- a/vendor/agent/auto_nlist.c +++ b/vendor/agent/auto_nlist.c @@ -1,20 +1,20 @@ #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 -#if HAVE_KVM_H +#ifdef HAVE_KVM_H #include #elif defined(HAVE_NLIST_H) #include @@ -146,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/vendor/agent/helpers/Makefile.depend b/vendor/agent/helpers/Makefile.depend index e3b98dd..5c40a0f 100644 --- a/vendor/agent/helpers/Makefile.depend +++ b/vendor/agent/helpers/Makefile.depend @@ -1,6 +1,9 @@ # DO NOT DELETE THIS LINE -- make depend depends on it. ./all_helpers.lo: ../../include/net-snmp/net-snmp-config.h +./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 @@ -30,7 +33,9 @@ ./all_helpers.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./all_helpers.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -49,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 @@ -71,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 @@ -140,7 +144,9 @@ ./baby_steps.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./baby_steps.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -159,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 @@ -180,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 @@ -247,7 +252,9 @@ ./bulk_to_next.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./bulk_to_next.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -267,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 @@ -288,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 @@ -356,7 +362,9 @@ ./cache_handler.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./cache_handler.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -375,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 @@ -396,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 @@ -463,7 +470,9 @@ ./debug_handler.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./debug_handler.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -483,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 @@ -504,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 @@ -572,7 +580,9 @@ ./instance.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./instance.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -591,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 @@ -612,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 @@ -680,7 +689,9 @@ ./mode_end_call.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./mode_end_call.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -699,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 @@ -720,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 @@ -787,7 +797,9 @@ ./multiplexer.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./multiplexer.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -807,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 @@ -828,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 @@ -895,7 +906,9 @@ ./null.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./null.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -915,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 @@ -936,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 @@ -1003,7 +1015,9 @@ ./old_api.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./old_api.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1023,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 @@ -1044,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 @@ -1112,7 +1125,9 @@ ./read_only.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./read_only.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1132,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 @@ -1153,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 @@ -1221,7 +1235,9 @@ ./row_merge.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./row_merge.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1240,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 @@ -1261,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 @@ -1328,7 +1343,9 @@ ./scalar.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./scalar.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1348,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 @@ -1369,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 @@ -1436,7 +1452,9 @@ ./scalar_group.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./scalar_group.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1456,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 @@ -1477,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 @@ -1544,7 +1561,9 @@ ./serialize.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./serialize.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1564,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 @@ -1585,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 @@ -1653,7 +1671,9 @@ ./snmp_get_statistic.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./snmp_get_statistic.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1672,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 @@ -1693,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 @@ -1761,7 +1780,9 @@ ./stash_cache.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./stash_cache.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1780,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 @@ -1801,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 @@ -1871,7 +1891,9 @@ ./stash_to_next.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./stash_to_next.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1890,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 @@ -1911,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 @@ -1981,7 +2002,9 @@ ./table.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./table.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2000,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 @@ -2021,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 @@ -2089,7 +2111,9 @@ ./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 @@ -2108,7 +2132,6 @@ ./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 @@ -2129,8 +2152,8 @@ ./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/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 @@ -2197,7 +2220,9 @@ ./table_container.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./table_container.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2216,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 @@ -2237,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 @@ -2305,7 +2329,9 @@ ./table_data.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./table_data.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2324,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 @@ -2345,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 @@ -2413,7 +2438,9 @@ ./table_dataset.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./table_dataset.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2432,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 @@ -2453,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 @@ -2521,7 +2547,9 @@ ./table_iterator.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./table_iterator.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2540,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 @@ -2561,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 @@ -2630,7 +2657,9 @@ ./table_row.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./table_row.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2649,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 @@ -2670,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 @@ -2738,7 +2766,9 @@ ./table_tdata.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./table_tdata.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2757,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 @@ -2778,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 @@ -2846,7 +2875,9 @@ ./watcher.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./watcher.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2865,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 @@ -2886,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/vendor/agent/helpers/Makefile.in b/vendor/agent/helpers/Makefile.in index 4f5595d..51f409d 100644 --- a/vendor/agent/helpers/Makefile.in +++ b/vendor/agent/helpers/Makefile.in @@ -32,5 +32,5 @@ LOBJS = dummy.lo all: standardall libnetsnmphelpers.$(LIB_EXTENSION)$(LIB_VERSION): $(LOBJS) - $(LIB_LD_CMD) $@ $(LOBJS) @LD_NO_UNDEFINED@ $(LDFLAGS) + $(LIB_LD_CMD) $@ $(LOBJS) $(LDFLAGS) $(RANLIB) $@ diff --git a/vendor/agent/helpers/baby_steps.c b/vendor/agent/helpers/baby_steps.c index 489a3bf..5d20840 100644 --- a/vendor/agent/helpers/baby_steps.c +++ b/vendor/agent/helpers/baby_steps.c @@ -68,16 +68,20 @@ _baby_steps_access_multiplexer(netsnmp_mib_handler *handler, * @{ */ -static netsnmp_baby_steps_modes * -netsnmp_baby_steps_modes_ref(netsnmp_baby_steps_modes *md) +static void * +netsnmp_baby_steps_modes_ref(void *p) { + netsnmp_baby_steps_modes *md = p; + md->refcnt++; return md; } static void -netsnmp_baby_steps_modes_deref(netsnmp_baby_steps_modes *md) +netsnmp_baby_steps_modes_deref(void *p) { + netsnmp_baby_steps_modes *md = p; + if (--md->refcnt == 0) free(md); } @@ -104,8 +108,8 @@ netsnmp_baby_steps_handler_get(u_long modes) else { md->refcnt = 1; mh->myvoid = md; - mh->data_clone = (void *(*)(void *))netsnmp_baby_steps_modes_ref; - mh->data_free = (void (*)(void *))netsnmp_baby_steps_modes_deref; + mh->data_clone = netsnmp_baby_steps_modes_ref; + mh->data_free = netsnmp_baby_steps_modes_deref; if (0 == modes) modes = BABY_STEP_ALL; md->registered = modes; diff --git a/vendor/agent/helpers/cache_handler.c b/vendor/agent/helpers/cache_handler.c index 2a3dab5..898df5d 100644 --- a/vendor/agent/helpers/cache_handler.c +++ b/vendor/agent/helpers/cache_handler.c @@ -16,7 +16,11 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_MALLOC_H +#include +#endif + +#ifdef HAVE_STRING_H #include #else #include @@ -216,16 +220,20 @@ netsnmp_cache_create(int timeout, NetsnmpCacheLoad * load_hook, return cache; } -static netsnmp_cache * -netsnmp_cache_ref(netsnmp_cache *cache) +static void * +netsnmp_cache_ref(void *p) { + netsnmp_cache *cache = p; + cache->refcnt++; return cache; } static void -netsnmp_cache_deref(netsnmp_cache *cache) +netsnmp_cache_deref(void *p) { + netsnmp_cache *cache = p; + if (--cache->refcnt == 0) { netsnmp_cache_remove(cache); netsnmp_cache_free(cache); @@ -347,7 +355,6 @@ netsnmp_cache_timer_start(netsnmp_cache *cache) return 0; } - cache->flags &= ~NETSNMP_CACHE_AUTO_RELOAD; DEBUGMSGT(("cache_timer:start", "starting timer %lu for cache %p\n", cache->timer_id, cache)); return cache->timer_id; @@ -369,7 +376,7 @@ netsnmp_cache_timer_stop(netsnmp_cache *cache) "stopping timer %lu for cache %p\n", cache->timer_id, cache)); snmp_alarm_unregister(cache->timer_id); - cache->flags |= NETSNMP_CACHE_AUTO_RELOAD; + cache->timer_id = 0; } @@ -394,7 +401,7 @@ netsnmp_cache_handler_get(netsnmp_cache* cache) */ (void)_cache_load(cache); } - if (cache->flags & NETSNMP_CACHE_AUTO_RELOAD) + if (cache->flags & NETSNMP_CACHE_AUTO_RELOAD && !cache->timer_id) netsnmp_cache_timer_start(cache); } @@ -409,8 +416,8 @@ void netsnmp_cache_handler_owns_cache(netsnmp_mib_handler *handler) { netsnmp_assert(handler->myvoid); ((netsnmp_cache *)handler->myvoid)->refcnt++; - handler->data_clone = (void *(*)(void *))netsnmp_cache_ref; - handler->data_free = (void(*)(void*))netsnmp_cache_deref; + handler->data_clone = netsnmp_cache_ref; + handler->data_free = netsnmp_cache_deref; } /** returns a cache handler that can be injected into a given handler chain. @@ -770,6 +777,7 @@ void release_cached_resources(unsigned int regNo, void *clientargs) { netsnmp_cache *cache = NULL; + int do_trim = 0; cache_outstanding_valid = 0; DEBUGMSGTL(("helper:cache_handler", "running auto-release\n")); @@ -786,13 +794,23 @@ release_cached_resources(unsigned int regNo, void *clientargs) * least one active cache. */ if (netsnmp_cache_check_expired(cache)) { - if(! (cache->flags & NETSNMP_CACHE_DONT_FREE_EXPIRED)) + if(! (cache->flags & NETSNMP_CACHE_DONT_FREE_EXPIRED)) { _cache_free(cache); + if (cache->free_cache && !cache->timer_id) + do_trim = 1; + } } else { cache_outstanding_valid = 1; } } } + + if (do_trim) { +#ifdef HAVE_MALLOC_TRIM + malloc_trim(0); +#endif + } + /* * If there are any caches still valid & active, * then schedule another pass. diff --git a/vendor/agent/helpers/debug_handler.c b/vendor/agent/helpers/debug_handler.c index 579f0c9..342e8dc 100644 --- a/vendor/agent/helpers/debug_handler.c +++ b/vendor/agent/helpers/debug_handler.c @@ -26,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: * diff --git a/vendor/agent/helpers/instance.c b/vendor/agent/helpers/instance.c index 053dfdf..90bbd65 100644 --- a/vendor/agent/helpers/instance.c +++ b/vendor/agent/helpers/instance.c @@ -22,7 +22,7 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -50,16 +50,20 @@ typedef struct netsnmp_num_file_instance_s { * @{ */ -static netsnmp_num_file_instance * -netsnmp_num_file_instance_ref(netsnmp_num_file_instance *nfi) +static void * +netsnmp_num_file_instance_ref(void *p) { + netsnmp_num_file_instance *nfi = p; + nfi->refcnt++; return nfi; } static void -netsnmp_num_file_instance_deref(netsnmp_num_file_instance *nfi) +netsnmp_num_file_instance_deref(void *p) { + netsnmp_num_file_instance *nfi = p; + if (--nfi->refcnt == 0) { free(nfi->file_name); free(nfi); @@ -196,10 +200,8 @@ get_reg(const char *name, 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; + myreg->handler->data_clone = netsnmp_num_file_instance_ref; + myreg->handler->data_free = netsnmp_num_file_instance_deref; } if (contextName) { myreg->contextName = strdup(contextName); diff --git a/vendor/agent/helpers/null.c b/vendor/agent/helpers/null.c index 879ad16..1b4b455 100644 --- a/vendor/agent/helpers/null.c +++ b/vendor/agent/helpers/null.c @@ -15,7 +15,7 @@ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include diff --git a/vendor/agent/helpers/old_api.c b/vendor/agent/helpers/old_api.c index 007f2bc..b50e281 100644 --- a/vendor/agent/helpers/old_api.c +++ b/vendor/agent/helpers/old_api.c @@ -15,7 +15,7 @@ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -25,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 @@ -60,6 +71,12 @@ get_old_api_handler(void) return netsnmp_create_handler("old_api", netsnmp_old_api_helper); } +static void * +netsnmp_clone_variable(void *p) +{ + return netsnmp_duplicate_variable(p); +} + struct variable * netsnmp_duplicate_variable(const struct variable *var) { @@ -108,6 +125,11 @@ netsnmp_register_old_api(const char *moduleName, vp = netsnmp_duplicate_variable((const struct variable *) ((const char *) var + varsize * i)); + if (vp == NULL) { + SNMP_FREE(reginfo); + return SNMP_ERR_GENERR; + } + reginfo->handler = get_old_api_handler(); reginfo->handlerName = strdup(moduleName); reginfo->rootoid_len = (mibloclen + vp->namelen); @@ -127,8 +149,7 @@ netsnmp_register_old_api(const char *moduleName, memcpy(reginfo->rootoid + mibloclen, vp->name, vp->namelen * sizeof(oid)); reginfo->handler->myvoid = (void *) vp; - reginfo->handler->data_clone - = (void *(*)(void *))netsnmp_duplicate_variable; + reginfo->handler->data_clone = netsnmp_clone_variable; reginfo->handler->data_free = free; reginfo->priority = priority; @@ -207,7 +228,7 @@ netsnmp_register_mib_table_row(const char *moduleName, DEBUGMSG(("netsnmp_register_mib_table_row", "(%d)\n", (var_subid - vr->namelen))); r->handler->myvoid = netsnmp_duplicate_variable(vr); - r->handler->data_clone = (void *(*)(void *))netsnmp_duplicate_variable; + r->handler->data_clone = netsnmp_clone_variable; r->handler->data_free = free; r->contextName = (context) ? strdup(context) : NULL; @@ -270,7 +291,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 @@ -278,7 +299,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; @@ -287,8 +308,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 */ @@ -308,7 +327,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 @@ -322,7 +341,7 @@ netsnmp_old_api_helper(netsnmp_mib_handler *handler, /* * Actually call the old mib-module function */ - if (vp && vp->findVar) { + 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 */ @@ -361,7 +380,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, diff --git a/vendor/agent/helpers/row_merge.c b/vendor/agent/helpers/row_merge.c index 2a4066f..4b46418 100644 --- a/vendor/agent/helpers/row_merge.c +++ b/vendor/agent/helpers/row_merge.c @@ -19,7 +19,7 @@ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include diff --git a/vendor/agent/helpers/scalar.c b/vendor/agent/helpers/scalar.c index 63aeb37..7cf0023 100644 --- a/vendor/agent/helpers/scalar.c +++ b/vendor/agent/helpers/scalar.c @@ -21,7 +21,7 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -79,14 +79,19 @@ netsnmp_get_scalar_handler(void) int netsnmp_register_scalar(netsnmp_handler_registration *reginfo) { - netsnmp_mib_handler *h1, *h2; - + netsnmp_mib_handler *h1 = NULL, *h2 = NULL; + oid *tmp; /* * Extend the registered OID with space for the instance subid * (but don't extend the length just yet!) */ - reginfo->rootoid = (oid*)realloc(reginfo->rootoid, + + tmp = (oid*)realloc(reginfo->rootoid, (reginfo->rootoid_len+1) * sizeof(oid) ); + if (tmp == NULL) { + goto error; + } + reginfo->rootoid = tmp; reginfo->rootoid[ reginfo->rootoid_len ] = 0; h1 = netsnmp_get_instance_handler(); @@ -98,7 +103,7 @@ netsnmp_register_scalar(netsnmp_handler_registration *reginfo) return netsnmp_register_serialize(reginfo); } } - + error: snmp_log(LOG_ERR, "register scalar failed\n"); netsnmp_handler_free(h1); netsnmp_handler_free(h2); @@ -107,7 +112,6 @@ netsnmp_register_scalar(netsnmp_handler_registration *reginfo) return MIB_REGISTRATION_FAILED; } - /** * This function registers a read only scalar helper handler. This * function is very similar to netsnmp_register_scalar the only addition diff --git a/vendor/agent/helpers/scalar_group.c b/vendor/agent/helpers/scalar_group.c index 6133c3c..87411ae 100644 --- a/vendor/agent/helpers/scalar_group.c +++ b/vendor/agent/helpers/scalar_group.c @@ -17,7 +17,7 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -26,9 +26,10 @@ #include #include -static netsnmp_scalar_group* -clone_scalar_group(netsnmp_scalar_group* src) +static void * +clone_scalar_group(void *p) { + netsnmp_scalar_group* src = p; netsnmp_scalar_group *t = SNMP_MALLOC_TYPEDEF(netsnmp_scalar_group); if(t != NULL) { t->lbound = src->lbound; @@ -61,7 +62,7 @@ netsnmp_get_scalar_group_handler(oid first, oid last) sgroup->ubound = last; ret->myvoid = (void *)sgroup; ret->data_free = free; - ret->data_clone = (void *(*)(void *))clone_scalar_group; + ret->data_clone = clone_scalar_group; } } return ret; diff --git a/vendor/agent/helpers/stash_cache.c b/vendor/agent/helpers/stash_cache.c index 41fb4cc..f4e5fb9 100644 --- a/vendor/agent/helpers/stash_cache.c +++ b/vendor/agent/helpers/stash_cache.c @@ -226,13 +226,17 @@ _netsnmp_stash_cache_load( netsnmp_cache *cache, void *magic ) return ret; } +static void netsnmp_free_var(void *var) +{ + snmp_free_var(var); +} + void _netsnmp_stash_cache_free( netsnmp_cache *cache, void *magic ) { - netsnmp_stash_cache_info *cinfo = (netsnmp_stash_cache_info*) magic; - netsnmp_oid_stash_free(&cinfo->cache, - (NetSNMPStashFreeNode *) snmp_free_var); - return; + netsnmp_stash_cache_info *cinfo = magic; + + netsnmp_oid_stash_free(&cinfo->cache, netsnmp_free_var); } /** initializes the stash_cache helper which then registers a stash_cache diff --git a/vendor/agent/helpers/table.c b/vendor/agent/helpers/table.c index f357b84..80773a5 100644 --- a/vendor/agent/helpers/table.c +++ b/vendor/agent/helpers/table.c @@ -36,7 +36,7 @@ netsnmp_feature_require(oid_stash); #endif /* !NETSNMP_NO_WRITE_SUPPORT */ -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -122,6 +122,16 @@ netsnmp_get_table_handler(netsnmp_table_registration_info *tabreq) return ret; } +static void *netsnmp_clone_tri(void *tri) +{ + return netsnmp_table_registration_info_clone(tri); +} + +static void netsnmp_free_tri(void *tri) +{ + netsnmp_table_registration_info_free(tri); +} + /** Configures a handler such that table registration information is freed by * netsnmp_handler_free(). Should only be called if handler->myvoid points to * an object of type netsnmp_table_registration_info. @@ -130,10 +140,8 @@ void netsnmp_handler_owns_table_info(netsnmp_mib_handler *handler) { netsnmp_assert(handler); netsnmp_assert(handler->myvoid); - handler->data_clone - = (void *(*)(void *)) netsnmp_table_registration_info_clone; - handler->data_free - = (void (*)(void *)) netsnmp_table_registration_info_free; + handler->data_clone = netsnmp_clone_tri; + handler->data_free = netsnmp_free_tri; } /** Configures a handler such that table registration information is freed by diff --git a/vendor/agent/helpers/table_array.c b/vendor/agent/helpers/table_array.c index b0a6e6f..83219a4 100644 --- a/vendor/agent/helpers/table_array.c +++ b/vendor/agent/helpers/table_array.c @@ -20,7 +20,7 @@ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -647,10 +647,10 @@ group_requests(netsnmp_agent_request_info *agtreq_info, #ifndef NETSNMP_NO_WRITE_SUPPORT static void -release_netsnmp_request_group(netsnmp_index *g, void *v) +release_netsnmp_request_group(void *g, void *v) { netsnmp_request_group_item *tmp; - netsnmp_request_group *group = (netsnmp_request_group *) g; + netsnmp_request_group *group = g; if (!g) return; @@ -666,18 +666,17 @@ release_netsnmp_request_group(netsnmp_index *g, void *v) static void release_netsnmp_request_groups(void *vp) { - netsnmp_container *c = (netsnmp_container*)vp; - CONTAINER_FOR_EACH(c, (netsnmp_container_obj_func*) - release_netsnmp_request_group, NULL); + netsnmp_container *c = vp; + CONTAINER_FOR_EACH(c, release_netsnmp_request_group, NULL); CONTAINER_FREE(c); } static void -process_set_group(netsnmp_index *o, void *c) +process_set_group(void *o, void *c) { /* xxx-rks: should we continue processing after an error?? */ set_context *context = (set_context *) c; - netsnmp_request_group *ag = (netsnmp_request_group *) o; + netsnmp_request_group *ag = o; int rc = SNMP_ERR_NOERROR; switch (context->agtreq_info->mode) { @@ -859,9 +858,7 @@ process_set_requests(netsnmp_agent_request_info *agtreq_info, context.agtreq_info = agtreq_info; context.tad = tad; context.status = SNMP_ERR_NOERROR; - CONTAINER_FOR_EACH(request_group, - (netsnmp_container_obj_func*)process_set_group, - &context); + CONTAINER_FOR_EACH(request_group, process_set_group, &context); return context.status; } diff --git a/vendor/agent/helpers/table_container.c b/vendor/agent/helpers/table_container.c index 97b1489..afe7e92 100644 --- a/vendor/agent/helpers/table_container.c +++ b/vendor/agent/helpers/table_container.c @@ -20,7 +20,7 @@ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -278,16 +278,20 @@ netsnmp_tcontainer_replace_row( container_table_data *table, * * ================================== */ -static container_table_data * -netsnmp_container_table_data_clone(container_table_data *tad) +static void * +netsnmp_container_table_data_clone(void *p) { + container_table_data *tad = p; + ++tad->refcnt; return tad; } static void -netsnmp_container_table_data_free(container_table_data *tad) +netsnmp_container_table_data_free(void *p) { + container_table_data *tad = p; + if (--tad->refcnt == 0) free(tad); } @@ -333,8 +337,8 @@ netsnmp_container_table_handler_get(netsnmp_table_registration_info *tabreg, container->ncompare = netsnmp_ncompare_netsnmp_index; handler->myvoid = (void*)tad; - handler->data_clone = (void *(*)(void *))netsnmp_container_table_data_clone; - handler->data_free = (void (*)(void *))netsnmp_container_table_data_free; + handler->data_clone = netsnmp_container_table_data_clone; + handler->data_free = netsnmp_container_table_data_free; handler->flags |= MIB_HANDLER_AUTO_NEXT; return handler; diff --git a/vendor/agent/helpers/table_data.c b/vendor/agent/helpers/table_data.c index b3d7e88..19c7285 100644 --- a/vendor/agent/helpers/table_data.c +++ b/vendor/agent/helpers/table_data.c @@ -17,7 +17,7 @@ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include diff --git a/vendor/agent/helpers/table_dataset.c b/vendor/agent/helpers/table_dataset.c index 1020232..c1a4a68 100644 --- a/vendor/agent/helpers/table_dataset.c +++ b/vendor/agent/helpers/table_dataset.c @@ -18,7 +18,7 @@ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -480,6 +480,7 @@ netsnmp_register_table_data_set(netsnmp_handler_registration *reginfo, snmp_log(LOG_ERR, "could not create table data set handler\n"); netsnmp_handler_free(handler); netsnmp_handler_registration_free(reginfo); + free(table_info); return MIB_REGISTRATION_FAILED; } @@ -863,8 +864,6 @@ netsnmp_table_data_set_helper_handler(netsnmp_mib_handler *handler, netsnmp_create_data_list(TABLE_DATA_ROW, newrow, NULL)); } } - - row = NULL; } if (newrowstash->deleted) { netsnmp_table_dataset_remove_and_delete_row(datatable, newrow); diff --git a/vendor/agent/helpers/table_iterator.c b/vendor/agent/helpers/table_iterator.c index 7978429..b01f54c 100644 --- a/vendor/agent/helpers/table_iterator.c +++ b/vendor/agent/helpers/table_iterator.c @@ -95,7 +95,7 @@ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -187,16 +187,20 @@ netsnmp_iterator_delete_table( netsnmp_iterator_info *iinfo ) * * ================================== */ -static netsnmp_iterator_info * -netsnmp_iterator_ref(netsnmp_iterator_info *iinfo) +static void * +netsnmp_iterator_ref(void *p) { + netsnmp_iterator_info *iinfo = p; + iinfo->refcnt++; return iinfo; } static void -netsnmp_iterator_deref(netsnmp_iterator_info *iinfo) +netsnmp_iterator_deref(void *p) { + netsnmp_iterator_info *iinfo = p; + if (--iinfo->refcnt == 0) netsnmp_iterator_delete_table(iinfo); } @@ -206,8 +210,8 @@ void netsnmp_handler_owns_iterator_info(netsnmp_mib_handler *h) netsnmp_assert(h); netsnmp_assert(h->myvoid); ((netsnmp_iterator_info *)(h->myvoid))->refcnt++; - h->data_clone = (void *(*)(void *))netsnmp_iterator_ref; - h->data_free = (void(*)(void *))netsnmp_iterator_deref; + h->data_clone = netsnmp_iterator_ref; + h->data_free = netsnmp_iterator_deref; } /** @@ -468,7 +472,7 @@ netsnmp_table_iterator_helper_handler(netsnmp_mib_handler *handler, netsnmp_request_info *request, *reqtmp = NULL; netsnmp_variable_list *index_search = NULL; netsnmp_variable_list *free_this_index_search = NULL; - void *callback_loop_context = NULL, *last_loop_context; + void *callback_loop_context = NULL; void *callback_data_context = NULL; ti_cache_info *ti_info = NULL; int request_count = 0; @@ -821,8 +825,9 @@ netsnmp_table_iterator_helper_handler(netsnmp_mib_handler *handler, /* Is there any point in carrying on? */ if (!request_count) break; + { /* get the next search possibility */ - last_loop_context = callback_loop_context; + void *last_loop_context = callback_loop_context; index_search = (iinfo->get_next_data_point) (&callback_loop_context, &callback_data_context, @@ -830,7 +835,7 @@ netsnmp_table_iterator_helper_handler(netsnmp_mib_handler *handler, if (iinfo->free_loop_context && last_loop_context && callback_data_context != last_loop_context) { (iinfo->free_loop_context) (last_loop_context, iinfo); - last_loop_context = NULL; + } } } diff --git a/vendor/agent/helpers/table_row.c b/vendor/agent/helpers/table_row.c index 8778ee0..b465750 100644 --- a/vendor/agent/helpers/table_row.c +++ b/vendor/agent/helpers/table_row.c @@ -17,7 +17,7 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include diff --git a/vendor/agent/helpers/table_tdata.c b/vendor/agent/helpers/table_tdata.c index e87a3c9..8677967 100644 --- a/vendor/agent/helpers/table_tdata.c +++ b/vendor/agent/helpers/table_tdata.c @@ -17,7 +17,7 @@ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include diff --git a/vendor/agent/helpers/watcher.c b/vendor/agent/helpers/watcher.c index 3988e2a..6c2bac5 100644 --- a/vendor/agent/helpers/watcher.c +++ b/vendor/agent/helpers/watcher.c @@ -224,7 +224,7 @@ netsnmp_owns_watcher_info(netsnmp_mib_handler *handler) { netsnmp_assert(handler); netsnmp_assert(handler->myvoid); - handler->data_clone = (void *(*)(void *))netsnmp_clone_watcher_info; + handler->data_clone = netsnmp_clone_watcher_info; handler->data_free = free; } @@ -591,10 +591,12 @@ netsnmp_watched_spinlock_handler(netsnmp_mib_handler *handler, * ***************************/ -netsnmp_watcher_info * -netsnmp_clone_watcher_info(netsnmp_watcher_info *winfo) +void * +netsnmp_clone_watcher_info(void *p) { + netsnmp_watcher_info *winfo = p; netsnmp_watcher_info *copy = malloc(sizeof(*copy)); + if (copy) *copy = *winfo; return copy; diff --git a/vendor/agent/kernel.c b/vendor/agent/kernel.c index 87f8953..671e524 100644 --- a/vendor/agent/kernel.c +++ b/vendor/agent/kernel.c @@ -18,24 +18,24 @@ #include #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 @@ -44,7 +44,7 @@ #include "kernel.h" #include -#if HAVE_KVM_H +#if defined(HAVE_KVM_H) && !defined(NETSNMP_NO_KMEM_USAGE) && !defined(__FreeBSD__) kvm_t *kd; /** @@ -57,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); @@ -105,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 @@ -130,7 +130,8 @@ free_kmem(void) } } -#elif defined(HAVE_NLIST_H) && !defined(__linux__) +#elif defined(HAVE_NLIST_H) && !defined(__linux__) && !defined(__FreeBSD__) && \ + !defined(NETSNMP_NO_KMEM_USAGE) static off_t klseek(off_t); static int klread(char *, int); @@ -251,7 +252,48 @@ free_kmem(void) kmem = -1; } } +#elif defined(__FreeBSD__) +kvm_t *kd; + +/** + * Initialize the libkvm descriptor. On FreeBSD we can use most of libkvm + * without requiring /dev/kmem access. Only kvm_nlist() and kvm_read() need + * that, and we don't use them. + * + * @return TRUE upon success; FALSE upon failure. + */ +int +init_kmem(const char *file) +{ + char err[4096]; + + kd = kvm_openfiles(NULL, "/dev/null", NULL, O_RDONLY, err); + if (!kd) { + snmp_log(LOG_CRIT, "init_kmem: kvm_openfiles failed: %s\n", err); + return FALSE; + } + return TRUE; +} +/** + * A stub to return failure to any attempt to read kernel memory. Our + * libkvm handle doesn't enable /dev/kmem access. MIB implementations should + * use unprivileged to fetch information about the system. + */ +int +klookup(unsigned long off, void *target, size_t siz) +{ + return 0; +} + +void +free_kmem(void) +{ + if (kd != NULL) { + (void)kvm_close(kd); + kd = NULL; + } +} #else int init_kmem(const char *file) diff --git a/vendor/agent/kernel.h b/vendor/agent/kernel.h index 955b581..f43d4e7 100644 --- a/vendor/agent/kernel.h +++ b/vendor/agent/kernel.h @@ -17,14 +17,14 @@ extern int init_kmem(const char *); extern void free_kmem(void); -#if HAVE_KVM_H +#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/vendor/agent/mib_modules.c b/vendor/agent/mib_modules.c index 70fec15..72f4a0c 100644 --- a/vendor/agent/mib_modules.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/Makefile.depend b/vendor/agent/mibgroup/Makefile.depend index b461d67..ec6a493 100644 --- a/vendor/agent/mibgroup/Makefile.depend +++ b/vendor/agent/mibgroup/Makefile.depend @@ -1,6 +1,9 @@ # DO NOT DELETE THIS LINE -- make depend depends on it. ./header_complex.lo: ../../include/net-snmp/net-snmp-config.h +./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 @@ -29,7 +32,9 @@ ./header_complex.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./header_complex.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -49,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 @@ -71,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 @@ -141,7 +145,9 @@ ./testhandler.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./testhandler.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -160,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 @@ -181,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 @@ -250,7 +255,9 @@ ./util_funcs.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./util_funcs.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -269,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 @@ -290,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 @@ -365,7 +371,9 @@ ./Rmon/agutil.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./Rmon/agutil.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -385,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 @@ -406,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 @@ -474,7 +481,9 @@ ./Rmon/alarm.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./Rmon/alarm.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -494,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 @@ -515,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 @@ -585,7 +593,9 @@ ./Rmon/alarmTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./Rmon/alarmTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -604,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 @@ -625,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 @@ -694,7 +703,9 @@ ./Rmon/event.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./Rmon/event.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -713,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 @@ -734,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 @@ -802,7 +812,9 @@ ./Rmon/history.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./Rmon/history.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -822,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 @@ -843,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 @@ -911,7 +922,9 @@ ./Rmon/rows.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./Rmon/rows.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -931,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 @@ -952,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 @@ -1020,7 +1032,9 @@ ./Rmon/statistics.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./Rmon/statistics.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1040,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 @@ -1061,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 @@ -1131,7 +1144,9 @@ ./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 @@ -1150,7 +1165,6 @@ ./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 @@ -1171,8 +1185,8 @@ ./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/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 @@ -1212,7 +1226,6 @@ ./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 @@ -1242,7 +1255,9 @@ ./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 @@ -1261,7 +1276,6 @@ ./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 @@ -1282,8 +1296,8 @@ ./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/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 @@ -1350,7 +1364,9 @@ ./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 @@ -1370,7 +1386,6 @@ ./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 @@ -1391,8 +1406,8 @@ ./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/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 @@ -1460,7 +1475,9 @@ ./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 @@ -1479,7 +1496,6 @@ ./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 @@ -1500,8 +1516,8 @@ ./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/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 @@ -1569,7 +1585,9 @@ ./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 @@ -1588,7 +1606,6 @@ ./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 @@ -1609,8 +1626,8 @@ ./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/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 @@ -1678,7 +1695,9 @@ ./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 @@ -1697,7 +1716,6 @@ ./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 @@ -1718,8 +1736,8 @@ ./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/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 @@ -1788,7 +1806,9 @@ ./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 @@ -1807,7 +1827,6 @@ ./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 @@ -1828,8 +1847,8 @@ ./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/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 @@ -1897,7 +1916,9 @@ ./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 @@ -1916,7 +1937,6 @@ ./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 @@ -1937,8 +1957,8 @@ ./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/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 @@ -2007,7 +2027,9 @@ ./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 @@ -2026,7 +2048,6 @@ ./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 @@ -2047,8 +2068,8 @@ ./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/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 @@ -2118,7 +2139,9 @@ ./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 @@ -2137,7 +2160,6 @@ ./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 @@ -2158,8 +2180,8 @@ ./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/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 @@ -2228,7 +2250,9 @@ ./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 @@ -2247,7 +2271,6 @@ ./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 @@ -2268,8 +2291,8 @@ ./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/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 @@ -2342,7 +2365,9 @@ ./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 @@ -2362,7 +2387,6 @@ ./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 @@ -2383,8 +2407,8 @@ ./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: ../../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 @@ -2415,7 +2439,9 @@ ./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 @@ -2434,7 +2460,6 @@ ./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 @@ -2455,8 +2480,8 @@ ./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/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 @@ -2531,7 +2556,9 @@ ./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 @@ -2550,7 +2577,6 @@ ./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 @@ -2571,8 +2597,8 @@ ./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/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 @@ -2640,7 +2666,9 @@ ./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 @@ -2659,7 +2687,6 @@ ./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 @@ -2680,8 +2707,8 @@ ./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/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 @@ -2749,7 +2776,9 @@ ./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 @@ -2768,7 +2797,6 @@ ./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 @@ -2789,8 +2817,8 @@ ./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/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 @@ -2861,7 +2889,9 @@ ./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 @@ -2880,7 +2910,6 @@ ./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 @@ -2901,8 +2930,8 @@ ./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/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 @@ -2970,7 +2999,9 @@ ./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 @@ -2990,7 +3021,6 @@ ./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 @@ -3011,8 +3041,8 @@ ./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/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 @@ -3081,7 +3111,9 @@ ./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 @@ -3101,7 +3133,6 @@ ./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 @@ -3122,8 +3153,8 @@ ./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/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 @@ -3192,7 +3223,9 @@ ./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 @@ -3212,7 +3245,6 @@ ./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 @@ -3233,8 +3265,8 @@ ./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/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 @@ -3304,7 +3336,9 @@ ./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 @@ -3323,7 +3357,6 @@ ./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 @@ -3344,8 +3377,8 @@ ./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/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 @@ -3418,7 +3451,9 @@ ./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 @@ -3438,7 +3473,6 @@ ./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 @@ -3459,8 +3493,8 @@ ./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/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 @@ -3529,7 +3563,9 @@ ./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 @@ -3549,7 +3585,6 @@ ./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 @@ -3570,8 +3605,8 @@ ./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/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 @@ -3637,7 +3672,9 @@ ./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 @@ -3657,7 +3694,6 @@ ./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 @@ -3678,8 +3714,8 @@ ./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/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 @@ -3746,7 +3782,9 @@ ./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 @@ -3766,7 +3804,6 @@ ./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 @@ -3787,8 +3824,8 @@ ./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/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 @@ -3856,7 +3893,9 @@ ./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 @@ -3875,7 +3914,6 @@ ./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 @@ -3896,8 +3934,8 @@ ./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/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 @@ -3968,7 +4006,9 @@ ./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 @@ -3988,7 +4028,6 @@ ./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 @@ -4009,8 +4048,8 @@ ./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/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 @@ -4079,7 +4118,9 @@ ./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 @@ -4098,7 +4139,6 @@ ./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 @@ -4119,8 +4159,8 @@ ./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: ../../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 @@ -4152,7 +4192,9 @@ ./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 @@ -4172,7 +4214,6 @@ ./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 @@ -4193,8 +4234,8 @@ ./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: ../../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 @@ -4226,7 +4267,9 @@ ./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 @@ -4246,7 +4289,6 @@ ./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 @@ -4267,8 +4309,8 @@ ./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/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 @@ -4336,7 +4378,9 @@ ./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 @@ -4355,7 +4399,6 @@ ./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 @@ -4376,8 +4419,8 @@ ./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/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 @@ -4443,7 +4486,9 @@ ./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 @@ -4463,7 +4508,6 @@ ./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 @@ -4484,8 +4528,8 @@ ./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/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 @@ -4553,7 +4597,9 @@ ./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 @@ -4573,7 +4619,6 @@ ./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 @@ -4594,8 +4639,8 @@ ./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/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 @@ -4661,7 +4706,9 @@ ./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 @@ -4681,7 +4728,6 @@ ./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 @@ -4702,8 +4748,8 @@ ./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/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 @@ -4771,7 +4817,9 @@ ./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 @@ -4791,7 +4839,6 @@ ./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 @@ -4812,8 +4859,8 @@ ./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/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 @@ -4882,7 +4929,9 @@ ./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 @@ -4902,7 +4951,6 @@ ./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 @@ -4923,8 +4971,8 @@ ./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/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 @@ -4993,7 +5041,9 @@ ./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 @@ -5013,7 +5063,6 @@ ./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 @@ -5034,8 +5083,8 @@ ./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/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 @@ -5071,7 +5120,9 @@ ./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 @@ -5091,7 +5142,6 @@ ./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 @@ -5112,8 +5162,8 @@ ./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/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 @@ -5151,7 +5201,9 @@ ./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 @@ -5170,7 +5222,6 @@ ./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 @@ -5191,8 +5242,8 @@ ./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/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 @@ -5262,7 +5313,9 @@ ./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 @@ -5281,7 +5334,6 @@ ./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 @@ -5302,8 +5354,8 @@ ./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/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 @@ -5371,7 +5423,9 @@ ./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 @@ -5391,7 +5445,6 @@ ./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 @@ -5412,8 +5465,8 @@ ./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/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 @@ -5450,7 +5503,9 @@ ./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 @@ -5470,7 +5525,6 @@ ./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 @@ -5491,8 +5545,8 @@ ./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/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 @@ -5530,7 +5584,9 @@ ./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 @@ -5550,7 +5606,6 @@ ./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 @@ -5571,8 +5626,8 @@ ./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/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 @@ -5611,7 +5666,9 @@ ./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 @@ -5631,7 +5688,6 @@ ./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 @@ -5652,8 +5708,8 @@ ./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/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 @@ -5724,7 +5780,9 @@ ./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 @@ -5744,7 +5802,6 @@ ./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 @@ -5765,8 +5822,8 @@ ./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/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 @@ -5837,7 +5894,9 @@ ./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 @@ -5856,7 +5915,6 @@ ./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 @@ -5877,8 +5935,8 @@ ./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/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 @@ -5910,7 +5968,9 @@ ./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 @@ -5935,7 +5995,6 @@ ./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 @@ -5956,8 +6015,8 @@ ./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/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 @@ -5996,7 +6055,9 @@ ./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 @@ -6015,7 +6076,6 @@ ./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 @@ -6036,8 +6096,8 @@ ./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/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 @@ -6107,7 +6167,9 @@ ./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 @@ -6126,7 +6188,6 @@ ./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 @@ -6147,8 +6208,8 @@ ./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/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 @@ -6218,7 +6279,9 @@ ./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 @@ -6238,7 +6301,6 @@ ./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 @@ -6259,8 +6321,8 @@ ./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/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 @@ -6331,7 +6393,9 @@ ./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 @@ -6350,7 +6414,6 @@ ./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 @@ -6371,8 +6434,8 @@ ./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/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 @@ -6440,7 +6503,9 @@ ./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 @@ -6460,7 +6525,6 @@ ./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 @@ -6481,8 +6545,8 @@ ./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/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 @@ -6550,7 +6614,9 @@ ./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 @@ -6570,7 +6636,6 @@ ./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 @@ -6591,8 +6656,8 @@ ./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/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 @@ -6666,7 +6731,9 @@ ./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 @@ -6685,7 +6752,6 @@ ./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 @@ -6706,8 +6772,8 @@ ./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/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 @@ -6783,7 +6849,9 @@ ./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 @@ -6803,7 +6871,6 @@ ./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 @@ -6824,8 +6891,8 @@ ./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/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 @@ -6899,7 +6966,9 @@ ./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 @@ -6918,7 +6987,6 @@ ./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 @@ -6939,8 +7007,8 @@ ./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/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 @@ -7012,7 +7080,9 @@ ./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 @@ -7031,7 +7101,6 @@ ./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 @@ -7052,8 +7121,8 @@ ./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/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 @@ -7126,7 +7195,9 @@ ./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 @@ -7146,7 +7217,6 @@ ./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 @@ -7167,8 +7237,8 @@ ./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/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 @@ -7236,7 +7306,9 @@ ./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 @@ -7256,7 +7328,6 @@ ./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 @@ -7277,8 +7348,8 @@ ./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: ../../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 @@ -7310,7 +7381,9 @@ ./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 @@ -7329,7 +7402,6 @@ ./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 @@ -7350,8 +7422,8 @@ ./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/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 @@ -7421,7 +7493,9 @@ ./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 @@ -7440,7 +7514,6 @@ ./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 @@ -7461,8 +7534,8 @@ ./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/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 @@ -7529,7 +7602,9 @@ ./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 @@ -7549,7 +7624,6 @@ ./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 @@ -7570,8 +7644,8 @@ ./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/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 @@ -7638,7 +7712,9 @@ ./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 @@ -7658,7 +7734,6 @@ ./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 @@ -7679,8 +7754,8 @@ ./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/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 @@ -7747,7 +7822,9 @@ ./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 @@ -7767,7 +7844,6 @@ ./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 @@ -7788,8 +7864,8 @@ ./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/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 @@ -7856,7 +7932,9 @@ ./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 @@ -7876,7 +7954,6 @@ ./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 @@ -7897,8 +7974,8 @@ ./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/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 @@ -7967,7 +8044,9 @@ ./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 @@ -7986,7 +8065,6 @@ ./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 @@ -8007,8 +8085,8 @@ ./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/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 @@ -8076,7 +8154,9 @@ ./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 @@ -8095,7 +8175,6 @@ ./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 @@ -8116,8 +8195,8 @@ ./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/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 @@ -8187,7 +8266,9 @@ ./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 @@ -8207,7 +8288,6 @@ ./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 @@ -8228,8 +8308,8 @@ ./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/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 @@ -8300,7 +8380,9 @@ ./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 @@ -8319,7 +8401,6 @@ ./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 @@ -8340,8 +8421,8 @@ ./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/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 @@ -8417,7 +8498,9 @@ ./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 @@ -8436,7 +8519,6 @@ ./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 @@ -8457,8 +8539,8 @@ ./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/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 @@ -8532,7 +8614,9 @@ ./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 @@ -8551,7 +8635,6 @@ ./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 @@ -8572,8 +8655,8 @@ ./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/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 @@ -8643,7 +8726,9 @@ ./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 @@ -8663,7 +8748,6 @@ ./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 @@ -8684,8 +8768,8 @@ ./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/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 @@ -8758,7 +8842,9 @@ ./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 @@ -8778,7 +8864,6 @@ ./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 @@ -8799,8 +8884,8 @@ ./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/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 @@ -8868,7 +8953,9 @@ ./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 @@ -8888,7 +8975,6 @@ ./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 @@ -8909,8 +8995,8 @@ ./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/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 @@ -8977,7 +9063,9 @@ ./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 @@ -8997,7 +9085,6 @@ ./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 @@ -9018,8 +9105,8 @@ ./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/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 @@ -9087,7 +9174,9 @@ ./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 @@ -9107,7 +9196,6 @@ ./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 @@ -9128,8 +9216,8 @@ ./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/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 @@ -9196,7 +9284,9 @@ ./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 @@ -9216,7 +9306,6 @@ ./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 @@ -9237,8 +9326,8 @@ ./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/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 @@ -9309,7 +9398,9 @@ ./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 @@ -9328,7 +9419,6 @@ ./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 @@ -9349,8 +9439,8 @@ ./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/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 @@ -9423,7 +9513,9 @@ ./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 @@ -9443,7 +9535,6 @@ ./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 @@ -9464,8 +9555,8 @@ ./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/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 @@ -9533,7 +9624,9 @@ ./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 @@ -9552,7 +9645,6 @@ ./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 @@ -9573,8 +9665,8 @@ ./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/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 @@ -9644,7 +9736,9 @@ ./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 @@ -9663,7 +9757,6 @@ ./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 @@ -9684,8 +9777,8 @@ ./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/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 @@ -9756,7 +9849,9 @@ ./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 @@ -9775,7 +9870,6 @@ ./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/factory.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 @@ -9796,8 +9890,8 @@ ./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/snmptsm.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 @@ -9867,7 +9961,9 @@ ./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 @@ -9886,7 +9982,6 @@ ./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 @@ -9907,8 +10002,8 @@ ./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/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 @@ -9995,7 +10090,9 @@ ./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 @@ -10014,7 +10111,6 @@ ./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/factory.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 @@ -10035,8 +10131,8 @@ ./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/snmptsm.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 @@ -10113,7 +10209,9 @@ ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -10133,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 @@ -10154,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 @@ -10223,7 +10320,9 @@ ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -10243,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 @@ -10264,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 @@ -10333,7 +10431,9 @@ ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -10353,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 @@ -10374,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 @@ -10443,7 +10542,9 @@ ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -10463,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 @@ -10484,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 @@ -10553,7 +10653,9 @@ ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -10573,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 @@ -10594,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 @@ -10663,7 +10764,9 @@ ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -10683,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 @@ -10704,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 @@ -10773,7 +10875,9 @@ ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -10793,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 @@ -10814,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 @@ -10883,7 +10986,9 @@ ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -10903,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 @@ -10924,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 @@ -10993,7 +11097,9 @@ ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -11013,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 @@ -11034,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 @@ -11103,7 +11208,9 @@ ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -11123,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 @@ -11144,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 @@ -11212,7 +11318,9 @@ ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -11232,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 @@ -11253,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 @@ -11321,7 +11428,9 @@ ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -11341,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 @@ -11362,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 @@ -11430,7 +11538,9 @@ ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -11450,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 @@ -11471,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 @@ -11541,7 +11650,9 @@ ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -11560,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 @@ -11581,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 @@ -11657,7 +11767,9 @@ ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -11677,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 @@ -11698,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 @@ -11772,7 +11883,9 @@ ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -11792,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 @@ -11813,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 @@ -11885,7 +11997,9 @@ ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -11905,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 @@ -11926,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 @@ -12002,7 +12115,9 @@ ./smux/smux.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./smux/smux.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -12021,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 @@ -12042,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 @@ -12110,7 +12224,9 @@ ./smux/snmp_bgp.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./smux/snmp_bgp.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -12130,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 @@ -12151,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 @@ -12219,7 +12334,9 @@ ./smux/snmp_ospf.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./smux/snmp_ospf.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -12239,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 @@ -12260,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 @@ -12328,7 +12444,9 @@ ./smux/snmp_rip2.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./smux/snmp_rip2.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -12348,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 @@ -12369,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 @@ -12438,7 +12555,9 @@ ./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -12457,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 @@ -12478,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 @@ -12549,7 +12667,9 @@ ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -12568,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 @@ -12589,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 @@ -12659,7 +12778,9 @@ ./snmpv3/usmConf.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./snmpv3/usmConf.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -12679,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 @@ -12700,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 @@ -12768,7 +12888,9 @@ ./snmpv3/usmStats.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./snmpv3/usmStats.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -12787,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 @@ -12808,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 @@ -12879,7 +13000,9 @@ ./snmpv3/usmUser.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./snmpv3/usmUser.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -12898,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 @@ -12919,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 @@ -12987,7 +13109,9 @@ ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -13007,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 @@ -13028,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 @@ -13098,7 +13221,9 @@ ./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 @@ -13118,7 +13243,6 @@ ./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/factory.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 @@ -13139,8 +13263,8 @@ ./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/snmptsm.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 @@ -13208,7 +13332,9 @@ ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -13228,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 @@ -13249,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 @@ -13318,7 +13443,9 @@ ./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 @@ -13338,7 +13465,6 @@ ./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/factory.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 @@ -13359,8 +13485,8 @@ ./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/snmptsm.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 @@ -13428,7 +13554,9 @@ ./target/target.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./target/target.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -13447,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 @@ -13468,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 @@ -13540,7 +13667,9 @@ ./target/target_counters.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./target/target_counters.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -13559,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 @@ -13580,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 @@ -13648,7 +13776,9 @@ ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -13668,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 @@ -13689,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 @@ -13757,7 +13886,9 @@ ./tunnel/tunnel.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./tunnel/tunnel.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -13777,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 @@ -13798,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 @@ -13839,117 +13969,13 @@ ./tunnel/tunnel.lo: ../../include/net-snmp/agent/snmp_get_statistic.h ./tunnel/tunnel.lo: ../../include/net-snmp/agent/sysORTable.h ./tunnel/tunnel.lo: ../../include/net-snmp/agent/agent_callbacks.h tunnel.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/netsnmp-attribute-format.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/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 +./tunnel/tunnel.lo: if-mib/ifTable/ifTable.h +./tunnel/tunnel.lo: ../../include/net-snmp/data_access/interface.h +./tunnel/tunnel.lo: if-mib/ifTable/ifTable_constants.h +./tunnel/tunnel.lo: if-mib/ifTable/ifTable_interface.h +./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_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 @@ -13978,7 +14004,9 @@ ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -13998,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 @@ -14019,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 @@ -14059,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.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 @@ -14089,7 +14116,9 @@ ./ucd-snmp/diskio.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -14109,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 @@ -14130,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 @@ -14201,7 +14229,9 @@ ./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -14220,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 @@ -14241,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 @@ -14309,7 +14338,9 @@ ./ucd-snmp/errormib.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/errormib.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -14329,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 @@ -14350,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 @@ -14421,7 +14451,9 @@ ./ucd-snmp/extensible.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/extensible.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -14440,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 @@ -14461,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 @@ -14536,7 +14567,9 @@ ./ucd-snmp/file.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/file.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -14556,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 @@ -14577,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 @@ -14646,7 +14678,9 @@ ./ucd-snmp/hpux.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/hpux.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -14666,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 @@ -14687,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 @@ -14756,7 +14789,9 @@ ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -14775,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 @@ -14796,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 @@ -14865,7 +14899,9 @@ ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -14885,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 @@ -14906,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 @@ -14976,7 +15011,9 @@ ./ucd-snmp/loadave.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/loadave.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -14996,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 @@ -15017,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 @@ -15089,7 +15125,9 @@ ./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 @@ -15109,7 +15147,6 @@ ./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 @@ -15130,8 +15167,8 @@ ./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/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 @@ -15199,7 +15236,9 @@ ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -15219,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 @@ -15240,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 @@ -15310,7 +15348,9 @@ ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -15330,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 @@ -15351,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 @@ -15421,7 +15460,9 @@ ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -15441,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 @@ -15462,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 @@ -15532,7 +15572,9 @@ ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -15552,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 @@ -15573,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 @@ -15646,7 +15687,9 @@ ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -15666,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 @@ -15687,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 @@ -15757,7 +15799,9 @@ ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -15777,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 @@ -15798,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 @@ -15868,7 +15911,9 @@ ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -15888,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 @@ -15909,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 @@ -15981,7 +16025,9 @@ ./ucd-snmp/pass.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/pass.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -16000,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 @@ -16021,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 @@ -16093,7 +16138,9 @@ ./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -16113,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 @@ -16134,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 @@ -16207,7 +16253,9 @@ ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -16226,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 @@ -16247,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 @@ -16320,7 +16367,9 @@ ./ucd-snmp/proc.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/proc.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -16339,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 @@ -16360,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 @@ -16399,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 @@ -16434,7 +16482,9 @@ ./ucd-snmp/proxy.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -16453,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 @@ -16474,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 @@ -16543,7 +16592,9 @@ ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -16562,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 @@ -16583,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 @@ -16654,7 +16704,9 @@ ./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 @@ -16674,7 +16726,6 @@ ./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 @@ -16695,8 +16746,8 @@ ./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/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 @@ -16765,7 +16816,9 @@ ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -16785,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 @@ -16806,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 @@ -16875,7 +16927,9 @@ ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -16895,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 @@ -16916,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 @@ -16986,7 +17039,9 @@ ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -17006,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 @@ -17027,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 @@ -17097,7 +17151,9 @@ ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -17117,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 @@ -17138,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 @@ -17207,7 +17262,9 @@ ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -17227,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 @@ -17248,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 @@ -17319,7 +17375,9 @@ ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -17339,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 @@ -17360,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 @@ -17430,7 +17487,9 @@ ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -17449,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 @@ -17470,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 @@ -17541,7 +17599,9 @@ ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -17561,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 @@ -17582,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 @@ -17652,7 +17711,9 @@ ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -17672,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 @@ -17693,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 @@ -17762,7 +17822,9 @@ ./util_funcs/Exit.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./util_funcs/Exit.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -17802,7 +17864,9 @@ ./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -17840,7 +17904,9 @@ ./util_funcs/header_generic.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./util_funcs/header_generic.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -17860,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 @@ -17881,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 @@ -17949,7 +18014,9 @@ ./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -17969,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 @@ -17990,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 @@ -18058,7 +18124,9 @@ ./util_funcs/restart.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./util_funcs/restart.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -18078,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 @@ -18099,8 +18166,8 @@ ./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 @@ -18167,7 +18234,9 @@ ./utilities/execute.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./utilities/execute.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -18187,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 @@ -18208,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 @@ -18279,7 +18347,9 @@ ./utilities/iquery.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./utilities/iquery.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -18298,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 @@ -18319,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 @@ -18388,7 +18457,9 @@ ./utilities/override.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./utilities/override.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -18408,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 @@ -18429,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 diff --git a/vendor/agent/mibgroup/Rmon.h b/vendor/agent/mibgroup/Rmon.h index 3a7d3a4..acc12c8 100644 --- a/vendor/agent/mibgroup/Rmon.h +++ b/vendor/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/vendor/agent/mibgroup/Rmon/agutil.c b/vendor/agent/mibgroup/Rmon/agutil.c index 12c6342..4a0617a 100644 --- a/vendor/agent/mibgroup/Rmon/agutil.c +++ b/vendor/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/vendor/agent/mibgroup/Rmon/agutil_api.h b/vendor/agent/mibgroup/Rmon/agutil_api.h index 3959fab..e1532c3 100644 --- a/vendor/agent/mibgroup/Rmon/agutil_api.h +++ b/vendor/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/vendor/agent/mibgroup/Rmon/alarm.c b/vendor/agent/mibgroup/Rmon/alarm.c index f5ef4cc..66840c4 100644 --- a/vendor/agent/mibgroup/Rmon/alarm.c +++ b/vendor/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 @@ -663,7 +663,7 @@ var_alarmEntry(struct variable * vp, oid * name, size_t * length, } /* - * Registration & Initializatio section + * Registration & Initialization section */ oid oidalarmVariablesOid[] = { 1, 3, 6, 1, 2, 1, 16, 3 }; diff --git a/vendor/agent/mibgroup/Rmon/alarmTable.c b/vendor/agent/mibgroup/Rmon/alarmTable.c index a84aa6e..ccf59b3 100644 --- a/vendor/agent/mibgroup/Rmon/alarmTable.c +++ b/vendor/agent/mibgroup/Rmon/alarmTable.c @@ -27,6 +27,10 @@ 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) @@ -43,33 +47,38 @@ 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 */ } + +void shutdown_alarmTable(void) +{ + netsnmp_tdata_unregister(alarm_reg); + netsnmp_table_registration_info_free(alarm_info); +} + + #define ALARM_STR1_LEN 32 typedef enum { RMON1_ENTRY_VALID = 1, diff --git a/vendor/agent/mibgroup/Rmon/alarmTable.h b/vendor/agent/mibgroup/Rmon/alarmTable.h index 1a070b2..b05aed2 100644 --- a/vendor/agent/mibgroup/Rmon/alarmTable.h +++ b/vendor/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/vendor/agent/mibgroup/Rmon/event.c b/vendor/agent/mibgroup/Rmon/event.c index bd76eb8..e2bc686 100644 --- a/vendor/agent/mibgroup/Rmon/event.c +++ b/vendor/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 @@ -759,7 +759,7 @@ add_event_entry(int ctrl_index, #endif /* - * Registration & Initializatio section + * Registration & Initialization section */ oid eventTable_variables_oid[] = diff --git a/vendor/agent/mibgroup/Rmon/event.h b/vendor/agent/mibgroup/Rmon/event.h index d52cae2..16e88db 100644 --- a/vendor/agent/mibgroup/Rmon/event.h +++ b/vendor/agent/mibgroup/Rmon/event.h @@ -26,10 +26,10 @@ */ void init_event(void); -config_require(util_funcs) +config_require(util_funcs); -config_require(Rmon/agutil) -config_require(Rmon/rows) +config_require(Rmon/agutil); +config_require(Rmon/rows); int event_api_send_alarm(u_char is_rising, u_long alarm_index, diff --git a/vendor/agent/mibgroup/Rmon/history.c b/vendor/agent/mibgroup/Rmon/history.c index 16bdf59..827f542 100644 --- a/vendor/agent/mibgroup/Rmon/history.c +++ b/vendor/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 @@ -640,7 +640,7 @@ add_hist_entry(int ctrl_index, int ifIndex, #endif /* - * Registration & Initializatio section + * Registration & Initialization section */ oid historyControlTable_variables_oid[] = diff --git a/vendor/agent/mibgroup/Rmon/rows.c b/vendor/agent/mibgroup/Rmon/rows.c index ac26e30..3724fa8 100644 --- a/vendor/agent/mibgroup/Rmon/rows.c +++ b/vendor/agent/mibgroup/Rmon/rows.c @@ -52,7 +52,7 @@ rowapi_delete(RMON_ENTRY_T * eold) table_ptr = (TABLE_DEFINTION_T *) eold->table_ptr; /* - * delete timout scheduling + * delete timeout scheduling */ snmp_alarm_unregister(eold->timer_id); ag_trace("Entry %ld in %s has been deleted", @@ -67,7 +67,7 @@ rowapi_delete(RMON_ENTRY_T * eold) } /* - * delete it in users's sence + * delete it in the user's sense */ if (table_ptr->ClbkDelete) table_ptr->ClbkDelete((RMON_ENTRY_T *) eold->body); @@ -163,7 +163,7 @@ rowapi_activate(TABLE_DEFINTION_T * table_ptr, RMON_ENTRY_T * eptr) } /* - * creates an entry, locats it in proper sorted order by index + * creates an entry, locates it in proper sorted order by index * Row is initialized to zero, * except: 'next', 'table_ptr', 'index', * 'timer_id' & 'status'=(RMON1_ENTRY_UNDER_CREATION) @@ -396,7 +396,7 @@ ROWAPI_action_check(TABLE_DEFINTION_T * table_ptr, u_long ctrl_index) eptr = ROWAPI_find(table_ptr, ctrl_index); if (!eptr) { - ag_trace("Smth wrong ?"); + ag_trace("Something wrong ?"); return SNMP_ERR_GENERR; } @@ -438,7 +438,7 @@ ROWAPI_action_check(TABLE_DEFINTION_T * table_ptr, u_long ctrl_index) /* * Our MIB understanding extension: we permit to set * VALID when entry doesn't exit, in this case PDU has to have - * the nessessary & valid set of non-default values + * the necessary & valid set of non-default values */ if (table_ptr->ClbkValidate) { return table_ptr->ClbkValidate(eptr); @@ -462,7 +462,7 @@ ROWAPI_commit(TABLE_DEFINTION_T * table_ptr, u_long ctrl_index) eptr = ROWAPI_find(table_ptr, ctrl_index); if (!eptr) { - ag_trace("Smth wrong ?"); + ag_trace("Something wrong ?"); return SNMP_ERR_GENERR; } @@ -490,7 +490,7 @@ ROWAPI_commit(TABLE_DEFINTION_T * table_ptr, u_long ctrl_index) /* * Our MIB understanding extension: we permit to set * VALID when entry doesn't exit, in this case PDU has to have - * the nessessary & valid set of non-default values + * the necessary & valid set of non-default values */ if (eptr->new_owner) { if (eptr->owner) diff --git a/vendor/agent/mibgroup/Rmon/statistics.c b/vendor/agent/mibgroup/Rmon/statistics.c index 83eaa1d..4568054 100644 --- a/vendor/agent/mibgroup/Rmon/statistics.c +++ b/vendor/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 @@ -132,7 +132,7 @@ int stat_Validate(RMON_ENTRY_T * eptr) { /* - * T.B.D. (system dependent) check valid inteface in body->data_source; + * T.B.D. (system dependent) check valid interface in body->data_source; */ return 0; diff --git a/vendor/agent/mibgroup/Rmon/test_alarm.sh b/vendor/agent/mibgroup/Rmon/test_alarm.sh index b6046c7..0a0863a 100644 --- a/vendor/agent/mibgroup/Rmon/test_alarm.sh +++ b/vendor/agent/mibgroup/Rmon/test_alarm.sh @@ -27,7 +27,7 @@ ETHIND=3 EVNIND=7 ALRIND=2 LOWLIMIT=4800 -HILIMIT =4900 +HILIMIT=4900 INTERVAL=3 WAITTIME=17 diff --git a/vendor/agent/mibgroup/agent/extend.c b/vendor/agent/mibgroup/agent/extend.c index 33e6f23..cd3ec53 100644 --- a/vendor/agent/mibgroup/agent/extend.c +++ b/vendor/agent/mibgroup/agent/extend.c @@ -260,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); } @@ -272,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; @@ -354,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; /* @@ -371,7 +378,7 @@ extend_load_cache(netsnmp_cache *cache, void *magic) } } if ( extension->numlines > 1 ) { - extension->lines = (char**)calloc( sizeof(char *), extension->numlines ); + extension->lines = (char**)calloc( extension->numlines , sizeof(char *) ); memcpy( extension->lines, line_buf, sizeof(char *) * extension->numlines ); } else { @@ -573,8 +580,12 @@ extend_parse_config(const char *token, char *cptr) 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... */ } @@ -1587,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]; + switch (action) { case MODE_SET_RESERVE1: if (var_val_type != ASN_INTEGER) { diff --git a/vendor/agent/mibgroup/agent/extend.h b/vendor/agent/mibgroup/agent/extend.h index 8b76cd4..355c894 100644 --- a/vendor/agent/mibgroup/agent/extend.h +++ b/vendor/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/vendor/agent/mibgroup/agent/nsDebug.c b/vendor/agent/mibgroup/agent/nsDebug.c index d8f2842..617091a 100644 --- a/vendor/agent/mibgroup/agent/nsDebug.c +++ b/vendor/agent/mibgroup/agent/nsDebug.c @@ -82,6 +82,7 @@ init_nsDebug(void) */ iinfo = SNMP_MALLOC_TYPEDEF(netsnmp_iterator_info); if (!iinfo) { + free(table_info); return; } iinfo->get_first_data_point = get_first_debug_entry; @@ -332,7 +333,9 @@ handle_nsDebugTable(netsnmp_mib_handler *handler, { long status; netsnmp_request_info *request =NULL; +#ifndef NETSNMP_NO_WRITE_SUPPORT netsnmp_table_request_info *table_info =NULL; +#endif netsnmp_token_descr *debug_entry=NULL; switch (reqinfo->mode) { diff --git a/vendor/agent/mibgroup/agent/nsLogging.c b/vendor/agent/mibgroup/agent/nsLogging.c index 9abdeb5..7f42904 100644 --- a/vendor/agent/mibgroup/agent/nsLogging.c +++ b/vendor/agent/mibgroup/agent/nsLogging.c @@ -147,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: @@ -201,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: @@ -394,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/vendor/agent/mibgroup/agent/nsVacmAccessTable.c b/vendor/agent/mibgroup/agent/nsVacmAccessTable.c index cc61fce..6c43210 100644 --- a/vendor/agent/mibgroup/agent/nsVacmAccessTable.c +++ b/vendor/agent/mibgroup/agent/nsVacmAccessTable.c @@ -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/vendor/agent/mibgroup/agent/nsVacmAccessTable.h b/vendor/agent/mibgroup/agent/nsVacmAccessTable.h index c4522ef..595d883 100644 --- a/vendor/agent/mibgroup/agent/nsVacmAccessTable.h +++ b/vendor/agent/mibgroup/agent/nsVacmAccessTable.h @@ -5,7 +5,7 @@ #ifndef NSVACMACCESSTABLE_H #define NSVACMACCESSTABLE_H -config_add_mib(NET-SNMP-VACM-MIB) +config_add_mib(NET-SNMP-VACM-MIB); /* * function declarations diff --git a/vendor/agent/mibgroup/agent_mibs.h b/vendor/agent/mibgroup/agent_mibs.h index 50dd159..30033a0 100644 --- a/vendor/agent/mibgroup/agent_mibs.h +++ b/vendor/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/vendor/agent/mibgroup/agentx.h b/vendor/agent/mibgroup/agentx.h index de47fa8..dc376b5 100644 --- a/vendor/agent/mibgroup/agentx.h +++ b/vendor/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/vendor/agent/mibgroup/agentx/agentx_config.c b/vendor/agent/mibgroup/agentx/agentx_config.c index b39443c..4d5f023 100644 --- a/vendor/agent/mibgroup/agentx/agentx_config.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/agentx/agentx_config.h b/vendor/agent/mibgroup/agentx/agentx_config.h index 9496a47..e64f14a 100644 --- a/vendor/agent/mibgroup/agentx/agentx_config.h +++ b/vendor/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/vendor/agent/mibgroup/agentx/client.c b/vendor/agent/mibgroup/agentx/client.c index c02fad6..fe5c31a 100644 --- a/vendor/agent/mibgroup/agentx/client.c +++ b/vendor/agent/mibgroup/agentx/client.c @@ -7,30 +7,30 @@ #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 @@ -105,7 +105,7 @@ int agentx_open_session(netsnmp_session * ss) { netsnmp_pdu *pdu, *response; - u_long timeout; + int timeout; DEBUGMSGTL(("agentx/subagent", "opening session \n")); if (ss == NULL || !IS_AGENTX_VERSION(ss->version)) { @@ -118,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/vendor/agent/mibgroup/agentx/client.h b/vendor/agent/mibgroup/agentx/client.h index 1701aaa..3e84615 100644 --- a/vendor/agent/mibgroup/agentx/client.h +++ b/vendor/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/vendor/agent/mibgroup/agentx/master.c b/vendor/agent/mibgroup/agentx/master.c index 2044168..ed7ecd1 100644 --- a/vendor/agent/mibgroup/agentx/master.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/agentx/master.h b/vendor/agent/mibgroup/agentx/master.h index 7525b8c..d5b0134 100644 --- a/vendor/agent/mibgroup/agentx/master.h +++ b/vendor/agent/mibgroup/agentx/master.h @@ -1,11 +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/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/vendor/agent/mibgroup/agentx/master_admin.c b/vendor/agent/mibgroup/agentx/master_admin.c index e01a4c5..e08dace 100644 --- a/vendor/agent/mibgroup/agentx/master_admin.c +++ b/vendor/agent/mibgroup/agentx/master_admin.c @@ -13,20 +13,20 @@ #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 @@ -93,6 +93,7 @@ open_agentx_session(netsnmp_session * session, netsnmp_pdu *pdu) sp->contextName = NULL; sp->securityEngineID = NULL; sp->securityPrivProto = NULL; + sp->sessUser = NULL; /* * This next bit utilises unused SNMPv3 fields @@ -500,6 +501,9 @@ handle_master_agentx_packet(int operation, asp = (netsnmp_agent_session *) magic; } else { asp = init_agent_snmp_session(session, pdu); + if (asp == NULL) { + return 1; + } } DEBUGMSGTL(("agentx/master", "handle pdu (req=0x%lx,trans=0x%lx,sess=0x%lx)\n", diff --git a/vendor/agent/mibgroup/agentx/master_admin.h b/vendor/agent/mibgroup/agentx/master_admin.h index 8f1a6cc..725f0e2 100644 --- a/vendor/agent/mibgroup/agentx/master_admin.h +++ b/vendor/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/vendor/agent/mibgroup/agentx/protocol.c b/vendor/agent/mibgroup/agentx/protocol.c index 829a545..f8a0203 100644 --- a/vendor/agent/mibgroup/agentx/protocol.c +++ b/vendor/agent/mibgroup/agentx/protocol.c @@ -14,32 +14,32 @@ #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 @@ -1895,7 +1895,7 @@ agentx_parse(netsnmp_session * session, netsnmp_pdu *pdu, u_char * data, #ifdef TESTING -testit(netsnmp_pdu *pdu1) +void testit(netsnmp_pdu *pdu1) { char packet1[BUFSIZ]; char packet2[BUFSIZ]; @@ -1964,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/vendor/agent/mibgroup/agentx/protocol.h b/vendor/agent/mibgroup/agentx/protocol.h index e1eebc1..d2d08b2 100644 --- a/vendor/agent/mibgroup/agentx/protocol.h +++ b/vendor/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/vendor/agent/mibgroup/agentx/subagent.c b/vendor/agent/mibgroup/agentx/subagent.c index 844e8eb..827e312 100644 --- a/vendor/agent/mibgroup/agentx/subagent.c +++ b/vendor/agent/mibgroup/agentx/subagent.c @@ -8,25 +8,25 @@ #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 @@ -88,7 +88,9 @@ struct agent_netsnmp_set_info { struct agent_netsnmp_set_info *next; }; +#ifndef NETSNMP_NO_WRITE_SUPPORT static struct agent_netsnmp_set_info *Sets = NULL; +#endif netsnmp_session *agentx_callback_sess = NULL; @@ -241,7 +243,6 @@ free_set_vars(netsnmp_session * ss, netsnmp_pdu *pdu) prev = ptr; } } -#endif /* !NETSNMP_NO_WRITE_SUPPORT */ static void send_agentx_error(netsnmp_session *session, netsnmp_pdu *pdu, int errstat, int errindex) @@ -262,12 +263,15 @@ send_agentx_error(netsnmp_session *session, netsnmp_pdu *pdu, int errstat, int e snmp_free_pdu(pdu); } } +#endif /* !NETSNMP_NO_WRITE_SUPPORT */ int handle_agentx_packet(int operation, netsnmp_session * session, int reqid, netsnmp_pdu *pdu, void *magic) { +#ifndef NETSNMP_NO_WRITE_SUPPORT struct agent_netsnmp_set_info *asi = NULL; +#endif snmp_callback mycallback; netsnmp_pdu *internal_pdu = NULL; void *retmagic = NULL; @@ -505,8 +509,10 @@ handle_agentx_packet(int operation, netsnmp_session * session, int reqid, */ internal_pdu = snmp_clone_pdu(pdu); - if (!internal_pdu) + if (!internal_pdu) { + free(smagic); return 1; + } free(internal_pdu->contextName); internal_pdu->contextName = (char *) internal_pdu->community; internal_pdu->contextNameLen = internal_pdu->community_len; diff --git a/vendor/agent/mibgroup/agentx/subagent.h b/vendor/agent/mibgroup/agentx/subagent.h index b55bec1..bc63e8b 100644 --- a/vendor/agent/mibgroup/agentx/subagent.h +++ b/vendor/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/vendor/agent/mibgroup/default_modules.h b/vendor/agent/mibgroup/default_modules.h index fc5f26a..75575a4 100644 --- a/vendor/agent/mibgroup/default_modules.h +++ b/vendor/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/vendor/agent/mibgroup/deliver/deliverByNotify.c b/vendor/agent/mibgroup/deliver/deliverByNotify.c index 6414b4a..7b594e2 100644 --- a/vendor/agent/mibgroup/deliver/deliverByNotify.c +++ b/vendor/agent/mibgroup/deliver/deliverByNotify.c @@ -16,13 +16,13 @@ netsnmp_feature_require(container_fifo); /* if v is !NULL, then estimate it's likely size */ #define ESTIMATE_VAR_SIZE(v) (v?(v->name_length + v->val_len + 8):0) -void parse_deliver_config(const char *, char *); -void parse_deliver_maxsize_config(const char *, char *); -void parse_data_notification_oid_config(const char *, char *); -void parse_periodic_time_oid_config(const char *, char *); -void parse_message_number_oid_config(const char *, char *); -void parse_max_message_number_oid_config(const char *, char *); -void free_deliver_config(void); +static void parse_deliver_config(const char *, char *); +static void parse_deliver_maxsize_config(const char *, char *); +static void parse_data_notification_oid_config(const char *, char *); +static void parse_periodic_time_oid_config(const char *, char *); +static void parse_message_number_oid_config(const char *, char *); +static void parse_max_message_number_oid_config(const char *, char *); +static void free_deliver_config(void); static void _schedule_next_execute_time(void); @@ -44,13 +44,16 @@ size_t netsnmp_max_message_number_oid_len = 13; oid objid_snmptrap[] = { 1, 3, 6, 1, 6, 3, 1, 1, 4, 1, 0 }; -#define DEFAULT_MAX_DELIVER_SIZE -1; +#define DEFAULT_MAX_DELIVER_SIZE -1 static int default_max_size; unsigned int alarm_reg; static netsnmp_container *deliver_container; static int -_deliver_compare(deliver_by_notify *lhs, deliver_by_notify *rhs) { +_deliver_compare(const void *p, const void *q) +{ + const deliver_by_notify *lhs = p, *rhs = q; + /* sort by the next_run time */ if (lhs->next_run < rhs->next_run) return -1; @@ -99,7 +102,7 @@ init_deliverByNotify(void) return; } deliver_container->container_name = strdup("deliverByNotify"); - deliver_container->compare = (netsnmp_container_compare *) _deliver_compare; + deliver_container->compare = _deliver_compare; /* set the defaults */ default_max_size = DEFAULT_MAX_DELIVER_SIZE; @@ -239,7 +242,10 @@ parse_deliver_maxsize_config(const char *token, char *line) { } static void -_free_deliver_obj(deliver_by_notify *obj, void *context) { +_free_deliver_obj(void *p, void *context) +{ + deliver_by_notify *obj = p; + netsnmp_assert_or_return(obj != NULL, ); SNMP_FREE(obj->target); SNMP_FREE(obj); @@ -248,8 +254,7 @@ _free_deliver_obj(deliver_by_notify *obj, void *context) { void free_deliver_config(void) { default_max_size = DEFAULT_MAX_DELIVER_SIZE; - CONTAINER_CLEAR(deliver_container, - (netsnmp_container_obj_func *) _free_deliver_obj, NULL); + CONTAINER_CLEAR(deliver_container, _free_deliver_obj, NULL); if (alarm_reg) { snmp_alarm_unregister(alarm_reg); alarm_reg = 0; @@ -298,6 +303,7 @@ deliver_execute(unsigned int clientreg, void *clientarg) { /* XXX: disable? and reset the next query time point! */ snmp_log(LOG_ERR, "deliverByNotify: failed to issue the query"); ITERATOR_RELEASE(iterator); + free(vars); return; } @@ -457,7 +463,7 @@ _schedule_next_execute_time(void) { for(obj = ITERATOR_FIRST(iterator); obj; obj = ITERATOR_NEXT(iterator)) { next_time = calculate_time_until_next_run(obj, &local_now); - DEBUGMSGTL(("deliverByNotify", " obj: %d (last=%d, next_run=%d)\n", next_time, obj->last_run, obj->next_run)); + DEBUGMSGTL(("deliverByNotify", " obj: %d (last=%lld, next_run=%lld)\n", next_time, (long long)obj->last_run, (long long)obj->next_run)); if (next_time < sleep_for) sleep_for = next_time; } diff --git a/vendor/agent/mibgroup/deliver/deliverByNotify.h b/vendor/agent/mibgroup/deliver/deliverByNotify.h index 292c366..50ca0c7 100644 --- a/vendor/agent/mibgroup/deliver/deliverByNotify.h +++ b/vendor/agent/mibgroup/deliver/deliverByNotify.h @@ -1,24 +1,21 @@ #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); -void parse_deliver_config(const char *, char *); -void free_deliver_config(void); - SNMPAlarmCallback deliver_execute; #define NETSNMP_DELIVER_NO_PERIOD_OID 0x01 @@ -27,8 +24,8 @@ SNMPAlarmCallback deliver_execute; /* implementation details */ typedef struct deliver_by_notify_s { int frequency; - int last_run; - int next_run; + time_t last_run; + time_t next_run; oid *target; size_t target_len; int max_packet_size; diff --git a/vendor/agent/mibgroup/disman.h b/vendor/agent/mibgroup/disman.h index 6b7cdd5..0dc50b8 100644 --- a/vendor/agent/mibgroup/disman.h +++ b/vendor/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/vendor/agent/mibgroup/disman/event-mib.h b/vendor/agent/mibgroup/disman/event-mib.h index 58c8391..757c99b 100644 --- a/vendor/agent/mibgroup/disman/event-mib.h +++ b/vendor/agent/mibgroup/disman/event-mib.h @@ -1,2 +1,2 @@ -config_require(disman/event) +config_require(disman/event); diff --git a/vendor/agent/mibgroup/disman/event.h b/vendor/agent/mibgroup/disman/event.h index e646975..cda1382 100644 --- a/vendor/agent/mibgroup/disman/event.h +++ b/vendor/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/vendor/agent/mibgroup/disman/event/mteEventConf.h b/vendor/agent/mibgroup/disman/event/mteEventConf.h index 47001f0..b6b59f6 100644 --- a/vendor/agent/mibgroup/disman/event/mteEventConf.h +++ b/vendor/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/vendor/agent/mibgroup/disman/event/mteEventTable.c b/vendor/agent/mibgroup/disman/event/mteEventTable.c index e6ef001..fbc5c03 100644 --- a/vendor/agent/mibgroup/disman/event/mteEventTable.c +++ b/vendor/agent/mibgroup/disman/event/mteEventTable.c @@ -91,10 +91,12 @@ mteEventTable_handler(netsnmp_mib_handler *handler, netsnmp_request_info *request; netsnmp_table_request_info *tinfo; - netsnmp_tdata_row *row; struct mteEvent *entry; +#ifndef NETSNMP_NO_WRITE_SUPPORT + netsnmp_tdata_row *row; char mteOwner[MTE_STR1_LEN+1]; char mteEName[MTE_STR1_LEN+1]; +#endif long ret; DEBUGMSGTL(("disman:event:mib", "Event Table handler (%d)\n", diff --git a/vendor/agent/mibgroup/disman/event/mteTrigger.c b/vendor/agent/mibgroup/disman/event/mteTrigger.c index e9a8831..5a1d8e7 100644 --- a/vendor/agent/mibgroup/disman/event/mteTrigger.c +++ b/vendor/agent/mibgroup/disman/event/mteTrigger.c @@ -1012,7 +1012,7 @@ mteTrigger_run( unsigned int reg, void *clientarg) * Similarly, if no fallEvent is configured, * there's no point in trying to fire it either. */ - if (entry->mteTThRiseEvent[0] != '\0' ) { + if (entry->mteTThFallEvent[0] != '\0' ) { entry->mteTriggerXOwner = entry->mteTThObjOwner; entry->mteTriggerXObjects = entry->mteTThObjects; entry->mteTriggerFired = vp1; @@ -1105,7 +1105,7 @@ mteTrigger_run( unsigned int reg, void *clientarg) * Similarly, if no fallEvent is configured, * there's no point in trying to fire it either. */ - if (entry->mteTThDRiseEvent[0] != '\0' ) { + if (entry->mteTThDFallEvent[0] != '\0' ) { entry->mteTriggerXOwner = entry->mteTThObjOwner; entry->mteTriggerXObjects = entry->mteTThObjects; entry->mteTriggerFired = vp1; diff --git a/vendor/agent/mibgroup/disman/event/mteTriggerConf.c b/vendor/agent/mibgroup/disman/event/mteTriggerConf.c index ff710c6..0c01f7f 100644 --- a/vendor/agent/mibgroup/disman/event/mteTriggerConf.c +++ b/vendor/agent/mibgroup/disman/event/mteTriggerConf.c @@ -167,7 +167,7 @@ parse_mteMonitor(const char *token, const char *line) int seen_name = 0; char oid_name_buf[SPRINT_MAX_LEN]; oid name_buf[MAX_OID_LEN]; - size_t name_buf_len; + size_t name_buf_len = 0; u_char op = 0; long value = 0; @@ -188,6 +188,7 @@ parse_mteMonitor(const char *token, const char *line) memset( buf, 0, sizeof(buf)); memset( tname, 0, sizeof(tname)); memset( ename, 0, sizeof(ename)); + memset(name_buf, 0, sizeof(name_buf)); for (cp = copy_nword_const(line, buf, SPRINT_MAX_LEN); ; cp = copy_nword_const(cp, buf, SPRINT_MAX_LEN)) { diff --git a/vendor/agent/mibgroup/disman/event/mteTriggerConf.h b/vendor/agent/mibgroup/disman/event/mteTriggerConf.h index bfbcfcb..da7ac89 100644 --- a/vendor/agent/mibgroup/disman/event/mteTriggerConf.h +++ b/vendor/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/vendor/agent/mibgroup/disman/event/mteTriggerDeltaTable.c b/vendor/agent/mibgroup/disman/event/mteTriggerDeltaTable.c index 4e0edf5..7219da5 100644 --- a/vendor/agent/mibgroup/disman/event/mteTriggerDeltaTable.c +++ b/vendor/agent/mibgroup/disman/event/mteTriggerDeltaTable.c @@ -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/vendor/agent/mibgroup/disman/event/mteTriggerExistenceTable.c b/vendor/agent/mibgroup/disman/event/mteTriggerExistenceTable.c index 80ca56e..19885d9 100644 --- a/vendor/agent/mibgroup/disman/event/mteTriggerExistenceTable.c +++ b/vendor/agent/mibgroup/disman/event/mteTriggerExistenceTable.c @@ -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/vendor/agent/mibgroup/disman/event/mteTriggerTable.h b/vendor/agent/mibgroup/disman/event/mteTriggerTable.h index c5c393a..6cab9ae 100644 --- a/vendor/agent/mibgroup/disman/event/mteTriggerTable.h +++ b/vendor/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/vendor/agent/mibgroup/disman/expr/expErrorTable.c b/vendor/agent/mibgroup/disman/expr/expErrorTable.c index d66fa4b..36ee126 100644 --- a/vendor/agent/mibgroup/disman/expr/expErrorTable.c +++ b/vendor/agent/mibgroup/disman/expr/expErrorTable.c @@ -15,14 +15,17 @@ 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 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/vendor/agent/mibgroup/disman/expr/expErrorTable.h b/vendor/agent/mibgroup/disman/expr/expErrorTable.h index 1d8339e..920b286 100644 --- a/vendor/agent/mibgroup/disman/expr/expErrorTable.h +++ b/vendor/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/vendor/agent/mibgroup/disman/expr/expExpressionTable.c b/vendor/agent/mibgroup/disman/expr/expExpressionTable.c index 16e7369..49cd380 100644 --- a/vendor/agent/mibgroup/disman/expr/expExpressionTable.c +++ b/vendor/agent/mibgroup/disman/expr/expExpressionTable.c @@ -22,14 +22,17 @@ 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 diff --git a/vendor/agent/mibgroup/disman/expr/expExpressionTable.h b/vendor/agent/mibgroup/disman/expr/expExpressionTable.h index a32d8f5..68e5076 100644 --- a/vendor/agent/mibgroup/disman/expr/expExpressionTable.h +++ b/vendor/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/vendor/agent/mibgroup/disman/expr/expObjectTable.c b/vendor/agent/mibgroup/disman/expr/expObjectTable.c index 55a23b9..27d09f3 100644 --- a/vendor/agent/mibgroup/disman/expr/expObjectTable.c +++ b/vendor/agent/mibgroup/disman/expr/expObjectTable.c @@ -20,14 +20,15 @@ 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 diff --git a/vendor/agent/mibgroup/disman/expr/expObjectTable.h b/vendor/agent/mibgroup/disman/expr/expObjectTable.h index 568f67a..855a3b0 100644 --- a/vendor/agent/mibgroup/disman/expr/expObjectTable.h +++ b/vendor/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/vendor/agent/mibgroup/disman/expr/expValue.c b/vendor/agent/mibgroup/disman/expr/expValue.c index 11fcd83..8ebf02c 100644 --- a/vendor/agent/mibgroup/disman/expr/expValue.c +++ b/vendor/agent/mibgroup/disman/expr/expValue.c @@ -70,7 +70,7 @@ netsnmp_variable_list * _expValue_evalParam( netsnmp_variable_list *expIdx, int param, oid *suffix, size_t suffix_len ) { - netsnmp_variable_list *var = SNMP_MALLOC_TYPEDEF( netsnmp_variable_list ); + netsnmp_variable_list *var = NULL; struct expObject *obj; netsnmp_variable_list *val_var = NULL, *oval_var = NULL; /* values */ netsnmp_variable_list *dd_var = NULL, *odd_var = NULL; /* deltaDs */ @@ -80,9 +80,14 @@ _expValue_evalParam( netsnmp_variable_list *expIdx, int param, /* * Retrieve the expObject entry for the requested parameter. */ - if ( !var || !expIdx || !expIdx->next_variable || - !expIdx->next_variable->next_variable ) + if (!expIdx || !expIdx->next_variable || + !expIdx->next_variable->next_variable ) { return NULL; + } + var = SNMP_MALLOC_TYPEDEF( netsnmp_variable_list ); + if (!var) { + return NULL; + } *expIdx->next_variable->next_variable->val.integer = param; obj = (struct expObject *) diff --git a/vendor/agent/mibgroup/disman/expr/expValueTable.c b/vendor/agent/mibgroup/disman/expr/expValueTable.c index 38a6072..f5db2fc 100644 --- a/vendor/agent/mibgroup/disman/expr/expValueTable.c +++ b/vendor/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, diff --git a/vendor/agent/mibgroup/disman/expr/expValueTable.h b/vendor/agent/mibgroup/disman/expr/expValueTable.h index 15f3202..1f20e0d 100644 --- a/vendor/agent/mibgroup/disman/expr/expValueTable.h +++ b/vendor/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/vendor/agent/mibgroup/disman/expression-mib.h b/vendor/agent/mibgroup/disman/expression-mib.h index 18db2af..e32f3b8 100644 --- a/vendor/agent/mibgroup/disman/expression-mib.h +++ b/vendor/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/vendor/agent/mibgroup/disman/expression.h b/vendor/agent/mibgroup/disman/expression.h index 82f7cc0..503972a 100644 --- a/vendor/agent/mibgroup/disman/expression.h +++ b/vendor/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/vendor/agent/mibgroup/disman/expression/expErrorTable.c b/vendor/agent/mibgroup/disman/expression/expErrorTable.c index 5ef1ef6..0231d64 100644 --- a/vendor/agent/mibgroup/disman/expression/expErrorTable.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/disman/expression/expErrorTable.h b/vendor/agent/mibgroup/disman/expression/expErrorTable.h index 5399159..99ba3c3 100644 --- a/vendor/agent/mibgroup/disman/expression/expErrorTable.h +++ b/vendor/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/vendor/agent/mibgroup/disman/expression/expExpressionTable.c b/vendor/agent/mibgroup/disman/expression/expExpressionTable.c index e8669b2..48bf423 100644 --- a/vendor/agent/mibgroup/disman/expression/expExpressionTable.c +++ b/vendor/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 @@ -1158,9 +1158,8 @@ write_expExpressionEntryStatus(int action, } if (pdu->securityName) { StorageTmp->pdu_securityName = - calloc(1, pdu->securityNameLen + 1); - memcpy(StorageTmp->pdu_securityName, pdu->securityName, - pdu->securityNameLen); + netsnmp_memdup(pdu->securityName, + pdu->securityNameLen + 1); StorageTmp->pdu_securityNameLen = pdu->securityNameLen; } else { StorageTmp->pdu_securityName = NULL; diff --git a/vendor/agent/mibgroup/disman/expression/expExpressionTable.h b/vendor/agent/mibgroup/disman/expression/expExpressionTable.h index a4be6bd..da655f2 100644 --- a/vendor/agent/mibgroup/disman/expression/expExpressionTable.h +++ b/vendor/agent/mibgroup/disman/expression/expExpressionTable.h @@ -25,7 +25,7 @@ */ -config_require(header_complex) +config_require(header_complex); /* * our storage structure(s) diff --git a/vendor/agent/mibgroup/disman/expression/expObjectTable.c b/vendor/agent/mibgroup/disman/expression/expObjectTable.c index c1b93e3..d9dead8 100644 --- a/vendor/agent/mibgroup/disman/expression/expObjectTable.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/disman/expression/expObjectTable.h b/vendor/agent/mibgroup/disman/expression/expObjectTable.h index 823e8bd..a9190f0 100644 --- a/vendor/agent/mibgroup/disman/expression/expObjectTable.h +++ b/vendor/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; diff --git a/vendor/agent/mibgroup/disman/expression/expValueTable.c b/vendor/agent/mibgroup/disman/expression/expValueTable.c index 2463bd4..1228a5f 100644 --- a/vendor/agent/mibgroup/disman/expression/expValueTable.c +++ b/vendor/agent/mibgroup/disman/expression/expValueTable.c @@ -23,13 +23,13 @@ */ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include diff --git a/vendor/agent/mibgroup/disman/expression/expValueTable.h b/vendor/agent/mibgroup/disman/expression/expValueTable.h index f88208f..600ac74 100644 --- a/vendor/agent/mibgroup/disman/expression/expValueTable.h +++ b/vendor/agent/mibgroup/disman/expression/expValueTable.h @@ -20,7 +20,7 @@ /* * 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 diff --git a/vendor/agent/mibgroup/disman/mteObjectsTable.c b/vendor/agent/mibgroup/disman/mteObjectsTable.c index 79d0e30..945aaf2 100644 --- a/vendor/agent/mibgroup/disman/mteObjectsTable.c +++ b/vendor/agent/mibgroup/disman/mteObjectsTable.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 diff --git a/vendor/agent/mibgroup/disman/mteObjectsTable.h b/vendor/agent/mibgroup/disman/mteObjectsTable.h index 4d44c87..fea5f03 100644 --- a/vendor/agent/mibgroup/disman/mteObjectsTable.h +++ b/vendor/agent/mibgroup/disman/mteObjectsTable.h @@ -13,7 +13,7 @@ */ -config_require(header_complex) +config_require(header_complex); /* diff --git a/vendor/agent/mibgroup/disman/mteTriggerBooleanTable.c b/vendor/agent/mibgroup/disman/mteTriggerBooleanTable.c index fccc7ad..732a279 100644 --- a/vendor/agent/mibgroup/disman/mteTriggerBooleanTable.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/disman/mteTriggerBooleanTable.h b/vendor/agent/mibgroup/disman/mteTriggerBooleanTable.h index 6413da5..74b09ae 100644 --- a/vendor/agent/mibgroup/disman/mteTriggerBooleanTable.h +++ b/vendor/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/vendor/agent/mibgroup/disman/mteTriggerDeltaTable.c b/vendor/agent/mibgroup/disman/mteTriggerDeltaTable.c index f5f2fe7..c7bdd77 100644 --- a/vendor/agent/mibgroup/disman/mteTriggerDeltaTable.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/disman/mteTriggerDeltaTable.h b/vendor/agent/mibgroup/disman/mteTriggerDeltaTable.h index fa4872a..9566a47 100644 --- a/vendor/agent/mibgroup/disman/mteTriggerDeltaTable.h +++ b/vendor/agent/mibgroup/disman/mteTriggerDeltaTable.h @@ -13,7 +13,7 @@ */ -config_require(header_complex) +config_require(header_complex); /* diff --git a/vendor/agent/mibgroup/disman/mteTriggerExistenceTable.c b/vendor/agent/mibgroup/disman/mteTriggerExistenceTable.c index 18b578c..30ffac4 100644 --- a/vendor/agent/mibgroup/disman/mteTriggerExistenceTable.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/disman/mteTriggerExistenceTable.h b/vendor/agent/mibgroup/disman/mteTriggerExistenceTable.h index 75c6427..31747ee 100644 --- a/vendor/agent/mibgroup/disman/mteTriggerExistenceTable.h +++ b/vendor/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/vendor/agent/mibgroup/disman/mteTriggerTable.c b/vendor/agent/mibgroup/disman/mteTriggerTable.c index 6d08897..4d34297 100644 --- a/vendor/agent/mibgroup/disman/mteTriggerTable.c +++ b/vendor/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 @@ -2975,9 +2975,8 @@ write_mteTriggerEntryStatus(int action, } if (pdu->securityName) { StorageTmp->pdu_securityName = - calloc(1, pdu->securityNameLen + 1); - memcpy(StorageTmp->pdu_securityName, pdu->securityName, - pdu->securityNameLen); + netsnmp_memdup(pdu->securityName, + pdu->securityNameLen + 1); StorageTmp->pdu_securityNameLen = pdu->securityNameLen; } else { StorageTmp->pdu_securityName = NULL; @@ -3136,7 +3135,7 @@ mte_get_response(struct mteTriggerTable_data *item, netsnmp_pdu *pdu) item->mteTriggerContextNameLen); pdu->contextNameLen = item->mteTriggerContextNameLen; pdu->securityName = netsnmp_memdup(item->pdu_securityName, - item->pdu_securityNameLen); + item->pdu_securityNameLen + 1); pdu->securityNameLen = item->pdu_securityNameLen; DEBUGMSGTL(("mteTriggerTable", "accessing locally with secName \"%s\" community \"%s\"\n", diff --git a/vendor/agent/mibgroup/disman/mteTriggerTable.h b/vendor/agent/mibgroup/disman/mteTriggerTable.h index 898b014..3d6738f 100644 --- a/vendor/agent/mibgroup/disman/mteTriggerTable.h +++ b/vendor/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 /* diff --git a/vendor/agent/mibgroup/disman/mteTriggerThresholdTable.c b/vendor/agent/mibgroup/disman/mteTriggerThresholdTable.c index ca0efa9..ed86300 100644 --- a/vendor/agent/mibgroup/disman/mteTriggerThresholdTable.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/disman/mteTriggerThresholdTable.h b/vendor/agent/mibgroup/disman/mteTriggerThresholdTable.h index 8f33011..b788325 100644 --- a/vendor/agent/mibgroup/disman/mteTriggerThresholdTable.h +++ b/vendor/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/vendor/agent/mibgroup/disman/nslookup-mib.h b/vendor/agent/mibgroup/disman/nslookup-mib.h index 1c3fb1c..ed253fd 100644 --- a/vendor/agent/mibgroup/disman/nslookup-mib.h +++ b/vendor/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/vendor/agent/mibgroup/disman/nslookup/lookupCtlTable.c b/vendor/agent/mibgroup/disman/nslookup/lookupCtlTable.c index c580437..d5f99ce 100644 --- a/vendor/agent/mibgroup/disman/nslookup/lookupCtlTable.c +++ b/vendor/agent/mibgroup/disman/nslookup/lookupCtlTable.c @@ -133,10 +133,15 @@ create_lookupTable_data(void) struct lookupTable_data *StorageNew = NULL; StorageNew = SNMP_MALLOC_STRUCT(lookupTable_data); if (StorageNew == NULL) { - snmp_log(LOG_ERR, "Out in memory in nslookup-mib/create_lookupTable_date\n"); + snmp_log(LOG_ERR, "Out of memory in nslookup-mib/create_lookupTable_data\n"); exit(1); } StorageNew->lookupCtlTargetAddress = strdup(""); + if (StorageNew->lookupCtlTargetAddress == NULL) { + free(StorageNew); + snmp_log(LOG_ERR, "Out of memory in nslookup-mib/create_lookupTable_data\n"); + exit(1); + } StorageNew->lookupCtlTargetAddressLen = 0; StorageNew->lookupCtlOperStatus = 2L; StorageNew->lookupCtlTime = 0; @@ -260,6 +265,7 @@ parse_lookupCtlTable(const char *token, char *line) &StorageTmp->lookupCtlOwnerIndexLen); if (StorageTmp->lookupCtlOwnerIndex == NULL) { config_perror("invalid specification for lookupCtlOwnerIndex"); + free(StorageTmp); return; } @@ -269,6 +275,7 @@ parse_lookupCtlTable(const char *token, char *line) &StorageTmp->lookupCtlOperationNameLen); if (StorageTmp->lookupCtlOperationName == NULL) { config_perror("invalid specification for lookupCtlOperationName"); + free(StorageTmp); return; } @@ -283,6 +290,7 @@ parse_lookupCtlTable(const char *token, char *line) &StorageTmp->lookupCtlTargetAddressLen); if (StorageTmp->lookupCtlTargetAddress == NULL) { config_perror("invalid specification for lookupCtlTargetAddress"); + free(StorageTmp); return; } @@ -492,6 +500,13 @@ add_result(struct lookupTable_data *item, int index, temp->lookupResultsAddressType = iatype; temp->lookupResultsAddress = malloc(data_len + 1); + if (temp->lookupResultsAddress == NULL) { + snmp_log(LOG_ERR, "Out of memory in nslookup-mib/run_lookup\n"); + free(temp->lookupCtlOperationName); + free(temp->lookupCtlOwnerIndex); + free(temp); + return NULL; + } memcpy(temp->lookupResultsAddress, data, data_len); temp->lookupResultsAddress[data_len] = '\0'; temp->lookupResultsAddressLen = data_len; @@ -520,6 +535,9 @@ run_lookup(struct lookupTable_data *item) addressType = (long) item->lookupCtlTargetAddressType; addresslen = (size_t) item->lookupCtlTargetAddressLen; address = (char *) malloc(addresslen + 1); + if (!address) { + return; + } memcpy(address, item->lookupCtlTargetAddress, addresslen + 1); address[addresslen] = '\0'; @@ -531,6 +549,7 @@ run_lookup(struct lookupTable_data *item) DEBUGMSGTL(("lookupResultsTable", "Invalid argument: %s\n", address)); modify_lookupCtlRc(item, 99); + free(address); return; } @@ -548,6 +567,7 @@ run_lookup(struct lookupTable_data *item) "Can't get a network host entry for ipv4 address: %s\n", address)); modify_lookupCtlRc(item, h_errno); + free(address); return; } else { modify_lookupCtlRc(item, 0L); @@ -579,7 +599,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 }; @@ -626,7 +646,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); @@ -676,7 +696,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); @@ -760,6 +780,7 @@ run_lookup(struct lookupTable_data *item) "Can't get a network host entry for %s\n", address)); modify_lookupCtlRc(item, h_errno); + free(address); return; } else { modify_lookupCtlRc(item, 0L); diff --git a/vendor/agent/mibgroup/disman/nslookup/lookupCtlTable.h b/vendor/agent/mibgroup/disman/nslookup/lookupCtlTable.h index 417f630..6abab6b 100644 --- a/vendor/agent/mibgroup/disman/nslookup/lookupCtlTable.h +++ b/vendor/agent/mibgroup/disman/nslookup/lookupCtlTable.h @@ -70,8 +70,6 @@ SNMPCallback store_lookupCtlTable; #ifndef NETSNMP_NO_WRITE_SUPPORT WriteMethod write_lookupCtlTargetAddressType; WriteMethod write_lookupCtlTargetAddress; -WriteMethod write_lookupCtlRowStatus; - WriteMethod write_lookupCtlRowStatus; #endif /* !NETSNMP_NO_WRITE_SUPPORT */ diff --git a/vendor/agent/mibgroup/disman/nslookup/lookupResultsTable.c b/vendor/agent/mibgroup/disman/nslookup/lookupResultsTable.c index 6813795..b605c01 100644 --- a/vendor/agent/mibgroup/disman/nslookup/lookupResultsTable.c +++ b/vendor/agent/mibgroup/disman/nslookup/lookupResultsTable.c @@ -114,6 +114,7 @@ parse_lookupResultsTable(const char *token, char *line) &StorageTmp->lookupCtlOwnerIndexLen); if (StorageTmp->lookupCtlOwnerIndex == NULL) { config_perror("invalid specification for lookupCtlOwnerIndex"); + free(StorageTmp); return; } @@ -123,6 +124,7 @@ parse_lookupResultsTable(const char *token, char *line) &StorageTmp->lookupCtlOperationNameLen); if (StorageTmp->lookupCtlOperationName == NULL) { config_perror("invalid specification for lookupCtlOperationName"); + free(StorageTmp); return; } @@ -139,6 +141,7 @@ parse_lookupResultsTable(const char *token, char *line) &StorageTmp->lookupResultsAddressLen); if (StorageTmp->lookupResultsAddress == NULL) { config_perror("invalid specification for lookupResultsAddress"); + free(StorageTmp); return; } diff --git a/vendor/agent/mibgroup/disman/old-event-mib.h b/vendor/agent/mibgroup/disman/old-event-mib.h index 71ef1f5..681784b 100644 --- a/vendor/agent/mibgroup/disman/old-event-mib.h +++ b/vendor/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/vendor/agent/mibgroup/disman/ping-mib.h b/vendor/agent/mibgroup/disman/ping-mib.h index 640b37f..d969c9c 100644 --- a/vendor/agent/mibgroup/disman/ping-mib.h +++ b/vendor/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/vendor/agent/mibgroup/disman/ping/pingCtlTable.c b/vendor/agent/mibgroup/disman/ping/pingCtlTable.c index 5041e6c..a5230fa 100644 --- a/vendor/agent/mibgroup/disman/ping/pingCtlTable.c +++ b/vendor/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" @@ -233,6 +234,21 @@ create_pingCtlTable_data(void) StorageNew->storageType = ST_NONVOLATILE; StorageNew->pingProbeHistoryMaxIndex = 0; + + if (StorageNew->pingCtlTargetAddress == NULL || + StorageNew->pingCtlTrapGeneration == NULL || + StorageNew->pingCtlType == NULL || + StorageNew->pingCtlDescr == NULL || + StorageNew->pingCtlSourceAddress == NULL) { + free(StorageNew->pingCtlTargetAddress); + free(StorageNew->pingCtlTrapGeneration); + free(StorageNew->pingCtlType); + free(StorageNew->pingCtlDescr); + free(StorageNew->pingCtlSourceAddress); + free(StorageNew); + return NULL; + } + return StorageNew; } @@ -417,6 +433,7 @@ parse_pingCtlTable(const char *token, char *line) &StorageTmp->pingCtlOwnerIndexLen); if (StorageTmp->pingCtlOwnerIndex == NULL) { config_perror("invalid specification for pingCtlOwnerIndex"); + free(StorageTmp); return; } @@ -426,6 +443,7 @@ parse_pingCtlTable(const char *token, char *line) &StorageTmp->pingCtlTestNameLen); if (StorageTmp->pingCtlTestName == NULL) { config_perror("invalid specification for pingCtlTestName"); + free(StorageTmp); return; } @@ -440,6 +458,7 @@ parse_pingCtlTable(const char *token, char *line) &StorageTmp->pingCtlTargetAddressLen); if (StorageTmp->pingCtlTargetAddress == NULL) { config_perror("invalid specification for pingCtlTargetAddress"); + free(StorageTmp); return; } @@ -465,6 +484,7 @@ parse_pingCtlTable(const char *token, char *line) &StorageTmp->pingCtlDataFillLen); if (StorageTmp->pingCtlDataFill == NULL) { config_perror("invalid specification for pingCtlDataFill"); + free(StorageTmp); return; } @@ -486,6 +506,7 @@ parse_pingCtlTable(const char *token, char *line) &StorageTmp->pingCtlTrapGenerationLen); if (StorageTmp->pingCtlTrapGeneration == NULL) { config_perror("invalid specification for pingCtlTrapGeneration"); + free(StorageTmp); return; } @@ -505,6 +526,7 @@ parse_pingCtlTable(const char *token, char *line) &StorageTmp->pingCtlTypeLen); if (StorageTmp->pingCtlType == NULL) { config_perror("invalid specification for pingCtlType"); + free(StorageTmp); return; } @@ -514,6 +536,7 @@ parse_pingCtlTable(const char *token, char *line) &StorageTmp->pingCtlDescrLen); if (StorageTmp->pingCtlDescr == NULL) { config_perror("invalid specification for pingCtlTrapDescr"); + free(StorageTmp); return; } @@ -1081,7 +1104,7 @@ in_cksum(unsigned short *addr, int len) */ sum = (sum >> 16) + (sum & 0xffff); /* add hi 16 to low 16 */ sum += (sum >> 16); /* add carry */ - answer = ~sum; /* truncate to 16 bits */ + answer = (u_short)~sum; /* truncate to 16 bits */ return (answer); } @@ -1127,7 +1150,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, @@ -1506,6 +1529,7 @@ proc_v4(char *ptr, ssize_t len, struct timeval *tvrecv, time_t timep, temp->pingCtlTestName[item->pingCtlTestNameLen] = '\0'; temp->pingCtlTestNameLen = item->pingCtlTestNameLen; + { /* add lock to protect */ pthread_mutex_t counter_mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&counter_mutex); @@ -1515,7 +1539,7 @@ proc_v4(char *ptr, ssize_t len, struct timeval *tvrecv, time_t timep, temp->pingProbeHistoryIndex = ++(item->pingProbeHistoryMaxIndex); pthread_mutex_unlock(&counter_mutex); - + } temp->pingProbeHistoryResponse = rtt; temp->pingProbeHistoryStatus = 1; @@ -1591,12 +1615,14 @@ proc_v4(char *ptr, ssize_t len, struct timeval *tvrecv, time_t timep, temp->pingCtlTestName[item->pingCtlTestNameLen] = '\0'; temp->pingCtlTestNameLen = item->pingCtlTestNameLen; + { /* add lock to protect */ pthread_mutex_t counter_mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&counter_mutex); temp->pingProbeHistoryIndex = ++(item->pingProbeHistoryMaxIndex); pthread_mutex_unlock(&counter_mutex); /* end */ + } temp->pingProbeHistoryResponse = item->pingCtlTimeOut * 1000; temp->pingProbeHistoryStatus = 4; @@ -1734,9 +1760,9 @@ run_ping(unsigned int clientreg, void *clientarg) unsigned long *minrtt = NULL; unsigned long *maxrtt = NULL; unsigned long *averagertt = NULL; + struct addrinfo *ai = NULL; datalen = 56; /* data that goes with ICMP echo request */ - struct addrinfo *ai = NULL; minrtt = malloc(sizeof(unsigned long)); maxrtt = malloc(sizeof(unsigned long)); averagertt = malloc(sizeof(unsigned long)); @@ -4872,6 +4898,7 @@ main_loop(struct pingCtlTable_data *item, int icmp_sock, int preload, cur_time.tv_sec = 0; cur_time.tv_usec = 0; + { struct pingProbeHistoryTable_data current_temp; static int probeFailed = 0; static int testFailed = 0; @@ -4985,6 +5012,7 @@ main_loop(struct pingCtlTable_data *item, int icmp_sock, int preload, struct timeval recv_time; int not_ours = 0; /* Raw socket can receive messages * destined to other running pings. */ + time_t timep; iov.iov_len = packlen; msg.msg_name = addrbuf; @@ -4996,7 +5024,6 @@ main_loop(struct pingCtlTable_data *item, int icmp_sock, int preload, msg.msg_flags = 0; cc = recvmsg(icmp_sock, &msg, polling); - time_t timep; time(&timep); polling = MSG_DONTWAIT; @@ -5050,6 +5077,7 @@ main_loop(struct pingCtlTable_data *item, int icmp_sock, int preload, temp->pingCtlTestName[item->pingCtlTestNameLen] = '\0'; temp->pingCtlTestNameLen = item->pingCtlTestNameLen; + { /* add lock to protect */ pthread_mutex_t counter_mutex = PTHREAD_MUTEX_INITIALIZER; @@ -5058,6 +5086,7 @@ main_loop(struct pingCtlTable_data *item, int icmp_sock, int preload, ++(item->pingProbeHistoryMaxIndex); pthread_mutex_unlock(&counter_mutex); /* end */ + } temp->pingProbeHistoryResponse = item->pingCtlTimeOut * 1000; @@ -5201,6 +5230,7 @@ main_loop(struct pingCtlTable_data *item, int icmp_sock, int preload, testFailed = 0; } + } finish(options, hostname, interval, timing, &rtt, start_time, deadline, &npackets, &nreceived, &nrepeats, &ntransmitted, &nchecksum, @@ -5383,6 +5413,7 @@ gather_statistics(int *series, struct pingCtlTable_data *item, __u8 * ptr, temp->pingCtlTestName[item->pingCtlTestNameLen] = '\0'; temp->pingCtlTestNameLen = item->pingCtlTestNameLen; + { /* add lock to protect */ pthread_mutex_t counter_mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&counter_mutex); @@ -5391,7 +5422,7 @@ gather_statistics(int *series, struct pingCtlTable_data *item, __u8 * ptr, temp->pingProbeHistoryIndex = ++(item->pingProbeHistoryMaxIndex); pthread_mutex_unlock(&counter_mutex); /* end */ - + } temp->pingProbeHistoryResponse = triptime; temp->pingProbeHistoryStatus = 1; diff --git a/vendor/agent/mibgroup/disman/ping/pingCtlTable.h b/vendor/agent/mibgroup/disman/ping/pingCtlTable.h index 1bc304c..9c7b18e 100644 --- a/vendor/agent/mibgroup/disman/ping/pingCtlTable.h +++ b/vendor/agent/mibgroup/disman/ping/pingCtlTable.h @@ -82,10 +82,10 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include #include diff --git a/vendor/agent/mibgroup/disman/ping/pingProbeHistoryTable.c b/vendor/agent/mibgroup/disman/ping/pingProbeHistoryTable.c index 753d51d..4dcba0c 100644 --- a/vendor/agent/mibgroup/disman/ping/pingProbeHistoryTable.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/disman/ping/pingResultsTable.c b/vendor/agent/mibgroup/disman/ping/pingResultsTable.c index a0a3eb9..69aacef 100644 --- a/vendor/agent/mibgroup/disman/ping/pingResultsTable.c +++ b/vendor/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 @@ -145,6 +145,7 @@ parse_pingResultsTable(const char *token, char *line) &StorageTmp->pingCtlOwnerIndexLen); if (StorageTmp->pingCtlOwnerIndex == NULL) { config_perror("invalid specification for pingCtlOwnerIndex"); + free(StorageTmp); return; } @@ -154,6 +155,7 @@ parse_pingResultsTable(const char *token, char *line) &StorageTmp->pingCtlTestNameLen); if (StorageTmp->pingCtlTestName == NULL) { config_perror("invalid specification for pingCtlTestName"); + free(StorageTmp); return; } @@ -171,6 +173,7 @@ parse_pingResultsTable(const char *token, char *line) if (StorageTmp->pingResultsIpTargetAddress == NULL) { config_perror ("invalid specification for pingResultsIpTargetAddress"); + free(StorageTmp); return; } @@ -201,6 +204,7 @@ parse_pingResultsTable(const char *token, char *line) if (StorageTmp->pingResultsLastGoodProbe == NULL) { config_perror ("invalid specification for pingResultsLastGoodProbe!"); + free(StorageTmp); return; } diff --git a/vendor/agent/mibgroup/disman/schedule.h b/vendor/agent/mibgroup/disman/schedule.h index a3351b6..392f2e0 100644 --- a/vendor/agent/mibgroup/disman/schedule.h +++ b/vendor/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/vendor/agent/mibgroup/disman/schedule/schedConf.c b/vendor/agent/mibgroup/disman/schedule/schedConf.c index 218973d..f89ec9e 100644 --- a/vendor/agent/mibgroup/disman/schedule/schedConf.c +++ b/vendor/agent/mibgroup/disman/schedule/schedConf.c @@ -161,13 +161,20 @@ _sched_convert_bits( char *cron_spec, char *bit_buf, memset( bit_buf, 0, bit_buf_len ); while (1) { - sscanf( cp, "%d", &val); + if ( sscanf( cp, "%d", &val) != 1 ) { + config_perror("Bad number format"); + return; + } /* Handle negative day specification */ if ( val < 0 ) { val = max_val - val; } if ( startAt1 ) val--; + if ( val < 0 || val >= max_val ) { + config_perror("Bad time spec"); + return; + } major = val/8; minor = val%8; bit_buf[ major ] |= b[minor]; @@ -231,7 +238,7 @@ parse_sched_timed( const char *token, char *line ) */ while (line && isspace((unsigned char)(*line))) line++; - if ( *line == '=' ) { + if (line && *line == '=') { line++; while (line && isspace((unsigned char)(*line))) { line++; @@ -263,7 +270,7 @@ parse_sched_timed( const char *token, char *line ) } entry = (struct schedTable_entry *)row->data; - entry->schedWeekDay = dayVal; + entry->schedWeekDay[0] = dayVal; memcpy(entry->schedMonth, monVal, 2); memcpy(entry->schedDay, dateVal, 4+4); memcpy(entry->schedHour, hourVal, 3); @@ -333,7 +340,7 @@ parse_schedTable( const char *token, char *line ) /* Unpick the various timed bits */ len = 22; vp = time_bits; line = read_config_read_data(ASN_OCTET_STR, line, &vp, &len); - entry->schedWeekDay = time_bits[0]; + entry->schedWeekDay[0] = time_bits[0]; entry->schedMonth[0] = time_bits[1]; entry->schedMonth[1] = time_bits[2]; entry->schedHour[0] = time_bits[11]; @@ -407,7 +414,7 @@ store_schedTable(int majorID, int minorID, void *serverarg, void *clientarg) cptr = read_config_store_data(ASN_UNSIGNED, cptr, &tint, NULL ); /* Combine all the timed bits into a single field */ - time_bits[0] = entry->schedWeekDay; + time_bits[0] = entry->schedWeekDay[0]; time_bits[1] = entry->schedMonth[0]; time_bits[2] = entry->schedMonth[1]; time_bits[11] = entry->schedHour[0]; diff --git a/vendor/agent/mibgroup/disman/schedule/schedConf.h b/vendor/agent/mibgroup/disman/schedule/schedConf.h index 91f4965..cec9c8d 100644 --- a/vendor/agent/mibgroup/disman/schedule/schedConf.h +++ b/vendor/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/vendor/agent/mibgroup/disman/schedule/schedCore.c b/vendor/agent/mibgroup/disman/schedule/schedCore.c index f9dcc32..9cda57b 100644 --- a/vendor/agent/mibgroup/disman/schedule/schedCore.c +++ b/vendor/agent/mibgroup/disman/schedule/schedCore.c @@ -117,7 +117,7 @@ static u_char _bits[] = { 0x80, 0x40, 0x20, 0x10, * Are any of the bits set? */ static int -_bit_allClear( char *pattern, int len ) { +_bit_allClear(const u_char *pattern, int len) { int i; for (i=0; ischedHour, 3 ) || _bit_allClear( entry->schedDay, 4+4 ) || _bit_allClear( entry->schedMonth, 2 ) || - _bit_allClear(&entry->schedWeekDay, 1 )) { + _bit_allClear( entry->schedWeekDay, 1 )) { DEBUGMSGTL(("disman:schedule:time", "calendar: incomplete spec\n")); return; } @@ -357,7 +358,7 @@ sched_nextTime( struct schedTable_entry *entry ) if ( _bit_set( entry->schedMonth, now_tm.tm_mon )) { next_tm.tm_mon = now_tm.tm_mon; rev_day = _daysPerMonth[ now_tm.tm_mon ] - now_tm.tm_mday; - if ( _bit_set( &entry->schedWeekDay, now_tm.tm_wday ) && + if ( _bit_set( entry->schedWeekDay, now_tm.tm_wday ) && (_bit_set( entry->schedDay, now_tm.tm_mday-1 ) || _bit_set( entry->schedDay, 31+rev_day ))) { next_tm.tm_mday = now_tm.tm_mday; diff --git a/vendor/agent/mibgroup/disman/schedule/schedCore.h b/vendor/agent/mibgroup/disman/schedule/schedCore.h index 35866d7..5be7f0d 100644 --- a/vendor/agent/mibgroup/disman/schedule/schedCore.h +++ b/vendor/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 @@ -39,11 +39,11 @@ struct schedTable_entry { */ char schedDescr[SCHED_STR2_LEN+1]; u_long schedInterval; - char schedWeekDay; - char schedMonth[2]; - char schedDay[4+4]; - char schedHour[3]; - char schedMinute[8]; + u_char schedWeekDay[1]; + u_char schedMonth[2]; + u_char schedDay[4+4]; + u_char schedHour[3]; + u_char schedMinute[8]; char schedContextName[SCHED_STR1_LEN+1]; oid schedVariable[ MAX_OID_LEN ]; size_t schedVariable_len; diff --git a/vendor/agent/mibgroup/disman/schedule/schedTable.c b/vendor/agent/mibgroup/disman/schedule/schedTable.c index b2d8aaf..ec5ca13 100644 --- a/vendor/agent/mibgroup/disman/schedule/schedTable.c +++ b/vendor/agent/mibgroup/disman/schedule/schedTable.c @@ -449,7 +449,7 @@ schedTable_handler(netsnmp_mib_handler *handler, recalculate = 1; break; case COLUMN_SCHEDWEEKDAY: - entry->schedWeekDay = request->requestvb->val.string[0]; + entry->schedWeekDay[0] = request->requestvb->val.string[0]; recalculate = 1; break; case COLUMN_SCHEDMONTH: diff --git a/vendor/agent/mibgroup/disman/schedule/schedTable.h b/vendor/agent/mibgroup/disman/schedule/schedTable.h index 52033ba..b899f0b 100644 --- a/vendor/agent/mibgroup/disman/schedule/schedTable.h +++ b/vendor/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/vendor/agent/mibgroup/disman/traceroute-mib.h b/vendor/agent/mibgroup/disman/traceroute-mib.h index b33d69e..238dbdb 100644 --- a/vendor/agent/mibgroup/disman/traceroute-mib.h +++ b/vendor/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/vendor/agent/mibgroup/disman/traceroute/traceRouteCtlTable.c b/vendor/agent/mibgroup/disman/traceroute/traceRouteCtlTable.c index fb75f85..b7faa83 100644 --- a/vendor/agent/mibgroup/disman/traceroute/traceRouteCtlTable.c +++ b/vendor/agent/mibgroup/disman/traceroute/traceRouteCtlTable.c @@ -22,6 +22,7 @@ #include #include #include +#include #ifndef NETSNMP_NO_WRITE_SUPPORT netsnmp_feature_require(header_complex_find_entry); @@ -577,10 +578,8 @@ traceRouteProbeHistoryTable_addall(struct traceRouteCtlTable_data *thedata) p = p->next; } while (p != NULL); - else { - return SNMP_ERR_INCONSISTENTNAME; - } + return SNMP_ERR_INCONSISTENTNAME; } @@ -4416,6 +4415,7 @@ run_traceRoute_ipv4(struct traceRouteCtlTable_data *item) item->traceRouteCtlMaxTtl, packlen)); (void) fflush(stderr); + { struct traceRouteResultsTable_data *StorageResults = NULL; netsnmp_variable_list *vars_results = NULL; @@ -4453,15 +4453,13 @@ run_traceRoute_ipv4(struct traceRouteCtlTable_data *item) 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; + count = traceRouteHopsTable_count(item); + 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 */ @@ -4474,7 +4472,7 @@ run_traceRoute_ipv4(struct traceRouteCtlTable_data *item) if (snmp_oid_compare (newoid, newoid_len, hciptr2->name, newoid_len) == 0) { - StorageTmp = + struct traceRouteHopsTable_data *StorageTmp = header_complex_extract_entry (&traceRouteHopsTableStorage, hciptr2); @@ -4494,7 +4492,6 @@ run_traceRoute_ipv4(struct traceRouteCtlTable_data *item) = '\0'; k++; - StorageTmp = NULL; } } traceRouteHopsTable_del(item); @@ -4524,13 +4521,14 @@ run_traceRoute_ipv4(struct traceRouteCtlTable_data *item) 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(""); @@ -4563,6 +4561,8 @@ run_traceRoute_ipv4(struct traceRouteCtlTable_data *item) "registered an entry error\n")); } + + { unsigned long maxRtt = 0; unsigned long minRtt = 0; unsigned long averageRtt = 0; @@ -4739,6 +4739,7 @@ run_traceRoute_ipv4(struct traceRouteCtlTable_data *item) temp_his->traceRouteCtlTestNameLen = item->traceRouteCtlTestNameLen; + { /* add lock to protect */ pthread_mutex_t counter_mutex = PTHREAD_MUTEX_INITIALIZER; @@ -4750,6 +4751,8 @@ run_traceRoute_ipv4(struct traceRouteCtlTable_data *item) ++(item->traceRouteProbeHistoryMaxIndex); pthread_mutex_unlock(&counter_mutex); /* endsadsadsad */ + } + temp_his->traceRouteProbeHistoryHopIndex = ttl; temp_his->traceRouteProbeHistoryProbeIndex = probe + 1; @@ -4858,6 +4861,7 @@ run_traceRoute_ipv4(struct traceRouteCtlTable_data *item) (void) fflush(stdout); } + } putchar('\n'); @@ -4941,6 +4945,7 @@ run_traceRoute_ipv4(struct traceRouteCtlTable_data *item) close(sndsock); free(outip); free(hostname); + } } static void @@ -5121,7 +5126,7 @@ run_traceRoute_ipv6(struct traceRouteCtlTable_data *item) item->traceRouteCtlMaxTtl, datalen); (void) fflush(stderr); - + { struct traceRouteResultsTable_data *StorageResults = NULL; netsnmp_variable_list *vars_results = NULL; @@ -5156,15 +5161,15 @@ run_traceRoute_ipv6(struct traceRouteCtlTable_data *item) 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; + count = traceRouteHopsTable_count(item); + 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 */ @@ -5229,13 +5234,14 @@ run_traceRoute_ipv6(struct traceRouteCtlTable_data *item) 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(""); @@ -5269,6 +5275,7 @@ run_traceRoute_ipv6(struct traceRouteCtlTable_data *item) } + { unsigned long maxRtt = 0; unsigned long minRtt = 0; unsigned long averageRtt = 0; @@ -5390,6 +5397,7 @@ run_traceRoute_ipv6(struct traceRouteCtlTable_data *item) temp_his->traceRouteCtlTestNameLen = item->traceRouteCtlTestNameLen; + { /* add lock to protect */ pthread_mutex_t counter_mutex = PTHREAD_MUTEX_INITIALIZER; @@ -5401,6 +5409,8 @@ run_traceRoute_ipv6(struct traceRouteCtlTable_data *item) ++(item->traceRouteProbeHistoryMaxIndex); pthread_mutex_unlock(&counter_mutex); /* endsadsadsad */ + } + temp_his->traceRouteProbeHistoryHopIndex = ttl; temp_his->traceRouteProbeHistoryProbeIndex = probe + 1; @@ -5515,6 +5525,7 @@ run_traceRoute_ipv6(struct traceRouteCtlTable_data *item) (void) fflush(stdout); } + } putchar('\n'); @@ -5574,6 +5585,7 @@ run_traceRoute_ipv6(struct traceRouteCtlTable_data *item) } } + } if (flag == 1) { printf("path changed!\n"); @@ -5778,7 +5790,7 @@ send_probe(struct sockaddr_in *whereto, 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) @@ -5983,7 +5995,7 @@ in_checksum(u_short * addr, int len) */ sum = (sum >> 16) + (sum & 0xffff); /* add hi 16 to low 16 */ sum += (sum >> 16); /* add carry */ - answer = ~sum; /* truncate to 16 bits */ + answer = (u_short)~sum; /* truncate to 16 bits */ return (answer); } @@ -6066,8 +6078,8 @@ freehostinfo(struct hostinfo *hi) free(hi->name); hi->name = NULL; } - free((char *) hi->addrs); - free((char *) hi); + free(hi->addrs); + free(hi); } void diff --git a/vendor/agent/mibgroup/disman/traceroute/traceRouteHopsTable.c b/vendor/agent/mibgroup/disman/traceroute/traceRouteHopsTable.c index 19d9211..b6e2d39 100644 --- a/vendor/agent/mibgroup/disman/traceroute/traceRouteHopsTable.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/disman/traceroute/traceRouteProbeHistoryTable.c b/vendor/agent/mibgroup/disman/traceroute/traceRouteProbeHistoryTable.c index 70107e9..489acfc 100644 --- a/vendor/agent/mibgroup/disman/traceroute/traceRouteProbeHistoryTable.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/disman/traceroute/traceRouteResultsTable.c b/vendor/agent/mibgroup/disman/traceroute/traceRouteResultsTable.c index 78a11ed..116623c 100644 --- a/vendor/agent/mibgroup/disman/traceroute/traceRouteResultsTable.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/etherlike-mib.h b/vendor/agent/mibgroup/etherlike-mib.h index 224e254..87ed4d5 100644 --- a/vendor/agent/mibgroup/etherlike-mib.h +++ b/vendor/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/vendor/agent/mibgroup/etherlike-mib/data_access/dot3stats.h b/vendor/agent/mibgroup/etherlike-mib/data_access/dot3stats.h index 7d2b44f..2f773ce 100644 --- a/vendor/agent/mibgroup/etherlike-mib/data_access/dot3stats.h +++ b/vendor/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/vendor/agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.c b/vendor/agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.c index 03f5411..2914a36 100644 --- a/vendor/agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.c +++ b/vendor/agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.c @@ -7,11 +7,21 @@ #include #include -#if HAVE_UNISTD_H -#include +#if !(defined(HAVE_LIBNL3) && defined(HAVE_NETLINK_ROUTE_LINK_H)) + #ifndef HAVE_LIBNL3 + #error libnl3-devel (RedHat derivatives) / libnl-3-dev (Debian derivatives) required + #endif + #ifndef HAVE_NETLINK_ROUTE_LINK_H + #error libnl-route-3-dev required (Debian derivatives) + #endif + #if !defined(HAVE_LIBNL3) && !defined(HAVE_NETLINK_ROUTE_LINK_H) && defined(__linux__) + #error pkg-config/pkgconfig is required to detect libnl-3 + #endif #endif -#include "util_funcs.h" +#include +#include +#include /* * include our parent header @@ -20,909 +30,94 @@ #include "etherlike-mib/dot3StatsTable/dot3StatsTable_data_access.h" #include "etherlike-mib/dot3StatsTable/ioctl_imp_common.h" -/* - * @retval 0 success - * @retval -1 getifaddrs failed - * @retval -2 memory allocation failed - */ - -struct ifname * -dot3stats_interface_name_list_get (struct ifname *list_head, int *retval) -{ - struct ifaddrs *addrs = NULL, *p = NULL; - struct ifname *nameptr1=NULL, *nameptr2 = NULL; - - DEBUGMSGTL(("access:dot3StatsTable:interface_name_list_get", - "called\n")); - - if ((getifaddrs(&addrs)) < 0) { - DEBUGMSGTL(("access:dot3StatsTable:interface_name_list_get", - "getifaddrs failed\n")); - snmp_log (LOG_ERR, "access:dot3StatsTable,interface_name_list_get, getifaddrs failed\n"); - *retval = -1; - return NULL; - } - - for (p = addrs; p; p = p->ifa_next) { - - if (!list_head) { - list_head = malloc(sizeof(struct ifname)); - if (!list_head) { - DEBUGMSGTL(("access:dot3StatsTable:interface_name_list_get", - "memory allocation failed\n")); - snmp_log (LOG_ERR, "access:dot3StatsTable,interface_name_list_get, memory allocation failed\n"); - freeifaddrs(addrs); - *retval = -2; - return NULL; - } - memset(list_head, 0, sizeof (struct ifname)); - strlcpy(list_head->name, p->ifa_name, IF_NAMESIZE); - continue; - } - - for (nameptr1 = list_head; nameptr1; nameptr2 = nameptr1, nameptr1 = nameptr1->ifn_next) - if (!strncmp(p->ifa_name, nameptr1->name, IF_NAMESIZE)) - break; - - if (nameptr1) - continue; - - nameptr2->ifn_next = malloc(sizeof(struct ifname)); - if (!nameptr2->ifn_next) { - DEBUGMSGTL(("access:dot3StatsTable:interface_name_list_get", - "memory allocation failed\n")); - snmp_log (LOG_ERR, "access:dot3StatsTable,interface_name_list_get, memory allocation failed\n"); - dot3stats_interface_name_list_free (list_head); - freeifaddrs(addrs); - *retval = -2; - return NULL; - } - nameptr2 = nameptr2->ifn_next; - memset(nameptr2, 0, sizeof (struct ifname)); - strlcpy(nameptr2->name, p->ifa_name, IF_NAMESIZE); - continue; - - } - - freeifaddrs(addrs); - return list_head; -} - -/* - * @retval 0 success - * @retval -1 invalid pointer - */ - -int -dot3stats_interface_name_list_free (struct ifname *list_head) -{ - struct ifname *nameptr1 = NULL, *nameptr2 = NULL; - - DEBUGMSGTL(("access:dot3StatsTable:interface_name_list_free", - "called\n")); - - if (!list_head) { - snmp_log (LOG_ERR, "access:dot3StatsTable:interface_name_list_free: invalid pointer list_head"); - DEBUGMSGTL(("access:dot3StatsTable:interface_name_list_free", - "invalid pointer list_head\n")); - return -1; - } - - for (nameptr1 = list_head; nameptr1; nameptr1 = nameptr2) { - nameptr2 = nameptr1->ifn_next; - free (nameptr1); - } - - return 0; -} - -/* - * @retval 0 : not found - * @retval !0 : ifIndex - */ - -int -dot3stats_interface_ioctl_ifindex_get (int fd, const char *name) { -#ifndef SIOCGIFINDEX - return 0; -#else - 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); - if (rc < 0) { - DEBUGMSGTL(("access:dot3StatsTable:interface_ioctl_ifindex_get", - "error on interface '%s'\n", name)); - snmp_log (LOG_ERR, "access:dot3StatsTable:interface_ioctl_ifindex_get, error on interface '%s'\n", name); - return 0; - - } - - return ifrq.ifr_ifindex; -#endif /* SIOCGIFINDEX */ -} - -# if HAVE_LINUX_RTNETLINK_H /* { NETLINK */ -/* - * The following code is based upon code I got from Stephen Hemminger - */ -#include -#include - -struct rtnl_handle { - int fd; - struct sockaddr_nl local; - struct sockaddr_nl peer; - __u32 seq; - __u32 dump; -}; - -struct ifstat_ent { - struct ifstat_ent *next; - char *name; - int ifindex; - struct rtnl_link_stats stats; -}; - -typedef int (*rtnl_filter_t)(const struct sockaddr_nl *, struct nlmsghdr *n, void *); - -struct rtnl_dump_filter_arg -{ - rtnl_filter_t filter; - void *arg1; - rtnl_filter_t junk; - void *arg2; -}; - -static struct ifstat_ent *kern_db; -static const int rcvbuf_size = 1024 * 1024; - -static int -rtnl_open_byproto(struct rtnl_handle *rth, unsigned subscriptions, int protocol) -{ - socklen_t addr_len; - int sndbuf = 32768; - - memset(rth, 0, sizeof(*rth)); - - rth->fd = socket(AF_NETLINK, SOCK_RAW, protocol); - if (rth->fd < 0) { - snmp_log(LOG_ERR, "Cannot open netlink socket"); - return -1; - } - - if (setsockopt(rth->fd,SOL_SOCKET,SO_SNDBUF,&sndbuf,sizeof(sndbuf)) < 0) { - snmp_log(LOG_ERR, "SO_SNDBUF"); - return -1; - } - - if (setsockopt(rth->fd,SOL_SOCKET,SO_RCVBUF,&rcvbuf_size,sizeof(rcvbuf_size)) < 0) { - snmp_log(LOG_ERR, "SO_RCVBUF"); - return -1; - } - - memset(&rth->local, 0, sizeof(rth->local)); - rth->local.nl_family = AF_NETLINK; - rth->local.nl_groups = subscriptions; - - if (bind(rth->fd, (struct sockaddr*)&rth->local, sizeof(rth->local)) < 0) { - snmp_log(LOG_ERR, "Cannot bind netlink socket"); - return -1; - } - addr_len = sizeof(rth->local); - if (getsockname(rth->fd, (struct sockaddr*)&rth->local, &addr_len) < 0) { - snmp_log(LOG_ERR, "Cannot getsockname"); - return -1; - } - if (addr_len != sizeof(rth->local)) { - snmp_log(LOG_ERR, "Wrong address length %d\n", addr_len); - return -1; - } - if (rth->local.nl_family != AF_NETLINK) { - snmp_log(LOG_ERR, "Wrong address family %d\n", rth->local.nl_family); - return -1; - } - rth->seq = time(NULL); - return 0; -} - -static int -rtnl_open(struct rtnl_handle *rth, unsigned subscriptions) -{ - return rtnl_open_byproto(rth, subscriptions, NETLINK_ROUTE); -} - -static void -rtnl_close(struct rtnl_handle *rth) -{ - if (rth->fd != -1) - close(rth->fd); - rth->fd = -1; - - return; -} - -static int -rtnl_wilddump_request(struct rtnl_handle *rth, int family, int type) -{ - struct { - struct nlmsghdr nlh; - struct rtgenmsg g; - } req; - - memset(&req, 0, sizeof(req)); - req.nlh.nlmsg_len = sizeof(req); - req.nlh.nlmsg_type = type; - req.nlh.nlmsg_flags = NLM_F_ROOT|NLM_F_MATCH|NLM_F_REQUEST; - req.nlh.nlmsg_pid = 0; - req.nlh.nlmsg_seq = rth->dump = ++rth->seq; - req.g.rtgen_family = family; - - return send(rth->fd, (void*)&req, sizeof(req), 0); -} - -static int -parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len) -{ - memset(tb, 0, sizeof(struct rtattr *) * (max + 1)); - while (RTA_OK(rta, len)) - { - if (rta->rta_type <= max) - tb[rta->rta_type] = rta; - rta = RTA_NEXT(rta,len); - } - - if (len) - snmp_log(LOG_ERR, "parse_rtattr: !!!Deficit %d, rta_len=%d\n", len, rta->rta_len); - - return 0; -} - -static int -get_nlmsg(const struct sockaddr_nl *who, struct nlmsghdr *m, void *arg) -{ - struct ifinfomsg *ifi = NLMSG_DATA(m); - struct rtattr * tb[IFLA_MAX+1]; - int len = m->nlmsg_len; - struct ifstat_ent *n; - - if (m->nlmsg_type != RTM_NEWLINK) - return 0; - - len -= NLMSG_LENGTH(sizeof(*ifi)); - if (len < 0) - return -1; - - parse_rtattr(tb, IFLA_MAX, IFLA_RTA(ifi), len); - if (tb[IFLA_IFNAME] == NULL || tb[IFLA_STATS] == NULL) - return 0; - - n = malloc(sizeof(*n)); - memset(n, 0, sizeof(*n)); - - n->ifindex = ifi->ifi_index; - n->name = strdup(RTA_DATA(tb[IFLA_IFNAME])); - memcpy(&n->stats, RTA_DATA(tb[IFLA_STATS]), sizeof(n->stats)); - n->next = kern_db; - kern_db = n; - return 0; -} - -static int -rtnl_dump_filter_l(struct rtnl_handle *rth, - const struct rtnl_dump_filter_arg *arg) +static void dot3StatsTable_add_interface(netsnmp_container *container, + int if_index, + struct rtnl_link *rtnl_link) { - struct sockaddr_nl nladdr; - struct iovec iov; - struct msghdr msg = { - .msg_name = &nladdr, - .msg_namelen = sizeof(nladdr), - .msg_iov = &iov, - .msg_iovlen = 1, - }; - char buf[16384]; - - iov.iov_base = buf; - while (1) { - int status; - const struct rtnl_dump_filter_arg *a; - - iov.iov_len = sizeof(buf); - status = recvmsg(rth->fd, &msg, 0); - - if (status < 0) { - if (errno == EINTR || errno == EAGAIN) - continue; - fprintf(stderr, "netlink receive error %s (%d)\n", - strerror(errno), errno); - return -1; - } - - if (status == 0) { - fprintf(stderr, "EOF on netlink\n"); - return -1; - } - - for (a = arg; a->filter; a++) { - struct nlmsghdr *h = (struct nlmsghdr*)buf; - - while (NLMSG_OK(h, status)) { - int err; - - if (nladdr.nl_pid != 0 || - h->nlmsg_pid != rth->local.nl_pid || - h->nlmsg_seq != rth->dump) { - if (a->junk) { - err = a->junk(&nladdr, h, a->arg2); - if (err < 0) - return err; - } - goto skip_it; - } - - if (h->nlmsg_type == NLMSG_DONE) - return 0; - if (h->nlmsg_type == NLMSG_ERROR) { - struct nlmsgerr *err = (struct nlmsgerr*)NLMSG_DATA(h); - if (h->nlmsg_len < NLMSG_LENGTH(sizeof(struct nlmsgerr))) { - fprintf(stderr, "ERROR truncated\n"); - } else { - errno = -err->error; - perror("RTNETLINK answers"); - } - return -1; - } - err = a->filter(&nladdr, h, a->arg1); - if (err < 0) - return err; - -skip_it: - h = NLMSG_NEXT(h, status); - } - } while (0); - if (msg.msg_flags & MSG_TRUNC) { - fprintf(stderr, "Message truncated\n"); - continue; - } - if (status) { - fprintf(stderr, "!!!Remnant of size %d\n", status); - exit(1); - } - } -} - -static int -rtnl_dump_filter(struct rtnl_handle *rth, - rtnl_filter_t filter, - void *arg1, - rtnl_filter_t junk, - void *arg2) -{ - const struct rtnl_dump_filter_arg a[2] = { - { .filter = filter, .arg1 = arg1, .junk = junk, .arg2 = arg2 }, - { .filter = NULL, .arg1 = NULL, .junk = NULL, .arg2 = NULL } - }; - - return rtnl_dump_filter_l(rth, a); -} - -int -_dot3Stats_netlink_get_errorcntrs(dot3StatsTable_rowreq_ctx *rowreq_ctx, const char *name) -{ - struct rtnl_handle rth; - struct ifstat_ent *ke; - int done; - - if (rtnl_open(&rth, 0) < 0) - { - snmp_log(LOG_ERR, "_dot3Stats_netlink_get_errorcntrs: rtnl_open() failed\n"); - return 1; - } - - if (rtnl_wilddump_request(&rth, AF_INET, RTM_GETLINK) < 0) - { - snmp_log(LOG_ERR, "_dot3Stats_netlink_get_errorcntrs: Cannot send dump request"); - rtnl_close(&rth); - return 1; - } - - if (rtnl_dump_filter(&rth, get_nlmsg, NULL, NULL, NULL) < 0) - { - snmp_log(LOG_ERR, "_dot3Stats_netlink_get_errorcntrs: Dump terminated\n"); - rtnl_close(&rth); - return 1; - } + uint64_t tx_err, tx_drop, tx_colls, tx_carrier; + uint64_t rx_errs, rx_fifo, rx_frame; + dot3StatsTable_rowreq_ctx *row; + int rc; - rtnl_close(&rth); + row = dot3StatsTable_allocate_rowreq_ctx(NULL); + if (!row) + return; + dot3StatsTable_indexes_set(row, if_index); /* - * Now scan kern_db for this if's data - * While doing so, we'll throw away the kern db. + * See also dev_seq_printf_stats() in the Linux kernel source file + * net/core/net-procfs.c. */ - done = 0; - - while ((ke = kern_db) != NULL) - { - if (strcmp(ke->name, name) == 0) - { - dot3StatsTable_data *data = &rowreq_ctx->data; - - DEBUGMSGTL(("access:dot3StatsTable", "IFLA_STATS for %s\n", name)); - - data->dot3StatsFCSErrors = ke->stats.rx_crc_errors; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSFCSERRORS_FLAG; - - data->dot3StatsDeferredTransmissions = ke->stats.tx_dropped; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSDEFERREDTRANSMISSIONS_FLAG; - - data->dot3StatsInternalMacTransmitErrors = ke->stats.tx_fifo_errors; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSINTERNALMACTRANSMITERRORS_FLAG; - - data->dot3StatsCarrierSenseErrors = ke->stats.tx_carrier_errors; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSCARRIERSENSEERRORS_FLAG; - - data->dot3StatsFrameTooLongs = ke->stats.rx_frame_errors; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSFRAMETOOLONGS_FLAG; - - data->dot3StatsInternalMacReceiveErrors = ke->stats.rx_fifo_errors; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSINTERNALMACRECEIVEERRORS_FLAG; - - done = 1; - } - kern_db = ke->next; - free(ke->name); - free(ke); - } - - return !done; -} -# else /* }{ */ -int -_dot3Stats_netlink_get_errorcntrs(dot3StatsTable_rowreq_ctx *rowreq_ctx, const char *name) -{ - return 1; -} -# endif /* } */ - - -/* - * NAME: getulongfromsysclassnetstatistics - * PURPOSE: To get a single statistics value from /sys/class/net//statistics/ - * ARGUMENTS: ifname: interface name - * ctrname: counter name - * valuep: where to store value - * RETURNS: 0 if value not available - * non-0 if value available - */ -static int -getulongfromsysclassnetstatistics(const char *ifname, const char *ctrname, u_long *valuep) -{ - char path[256]; - FILE *fp; - int rv; - - if (ifname == NULL || ctrname == NULL || valuep == NULL) - return 0; - - snprintf(path, sizeof(path), "/sys/class/net/%s/statistics/%s", ifname, ctrname); - fp = fopen(path, "rt"); - if (fp == NULL) - return 0; - - rv = 1; - if (fscanf(fp, "%lu", valuep) != 1) - rv = 0; - - fclose(fp); - - return rv; -} - -/* - * NAME: interface_dot3stats_get_errorcounters - * PURPOSE: To get ethernet error statistics - * ARGUMENTS: rowreq_ctx: where to store the value(s) - * name: interface name - * RETURNS: nothing. fields not set if data not available - */ -void -interface_dot3stats_get_errorcounters (dot3StatsTable_rowreq_ctx *rowreq_ctx, const char *name) -{ - u_long value; - dot3StatsTable_data *data = &rowreq_ctx->data; - FILE *dev; - const char NETDEV_FILE[] = "/proc/net/dev"; - - if (_dot3Stats_netlink_get_errorcntrs(rowreq_ctx, name) == 0) - { - DEBUGMSGTL(("access:dot3StatsTable", "interface_dot3stats_get_errorcounters: got data from IFLA_STATS\n")); - return; - } - - if ((dev = fopen(NETDEV_FILE, "r")) != NULL) - { - char line[256], *lp, *next; - size_t namelen = strlen(name); - unsigned int value; - unsigned int column; - - while (fgets(line, sizeof(line), dev) != NULL) - { - /* br0:68395635 1038214 0 0 0 0 0 939411 25626606 90708 0 0 0 0 0 0 */ - lp = line; - while (*lp == ' ' || *lp == '\t') - lp++; - if (strncmp(lp, name, namelen) != 0 || lp[namelen] != ':') - continue; - lp += namelen + 1; /* Skip name and colon */ - - column = 1; - while (1) - { - value = strtoul(lp, &next, 10); - if (next == lp) - break; /* no more data */ - switch (column) - { - case 3: - data->dot3StatsFCSErrors = value; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSFCSERRORS_FLAG; - break; - case 12: - data->dot3StatsDeferredTransmissions = value; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSDEFERREDTRANSMISSIONS_FLAG; - break; - case 13: - data->dot3StatsInternalMacTransmitErrors = value; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSINTERNALMACTRANSMITERRORS_FLAG; - break; - case 15: - data->dot3StatsCarrierSenseErrors = value; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSCARRIERSENSEERRORS_FLAG; - break; - case 6: - data->dot3StatsFrameTooLongs = value; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSFRAMETOOLONGS_FLAG; - break; - case 5: - data->dot3StatsInternalMacReceiveErrors = value; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSINTERNALMACRECEIVEERRORS_FLAG; - break; - case 14: - data->dot3StatsSingleCollisionFrames = value; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSSINGLECOLLISIONFRAMES_FLAG; - break; - } - column++; - lp = next; - } - break; - } - - fclose(dev); - } - - if (!(rowreq_ctx->column_exists_flags & COLUMN_DOT3STATSFCSERRORS_FLAG) && - getulongfromsysclassnetstatistics(name, "rx_errors", &value)) { - data->dot3StatsFCSErrors = value; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSFCSERRORS_FLAG; - } - if (!(rowreq_ctx->column_exists_flags & COLUMN_DOT3STATSDEFERREDTRANSMISSIONS_FLAG) && - getulongfromsysclassnetstatistics(name, "tx_dropped", &value)) { - data->dot3StatsDeferredTransmissions = value; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSDEFERREDTRANSMISSIONS_FLAG; - } - if (!(rowreq_ctx->column_exists_flags & COLUMN_DOT3STATSINTERNALMACTRANSMITERRORS_FLAG) && - getulongfromsysclassnetstatistics(name, "tx_fifo_errors", &value)) { - data->dot3StatsInternalMacTransmitErrors = value; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSINTERNALMACTRANSMITERRORS_FLAG; - } - if (!(rowreq_ctx->column_exists_flags & COLUMN_DOT3STATSCARRIERSENSEERRORS_FLAG) && - getulongfromsysclassnetstatistics(name, "tx_carrier_errors", &value)) { - data->dot3StatsCarrierSenseErrors = value; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSCARRIERSENSEERRORS_FLAG; - } - if (!(rowreq_ctx->column_exists_flags & COLUMN_DOT3STATSFRAMETOOLONGS_FLAG) && - getulongfromsysclassnetstatistics(name, "rx_frame_errors", &value)) { - data->dot3StatsFrameTooLongs = value; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSFRAMETOOLONGS_FLAG; - } - if (!(rowreq_ctx->column_exists_flags & COLUMN_DOT3STATSINTERNALMACRECEIVEERRORS_FLAG) && - getulongfromsysclassnetstatistics(name, "rx_fifo_errors", &value)) { - data->dot3StatsInternalMacReceiveErrors = value; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSINTERNALMACRECEIVEERRORS_FLAG; - } - - return; -} - -/* - * @retval 0 success - * @retval -1 cannot get ETHTOOL_DRVINFO failed - * @retval -2 nstats zero - no statistcs available - * @retval -3 memory allocation for holding the statistics failed - * @retval -4 cannot get ETHTOOL_GSTRINGS information - * @retval -5 cannot get ETHTOOL_GSTATS information - * @retval -6 function not supported if HAVE_LINUX_ETHTOOL_H not defined - */ - - -int -interface_ioctl_dot3stats_get (dot3StatsTable_rowreq_ctx *rowreq_ctx, int fd, const char *name) { - -#ifdef HAVE_LINUX_ETHTOOL_H - dot3StatsTable_data *data = &rowreq_ctx->data; - struct ethtool_drvinfo driver_info; - struct ethtool_gstrings *eth_strings; - struct ethtool_stats *eth_stats; - struct ifreq ifr; - unsigned int nstats, size_str, i; - int err; - - DEBUGMSGTL(("access:dot3StatsTable:interface_ioctl_dot3Stats_get", - "called\n")); - - memset(&ifr, 0, sizeof(ifr)); - strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); - - memset(&driver_info, 0, sizeof (driver_info)); - driver_info.cmd = ETHTOOL_GDRVINFO; - ifr.ifr_data = (char *)&driver_info; - - err = _dot3Stats_ioctl_get(fd, SIOCETHTOOL, &ifr, name); - if (err < 0) { - DEBUGMSGTL(("access:dot3StatsTable:interface_ioctl_dot3Stats_get", - "ETHTOOL_GETDRVINFO failed for interface |%s| \n", name)); - return -1; - } - - nstats = driver_info.n_stats; - if (nstats < 1) { - DEBUGMSGTL(("access:dot3StatsTable:interface_ioctl_dot3Stats_get", - "no stats available for interface |%s| \n", name)); - return -2; - } - - size_str = nstats * ETH_GSTRING_LEN; - - eth_strings = malloc(size_str + sizeof (struct ethtool_gstrings)); - if (!eth_strings) { - DEBUGMSGTL(("access:dot3StatsTable:interface_ioctl_dot3Stats_get", - "no memory available\n")); - snmp_log (LOG_ERR, "access:dot3StatsTable,interface_ioctl_dot3Stats_get, no memory available\n"); - - return -3; - } - memset (eth_strings, 0, (size_str + sizeof (struct ethtool_gstrings))); - - eth_stats = malloc (size_str + sizeof (struct ethtool_stats)); - if (!eth_stats) { - free (eth_strings); - DEBUGMSGTL(("access:dot3StatsTable:interface_ioctl_dot3Stats_get", - "no memory available\n")); - snmp_log (LOG_ERR, "access:dot3StatsTable,interface_ioctl_dot3Stats_get, no memory available\n"); - - return -3; - } - memset (eth_stats, 0, (size_str + sizeof (struct ethtool_stats))); - - eth_strings->cmd = ETHTOOL_GSTRINGS; - eth_strings->string_set = ETH_SS_STATS; - eth_strings->len = nstats; - ifr.ifr_data = (char *) eth_strings; - err = _dot3Stats_ioctl_get(fd, SIOCETHTOOL, &ifr, name); - if (err < 0) { - DEBUGMSGTL(("access:dot3StatsTable:interface_ioctl_dot3Stats_get", - "cannot get stats strings information for interface |%s| \n", name)); - snmp_log (LOG_ERR, "access:dot3StatsTable,interface_ioctl_dot3Stats_get, cannot get stats strings information for interface |%s| \n", name); - - free(eth_strings); - free(eth_stats); - return -4; - } - - eth_stats->cmd = ETHTOOL_GSTATS; - eth_stats->n_stats = nstats; - ifr.ifr_data = (char *) eth_stats; - err = _dot3Stats_ioctl_get(fd, SIOCETHTOOL, &ifr, name); - if (err < 0) { - DEBUGMSGTL(("access:dot3StatsTable:interface_ioctl_dot3Stats_get", - "cannot get stats strings information for interface |%s| \n", name)); - snmp_log (LOG_ERR, "access:dot3StatsTable,interface_ioctl_dot3Stats_get, cannot get stats information for interface |%s| \n", name); - - free(eth_strings); - free(eth_stats); - return -5; - } - - for (i = 0; i < nstats; i++) { - char s[ETH_GSTRING_LEN]; - - strlcpy(s, (const char *) ð_strings->data[i * ETH_GSTRING_LEN], - sizeof(s)); - - if (DOT3STATSALIGNMENTERRORS(s)) { - data->dot3StatsAlignmentErrors = (u_long)eth_stats->data[i]; - 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; - } - - if (DOT3STATSLATECOLLISIONS(s)) { - data->dot3StatsLateCollisions = (u_long)eth_stats->data[i]; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSLATECOLLISIONS_FLAG; - } - - if (DOT3STATSSINGLECOLLISIONFRAMES(s)) { - data->dot3StatsSingleCollisionFrames = (u_long)eth_stats->data[i]; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSSINGLECOLLISIONFRAMES_FLAG; - } - - if (DOT3STATSEXCESSIVECOLLISIONS(s)) { - 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); - free(eth_stats); - - return 0; -#else - return -6; -#endif + rx_errs = rtnl_link_get_stat(rtnl_link, RTNL_LINK_RX_ERRORS); + rx_fifo = rtnl_link_get_stat(rtnl_link, RTNL_LINK_RX_DROPPED) + + rtnl_link_get_stat(rtnl_link, RTNL_LINK_RX_MISSED_ERR); + rx_frame = rtnl_link_get_stat(rtnl_link, RTNL_LINK_MULTICAST); + + tx_err = rtnl_link_get_stat(rtnl_link, RTNL_LINK_TX_ERRORS); + tx_drop = rtnl_link_get_stat(rtnl_link, RTNL_LINK_TX_DROPPED); + tx_colls = rtnl_link_get_stat(rtnl_link, RTNL_LINK_TX_ABORT_ERR); + tx_carrier = rtnl_link_get_stat(rtnl_link, RTNL_LINK_TX_CARRIER_ERR); + + row->column_exists_flags |= + COLUMN_DOT3STATSINDEX_FLAG | + COLUMN_DOT3STATSFCSERRORS_FLAG | + COLUMN_DOT3STATSINTERNALMACRECEIVEERRORS_FLAG | + COLUMN_DOT3STATSFRAMETOOLONGS_FLAG | + COLUMN_DOT3STATSDEFERREDTRANSMISSIONS_FLAG | + COLUMN_DOT3STATSINTERNALMACTRANSMITERRORS_FLAG | + COLUMN_DOT3STATSSINGLECOLLISIONFRAMES_FLAG | + COLUMN_DOT3STATSCARRIERSENSEERRORS_FLAG; + row->data.dot3StatsFCSErrors = rx_errs; + row->data.dot3StatsInternalMacReceiveErrors = rx_fifo; + row->data.dot3StatsFrameTooLongs = rx_frame; + row->data.dot3StatsDeferredTransmissions = tx_err; + row->data.dot3StatsInternalMacTransmitErrors = tx_drop; + row->data.dot3StatsSingleCollisionFrames = tx_colls; + row->data.dot3StatsCarrierSenseErrors = tx_carrier; + + rc = CONTAINER_INSERT(container, row); + netsnmp_assert(rc == 0); } - /* * @retval 0 success - * @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) -{ - dot3StatsTable_data *data = &rowreq_ctx->data; - struct netsnmp_linux_link_settings nlls; - int err; - - err = netsnmp_get_link_settings(&nlls, fd, name); - if (err == 0) { - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSDUPLEXSTATUS_FLAG; - switch (nlls.duplex) { - case DUPLEX_HALF: - data->dot3StatsDuplexStatus = DOT3STATSDUPLEXSTATUS_HALFDUPLEX; - break; - case DUPLEX_FULL: - data->dot3StatsDuplexStatus = DOT3STATSDUPLEXSTATUS_FULLDUPLEX; - break; - default: - data->dot3StatsDuplexStatus = DOT3STATSDUPLEXSTATUS_UNKNOWN; - break; - } - } - - return err; -} - - -/* - * NAME: interface_sysclassnet_dot3stats_get - * PURPOSE: To get ethernet statistics from /sys/class/net/... - * ARGUMENTS: rowreq_ctx: where to store the value(s) - * name: interface name - * RETURNS: nothing. fields not set if data not available - */ -void -interface_sysclassnet_dot3stats_get (dot3StatsTable_rowreq_ctx *rowreq_ctx, const char *name) -{ - u_long value; - dot3StatsTable_data *data = &rowreq_ctx->data; - - if (getulongfromsysclassnetstatistics(name, "rx_errors", &value)) { - data->dot3StatsFCSErrors = value; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSFCSERRORS_FLAG; - } - if (getulongfromsysclassnetstatistics(name, "tx_dropped", &value)) { - data->dot3StatsDeferredTransmissions = value; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSDEFERREDTRANSMISSIONS_FLAG; - } - if (getulongfromsysclassnetstatistics(name, "tx_fifo_errors", &value)) { - data->dot3StatsInternalMacTransmitErrors = value; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSINTERNALMACTRANSMITERRORS_FLAG; - } - if (getulongfromsysclassnetstatistics(name, "tx_carrier_errors", &value)) { - data->dot3StatsCarrierSenseErrors = value; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSCARRIERSENSEERRORS_FLAG; - } - if (getulongfromsysclassnetstatistics(name, "rx_frame_errors", &value)) { - data->dot3StatsFrameTooLongs = value; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSFRAMETOOLONGS_FLAG; - } - if (getulongfromsysclassnetstatistics(name, "rx_fifo_errors", &value)) { - data->dot3StatsInternalMacReceiveErrors = value; - rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSINTERNALMACRECEIVEERRORS_FLAG; - } - - return; -} - - - -/* ioctl wrapper - * - * @param fd : socket fd to use w/ioctl, or -1 to open/close one - * @param which - * @param ifrq - * param ifentry : ifentry to update - * @param name - * - * @retval 0 : success - * @retval -1 : invalid parameters - * @retval -2 : couldn't create socket - * @retval -3 : ioctl call failed + * @retval -1 getifaddrs failed + * @retval -2 memory allocation failed */ -int -_dot3Stats_ioctl_get(int fd, int which, struct ifreq *ifrq, const char* name) +int dot3StatsTable_container_load_impl(netsnmp_container *container) { - int ourfd = -1, rc = 0; - - DEBUGMSGTL(("access:dot3StatsTable:ioctl", "_dot3Stats_ioctl_get\n")); + struct nl_cache *link_cache; + struct nl_object *nl_object; + struct nl_sock *nl_sock; + int ret; - /* - * sanity checks - */ - if(NULL == name) { - DEBUGMSGTL(("access:dot3StatsTable:ioctl", - "_dot3Stats_ioctl_get interface name is NULL")); - snmp_log (LOG_ERR, "access:dot3StatsTable:ioctl, _dot3Stats_ioctl_get interface name is NULL"); + nl_sock = nl_socket_alloc(); + if (!nl_sock) return -1; + ret = nl_connect(nl_sock, NETLINK_ROUTE); + if (ret < 0) + return -1; + ret = rtnl_link_alloc_cache(nl_sock, AF_UNSPEC, &link_cache); + if (ret) { + ret = -1; + goto free_nl_sock; } - /* - * create socket for ioctls - */ - if(fd < 0) { - fd = ourfd = socket(AF_INET, SOCK_DGRAM, 0); - if(ourfd < 0) { - DEBUGMSGTL(("access:dot3StatsTable:ioctl", - "dot3Stats_ioctl_get couldn't create a socket\n")); - snmp_log (LOG_ERR, "access:dot3StatsTable:ioctl, _dot3Stats_ioctl_get error on interface '%s'\n", name); + for (nl_object = nl_cache_get_first(link_cache); nl_object; + nl_object = nl_cache_get_next(nl_object)) { + struct rtnl_link *rtnl_link = (void *)nl_object; + int if_index = rtnl_link_get_ifindex(rtnl_link); - return -2; - } + netsnmp_assert(if_index > 0); + if (if_index <= 0) + continue; + dot3StatsTable_add_interface(container, if_index, rtnl_link); } - strlcpy(ifrq->ifr_name, name, sizeof(ifrq->ifr_name)); - rc = ioctl(fd, which, ifrq); - if (rc < 0) { - DEBUGMSGTL(("access:dot3StatsTable:ioctl", - "dot3Stats_ioctl_get ioctl %d returned %d\n", which, rc)); - rc = -3; - } + nl_cache_put(link_cache); - if(ourfd >= 0) - close(ourfd); +free_nl_sock: + nl_socket_free(nl_sock); - return rc; + return ret; } - - diff --git a/vendor/agent/mibgroup/etherlike-mib/dot3StatsTable.h b/vendor/agent/mibgroup/etherlike-mib/dot3StatsTable.h index b04f7bf..d2b7fd8 100644 --- a/vendor/agent/mibgroup/etherlike-mib/dot3StatsTable.h +++ b/vendor/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/vendor/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable.c b/vendor/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable.c index b86380a..318ea62 100644 --- a/vendor/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable.c +++ b/vendor/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable.c @@ -29,11 +29,10 @@ oid dot3StatsTable_oid[] = { DOT3STATSTABLE_OID }; int dot3StatsTable_oid_size = OID_LENGTH(dot3StatsTable_oid); -dot3StatsTable_registration dot3StatsTable_user_context; static dot3StatsTable_registration *dot3StatsTable_user_context_p; -void initialize_table_dot3StatsTable(void); -void shutdown_table_dot3StatsTable(void); +static void initialize_table_dot3StatsTable(void); +static void shutdown_table_dot3StatsTable(void); /** diff --git a/vendor/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable_data_access.c b/vendor/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable_data_access.c index e87d75d..9f1093b 100644 --- a/vendor/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable_data_access.c +++ b/vendor/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable_data_access.c @@ -12,7 +12,7 @@ #include #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif @@ -190,8 +190,8 @@ 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 - * some other existing data, or peforming calculations to derive the data), + * If, however, the accessing the data involves more work (e.g. parsing + * some other existing data, or performing 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 * dot3StatsTable_row_prep() for populating data. @@ -216,12 +216,6 @@ int dot3StatsTable_container_load(netsnmp_container * container) { size_t count = 0; - int fd; -#if defined(linux) - long dot3StatsIndex; - int rc = 0, retval = 0; - struct ifname *list_head = NULL, *p = NULL; -#endif DEBUGMSGTL(("verbose:dot3StatsTable:dot3StatsTable_container_load", "called\n")); @@ -231,134 +225,9 @@ dot3StatsTable_container_load(netsnmp_container * container) * data context will be set from the param (unless NULL, * in which case a new data context will be allocated) */ - - /* - * temporary storage for index values - */ - - /* - * dot3StatsIndex(1)/InterfaceIndex/ASN_INTEGER/long(long)//l/A/w/e/R/d/H - */ - - - - /* - * create socket for ioctls - */ - - fd = socket(AF_INET, SOCK_DGRAM, 0); - if(fd < 0) { - snmp_log(LOG_ERR, "could not create socket\n"); - return -2; - } - - /* - * get the interface names of the devices present in the system, in case of failure retval suggests the reson for failure - * and list_head contains null - */ #if defined(linux) - list_head = dot3stats_interface_name_list_get (list_head, &retval); - - if (!list_head) { - snmp_log (LOG_ERR, "access:dot3StatsTable, error getting the interface names present in the system\n"); - DEBUGMSGTL(("access:dot3StatsTable", "error getting the interface names present in the system")); - close(fd); - return MFD_ERROR; - } - - /* - * Walk over the list of interface names present in the system and retreive the statistics - */ - - for (p = list_head; p; p = p->ifn_next) { - dot3StatsTable_rowreq_ctx *rowreq_ctx; - - DEBUGMSGTL(("access:dot3StatsTable", "processing '%s'\n", p->name)); - - /* - * get index via ioctl. - */ - - dot3StatsIndex = (long) dot3stats_interface_ioctl_ifindex_get(-1, p->name); - - /* - * get the dot3stats contents populated, if the device is not an ethernet device - * the operation will not be supported and an error message will be logged - */ - - 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; - } - - if (MFD_SUCCESS != - dot3StatsTable_indexes_set(rowreq_ctx, dot3StatsIndex)) { - snmp_log(LOG_ERR, - "error setting index while loading " - "dot3StatsTable data.\n"); - dot3StatsTable_release_rowreq_ctx(rowreq_ctx); - continue; - } - - /* - * TODO:352:r: | |-> populate dot3StatsTable data context. - * Populate data context here. (optionally, delay until row prep) - */ - /* - * non-TRANSIENT data: no need to copy. set pointer to data - */ - - 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) { - DEBUGMSGTL(("access:dot3StatsTable", "error getting the statistics for interface |%s| " - "dot3StatsTable data, operation might not be supported\n", p->name)); - dot3StatsTable_release_rowreq_ctx(rowreq_ctx); - continue; - } - - rc = interface_ioctl_dot3stats_duplex_get(rowreq_ctx, fd, p->name); - if (rc < 0) { - DEBUGMSGTL(("access:dot3StatsTable", "error getting the duplex status for |%s| " - "dot3StatsTable data, operation might not be supported\n", p->name)); - dot3StatsTable_release_rowreq_ctx(rowreq_ctx); - continue; - } - - /* - * insert into table container - */ - rc = CONTAINER_INSERT(container, rowreq_ctx); - if (rc < 0) { - DEBUGMSGTL(("access:dot3StatsTable", "error inserting |%s|", p->name)); - dot3StatsTable_release_rowreq_ctx(rowreq_ctx); - continue; - } - - ++count; - } - - close(fd); - - /* - * free the interface names list - */ - - if ( (dot3stats_interface_name_list_free(list_head)) < 0) { - snmp_log(LOG_ERR, "access:dot3StatsTable, error freeing the interface name list \n"); - DEBUGMSGTL(("access:dot3StatsTable", "error freeing the interface name list\n")); - return MFD_ERROR; - } + dot3StatsTable_container_load_impl(container); #endif DEBUGMSGT(("verbose:dot3StatsTable:dot3StatsTable_container_load", diff --git a/vendor/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable_data_access.h b/vendor/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable_data_access.h index f4b39a9..b25c929 100644 --- a/vendor/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable_data_access.h +++ b/vendor/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable_data_access.h @@ -56,20 +56,11 @@ extern "C" { void dot3StatsTable_container_free(netsnmp_container * container); - int dot3StatsTable_cache_load(netsnmp_container * - container); - void dot3StatsTable_cache_free(netsnmp_container * - container); - -#define MAX_LINE_SIZE 256 - int dot3StatsTable_row_prep(dot3StatsTable_rowreq_ctx * rowreq_ctx); - void interface_sysclassnet_dot3stats_get - (dot3StatsTable_rowreq_ctx * rowreq_ctx, const char *name); - void interface_dot3stats_get_errorcounters - (dot3StatsTable_rowreq_ctx * rowreq_ctx, const char *name); + int dot3StatsTable_container_load_impl(netsnmp_container * + container); diff --git a/vendor/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable_interface.c b/vendor/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable_interface.c index a685f60..a850e9d 100644 --- a/vendor/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable_interface.c +++ b/vendor/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable_interface.c @@ -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) && @@ -1067,8 +1067,10 @@ _cache_free(netsnmp_cache * cache, void *magic) * @internal */ static void -_container_item_free(dot3StatsTable_rowreq_ctx * rowreq_ctx, void *context) +_container_item_free(void *p, void *context) { + dot3StatsTable_rowreq_ctx *rowreq_ctx = p; + DEBUGMSGTL(("internal:dot3StatsTable:_container_item_free", "called\n")); @@ -1100,9 +1102,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 */ /** diff --git a/vendor/agent/mibgroup/etherlike-mib/dot3StatsTable/ioctl_imp_common.h b/vendor/agent/mibgroup/etherlike-mib/dot3StatsTable/ioctl_imp_common.h index e5d0c1e..f66112a 100644 --- a/vendor/agent/mibgroup/etherlike-mib/dot3StatsTable/ioctl_imp_common.h +++ b/vendor/agent/mibgroup/etherlike-mib/dot3StatsTable/ioctl_imp_common.h @@ -24,7 +24,7 @@ struct ifname { }; struct ifname *dot3stats_interface_name_list_get (struct ifname *, int *); -int dot3stats_interface_name_list_free (struct ifname *list_head); +void dot3stats_interface_name_list_free(struct ifname *list_head); int dot3stats_interface_ioctl_ifindex_get (int fd, const char *name); int _dot3Stats_ioctl_get(int fd, int which, struct ifreq *ifrq, const char* name); int interface_ioctl_dot3stats_get(dot3StatsTable_rowreq_ctx *rowreq_ctx, int fd, const char* name); diff --git a/vendor/agent/mibgroup/examples.h b/vendor/agent/mibgroup/examples.h index 83d3ccb..a313d62 100644 --- a/vendor/agent/mibgroup/examples.h +++ b/vendor/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/vendor/agent/mibgroup/examples/example.c b/vendor/agent/mibgroup/examples/example.c index 8e4bb23..b4be671 100644 --- a/vendor/agent/mibgroup/examples/example.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/examples/example.h b/vendor/agent/mibgroup/examples/example.h index 04b73e0..a144fcf 100644 --- a/vendor/agent/mibgroup/examples/example.h +++ b/vendor/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/vendor/agent/mibgroup/examples/netSnmpHostsTable.c b/vendor/agent/mibgroup/examples/netSnmpHostsTable.c index 9e699fe..931e308 100644 --- a/vendor/agent/mibgroup/examples/netSnmpHostsTable.c +++ b/vendor/agent/mibgroup/examples/netSnmpHostsTable.c @@ -65,8 +65,9 @@ initialize_table_netSnmpHostsTable(void) if (!my_handler || !table_info || !iinfo) { snmp_log(LOG_ERR, "malloc failed in initialize_table_netSnmpHostsTable"); - free(iinfo); + free(my_handler); free(table_info); + free(iinfo); return; /** Serious error. */ } diff --git a/vendor/agent/mibgroup/examples/netSnmpHostsTable.h b/vendor/agent/mibgroup/examples/netSnmpHostsTable.h index b6164a9..8603fd1 100644 --- a/vendor/agent/mibgroup/examples/netSnmpHostsTable.h +++ b/vendor/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/vendor/agent/mibgroup/examples/netSnmpHostsTable_checkfns.c b/vendor/agent/mibgroup/examples/netSnmpHostsTable_checkfns.c index 2039754..b0c985f 100644 --- a/vendor/agent/mibgroup/examples/netSnmpHostsTable_checkfns.c +++ b/vendor/agent/mibgroup/examples/netSnmpHostsTable_checkfns.c @@ -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/vendor/agent/mibgroup/examples/netSnmpHostsTable_checkfns.h b/vendor/agent/mibgroup/examples/netSnmpHostsTable_checkfns.h index cb996bb..b718d78 100644 --- a/vendor/agent/mibgroup/examples/netSnmpHostsTable_checkfns.h +++ b/vendor/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/vendor/agent/mibgroup/examples/notification.c b/vendor/agent/mibgroup/examples/notification.c index ab60201..705e0d3 100644 --- a/vendor/agent/mibgroup/examples/notification.c +++ b/vendor/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/vendor/agent/mibgroup/examples/ucdDemoPublic.c b/vendor/agent/mibgroup/examples/ucdDemoPublic.c index be11ad7..fcfb0f0 100644 --- a/vendor/agent/mibgroup/examples/ucdDemoPublic.c +++ b/vendor/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 @@ -188,6 +188,7 @@ write_ucdDemoResetKeys(int action, demopass); } } + free(engineID); /* * reset the keys */ diff --git a/vendor/agent/mibgroup/examples/ucdDemoPublic.h b/vendor/agent/mibgroup/examples/ucdDemoPublic.h index 253f4ff..4e55a86 100644 --- a/vendor/agent/mibgroup/examples/ucdDemoPublic.h +++ b/vendor/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/vendor/agent/mibgroup/hardware/cpu.h b/vendor/agent/mibgroup/hardware/cpu.h index 3956679..ca45ce5 100644 --- a/vendor/agent/mibgroup/hardware/cpu.h +++ b/vendor/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/vendor/agent/mibgroup/hardware/cpu/cpu_kerndata.h b/vendor/agent/mibgroup/hardware/cpu/cpu_kerndata.h index 7a0d9c7..176dc3a 100644 --- a/vendor/agent/mibgroup/hardware/cpu/cpu_kerndata.h +++ b/vendor/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/vendor/agent/mibgroup/hardware/cpu/cpu_kinfo.h b/vendor/agent/mibgroup/hardware/cpu/cpu_kinfo.h index 774f5f2..b70720d 100644 --- a/vendor/agent/mibgroup/hardware/cpu/cpu_kinfo.h +++ b/vendor/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/vendor/agent/mibgroup/hardware/cpu/cpu_kstat.c b/vendor/agent/mibgroup/hardware/cpu/cpu_kstat.c index 68bafee..3cc396f 100644 --- a/vendor/agent/mibgroup/hardware/cpu/cpu_kstat.c +++ b/vendor/agent/mibgroup/hardware/cpu/cpu_kstat.c @@ -22,8 +22,9 @@ 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; +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; @@ -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/vendor/agent/mibgroup/hardware/cpu/cpu_kstat.h b/vendor/agent/mibgroup/hardware/cpu/cpu_kstat.h index ce38628..f9afbd5 100644 --- a/vendor/agent/mibgroup/hardware/cpu/cpu_kstat.h +++ b/vendor/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/vendor/agent/mibgroup/hardware/cpu/cpu_linux.c b/vendor/agent/mibgroup/hardware/cpu/cpu_linux.c index 5f1489f..03b5b75 100644 --- a/vendor/agent/mibgroup/hardware/cpu/cpu_linux.c +++ b/vendor/agent/mibgroup/hardware/cpu/cpu_linux.c @@ -37,7 +37,7 @@ */ void init_cpu_linux( void ) { FILE *fp; - char buf[1024], *cp; + char buf[1024]; int i, n = 0; netsnmp_cpu_info *cpu = netsnmp_cpu_get_byIdx( -1, 1 ); strcpy(cpu->name, "Overall CPU statistics"); @@ -72,7 +72,7 @@ void init_cpu_linux( void ) { #ifdef DESCR_FIELD if (!strncmp( buf, DESCR_FIELD, strlen(DESCR_FIELD))) { - cp = strchr( buf, ':' ); + char *cp = strchr( buf, ':' ); if (cp) { strlcpy(cpu->descr, cp + 2, sizeof(cpu->descr)); cp = strchr(cpu->descr, '\n'); @@ -83,7 +83,7 @@ void init_cpu_linux( void ) { #endif #ifdef DESCR2_FIELD if (!strncmp( buf, DESCR2_FIELD, strlen(DESCR2_FIELD))) { - cp = strchr( buf, ':' ); + char *cp = strchr( buf, ':' ); if (cp) { strlcat(cpu->descr, cp, sizeof(cpu->descr)); cp = strchr(cpu->descr, '\n'); diff --git a/vendor/agent/mibgroup/hardware/cpu/cpu_linux.h b/vendor/agent/mibgroup/hardware/cpu/cpu_linux.h index 9bcdb19..3a2d5bb 100644 --- a/vendor/agent/mibgroup/hardware/cpu/cpu_linux.h +++ b/vendor/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/vendor/agent/mibgroup/hardware/cpu/cpu_mach.h b/vendor/agent/mibgroup/hardware/cpu/cpu_mach.h index f3f408f..42aaa9a 100644 --- a/vendor/agent/mibgroup/hardware/cpu/cpu_mach.h +++ b/vendor/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/vendor/agent/mibgroup/hardware/cpu/cpu_nlist.h b/vendor/agent/mibgroup/hardware/cpu/cpu_nlist.h index d28ba6f..0e4e57e 100644 --- a/vendor/agent/mibgroup/hardware/cpu/cpu_nlist.h +++ b/vendor/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/vendor/agent/mibgroup/hardware/cpu/cpu_null.h b/vendor/agent/mibgroup/hardware/cpu/cpu_null.h index 3150358..0be0747 100644 --- a/vendor/agent/mibgroup/hardware/cpu/cpu_null.h +++ b/vendor/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/vendor/agent/mibgroup/hardware/cpu/cpu_pcp.h b/vendor/agent/mibgroup/hardware/cpu/cpu_pcp.h index ddb7547..9eb4240 100644 --- a/vendor/agent/mibgroup/hardware/cpu/cpu_pcp.h +++ b/vendor/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/vendor/agent/mibgroup/hardware/cpu/cpu_perfstat.h b/vendor/agent/mibgroup/hardware/cpu/cpu_perfstat.h index 8b8b62c..c6a5073 100644 --- a/vendor/agent/mibgroup/hardware/cpu/cpu_perfstat.h +++ b/vendor/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/vendor/agent/mibgroup/hardware/cpu/cpu_pstat.h b/vendor/agent/mibgroup/hardware/cpu/cpu_pstat.h index 2353f68..e05c645 100644 --- a/vendor/agent/mibgroup/hardware/cpu/cpu_pstat.h +++ b/vendor/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/vendor/agent/mibgroup/hardware/cpu/cpu_sysctl.c b/vendor/agent/mibgroup/hardware/cpu/cpu_sysctl.c index b00606c..e60947a 100644 --- a/vendor/agent/mibgroup/hardware/cpu/cpu_sysctl.c +++ b/vendor/agent/mibgroup/hardware/cpu/cpu_sysctl.c @@ -191,10 +191,10 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) { #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; diff --git a/vendor/agent/mibgroup/hardware/cpu/cpu_sysctl.h b/vendor/agent/mibgroup/hardware/cpu/cpu_sysctl.h index f37b907..ff81086 100644 --- a/vendor/agent/mibgroup/hardware/cpu/cpu_sysctl.h +++ b/vendor/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/vendor/agent/mibgroup/hardware/cpu/cpu_sysinfo.h b/vendor/agent/mibgroup/hardware/cpu/cpu_sysinfo.h index 36c6e13..4618714 100644 --- a/vendor/agent/mibgroup/hardware/cpu/cpu_sysinfo.h +++ b/vendor/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/vendor/agent/mibgroup/hardware/fsys.h b/vendor/agent/mibgroup/hardware/fsys.h index 8cbf439..0566f01 100644 --- a/vendor/agent/mibgroup/hardware/fsys.h +++ b/vendor/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/vendor/agent/mibgroup/hardware/fsys/fsys_getfsstats.c b/vendor/agent/mibgroup/hardware/fsys/fsys_getfsstats.c index 2b6646d..3f21f6b 100644 --- a/vendor/agent/mibgroup/hardware/fsys/fsys_getfsstats.c +++ b/vendor/agent/mibgroup/hardware/fsys/fsys_getfsstats.c @@ -5,13 +5,13 @@ #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 @@ -119,11 +119,11 @@ netsnmp_fsys_arch_load( void ) /* * Retrieve information about the currently mounted filesystems... */ - n = NSFS_GETFSSTAT( NULL, 0, MNT_NOWAIT ); + 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. @@ -135,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/vendor/agent/mibgroup/hardware/fsys/fsys_mntctl.c b/vendor/agent/mibgroup/hardware/fsys/fsys_mntctl.c index 782c8ed..2267244 100644 --- a/vendor/agent/mibgroup/hardware/fsys/fsys_mntctl.c +++ b/vendor/agent/mibgroup/hardware/fsys/fsys_mntctl.c @@ -4,16 +4,16 @@ #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 diff --git a/vendor/agent/mibgroup/hardware/fsys/fsys_mntent.c b/vendor/agent/mibgroup/hardware/fsys/fsys_mntent.c index 6308332..57f801e 100644 --- a/vendor/agent/mibgroup/hardware/fsys/fsys_mntent.c +++ b/vendor/agent/mibgroup/hardware/fsys/fsys_mntent.c @@ -6,27 +6,33 @@ #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 @@ -59,6 +65,38 @@ #endif +/* + * 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", + "ubifs", + "virtiofs", + "vxfs", + "xfs", + "zfs", + NULL, +}; + static int _fsys_remote( char *device, int type ) { @@ -72,6 +110,8 @@ _fsys_remote( char *device, int type ) static int _fsys_type( char *typename ) { + const char **fs; + DEBUGMSGTL(("fsys:type", "Classifying %s\n", typename)); if ( !typename || *typename=='\0' ) @@ -124,48 +164,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_TMPFS) || - !strcmp(typename, MNTTYPE_GFS) || - !strcmp(typename, MNTTYPE_GFS2) || - !strcmp(typename, MNTTYPE_GLUSTERFS) || - !strcmp(typename, MNTTYPE_FUSEGLUSTERFS) || - !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_NVMFS) || - !strcmp(typename, MNTTYPE_ACFS) || - !strcmp(typename, MNTTYPE_NSS_VOL) || - !strcmp(typename, MNTTYPE_NSS_POOL) || - !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 */ - else if (!strcmp(typename, MNTTYPE_AUTOFS)) + 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 @@ -174,6 +187,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 ) { @@ -222,8 +273,8 @@ 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; @@ -242,6 +293,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 */ @@ -273,14 +330,7 @@ netsnmp_fsys_arch_load( void ) 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); diff --git a/vendor/agent/mibgroup/hardware/fsys/hw_fsys.c b/vendor/agent/mibgroup/hardware/fsys/hw_fsys.c index 4cefcca..7a544e1 100644 --- a/vendor/agent/mibgroup/hardware/fsys/hw_fsys.c +++ b/vendor/agent/mibgroup/hardware/fsys/hw_fsys.c @@ -1,3 +1,4 @@ +#define __USE_MINGW_ANSI_STDIO 0 #include #include #include @@ -8,6 +9,12 @@ #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); @@ -17,6 +24,10 @@ 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 @@ -89,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 ) { @@ -132,7 +146,7 @@ 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) { +netsnmp_fsys_info *netsnmp_fsys_get_next(const netsnmp_fsys_info *this_ptr) { return CONTAINER_NEXT(_fsys_container, this_ptr); } @@ -142,17 +156,18 @@ _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; - } + 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; DEBUGMSGTL(("fsys:new", "Create filesystem entry (index = %d)\n", _fsys_idx)); CONTAINER_INSERT(_fsys_container, sp); @@ -267,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; } @@ -275,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; } @@ -283,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; } @@ -292,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; } @@ -340,3 +361,98 @@ 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 + } + 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/vendor/agent/mibgroup/hardware/fsys/hw_fsys.h b/vendor/agent/mibgroup/hardware/fsys/hw_fsys.h index 31f90ef..a52e025 100644 --- a/vendor/agent/mibgroup/hardware/fsys/hw_fsys.h +++ b/vendor/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/vendor/agent/mibgroup/hardware/fsys/mnttypes.h b/vendor/agent/mibgroup/hardware/fsys/mnttypes.h index cda4242..ea73d98 100644 --- a/vendor/agent/mibgroup/hardware/fsys/mnttypes.h +++ b/vendor/agent/mibgroup/hardware/fsys/mnttypes.h @@ -112,94 +112,18 @@ #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_GLUSTERFS -#define MNTTYPE_GLUSTERFS "glusterfs" -#endif -#ifndef MNTTYPE_FUSEGLUSTERFS -#define MNTTYPE_FUSEGLUSTERFS "fuse.glusterfs" -#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_NVMFS -#define MNTTYPE_NVMFS "nvmfs" -#endif -#ifndef MNTTYPE_ACFS -#define MNTTYPE_ACFS "acfs" -#endif -#ifndef MNTTYPE_NSS_VOL -#define MNTTYPE_NSS_VOL "nssvol" -#endif -#ifndef MNTTYPE_NSS_POOL -#define MNTTYPE_NSS_POOL "nsspool" -#endif /* * File systems to skip - * (Probably not strictly needed) */ -#ifndef MNTTYPE_APP -#define MNTTYPE_APP "app" -#endif #ifndef MNTTYPE_AUTOFS #define MNTTYPE_AUTOFS "autofs" #endif -#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_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/vendor/agent/mibgroup/hardware/memory.h b/vendor/agent/mibgroup/hardware/memory.h index 7e4e88e..bb97667 100644 --- a/vendor/agent/mibgroup/hardware/memory.h +++ b/vendor/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/vendor/agent/mibgroup/hardware/memory/hw_mem.c b/vendor/agent/mibgroup/hardware/memory/hw_mem.c index ad9d2c3..a2ca75b 100644 --- a/vendor/agent/mibgroup/hardware/memory/hw_mem.c +++ b/vendor/agent/mibgroup/hardware/memory/hw_mem.c @@ -9,39 +9,48 @@ netsnmp_feature_child_of(hardware_memory, netsnmp_unused); 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; } @@ -49,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; } @@ -99,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/vendor/agent/mibgroup/hardware/memory/memory_darwin.c b/vendor/agent/mibgroup/hardware/memory/memory_darwin.c index 4462c45..12e35e7 100644 --- a/vendor/agent/mibgroup/hardware/memory/memory_darwin.c +++ b/vendor/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/vendor/agent/mibgroup/hardware/memory/memory_freebsd.c b/vendor/agent/mibgroup/hardware/memory/memory_freebsd.c index cdb0e69..f5edff3 100644 --- a/vendor/agent/mibgroup/hardware/memory/memory_freebsd.c +++ b/vendor/agent/mibgroup/hardware/memory/memory_freebsd.c @@ -12,7 +12,7 @@ #include #include -#if HAVE_SYS_VMPARAM_H +#ifdef HAVE_SYS_VMPARAM_H #include #else #include diff --git a/vendor/agent/mibgroup/hardware/memory/memory_irix.c b/vendor/agent/mibgroup/hardware/memory/memory_irix.c index 377f007..a396e00 100644 --- a/vendor/agent/mibgroup/hardware/memory/memory_irix.c +++ b/vendor/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/vendor/agent/mibgroup/hardware/memory/memory_linux.c b/vendor/agent/mibgroup/hardware/memory/memory_linux.c index 6d5e86c..4ae235c 100644 --- a/vendor/agent/mibgroup/hardware/memory/memory_linux.c +++ b/vendor/agent/mibgroup/hardware/memory/memory_linux.c @@ -24,7 +24,8 @@ 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, + int have_memavail = 0; + unsigned long memtotal = 0, memavail = 0, memfree = 0, memshared = 0, buffers = 0, cached = 0, sreclaimable = 0, swaptotal = 0, swapfree = 0; @@ -81,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); @@ -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"); diff --git a/vendor/agent/mibgroup/hardware/memory/memory_linux.h b/vendor/agent/mibgroup/hardware/memory/memory_linux.h index 1b59cfb..a7b8d6a 100644 --- a/vendor/agent/mibgroup/hardware/memory/memory_linux.h +++ b/vendor/agent/mibgroup/hardware/memory/memory_linux.h @@ -1 +1 @@ -config_require(hardware/memory/hw_mem) +config_require(hardware/memory/hw_mem); diff --git a/vendor/agent/mibgroup/hardware/memory/memory_netbsd.c b/vendor/agent/mibgroup/hardware/memory/memory_netbsd.c index 68cd209..cc6cb1f 100644 --- a/vendor/agent/mibgroup/hardware/memory/memory_netbsd.c +++ b/vendor/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 @@ -211,7 +211,7 @@ swapinfo(long pagesize) continue; if (!mem->descr) { /* sprintf(buf, "swap #%d", s[i].se_dev); */ - sprintf(buf, "swap %s", s[i].se_path); + snprintf(buf, sizeof buf, "swap %s", s[i].se_path); mem->descr = strdup( buf ); } mem->units = pagesize; diff --git a/vendor/agent/mibgroup/hardware/sensors.h b/vendor/agent/mibgroup/hardware/sensors.h index b88d915..e7a4ac7 100644 --- a/vendor/agent/mibgroup/hardware/sensors.h +++ b/vendor/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/vendor/agent/mibgroup/hardware/sensors/dummy_sensors.c b/vendor/agent/mibgroup/hardware/sensors/dummy_sensors.c index 3c18fd2..7ff6438 100644 --- a/vendor/agent/mibgroup/hardware/sensors/dummy_sensors.c +++ b/vendor/agent/mibgroup/hardware/sensors/dummy_sensors.c @@ -12,12 +12,15 @@ void netsnmp_sensor_arch_init( void ) { int netsnmp_sensor_arch_load(netsnmp_cache *cache, void *vp) { - time_t now; - struct tm *tm; + static const struct tm zero_tm; + time_t now; + const struct tm *tm; netsnmp_sensor_info *sp; time(&now); tm = localtime(&now); + if (!tm) + tm = &zero_tm; DEBUGMSGTL(("sensors:arch", "Reload Dummy Sensors module\n")); diff --git a/vendor/agent/mibgroup/hardware/sensors/dummy_sensors.h b/vendor/agent/mibgroup/hardware/sensors/dummy_sensors.h index b5ffb4d..3167627 100644 --- a/vendor/agent/mibgroup/hardware/sensors/dummy_sensors.h +++ b/vendor/agent/mibgroup/hardware/sensors/dummy_sensors.h @@ -1 +1 @@ -config_require(hardware/sensors/hw_sensors) +config_require(hardware/sensors/hw_sensors); diff --git a/vendor/agent/mibgroup/hardware/sensors/kstat_sensors.h b/vendor/agent/mibgroup/hardware/sensors/kstat_sensors.h index b5ffb4d..3167627 100644 --- a/vendor/agent/mibgroup/hardware/sensors/kstat_sensors.h +++ b/vendor/agent/mibgroup/hardware/sensors/kstat_sensors.h @@ -1 +1 @@ -config_require(hardware/sensors/hw_sensors) +config_require(hardware/sensors/hw_sensors); diff --git a/vendor/agent/mibgroup/hardware/sensors/lmsensors_v2.h b/vendor/agent/mibgroup/hardware/sensors/lmsensors_v2.h index b5ffb4d..3167627 100644 --- a/vendor/agent/mibgroup/hardware/sensors/lmsensors_v2.h +++ b/vendor/agent/mibgroup/hardware/sensors/lmsensors_v2.h @@ -1 +1 @@ -config_require(hardware/sensors/hw_sensors) +config_require(hardware/sensors/hw_sensors); diff --git a/vendor/agent/mibgroup/hardware/sensors/lmsensors_v3.h b/vendor/agent/mibgroup/hardware/sensors/lmsensors_v3.h index b5ffb4d..3167627 100644 --- a/vendor/agent/mibgroup/hardware/sensors/lmsensors_v3.h +++ b/vendor/agent/mibgroup/hardware/sensors/lmsensors_v3.h @@ -1 +1 @@ -config_require(hardware/sensors/hw_sensors) +config_require(hardware/sensors/hw_sensors); diff --git a/vendor/agent/mibgroup/hardware/sensors/picld_sensors.h b/vendor/agent/mibgroup/hardware/sensors/picld_sensors.h index b5ffb4d..3167627 100644 --- a/vendor/agent/mibgroup/hardware/sensors/picld_sensors.h +++ b/vendor/agent/mibgroup/hardware/sensors/picld_sensors.h @@ -1 +1 @@ -config_require(hardware/sensors/hw_sensors) +config_require(hardware/sensors/hw_sensors); diff --git a/vendor/agent/mibgroup/header_complex.c b/vendor/agent/mibgroup/header_complex.c index dd5f063..1e53b77 100644 --- a/vendor/agent/mibgroup/header_complex.c +++ b/vendor/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 @@ -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/vendor/agent/mibgroup/host.h b/vendor/agent/mibgroup/host.h index e8e6558..b28cad4 100644 --- a/vendor/agent/mibgroup/host.h +++ b/vendor/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/vendor/agent/mibgroup/host/data_access/swinst.c b/vendor/agent/mibgroup/host/data_access/swinst.c index f6370a2..29ca268 100644 --- a/vendor/agent/mibgroup/host/data_access/swinst.c +++ b/vendor/agent/mibgroup/host/data_access/swinst.c @@ -23,7 +23,7 @@ netsnmp_feature_child_of(swinst_entry_remove, netsnmp_unused); /* --------------------------------------------------------------------- */ -static void netsnmp_swinst_entry_free_cb(netsnmp_swinst_entry *, void *); +static void netsnmp_swinst_entry_free_cb(void *, void *); void init_swinst( void ) { @@ -129,9 +129,7 @@ void netsnmp_swinst_container_free_items(netsnmp_container *container) /* * free all items. */ - CONTAINER_CLEAR(container, - (netsnmp_container_obj_func*)netsnmp_swinst_entry_free_cb, - NULL); + CONTAINER_CLEAR(container, netsnmp_swinst_entry_free_cb, NULL); } @@ -175,7 +173,7 @@ netsnmp_swinst_entry_free(netsnmp_swinst_entry *entry) * free a row */ static void -netsnmp_swinst_entry_free_cb(netsnmp_swinst_entry *entry, void *context) +netsnmp_swinst_entry_free_cb(void *entry, void *context) { free(entry); } diff --git a/vendor/agent/mibgroup/host/data_access/swinst.h b/vendor/agent/mibgroup/host/data_access/swinst.h index bda3e47..1b10d76 100644 --- a/vendor/agent/mibgroup/host/data_access/swinst.h +++ b/vendor/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/vendor/agent/mibgroup/host/data_access/swinst_apt.c b/vendor/agent/mibgroup/host/data_access/swinst_apt.c index 9f0a5f7..0adcb51 100644 --- a/vendor/agent/mibgroup/host/data_access/swinst_apt.c +++ b/vendor/agent/mibgroup/host/data_access/swinst_apt.c @@ -31,9 +31,9 @@ #include #include "swinst_private.h" -config_require(date_n_time) +config_require(date_n_time); -char pkg_directory[SNMP_MAXBUF]; +static char pkg_directory[SNMP_MAXBUF]; static char apt_fmt[SNMP_MAXBUF]; static char file[SNMP_MAXBUF]; diff --git a/vendor/agent/mibgroup/host/data_access/swinst_pkginfo.c b/vendor/agent/mibgroup/host/data_access/swinst_pkginfo.c index d647d9a..cd7134a 100644 --- a/vendor/agent/mibgroup/host/data_access/swinst_pkginfo.c +++ b/vendor/agent/mibgroup/host/data_access/swinst_pkginfo.c @@ -52,7 +52,7 @@ netsnmp_feature_require(date_n_time); * - reporting hrSWInstalledLast* objects * - detecting when the cached contents are out of date. */ -char pkg_directory[SNMP_MAXPATH]; +static char pkg_directory[SNMP_MAXPATH]; /* --------------------------------------------------------------------- */ @@ -182,8 +182,8 @@ 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 ); diff --git a/vendor/agent/mibgroup/host/data_access/swinst_rpm.c b/vendor/agent/mibgroup/host/data_access/swinst_rpm.c index 28459bb..6b02268 100644 --- a/vendor/agent/mibgroup/host/data_access/swinst_rpm.c +++ b/vendor/agent/mibgroup/host/data_access/swinst_rpm.c @@ -53,7 +53,7 @@ netsnmp_feature_require(date_n_time); * - reporting hrSWInstalledLast* objects * - detecting when the cached contents are out of date. */ -char pkg_directory[SNMP_MAXPATH]; +static char pkg_directory[SNMP_MAXPATH]; /* --------------------------------------------------------------------- */ @@ -73,12 +73,23 @@ netsnmp_swinst_arch_init(void) #endif snprintf( pkg_directory, SNMP_MAXPATH, "%s/Packages", dbpath ); - SNMP_FREE(rpmdbpath); - dbpath = NULL; + if (-1 == stat( pkg_directory, &stat_buf )) { - snmp_log(LOG_ERR, "Can't find directory of RPM packages"); - pkg_directory[0] = '\0'; + + /* check for SQLite DB backend */ + snprintf( pkg_directory, SNMP_MAXPATH, "%s/rpmdb.sqlite", dbpath ); + + if (-1 == stat( pkg_directory, &stat_buf )) { + snmp_log(LOG_ERR, "Can't find directory of RPM packages\n"); + pkg_directory[0] = '\0'; + } } + + SNMP_FREE(rpmdbpath); + dbpath = NULL; +#ifdef HAVE_RPMGETPATH + rpmFreeRpmrc(); +#endif } void @@ -97,7 +108,7 @@ netsnmp_swinst_arch_load( netsnmp_container *container, u_int flags) rpmdbMatchIterator mi; Header h; -#if HAVE_HEADERGET +#ifdef HAVE_HEADERGET const char *g; rpmtd td_name, td_version, td_release, td_group, td_time; #else @@ -109,7 +120,7 @@ netsnmp_swinst_arch_load( netsnmp_container *container, u_int flags) int i = 1; netsnmp_swinst_entry *entry; -#if HAVE_HEADERGET +#ifdef HAVE_HEADERGET td_name = rpmtdNew(); td_version = rpmtdNew(); td_release = rpmtdNew(); @@ -133,7 +144,7 @@ netsnmp_swinst_arch_load( netsnmp_container *container, u_int flags) CONTAINER_INSERT(container, entry); h = headerLink( h ); -#if HAVE_HEADERGET +#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); @@ -171,7 +182,7 @@ netsnmp_swinst_arch_load( netsnmp_container *container, u_int flags) memcpy(entry->swDate, dt, entry->swDate_len); } -#if HAVE_HEADERGET +#ifdef HAVE_HEADERGET rpmtdFreeData(td_name); rpmtdFreeData(td_version); rpmtdFreeData(td_release); @@ -182,7 +193,7 @@ netsnmp_swinst_arch_load( netsnmp_container *container, u_int flags) } rpmdbFreeIterator( mi ); rpmtsFree( ts ); -#if HAVE_HEADERGET +#ifdef HAVE_HEADERGET rpmtdFree(td_name); rpmtdFree(td_version); rpmtdFree(td_release); diff --git a/vendor/agent/mibgroup/host/data_access/swrun.c b/vendor/agent/mibgroup/host/data_access/swrun.c index 640d6e7..7b278eb 100644 --- a/vendor/agent/mibgroup/host/data_access/swrun.c +++ b/vendor/agent/mibgroup/host/data_access/swrun.c @@ -17,7 +17,7 @@ #include "swrun.h" #include "swrun_private.h" -#if HAVE_PCRE_H +#ifdef HAVE_PCRE_H #include #endif @@ -39,8 +39,7 @@ static netsnmp_container *swrun_container = NULL; /* * local static prototypes */ -static void _swrun_entry_release(netsnmp_swrun_entry * entry, - void *unused); +static void _swrun_entry_release(void* entry, void *unused); /** * initialization @@ -100,7 +99,7 @@ swrun_max_processes( void ) #endif /* NETSNMP_FEATURE_REMOVE_SWRUN_MAX_PROCESSES */ #ifndef NETSNMP_FEATURE_REMOVE_SWRUN_COUNT_PROCESSES_BY_REGEX -#if HAVE_PCRE_H +#ifdef HAVE_PCRE_H int swrun_count_processes_by_regex( char *name, netsnmp_regex_ptr regexp ) { @@ -291,9 +290,7 @@ netsnmp_swrun_container_free_items(netsnmp_container *container) /* * free all items. */ - CONTAINER_CLEAR(container, - (netsnmp_container_obj_func*)_swrun_entry_release, - NULL); + CONTAINER_CLEAR(container, _swrun_entry_release, NULL); } /**---------------------------------------------------------------------*/ @@ -366,7 +363,7 @@ netsnmp_swrun_entry_free(netsnmp_swrun_entry * entry) /** */ static void -_swrun_entry_release(netsnmp_swrun_entry * entry, void *context) +_swrun_entry_release(void *entry, void *context) { netsnmp_swrun_entry_free(entry); } diff --git a/vendor/agent/mibgroup/host/data_access/swrun.h b/vendor/agent/mibgroup/host/data_access/swrun.h index 2ae53f5..d048cf8 100644 --- a/vendor/agent/mibgroup/host/data_access/swrun.h +++ b/vendor/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/vendor/agent/mibgroup/host/data_access/swrun_kinfo.c b/vendor/agent/mibgroup/host/data_access/swrun_kinfo.c index 0bade2a..e0bba7c 100644 --- a/vendor/agent/mibgroup/host/data_access/swrun_kinfo.c +++ b/vendor/agent/mibgroup/host/data_access/swrun_kinfo.c @@ -63,7 +63,7 @@ #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 */ @@ -159,7 +159,7 @@ 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 }; @@ -221,7 +221,7 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags) * We'll use SWRUN_K_COMM for hrSWRunName, * and as an alternative for hrSWRunPath */ -#if HAVE_KVM_GETPROC2 +#ifdef HAVE_KVM_GETPROC2 argv = kvm_getargv2( kd, &(proc_table[i]), 0); #else argv = kvm_getargv( kd, &(proc_table[i]), BUFSIZ); diff --git a/vendor/agent/mibgroup/host/data_access/swrun_procfs_psinfo.c b/vendor/agent/mibgroup/host/data_access/swrun_procfs_psinfo.c index 7aa0fa0..342bf56 100644 --- a/vendor/agent/mibgroup/host/data_access/swrun_procfs_psinfo.c +++ b/vendor/agent/mibgroup/host/data_access/swrun_procfs_psinfo.c @@ -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 diff --git a/vendor/agent/mibgroup/host/hrSWInstalledTable.h b/vendor/agent/mibgroup/host/hrSWInstalledTable.h index 48f17e8..4b617fd 100644 --- a/vendor/agent/mibgroup/host/hrSWInstalledTable.h +++ b/vendor/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/vendor/agent/mibgroup/host/hrSWRunPerfTable.h b/vendor/agent/mibgroup/host/hrSWRunPerfTable.h index 453fda3..6bc3c11 100644 --- a/vendor/agent/mibgroup/host/hrSWRunPerfTable.h +++ b/vendor/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/vendor/agent/mibgroup/host/hrSWRunTable.h b/vendor/agent/mibgroup/host/hrSWRunTable.h index de80fc0..79f3b67 100644 --- a/vendor/agent/mibgroup/host/hrSWRunTable.h +++ b/vendor/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/vendor/agent/mibgroup/host/hr_device.c b/vendor/agent/mibgroup/host/hr_device.c index 24031bf..ccb33e3 100644 --- a/vendor/agent/mibgroup/host/hr_device.c +++ b/vendor/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/vendor/agent/mibgroup/host/hr_disk.c b/vendor/agent/mibgroup/host/hr_disk.c index 1428c84..486df24 100644 --- a/vendor/agent/mibgroup/host/hr_disk.c +++ b/vendor/agent/mibgroup/host/hr_disk.c @@ -16,58 +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 @@ -78,7 +78,7 @@ #include #endif -#if HAVE_LIMITS_H +#ifdef HAVE_LIMITS_H #include #endif #ifdef HAVE_UNISTD_H @@ -365,7 +365,7 @@ parse_disk_config(const char *token, char *cptr) di_curr->item_details = (void *) 0; name++; } else if (*name == '[') { - d_set = (details_set *) calloc(sizeof(details_set), 1); + d_set = (details_set *) calloc(1, sizeof(details_set)); if (!d_set) { config_perror("Out of memory"); SNMP_FREE(d_new); @@ -461,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; @@ -712,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)); @@ -727,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", diff --git a/vendor/agent/mibgroup/host/hr_disk.h b/vendor/agent/mibgroup/host/hr_disk.h index b3c439c..5021020 100644 --- a/vendor/agent/mibgroup/host/hr_disk.h +++ b/vendor/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/vendor/agent/mibgroup/host/hr_filesys.c b/vendor/agent/mibgroup/host/hr_filesys.c index 4f78df3..06d5db0 100644 --- a/vendor/agent/mibgroup/host/hr_filesys.c +++ b/vendor/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 @@ -73,7 +73,7 @@ netsnmp_feature_require(ctime_to_timet); #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 @@ -205,7 +205,7 @@ struct mntent *HRFS_entry; #define FULL_DUMP 0 #define PART_DUMP 1 -static u_char *when_dumped(char *filesys, int level, size_t * length); +static u_char *when_dumped(const char *filesys, int level, size_t *length); /********************* * @@ -379,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; @@ -564,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; @@ -574,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 @@ -618,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) @@ -719,7 +719,7 @@ int Get_Next_HR_FileSys(void) { next: -#if HAVE_GETFSSTAT +#ifdef HAVE_GETFSSTAT if (HRFS_index >= fscount) return -1; HRFS_entry = fsstats + HRFS_index; @@ -792,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) @@ -848,7 +848,7 @@ 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) { @@ -866,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/vendor/agent/mibgroup/host/hr_network.c b/vendor/agent/mibgroup/host/hr_network.c index cd3c56e..fb574c2 100644 --- a/vendor/agent/mibgroup/host/hr_network.c +++ b/vendor/agent/mibgroup/host/hr_network.c @@ -8,7 +8,7 @@ #include #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include diff --git a/vendor/agent/mibgroup/host/hr_network.h b/vendor/agent/mibgroup/host/hr_network.h index d7bcb48..60dd94d 100644 --- a/vendor/agent/mibgroup/host/hr_network.h +++ b/vendor/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/vendor/agent/mibgroup/host/hr_other.c b/vendor/agent/mibgroup/host/hr_other.c index 9e4b16a..265ccdd 100644 --- a/vendor/agent/mibgroup/host/hr_other.c +++ b/vendor/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/vendor/agent/mibgroup/host/hr_other.h b/vendor/agent/mibgroup/host/hr_other.h index c1865d1..347ef53 100644 --- a/vendor/agent/mibgroup/host/hr_other.h +++ b/vendor/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/vendor/agent/mibgroup/host/hr_partition.c b/vendor/agent/mibgroup/host/hr_partition.c index 14d8071..6761978 100644 --- a/vendor/agent/mibgroup/host/hr_partition.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/host/hr_partition.h b/vendor/agent/mibgroup/host/hr_partition.h index c4992dd..e42e071 100644 --- a/vendor/agent/mibgroup/host/hr_partition.h +++ b/vendor/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/vendor/agent/mibgroup/host/hr_print.c b/vendor/agent/mibgroup/host/hr_print.c index be6feb1..1c1ef7a 100644 --- a/vendor/agent/mibgroup/host/hr_print.c +++ b/vendor/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" @@ -176,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 */ @@ -199,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 @@ -208,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 @@ -229,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)) { @@ -244,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) { @@ -253,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)) { @@ -278,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 diff --git a/vendor/agent/mibgroup/host/hr_print.h b/vendor/agent/mibgroup/host/hr_print.h index 7acee8d..2378ebd 100644 --- a/vendor/agent/mibgroup/host/hr_print.h +++ b/vendor/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/vendor/agent/mibgroup/host/hr_proc.c b/vendor/agent/mibgroup/host/hr_proc.c index 6f93079..a5baccc 100644 --- a/vendor/agent/mibgroup/host/hr_proc.c +++ b/vendor/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/vendor/agent/mibgroup/host/hr_proc.h b/vendor/agent/mibgroup/host/hr_proc.h index 1e4a926..f146fb9 100644 --- a/vendor/agent/mibgroup/host/hr_proc.h +++ b/vendor/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/vendor/agent/mibgroup/host/hr_storage.c b/vendor/agent/mibgroup/host/hr_storage.c index 6b459ec..6002648 100644 --- a/vendor/agent/mibgroup/host/hr_storage.c +++ b/vendor/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 @@ -564,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 @@ -603,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; @@ -634,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; diff --git a/vendor/agent/mibgroup/host/hr_storage.h b/vendor/agent/mibgroup/host/hr_storage.h index 2007c32..f938ab8 100644 --- a/vendor/agent/mibgroup/host/hr_storage.h +++ b/vendor/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/vendor/agent/mibgroup/host/hr_swinst.c b/vendor/agent/mibgroup/host/hr_swinst.c index 1f52733..083c891 100644 --- a/vendor/agent/mibgroup/host/hr_swinst.c +++ b/vendor/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 @@ -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 */ @@ -229,8 +229,14 @@ init_hr_swinst(void) snprintf(path, sizeof(path), "%s/Packages", swi->swi_dbpath); if (stat(path, &stat_buf) == -1) snprintf(path, sizeof(path), "%s/packages.rpm", swi->swi_dbpath); + /* check for SQLite DB backend */ + if (stat(path, &stat_buf) == -1) + snprintf(path, sizeof(path), "%s/rpmdb.sqlite", swi->swi_dbpath); path[ sizeof(path)-1 ] = 0; swi->swi_directory = strdup(path); +#ifdef HAVE_RPMGETPATH + rpmFreeRpmrc(); +#endif } #else # ifdef _PATH_HRSW_directory @@ -412,7 +418,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; @@ -516,7 +522,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"); diff --git a/vendor/agent/mibgroup/host/hr_swrun.c b/vendor/agent/mibgroup/host/hr_swrun.c index dddd3ea..85ab689 100644 --- a/vendor/agent/mibgroup/host/hr_swrun.c +++ b/vendor/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; @@ -634,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 /* @@ -680,13 +680,13 @@ 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 strlcpy(string, proc_table[LowProcIndex].ki_comm, sizeof(string)); #elif defined(dragonfly) && __DragonFly_version >= 190000 @@ -743,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"); @@ -803,13 +803,13 @@ 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 strlcpy(string, proc_table[LowProcIndex].ki_comm, sizeof(string)); #elif defined(dragonfly) && __DragonFly_version >= 190000 @@ -859,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"); @@ -910,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) @@ -921,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) @@ -966,7 +966,7 @@ var_hrswrun(struct variable * vp, #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"); @@ -988,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) @@ -1050,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 @@ -1147,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 + @@ -1267,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 + @@ -1331,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! */ @@ -1542,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; @@ -1550,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; @@ -1576,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"); @@ -1610,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/vendor/agent/mibgroup/host/hr_system.c b/vendor/agent/mibgroup/host/hr_system.c index aec5d5f..59d6aae 100644 --- a/vendor/agent/mibgroup/host/hr_system.c +++ b/vendor/agent/mibgroup/host/hr_system.c @@ -16,7 +16,7 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -36,7 +36,7 @@ #include "sys/proc.h" #endif #ifndef mingw32 -#if HAVE_UTMPX_H +#ifdef HAVE_UTMPX_H #include #else #include @@ -45,7 +45,7 @@ #include #include -#if HAVE_LM_H +#ifdef HAVE_LM_H #include #endif @@ -85,7 +85,7 @@ netsnmp_feature_require(date_n_time); #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); @@ -115,7 +115,7 @@ static long get_max_solaris_processes(void); static int get_load_dev(void); static int count_users(void); extern int count_processes(void); -#if USING_HOST_DATA_ACCESS_SWRUN_MODULE +#ifdef USING_HOST_DATA_ACCESS_SWRUN_MODULE static int count_kthreads = 1; static void parse_count_kthreads(const char *token, const char *line) @@ -202,7 +202,7 @@ init_hr_system(void) #ifdef NPROC_SYMBOL auto_nlist(NPROC_SYMBOL, 0, 0); #endif -#if USING_HOST_DATA_ACCESS_SWRUN_MODULE +#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"); @@ -273,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 @@ -318,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 */ @@ -329,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 +#ifdef USING_HOST_DATA_ACCESS_SWRUN_MODULE long_return = swrun_count_processes(count_kthreads); -#elif USING_HOST_HR_SWRUN_MODULE +#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; @@ -343,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; @@ -367,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; @@ -433,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) { @@ -441,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; } @@ -537,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; @@ -676,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 @@ -722,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/vendor/agent/mibgroup/host/hrh_filesys.c b/vendor/agent/mibgroup/host/hrh_filesys.c index 073a37e..fabeaa3 100644 --- a/vendor/agent/mibgroup/host/hrh_filesys.c +++ b/vendor/agent/mibgroup/host/hrh_filesys.c @@ -26,19 +26,19 @@ #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 @@ -49,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 @@ -73,14 +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 -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); /********************* * @@ -139,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]; @@ -159,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; @@ -220,9 +217,10 @@ var_hrhfilesys(struct variable *vp, int fsys_idx; 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; @@ -234,13 +232,13 @@ var_hrhfilesys(struct variable *vp, free(string); string = NULL; *var_len = 0; - if (asprintf(&string, "%s", HRFS_entry->path) >= 0) + if (asprintf(&string, "%s", entry->path) >= 0) *var_len = strlen(string); return (u_char *)(string ? string : empty_str); case HRFSYS_RMOUNT: free(string); - if (HRFS_entry->flags & NETSNMP_FS_FLAG_REMOTE) { - if (asprintf(&string, "%s", HRFS_entry->device) < 0) + if (entry->flags & NETSNMP_FS_FLAG_REMOTE) { + if (asprintf(&string, "%s", entry->device) < 0) string = NULL; } else { string = strdup(""); @@ -249,25 +247,25 @@ var_hrhfilesys(struct variable *vp, 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)); @@ -281,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 @@ -426,13 +416,13 @@ Get_FSSize(char *dev) } int -Check_HR_FileSys_NFS (void) +Check_HR_FileSys_NFS(const netsnmp_fsys_info *entry) { - return (HRFS_entry->flags & NETSNMP_FS_FLAG_REMOTE) ? 1 : 0; + return entry->flags & NETSNMP_FS_FLAG_REMOTE ? 1 : 0; } int -Check_HR_FileSys_AutoFs (void) +Check_HR_FileSys_AutoFs(const netsnmp_fsys_info *entry) { - return HRFS_entry->type == NETSNMP_FS_TYPE_AUTOFS; + return entry->type == NETSNMP_FS_TYPE_AUTOFS; } diff --git a/vendor/agent/mibgroup/host/hrh_filesys.h b/vendor/agent/mibgroup/host/hrh_filesys.h index c0f5d6e..b440794 100644 --- a/vendor/agent/mibgroup/host/hrh_filesys.h +++ b/vendor/agent/mibgroup/host/hrh_filesys.h @@ -5,16 +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 Check_HR_FileSys_AutoFs(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/vendor/agent/mibgroup/host/hrh_storage.c b/vendor/agent/mibgroup/host/hrh_storage.c index 8967d35..1f0b4e9 100644 --- a/vendor/agent/mibgroup/host/hrh_storage.c +++ b/vendor/agent/mibgroup/host/hrh_storage.c @@ -17,13 +17,13 @@ #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 @@ -32,18 +32,18 @@ # 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,10 +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); -void* header_hrstoreEntry(struct variable *, oid *, size_t *, - int, size_t *, WriteMethod **); + Netsnmp_Node_Handler handle_memsize; @@ -169,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]; @@ -242,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; @@ -355,26 +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 (HRFS_entry && Check_HR_FileSys_AutoFs()) - 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 && storageUseNFS) + 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,10 +416,10 @@ 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 & 0x7fffffff; + 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; @@ -433,10 +429,10 @@ var_hrstore(struct variable *vp, 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 & 0x7fffffff; + 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; @@ -446,10 +442,10 @@ var_hrstore(struct variable *vp, 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 & 0x7fffffff; + 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; @@ -458,10 +454,10 @@ 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; + 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,33 +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()) && - !Check_HR_FileSys_AutoFs()) { - 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/vendor/agent/mibgroup/host/hrh_storage.h b/vendor/agent/mibgroup/host/hrh_storage.h index e872345..a44f28b 100644 --- a/vendor/agent/mibgroup/host/hrh_storage.h +++ b/vendor/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/vendor/agent/mibgroup/host_res.h b/vendor/agent/mibgroup/host_res.h index 1dba388..5b163c5 100644 --- a/vendor/agent/mibgroup/host_res.h +++ b/vendor/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/vendor/agent/mibgroup/if-mib.h b/vendor/agent/mibgroup/if-mib.h index 998a46b..fcfe351 100644 --- a/vendor/agent/mibgroup/if-mib.h +++ b/vendor/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/vendor/agent/mibgroup/if-mib/data_access/interface.c b/vendor/agent/mibgroup/if-mib/data_access/interface.c index 01e771c..e17d0de 100644 --- a/vendor/agent/mibgroup/if-mib/data_access/interface.c +++ b/vendor/agent/mibgroup/if-mib/data_access/interface.c @@ -16,9 +16,9 @@ #include "if-mib/ifTable/ifTable.h" #include "if-mib/data_access/interface.h" #include "interface_private.h" -#if HAVE_PCRE_H +#if defined(HAVE_PCRE_H) #include -#elif HAVE_REGEX_H +#elif defined(HAVE_REGEX_H) #include #include #endif @@ -47,8 +47,7 @@ static int ifmib_max_num_ifaces = 0; */ static int _access_interface_entry_compare_name(const void *lhs, const void *rhs); -static void _access_interface_entry_release(netsnmp_interface_entry * entry, - void *unused); +static void _access_interface_entry_release(void *entry, void *unused); 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); @@ -202,9 +201,7 @@ netsnmp_access_interface_container_free(netsnmp_container *container, u_int free /* * free all items. */ - CONTAINER_CLEAR(container, - (netsnmp_container_obj_func*)_access_interface_entry_release, - NULL); + CONTAINER_CLEAR(container, _access_interface_entry_release, NULL); } CONTAINER_FREE(container); @@ -311,6 +308,7 @@ netsnmp_access_interface_entry_create(const char *name, oid if_index) entry->index = netsnmp_access_interface_index_find(name); else entry->index = if_index; + netsnmp_assert(entry->index != 0); _access_interface_entry_save_name(name, entry->index); if (name) @@ -322,7 +320,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; } @@ -342,18 +340,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); } @@ -483,7 +473,7 @@ _access_interface_entry_compare_name(const void *lhs, const void *rhs) /** */ static void -_access_interface_entry_release(netsnmp_interface_entry * entry, void *context) +_access_interface_entry_release(void *entry, void *context) { netsnmp_access_interface_entry_free(entry); } @@ -677,7 +667,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 @@ -685,11 +674,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 @@ -701,14 +685,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; } } @@ -840,7 +821,7 @@ int netsnmp_access_interface_max_reached(const char *name) int netsnmp_access_interface_include(const char *name) { netsnmp_include_if_list *if_ptr; -#if HAVE_PCRE_H +#ifdef HAVE_PCRE_H int found_ndx[3]; #endif @@ -856,11 +837,11 @@ int netsnmp_access_interface_include(const char *name) for (if_ptr = include_list; if_ptr; if_ptr = if_ptr->next) { -#if HAVE_PCRE_H +#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 HAVE_REGEX_H +#elif defined(HAVE_REGEX_H) if (regexec(if_ptr->regex_ptr, name, 0, NULL, 0) == 0) return TRUE; #else @@ -980,10 +961,10 @@ _parse_include_if_config(const char *token, char *cptr) { netsnmp_include_if_list *if_ptr, *if_new; char *name, *st; -#if HAVE_PCRE_H +#if defined(HAVE_PCRE_H) const char *pcre_error; int pcre_error_offset; -#elif HAVE_REGEX_H +#elif defined(HAVE_REGEX_H) int r = 0; #endif @@ -1012,14 +993,14 @@ _parse_include_if_config(const char *token, char *cptr) config_perror("Out of memory"); goto err; } -#if HAVE_PCRE_H +#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 HAVE_REGEX_H +#elif defined(HAVE_REGEX_H) if_new->regex_ptr = malloc(sizeof(regex_t)); if (!if_new->regex_ptr) { config_perror("Out of memory"); @@ -1063,9 +1044,9 @@ _free_include_if_config(void) while (if_ptr) { if_next = if_ptr->next; -#if HAVE_PCRE_H +#if defined(HAVE_PCRE_H) free(if_ptr->regex_ptr); -#elif HAVE_REGEX_H +#elif defined(HAVE_REGEX_H) regfree(if_ptr->regex_ptr); free(if_ptr->regex_ptr); #endif diff --git a/vendor/agent/mibgroup/if-mib/data_access/interface.h b/vendor/agent/mibgroup/if-mib/data_access/interface.h index c485c7c..d6e7dfe 100644 --- a/vendor/agent/mibgroup/if-mib/data_access/interface.h +++ b/vendor/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,23 +26,23 @@ config_require(if-mib/data_access/interface) * be handled in the *_hpux.h header file. */ -config_exclude(mibII/interfaces) +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) +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) +config_require(if-mib/data_access/interface_sysctl); #elif defined(solaris2) -config_require(if-mib/data_access/interface_solaris2) +config_require(if-mib/data_access/interface_solaris2); #elif defined(HAVE_IPHLPAPI_H) && !defined(cygwin) -config_require(if-mib/data_access/interface_iphlpapi) +config_require(if-mib/data_access/interface_iphlpapi); #else -config_warning(This platform does not yet support the IF-MIB) -config_require(if-mib/data_access/interface_unsup) +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/vendor/agent/mibgroup/if-mib/data_access/interface_ioctl.c b/vendor/agent/mibgroup/if-mib/data_access/interface_ioctl.c index b7f6a89..9ab1657 100644 --- a/vendor/agent/mibgroup/if-mib/data_access/interface_ioctl.c +++ b/vendor/agent/mibgroup/if-mib/data_access/interface_ioctl.c @@ -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,7 +405,7 @@ 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; } diff --git a/vendor/agent/mibgroup/if-mib/data_access/interface_ioctl.h b/vendor/agent/mibgroup/if-mib/data_access/interface_ioctl.h index 9b0cb8c..5ef8a08 100644 --- a/vendor/agent/mibgroup/if-mib/data_access/interface_ioctl.h +++ b/vendor/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); diff --git a/vendor/agent/mibgroup/if-mib/data_access/interface_iphlpapi.c b/vendor/agent/mibgroup/if-mib/data_access/interface_iphlpapi.c index b1e18e5..285bcdc 100644 --- a/vendor/agent/mibgroup/if-mib/data_access/interface_iphlpapi.c +++ b/vendor/agent/mibgroup/if-mib/data_access/interface_iphlpapi.c @@ -61,7 +61,7 @@ static int netsnmp_arch_interface_load_old(netsnmp_container *container) for (row = iftable->table; row < end; row++) { netsnmp_interface_entry *entry; - entry = calloc(sizeof(*entry), 1); + entry = calloc(1, sizeof(*entry)); if (!entry) continue; entry->name = strdup((const char *) row->wszName); @@ -116,7 +116,7 @@ static int netsnmp_arch_interface_load_new(netsnmp_container *container) for (row = iftable->Table; row < end; row++) { netsnmp_interface_entry *entry; - entry = calloc(sizeof(*entry), 1); + entry = calloc(1, sizeof(*entry)); if (!entry) continue; entry->name = strdup((const char *) row->Alias); diff --git a/vendor/agent/mibgroup/if-mib/data_access/interface_linux.c b/vendor/agent/mibgroup/if-mib/data_access/interface_linux.c index 3abb205..d8ce6a9 100644 --- a/vendor/agent/mibgroup/if-mib/data_access/interface_linux.c +++ b/vendor/agent/mibgroup/if-mib/data_access/interface_linux.c @@ -26,12 +26,15 @@ netsnmp_feature_require(interface_ioctl_flags_set); #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; @@ -69,7 +72,7 @@ typedef __u8 u8; /* ditto */ #include -#if HAVE_SYS_IOCTL_H +#ifdef HAVE_SYS_IOCTL_H #include #else #error "linux should have sys/ioctl header" @@ -120,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; @@ -143,10 +140,10 @@ static void init_libpci(void) struct stat stbuf; /* - * When snmpd is run inside an OpenVZ container /proc/bus/pci is not - * available. + * When snmpd is run inside an OpenVZ container or on a Raspberry Pi system + * /proc/bus/pci is not available. */ - if (stat("/proc/vz", &stbuf) == 0) + if (stat("/proc/bus/pci", &stbuf) < 0) return; pci_access = pci_alloc(); @@ -176,36 +173,6 @@ static void init_libpci(void) void netsnmp_arch_interface_init(void) { - /* - * Check which retransmit time interface is 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(); @@ -322,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; @@ -414,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)); @@ -448,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)); @@ -596,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 @@ -609,9 +688,8 @@ 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 @@ -639,8 +717,8 @@ netsnmp_arch_interface_container_load(netsnmp_container* container, fd = socket(AF_INET, SOCK_DGRAM, 0); if(fd < 0) { snmp_log_perror("interface_linux: could not create socket"); - fclose(devin); - return -2; + rc = -2; + goto close_devin; } #ifdef NETSNMP_ENABLE_IPV6 @@ -677,9 +755,8 @@ 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"); - fclose(devin); - close(fd); - return -2; + rc = -2; + goto free_addr_container; } netsnmp_assert(NULL != ifc.ifc_buf); @@ -690,13 +767,16 @@ netsnmp_arch_interface_container_load(netsnmp_container* container, * 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++; @@ -722,19 +802,25 @@ netsnmp_arch_interface_container_load(netsnmp_container* container, *stats++ = 0; /* null terminate name */ if (!netsnmp_access_interface_include(ifstart)) - continue; + continue; + /* we may need to stop tracking ifaces if a max was set */ if (netsnmp_access_interface_max_reached(ifstart)) - /* we may need to stop tracking ifaces if a max was set */ - continue; + continue; + /* * set address type flags. * the only way I know of to check an interface for * ip version is to look for ip addresses. If anyone * knows a better way, put it here! */ -#ifdef NETSNMP_ENABLE_IPV6 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, &ifc); @@ -752,17 +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); - free(ifc.ifc_buf); - return -3; + rc = -3; + goto free_ifc; } entry->ns_flags = flags; /* initial flags; we'll set more later */ @@ -781,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; + if (entry->type == 0) + entry->type = netsnmp_guess_interface_type(entry); - 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; - } + netsnmp_derive_interface_id(entry); if (IANAIFTYPE_ETHERNETCSMACD == entry->type) { unsigned long long speed; @@ -865,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); @@ -922,15 +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); - free(ifc.ifc_buf); - return 0; + +close_devin: + fclose(devin); + + return rc; } #ifndef NETSNMP_FEATURE_REMOVE_INTERFACE_ARCH_SET_ADMIN_STATUS @@ -1256,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/vendor/agent/mibgroup/if-mib/data_access/interface_openbsd.c b/vendor/agent/mibgroup/if-mib/data_access/interface_openbsd.c index cf090c1..34e1d84 100644 --- a/vendor/agent/mibgroup/if-mib/data_access/interface_openbsd.c +++ b/vendor/agent/mibgroup/if-mib/data_access/interface_openbsd.c @@ -13,7 +13,7 @@ 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" @@ -143,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; } diff --git a/vendor/agent/mibgroup/if-mib/data_access/interface_solaris2.c b/vendor/agent/mibgroup/if-mib/data_access/interface_solaris2.c index a484e72..74dc411 100644 --- a/vendor/agent/mibgroup/if-mib/data_access/interface_solaris2.c +++ b/vendor/agent/mibgroup/if-mib/data_access/interface_solaris2.c @@ -121,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; @@ -211,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/vendor/agent/mibgroup/if-mib/data_access/interface_sysctl.c b/vendor/agent/mibgroup/if-mib/data_access/interface_sysctl.c index 8a2bfd6..ccfc683 100644 --- a/vendor/agent/mibgroup/if-mib/data_access/interface_sysctl.c +++ b/vendor/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" @@ -465,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; @@ -509,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) @@ -546,8 +544,6 @@ 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/vendor/agent/mibgroup/if-mib/ifTable.h b/vendor/agent/mibgroup/if-mib/ifTable.h index 65fa09a..90ef33f 100644 --- a/vendor/agent/mibgroup/if-mib/ifTable.h +++ b/vendor/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/vendor/agent/mibgroup/if-mib/ifTable/ifTable.c b/vendor/agent/mibgroup/if-mib/ifTable/ifTable.c index 53e0b91..9dc1f22 100644 --- a/vendor/agent/mibgroup/if-mib/ifTable/ifTable.c +++ b/vendor/agent/mibgroup/if-mib/ifTable/ifTable.c @@ -59,7 +59,7 @@ _if_number_handler(netsnmp_mib_handler *handler, /** - * Initializes the ifTable module. Called after the snmpd configuration has + * Initializes the ifTable module. Called before the snmpd configuration has * been read. */ static int @@ -193,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 @@ -327,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 @@ -376,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 @@ -1892,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. * @@ -2066,7 +1981,7 @@ ifTable_commit(ifTable_rowreq_ctx * rowreq_ctx) } /* - * if we successfully commited this row, set the dirty flag. + * if we successfully committed this row, set the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags |= MFD_ROW_DIRTY; @@ -2119,7 +2034,7 @@ ifTable_undo_commit(ifTable_rowreq_ctx * rowreq_ctx) /* - * if we successfully un-commited this row, clear the dirty flag. + * if we successfully un-committed this row, clear the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags &= ~MFD_ROW_DIRTY; diff --git a/vendor/agent/mibgroup/if-mib/ifTable/ifTable.h b/vendor/agent/mibgroup/if-mib/ifTable/ifTable.h index e90634f..5bfd767 100644 --- a/vendor/agent/mibgroup/if-mib/ifTable/ifTable.h +++ b/vendor/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,16 +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); - ifTable_rowreq_ctx *ifTable_row_find_by_mib_index(ifTable_mib_index * mib_idx); @@ -444,8 +434,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/vendor/agent/mibgroup/if-mib/ifTable/ifTable_constants.h b/vendor/agent/mibgroup/if-mib/ifTable/ifTable_constants.h index 1f5d87a..5c81d0a 100644 --- a/vendor/agent/mibgroup/if-mib/ifTable/ifTable_constants.h +++ b/vendor/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/vendor/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c b/vendor/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c index 8f7adc8..459585e 100644 --- a/vendor/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c +++ b/vendor/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c @@ -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,8 +602,8 @@ 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 - * some other existing data, or peforming calculations to derive the data), + * If, however, the accessing the data involves more work (e.g. parsing + * some other existing data, or performing 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 * ifTable_row_prep() for populating data. @@ -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/vendor/agent/mibgroup/if-mib/ifTable/ifTable_data_access.h b/vendor/agent/mibgroup/if-mib/ifTable/ifTable_data_access.h index 445929b..2659361 100644 --- a/vendor/agent/mibgroup/if-mib/ifTable/ifTable_data_access.h +++ b/vendor/agent/mibgroup/if-mib/ifTable/ifTable_data_access.h @@ -59,18 +59,6 @@ extern "C" { int ifTable_container_load(netsnmp_container *container); void ifTable_container_free(netsnmp_container *container); - void ifTable_container_shutdown(netsnmp_container - *container_ptr); - - int ifTable_container_load(netsnmp_container *container); - void ifTable_container_free(netsnmp_container *container); - - void ifTable_container_shutdown(netsnmp_container - *container_ptr); - - int ifTable_container_load(netsnmp_container *container); - void ifTable_container_free(netsnmp_container *container); - int ifTable_cache_load(netsnmp_container *container); void ifTable_cache_free(netsnmp_container *container); diff --git a/vendor/agent/mibgroup/if-mib/ifTable/ifTable_interface.c b/vendor/agent/mibgroup/if-mib/ifTable/ifTable_interface.c index fcbfa92..7bf9d94 100644 --- a/vendor/agent/mibgroup/if-mib/ifTable/ifTable_interface.c +++ b/vendor/agent/mibgroup/if-mib/ifTable/ifTable_interface.c @@ -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) && @@ -1665,7 +1626,7 @@ _mfd_ifTable_commit(netsnmp_mib_handler *handler, if (rowreq_ctx->rowreq_flags & MFD_ROW_DIRTY) { /* - * if we successfully commited this row, set the dirty flag. Use the + * if we successfully committed this row, set the dirty flag. Use the * current value + 1 (i.e. dirty = # rows changed). * this is checked in post_request... */ @@ -1674,7 +1635,7 @@ _mfd_ifTable_commit(netsnmp_mib_handler *handler, if (rowreq_ctx->rowreq_flags & MFD_ROW_DIRTY) { /* - * if we successfully commited this row, set the dirty flag. Use the + * if we successfully committed this row, set the dirty flag. Use the * current value + 1 (i.e. dirty = # rows changed). * this is checked in post_request... */ @@ -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/vendor/agent/mibgroup/if-mib/ifTable/ifTable_interface.h b/vendor/agent/mibgroup/if-mib/ifTable/ifTable_interface.h index be2028a..516aba7 100644 --- a/vendor/agent/mibgroup/if-mib/ifTable/ifTable_interface.h +++ b/vendor/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/vendor/agent/mibgroup/if-mib/ifXTable.h b/vendor/agent/mibgroup/if-mib/ifXTable.h index 5e99c0a..4493f88 100644 --- a/vendor/agent/mibgroup/if-mib/ifXTable.h +++ b/vendor/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/vendor/agent/mibgroup/if-mib/ifXTable/ifXTable.c b/vendor/agent/mibgroup/if-mib/ifXTable/ifXTable.c index 3cd1f5f..eb48aa5 100644 --- a/vendor/agent/mibgroup/if-mib/ifXTable/ifXTable.c +++ b/vendor/agent/mibgroup/if-mib/ifXTable/ifXTable.c @@ -1862,7 +1862,7 @@ ifXTable_commit(ifXTable_rowreq_ctx * rowreq_ctx) } /* - * if we successfully commited this row, set the dirty flag. + * if we successfully committed this row, set the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags |= MFD_ROW_DIRTY; @@ -1912,7 +1912,7 @@ ifXTable_undo_commit(ifXTable_rowreq_ctx * rowreq_ctx) /* - * if we successfully un-commited this row, clear the dirty flag. + * if we successfully un-committed this row, clear the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags &= ~MFD_ROW_DIRTY; diff --git a/vendor/agent/mibgroup/if-mib/ifXTable/ifXTable.h b/vendor/agent/mibgroup/if-mib/ifXTable/ifXTable.h index 925af13..9c9d086 100644 --- a/vendor/agent/mibgroup/if-mib/ifXTable/ifXTable.h +++ b/vendor/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* */ /* @@ -223,7 +223,6 @@ config_require(if-mib/ifXTable/ifXTable_data_access) int ifXTable_undo_cleanup(ifXTable_rowreq_ctx * rowreq_ctx); int ifXTable_undo(ifXTable_rowreq_ctx * rowreq_ctx); - int ifXTable_commit(ifXTable_rowreq_ctx * rowreq_ctx); int ifXTable_undo_commit(ifXTable_rowreq_ctx * rowreq_ctx); @@ -435,9 +434,6 @@ config_require(if-mib/ifXTable/ifXTable_data_access) ifCounterDiscontinuityTime_val); int ifCounterDiscontinuityTime_undo(ifXTable_rowreq_ctx * rowreq_ctx); - - - int ifXTable_check_dependencies(ifXTable_rowreq_ctx * ctx); #endif /* !NETSNMP_NO_WRITE_SUPPORT */ /* diff --git a/vendor/agent/mibgroup/if-mib/ifXTable/ifXTable_interface.c b/vendor/agent/mibgroup/if-mib/ifXTable/ifXTable_interface.c index 753054e..f2a2efd 100644 --- a/vendor/agent/mibgroup/if-mib/ifXTable/ifXTable_interface.c +++ b/vendor/agent/mibgroup/if-mib/ifXTable/ifXTable_interface.c @@ -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) { @@ -1545,7 +1543,7 @@ _mfd_ifXTable_commit(netsnmp_mib_handler *handler, if (rowreq_ctx->rowreq_flags & MFD_ROW_DIRTY) { /* - * if we successfully commited this row, set the dirty flag. Use the + * if we successfully committed this row, set the dirty flag. Use the * current value + 1 (i.e. dirty = # rows changed). * this is checked in post_request... */ diff --git a/vendor/agent/mibgroup/ip-forward-mib.h b/vendor/agent/mibgroup/ip-forward-mib.h index 969ba17..d698277 100644 --- a/vendor/agent/mibgroup/ip-forward-mib.h +++ b/vendor/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/vendor/agent/mibgroup/ip-forward-mib/data_access/route.h b/vendor/agent/mibgroup/ip-forward-mib/data_access/route.h index 632b396..2ff65d7 100644 --- a/vendor/agent/mibgroup/ip-forward-mib/data_access/route.h +++ b/vendor/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) +config_require(ip-forward-mib/data_access/route_sysctl); #elif defined(solaris2) -config_require(ip-forward-mib/data_access/route_solaris) +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/vendor/agent/mibgroup/ip-forward-mib/data_access/route_common.c b/vendor/agent/mibgroup/ip-forward-mib/data_access/route_common.c index a5b957c..67d7c7d 100644 --- a/vendor/agent/mibgroup/ip-forward-mib/data_access/route_common.c +++ b/vendor/agent/mibgroup/ip-forward-mib/data_access/route_common.c @@ -16,7 +16,7 @@ /* * local static prototypes */ -static void _access_route_entry_release(netsnmp_route_entry * entry, void *unused); +static void _access_route_entry_release(void *entry, void *unused); /**---------------------------------------------------------------------*/ /* @@ -67,9 +67,7 @@ netsnmp_access_route_container_free(netsnmp_container *container, u_int free_fla /* * free all items. */ - CONTAINER_CLEAR(container, - (netsnmp_container_obj_func*)_access_route_entry_release, - NULL); + CONTAINER_CLEAR(container, _access_route_entry_release, NULL); } else { /* @@ -268,7 +266,7 @@ netsnmp_access_route_entry_copy(netsnmp_route_entry *lhs, /** */ void -_access_route_entry_release(netsnmp_route_entry * entry, void *context) +_access_route_entry_release(void *entry, void *context) { netsnmp_access_route_entry_free(entry); } diff --git a/vendor/agent/mibgroup/ip-forward-mib/data_access/route_ioctl.c b/vendor/agent/mibgroup/ip-forward-mib/data_access/route_ioctl.c index 367f2d4..eeeecb9 100644 --- a/vendor/agent/mibgroup/ip-forward-mib/data_access/route_ioctl.c +++ b/vendor/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 @@ -114,6 +114,7 @@ int _netsnmp_ioctl_route_set_v4(netsnmp_route_entry * entry) 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); diff --git a/vendor/agent/mibgroup/ip-forward-mib/data_access/route_linux.c b/vendor/agent/mibgroup/ip-forward-mib/data_access/route_linux.c index 956e127..c6d5bfc 100644 --- a/vendor/agent/mibgroup/ip-forward-mib/data_access/route_linux.c +++ b/vendor/agent/mibgroup/ip-forward-mib/data_access/route_linux.c @@ -97,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; } /* @@ -114,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 @@ -186,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; } } @@ -251,6 +252,7 @@ _load_ipv6(netsnmp_container* container, u_long *index ) snmp_log(LOG_ERR, "/proc/net/ipv6_route data format error (%d!=8), " "line ==|%s|", rc, line); + free(entry); continue; } diff --git a/vendor/agent/mibgroup/ip-forward-mib/data_access/route_solaris.c b/vendor/agent/mibgroup/ip-forward-mib/data_access/route_solaris.c index 82612ed..d72830c 100644 --- a/vendor/agent/mibgroup/ip-forward-mib/data_access/route_solaris.c +++ b/vendor/agent/mibgroup/ip-forward-mib/data_access/route_solaris.c @@ -20,8 +20,8 @@ #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 @@ -34,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", @@ -45,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)) @@ -55,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 @@ -148,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; @@ -197,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; @@ -253,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/vendor/agent/mibgroup/ip-forward-mib/inetCidrRouteTable.h b/vendor/agent/mibgroup/ip-forward-mib/inetCidrRouteTable.h index 542d516..e20a269 100644 --- a/vendor/agent/mibgroup/ip-forward-mib/inetCidrRouteTable.h +++ b/vendor/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/vendor/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.c b/vendor/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.c index 9474fba..787e463 100644 --- a/vendor/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.c +++ b/vendor/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.c @@ -1499,7 +1499,7 @@ inetCidrRouteTable_commit(inetCidrRouteTable_rowreq_ctx * rowreq_ctx) } /* - * if we successfully commited this row, set the dirty flag. + * if we successfully committed this row, set the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags |= MFD_ROW_DIRTY; @@ -1565,7 +1565,7 @@ inetCidrRouteTable_undo_commit(inetCidrRouteTable_rowreq_ctx * rowreq_ctx) } /* - * if we successfully un-commited this row, clear the dirty flag. + * if we successfully un-committed this row, clear the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags &= ~MFD_ROW_DIRTY; diff --git a/vendor/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.h b/vendor/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.h index b8132e1..d5220f6 100644 --- a/vendor/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.h +++ b/vendor/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* */ /* @@ -205,14 +205,6 @@ config_require(ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_data_access) inetCidrRouteTable_data *inetCidrRouteTable_allocate_data(void); void inetCidrRouteTable_release_data(inetCidrRouteTable_data * data); - - int - inetCidrRouteTable_check_dependencies(inetCidrRouteTable_rowreq_ctx - * rowreq_ctx); - int inetCidrRouteTable_commit(inetCidrRouteTable_rowreq_ctx - * rowreq_ctx); - - inetCidrRouteTable_rowreq_ctx * inetCidrRouteTable_row_find_by_mib_index (inetCidrRouteTable_mib_index * mib_idx); diff --git a/vendor/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_data_access.c b/vendor/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_data_access.c index 770c302..0646c29 100644 --- a/vendor/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_data_access.c +++ b/vendor/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_data_access.c @@ -136,9 +136,10 @@ inetCidrRouteTable_container_init(netsnmp_container **container_ptr_ptr, * check entry for update */ static void -_snarf_route_entry(netsnmp_route_entry *route_entry, - netsnmp_container *container) +_snarf_route_entry(void *p, void *q) { + netsnmp_route_entry *route_entry = p; + netsnmp_container *container = q; inetCidrRouteTable_rowreq_ctx *rowreq_ctx; netsnmp_assert(NULL != route_entry); @@ -232,8 +233,8 @@ 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 - * some other existing data, or peforming calculations to derive the data), + * If, however, the accessing the data involves more work (e.g. parsing + * some other existing data, or performing 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 * inetCidrRouteTable_row_prep() for populating data. @@ -272,9 +273,7 @@ inetCidrRouteTable_container_load(netsnmp_container *container) /* * we just got a fresh copy of route data. snarf data */ - CONTAINER_FOR_EACH(route_container, - (netsnmp_container_obj_func *) _snarf_route_entry, - container); + CONTAINER_FOR_EACH(route_container, _snarf_route_entry, container); /* * free the container. we've either claimed each ifentry, or released it, diff --git a/vendor/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface.c b/vendor/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface.c index cf8a2d1..b242f3b 100644 --- a/vendor/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface.c +++ b/vendor/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface.c @@ -1176,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) && @@ -1238,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) @@ -1256,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) @@ -1311,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) @@ -2089,7 +2083,7 @@ _mfd_inetCidrRouteTable_commit(netsnmp_mib_handler *handler, if (rowreq_ctx->rowreq_flags & MFD_ROW_DIRTY) { /* - * if we successfully commited this row, set the dirty flag. Use the + * if we successfully committed this row, set the dirty flag. Use the * current value + 1 (i.e. dirty = # rows changed). * this is checked in post_request... */ @@ -2272,8 +2266,7 @@ _cache_free(netsnmp_cache * cache, void *magic) * @internal */ static void -_container_item_free(inetCidrRouteTable_rowreq_ctx * rowreq_ctx, - void *context) +_container_item_free(void *rowreq_ctx, void *context) { DEBUGMSGTL(("internal:inetCidrRouteTable:_container_item_free", "called\n")); @@ -2307,9 +2300,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 */ /** diff --git a/vendor/agent/mibgroup/ip-forward-mib/ipCidrRouteTable.h b/vendor/agent/mibgroup/ip-forward-mib/ipCidrRouteTable.h index 0214caf..1a07665 100644 --- a/vendor/agent/mibgroup/ip-forward-mib/ipCidrRouteTable.h +++ b/vendor/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/vendor/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.c b/vendor/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.c index 0ff00c1..b9a935b 100644 --- a/vendor/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.c +++ b/vendor/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.c @@ -1534,7 +1534,7 @@ ipCidrRouteTable_commit(ipCidrRouteTable_rowreq_ctx * rowreq_ctx) } /* - * if we successfully commited this row, set the dirty flag. + * if we successfully committed this row, set the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags |= MFD_ROW_DIRTY; @@ -1585,7 +1585,7 @@ ipCidrRouteTable_undo_commit(ipCidrRouteTable_rowreq_ctx * rowreq_ctx) /* - * if we successfully un-commited this row, clear the dirty flag. + * if we successfully un-committed this row, clear the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags &= ~MFD_ROW_DIRTY; diff --git a/vendor/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h b/vendor/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h index 2ce30be..8e84034 100644 --- a/vendor/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h +++ b/vendor/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* */ /* @@ -188,8 +188,6 @@ config_require(ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access) void ipCidrRouteTable_release_data(ipCidrRouteTable_data * data); - int ipCidrRouteTable_commit(ipCidrRouteTable_rowreq_ctx * - rowreq_ctx); ipCidrRouteTable_rowreq_ctx * ipCidrRouteTable_row_find_by_mib_index(ipCidrRouteTable_mib_index * mib_idx); diff --git a/vendor/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access.c b/vendor/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access.c index bb27675..78c7ea6 100644 --- a/vendor/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access.c +++ b/vendor/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access.c @@ -139,9 +139,10 @@ ipCidrRouteTable_container_init(netsnmp_container **container_ptr_ptr, * */ static void -_snarf_route_entry(netsnmp_route_entry *route_entry, - netsnmp_container *container) +_snarf_route_entry(void *p, void *q) { + netsnmp_route_entry *route_entry = p; + netsnmp_container *container = q; ipCidrRouteTable_rowreq_ctx *rowreq_ctx; DEBUGTRACE; @@ -222,8 +223,8 @@ 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 - * some other existing data, or peforming calculations to derive the data), + * If, however, the accessing the data involves more work (e.g. parsing + * some other existing data, or performing 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 * ipCidrRouteTable_row_prep() for populating data. @@ -258,9 +259,7 @@ ipCidrRouteTable_container_load(netsnmp_container *container) /* * we just got a fresh copy of route data. snarf data */ - CONTAINER_FOR_EACH(route_container, - (netsnmp_container_obj_func *) _snarf_route_entry, - container); + CONTAINER_FOR_EACH(route_container, _snarf_route_entry, container); /* * free the container. we've either claimed each ifentry, or released it, diff --git a/vendor/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_interface.c b/vendor/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_interface.c index d38a723..4936ca3 100644 --- a/vendor/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_interface.c +++ b/vendor/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_interface.c @@ -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) && @@ -1924,7 +1924,7 @@ _mfd_ipCidrRouteTable_commit(netsnmp_mib_handler *handler, if (rowreq_ctx->rowreq_flags & MFD_ROW_DIRTY) { /* - * if we successfully commited this row, set the dirty flag. Use the + * if we successfully committed this row, set the dirty flag. Use the * current value + 1 (i.e. dirty = # rows changed). * this is checked in post_request... */ @@ -2222,8 +2222,7 @@ _cache_free(netsnmp_cache * cache, void *magic) * @internal */ static void -_container_item_free(ipCidrRouteTable_rowreq_ctx * rowreq_ctx, - void *context) +_container_item_free(void *rowreq_ctx, void *context) { DEBUGMSGTL(("internal:ipCidrRouteTable:_container_item_free", "called\n")); @@ -2256,9 +2255,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 */ /** diff --git a/vendor/agent/mibgroup/ip-mib.h b/vendor/agent/mibgroup/ip-mib.h index 4e8317f..4c52d01 100644 --- a/vendor/agent/mibgroup/ip-mib.h +++ b/vendor/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/vendor/agent/mibgroup/ip-mib/data_access/arp.h b/vendor/agent/mibgroup/ip-mib/data_access/arp.h index 648cb28..5dfc627 100644 --- a/vendor/agent/mibgroup/ip-mib/data_access/arp.h +++ b/vendor/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/vendor/agent/mibgroup/ip-mib/data_access/arp_netlink.c b/vendor/agent/mibgroup/ip-mib/data_access/arp_netlink.c index 09c13f0..8cab2ef 100644 --- a/vendor/agent/mibgroup/ip-mib/data_access/arp_netlink.c +++ b/vendor/agent/mibgroup/ip-mib/data_access/arp_netlink.c @@ -12,7 +12,7 @@ #include #include #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include diff --git a/vendor/agent/mibgroup/ip-mib/data_access/defaultrouter.h b/vendor/agent/mibgroup/ip-mib/data_access/defaultrouter.h index 53584d9..4fd068b 100644 --- a/vendor/agent/mibgroup/ip-mib/data_access/defaultrouter.h +++ b/vendor/agent/mibgroup/ip-mib/data_access/defaultrouter.h @@ -17,16 +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) +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/vendor/agent/mibgroup/ip-mib/data_access/defaultrouter_common.c b/vendor/agent/mibgroup/ip-mib/data_access/defaultrouter_common.c index a65f98c..7d56162 100644 --- a/vendor/agent/mibgroup/ip-mib/data_access/defaultrouter_common.c +++ b/vendor/agent/mibgroup/ip-mib/data_access/defaultrouter_common.c @@ -19,8 +19,7 @@ */ static int _access_defaultrouter_entry_compare_addr(const void *lhs, const void *rhs); -static void _access_defaultrouter_entry_release(netsnmp_defaultrouter_entry * entry, - void *unused); +static void _access_defaultrouter_entry_release(void *entry, void *unused); /**---------------------------------------------------------------------*/ /* @@ -117,9 +116,7 @@ netsnmp_access_defaultrouter_container_free(netsnmp_container *container, /* * free all items. */ - CONTAINER_CLEAR(container, - (netsnmp_container_obj_func*)_access_defaultrouter_entry_release, - NULL); + CONTAINER_CLEAR(container, _access_defaultrouter_entry_release, NULL); } if(! (free_flags & NETSNMP_ACCESS_DEFAULTROUTER_FREE_KEEP_CONTAINER)) @@ -250,7 +247,7 @@ netsnmp_access_defaultrouter_entry_copy(netsnmp_defaultrouter_entry *lhs, /** */ void -_access_defaultrouter_entry_release(netsnmp_defaultrouter_entry * entry, void *context) +_access_defaultrouter_entry_release(void *entry, void *context) { netsnmp_access_defaultrouter_entry_free(entry); } diff --git a/vendor/agent/mibgroup/ip-mib/data_access/defaultrouter_linux.c b/vendor/agent/mibgroup/ip-mib/data_access/defaultrouter_linux.c index abe5ba8..6fe4bb6 100644 --- a/vendor/agent/mibgroup/ip-mib/data_access/defaultrouter_linux.c +++ b/vendor/agent/mibgroup/ip-mib/data_access/defaultrouter_linux.c @@ -83,7 +83,7 @@ netsnmp_arch_defaultrouter_container_load(netsnmp_container *container, static int _load(netsnmp_container *container) { -#ifndef HAVE_LINUX_RTNETLINK_H +#ifndef HAVE_LIBNL3 DEBUGMSGTL(("access:defaultrouter", "cannot get default router information" "as netlink socket is not available\n")); @@ -109,7 +109,6 @@ _load(netsnmp_container *container) struct rtmsg *rthdr; int count; int end_of_message = 0; - long hz = sysconf(_SC_CLK_TCK); netsnmp_assert(NULL != container); @@ -163,7 +162,6 @@ _load(netsnmp_container *container) struct nlmsghdr *nlmhp; struct rtmsg *rtmp; struct rtattr *rtap; - struct rta_cacheinfo *rtci; socklen_t sock_len; int rtcount; @@ -257,11 +255,14 @@ _load(netsnmp_container *container) #ifdef NETSNMP_ENABLE_IPV6 case RTA_CACHEINFO: - rtci = RTA_DATA(rtap); + { + struct rta_cacheinfo *rtci = RTA_DATA(rtap); + long hz = sysconf(_SC_CLK_TCK); if ((rtmp->rtm_flags & RTM_F_CLONED) || (rtci && rtci->rta_expires)) { lifetime = rtci->rta_expires / hz; } + } break; #endif diff --git a/vendor/agent/mibgroup/ip-mib/data_access/defaultrouter_solaris2.c b/vendor/agent/mibgroup/ip-mib/data_access/defaultrouter_solaris2.c index 38c3725..3700383 100644 --- a/vendor/agent/mibgroup/ip-mib/data_access/defaultrouter_solaris2.c +++ b/vendor/agent/mibgroup/ip-mib/data_access/defaultrouter_solaris2.c @@ -9,6 +9,7 @@ #include #include +#include #include "ip-mib/ipDefaultRouterTable/ipDefaultRouterTable.h" #include "defaultrouter_private.h" @@ -137,6 +138,5 @@ _load_defaultrouter_from_mib2(netsnmp_container *container, int family) } } -out: return 0; } diff --git a/vendor/agent/mibgroup/ip-mib/data_access/defaultrouter_sysctl.c b/vendor/agent/mibgroup/ip-mib/data_access/defaultrouter_sysctl.c index c5e6210..824ed50 100644 --- a/vendor/agent/mibgroup/ip-mib/data_access/defaultrouter_sysctl.c +++ b/vendor/agent/mibgroup/ip-mib/data_access/defaultrouter_sysctl.c @@ -163,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/vendor/agent/mibgroup/ip-mib/data_access/ipaddress.h b/vendor/agent/mibgroup/ip-mib/data_access/ipaddress.h index 029ae96..c3cfc6c 100644 --- a/vendor/agent/mibgroup/ip-mib/data_access/ipaddress.h +++ b/vendor/agent/mibgroup/ip-mib/data_access/ipaddress.h @@ -17,15 +17,14 @@ * 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/vendor/agent/mibgroup/ip-mib/data_access/ipaddress_common.c b/vendor/agent/mibgroup/ip-mib/data_access/ipaddress_common.c index 9c5996d..675d4ea 100644 --- a/vendor/agent/mibgroup/ip-mib/data_access/ipaddress_common.c +++ b/vendor/agent/mibgroup/ip-mib/data_access/ipaddress_common.c @@ -33,8 +33,7 @@ netsnmp_feature_require(ipaddress_arch_entry_copy); */ static int _access_ipaddress_entry_compare_addr(const void *lhs, const void *rhs); -static void _access_ipaddress_entry_release(netsnmp_ipaddress_entry * entry, - void *unused); +static void _access_ipaddress_entry_release(void *entry, void *unused); /**---------------------------------------------------------------------*/ /* @@ -183,9 +182,7 @@ netsnmp_access_ipaddress_container_free(netsnmp_container *container, u_int free /* * free all items. */ - CONTAINER_CLEAR(container, - (netsnmp_container_obj_func*)_access_ipaddress_entry_release, - NULL); + CONTAINER_CLEAR(container, _access_ipaddress_entry_release, NULL); } if(! (free_flags & NETSNMP_ACCESS_IPADDRESS_FREE_KEEP_CONTAINER)) @@ -526,7 +523,7 @@ netsnmp_ipaddress_ipv6_prefix_len(struct in6_addr mask) /** */ void -_access_ipaddress_entry_release(netsnmp_ipaddress_entry * entry, void *context) +_access_ipaddress_entry_release(void *entry, void *context) { netsnmp_access_ipaddress_entry_free(entry); } diff --git a/vendor/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c b/vendor/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c index 01bde91..485ce38 100644 --- a/vendor/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c +++ b/vendor/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c @@ -244,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(); @@ -499,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)); diff --git a/vendor/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c b/vendor/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c index 04dfd8c..232202d 100644 --- a/vendor/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c +++ b/vendor/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c @@ -19,6 +19,7 @@ #include #include +#include netsnmp_feature_require(prefix_info); netsnmp_feature_require(find_prefix_info); @@ -29,7 +30,6 @@ netsnmp_feature_child_of(ipaddress_arch_entry_copy, ipaddress_common); 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) @@ -39,7 +39,6 @@ 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" @@ -51,7 +50,7 @@ int _load_v6(netsnmp_container *container, int idx_offset); int netsnmp_access_ipaddress_extra_prefix_info(int index, u_long *preferedlt, - ulong *validlt, + u_long *validlt, char *addr); #endif @@ -219,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 */ @@ -234,7 +233,18 @@ _load_v6(netsnmp_container *container, int idx_offset) #define PROCFILE "/proc/net/if_inet6" if (!(in = fopen(PROCFILE, "r"))) { - NETSNMP_LOGONCE((LOG_ERR, "ipaddress_linux: could not open " PROCFILE)); + /* + * 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; } @@ -418,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) { @@ -507,13 +519,11 @@ netsnmp_access_other_info_get(int index, int family) 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) + u_long *validlt, char *addr) { struct { @@ -609,6 +619,5 @@ netsnmp_access_ipaddress_extra_prefix_info(int index, u_long *preferedlt, close(sd); return ret; } -#endif -#endif - +#endif /* HAVE_LINUX_RTNETLINK_H */ +#endif /* defined(NETSNMP_ENABLE_IPV6) */ diff --git a/vendor/agent/mibgroup/ip-mib/data_access/ipaddress_linux.h b/vendor/agent/mibgroup/ip-mib/data_access/ipaddress_linux.h index 600ceaf..5c2e91c 100644 --- a/vendor/agent/mibgroup/ip-mib/data_access/ipaddress_linux.h +++ b/vendor/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/vendor/agent/mibgroup/ip-mib/data_access/ipaddress_private.h b/vendor/agent/mibgroup/ip-mib/data_access/ipaddress_private.h index 61107c7..b227ee5 100644 --- a/vendor/agent/mibgroup/ip-mib/data_access/ipaddress_private.h +++ b/vendor/agent/mibgroup/ip-mib/data_access/ipaddress_private.h @@ -6,5 +6,3 @@ 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/vendor/agent/mibgroup/ip-mib/data_access/ipaddress_sysctl.c b/vendor/agent/mibgroup/ip-mib/data_access/ipaddress_sysctl.c index ace58d6..b7af242 100644 --- a/vendor/agent/mibgroup/ip-mib/data_access/ipaddress_sysctl.c +++ b/vendor/agent/mibgroup/ip-mib/data_access/ipaddress_sysctl.c @@ -158,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", @@ -195,9 +194,10 @@ netsnmp_arch_ipaddress_container_load(netsnmp_container *container, /* pass 2: walk addresses */ for (cp = if_list; cp < if_list + if_list_size; cp += ifa->ifam_msglen) { - ifa = (struct ifa_msghdr *) cp; int rtax; + ifa = (struct ifa_msghdr *) cp; + if (ifa->ifam_type != RTM_NEWADDR) continue; @@ -206,10 +206,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/vendor/agent/mibgroup/ip-mib/data_access/ipv6scopezone.h b/vendor/agent/mibgroup/ip-mib/data_access/ipv6scopezone.h index 8d81b3f..6100aee 100644 --- a/vendor/agent/mibgroup/ip-mib/data_access/ipv6scopezone.h +++ b/vendor/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/vendor/agent/mibgroup/ip-mib/data_access/ipv6scopezone_common.c b/vendor/agent/mibgroup/ip-mib/data_access/ipv6scopezone_common.c index ec9bf97..228b8ba 100644 --- a/vendor/agent/mibgroup/ip-mib/data_access/ipv6scopezone_common.c +++ b/vendor/agent/mibgroup/ip-mib/data_access/ipv6scopezone_common.c @@ -13,7 +13,7 @@ /* * local static prototypes */ -static void _entry_release(netsnmp_v6scopezone_entry * entry, void *unused); +static void _entry_release(void *entry, void *unused); /** @@ -86,9 +86,7 @@ netsnmp_access_scopezone_container_free(netsnmp_container *container, u_int free /* * free all items. */ - CONTAINER_CLEAR(container, - (netsnmp_container_obj_func*)_entry_release, - NULL); + CONTAINER_CLEAR(container, _entry_release, NULL); } CONTAINER_FREE(container); @@ -137,7 +135,7 @@ netsnmp_access_scopezone_entry_free(netsnmp_v6scopezone_entry * entry) * \internal */ static void -_entry_release(netsnmp_v6scopezone_entry * entry, void *context) +_entry_release(void *entry, void *context) { netsnmp_access_scopezone_entry_free(entry); } diff --git a/vendor/agent/mibgroup/ip-mib/data_access/ipv6scopezone_linux.c b/vendor/agent/mibgroup/ip-mib/data_access/ipv6scopezone_linux.c index bfe5ce7..9b61b69 100644 --- a/vendor/agent/mibgroup/ip-mib/data_access/ipv6scopezone_linux.c +++ b/vendor/agent/mibgroup/ip-mib/data_access/ipv6scopezone_linux.c @@ -97,6 +97,11 @@ _scopezone_v6(netsnmp_container* container, int idx_offset) "addr %s, index %d, pfx %d, scope %d, flags 0x%X\n", addr, if_index, pfx_len, scope, flags)); + if (if_index < 0) { + DEBUGMSGTL(("access:scopezone:container", + "Invalid interface index %d\n", if_index)); + continue; + } if (! (scope & IPV6_ADDR_LINKLOCAL)) { DEBUGMSGTL(("access:scopezone:container", "The address is not link-local, skipping\n")); diff --git a/vendor/agent/mibgroup/ip-mib/data_access/scalars_common.h b/vendor/agent/mibgroup/ip-mib/data_access/scalars_common.h index ebea21d..e748de3 100644 --- a/vendor/agent/mibgroup/ip-mib/data_access/scalars_common.h +++ b/vendor/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/vendor/agent/mibgroup/ip-mib/data_access/scalars_sysctl.c b/vendor/agent/mibgroup/ip-mib/data_access/scalars_sysctl.c index 569c743..11dfdba 100644 --- a/vendor/agent/mibgroup/ip-mib/data_access/scalars_sysctl.c +++ b/vendor/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/vendor/agent/mibgroup/ip-mib/data_access/systemstats.h b/vendor/agent/mibgroup/ip-mib/data_access/systemstats.h index 514807a..ef5b838 100644 --- a/vendor/agent/mibgroup/ip-mib/data_access/systemstats.h +++ b/vendor/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/vendor/agent/mibgroup/ip-mib/data_access/systemstats_common.c b/vendor/agent/mibgroup/ip-mib/data_access/systemstats_common.c index 7cb15b5..b05cc4e 100644 --- a/vendor/agent/mibgroup/ip-mib/data_access/systemstats_common.c +++ b/vendor/agent/mibgroup/ip-mib/data_access/systemstats_common.c @@ -22,7 +22,7 @@ static int need_wrap_check = -1; /* * local static prototypes */ -static void _entry_release(netsnmp_systemstats_entry * entry, void *unused); +static void _entry_release(void *entry, void *unused); /**---------------------------------------------------------------------*/ /* @@ -119,9 +119,7 @@ netsnmp_access_systemstats_container_free(netsnmp_container *container, u_int fr /* * free all items. */ - CONTAINER_CLEAR(container, - (netsnmp_container_obj_func*)_entry_release, - NULL); + CONTAINER_CLEAR(container, _entry_release, NULL); } CONTAINER_FREE(container); @@ -205,7 +203,7 @@ netsnmp_access_systemstats_entry_free(netsnmp_systemstats_entry * entry) * \internal */ static void -_entry_release(netsnmp_systemstats_entry * entry, void *context) +_entry_release(void *entry, void *context) { netsnmp_access_systemstats_entry_free(entry); } diff --git a/vendor/agent/mibgroup/ip-mib/data_access/systemstats_linux.c b/vendor/agent/mibgroup/ip-mib/data_access/systemstats_linux.c index 1c9232f..3995b80 100644 --- a/vendor/agent/mibgroup/ip-mib/data_access/systemstats_linux.c +++ b/vendor/agent/mibgroup/ip-mib/data_access/systemstats_linux.c @@ -36,7 +36,7 @@ netsnmp_access_systemstats_arch_init(void) } /* - /proc/net/snmp + /proc/net/snmp - Linux 6.6 and lower Ip: Forwarding DefaultTTL InReceives InHdrErrors InAddrErrors ForwDatagrams InUnknownProtos InDiscards InDelivers OutRequests OutDiscards OutNoRoutes ReasmTimeout ReasmReqds ReasmOKs ReasmFails FragOKs FragFails FragCreates Ip: 2 64 7083534 0 0 0 0 0 6860233 6548963 0 0 1 286623 63322 1 259920 0 0 @@ -49,6 +49,26 @@ netsnmp_access_systemstats_arch_init(void) Udp: InDatagrams NoPorts InErrors OutDatagrams Udp: 1491094 122 0 1466178 +* + /proc/net/snmp - Linux 6.7 and higher + + Ip: Forwarding DefaultTTL InReceives InHdrErrors InAddrErrors ForwDatagrams InUnknownProtos InDiscards InDelivers OutRequests OutDiscards OutNoRoutes ReasmTimeout ReasmReqds ReasmOKs ReasmFails FragOKs FragFails FragCreates OutTransmits + Ip: 1 64 50859058 496 0 37470604 0 0 20472980 7515791 1756 0 0 7264 3632 0 3548 0 7096 44961424 + + Icmp: InMsgs InErrors InCsumErrors InDestUnreachs InTimeExcds InParmProbs InSrcQuenchs InRedirects InEchos InEchoReps InTimestamps InTimestampReps InAddrMasks InAddrMaskReps OutMsgs OutErrors OutRateLimitGlobal OutRateLimitHost OutDestUnreachs OutTimeExcds OutParmProbs OutSrcQuenchs OutRedirects OutEchos OutEchoReps OutTimestamps OutTimestampReps OutAddrMasks OutAddrMaskReps + Icmp: 114447 2655 0 17589 0 0 0 0 66905 29953 0 0 0 0 143956 0 0 572 16610 484 0 0 0 59957 66905 0 0 0 0 + + IcmpMsg: InType0 InType3 InType8 OutType0 OutType3 OutType8 OutType11 + IcmpMsg: 29953 17589 66905 66905 16610 59957 484 + + Tcp: RtoAlgorithm RtoMin RtoMax MaxConn ActiveOpens PassiveOpens AttemptFails EstabResets CurrEstab InSegs OutSegs RetransSegs InErrs OutRsts InCsumErrors + Tcp: 1 200 120000 -1 17744 13525 307 3783 6 18093137 9277788 3499 8 7442 0 + + Udp: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors InCsumErrors IgnoredMulti MemErrors + Udp: 2257832 1422 0 2252835 0 0 0 84 0 + + UdpLite: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors InCsumErrors IgnoredMulti MemErrors + UdpLite: 0 0 0 0 0 0 0 0 0 */ @@ -101,10 +121,10 @@ _systemstats_v4(netsnmp_container* container, u_int load_flags) FILE *devin; char line[1024]; netsnmp_systemstats_entry *entry = NULL; - int scan_count; + int scan_count, expected_scan_count; char *stats, *start = line; int len; - unsigned long long scan_vals[19]; + unsigned long long scan_vals[20]; DEBUGMSGTL(("access:systemstats:container:arch", "load v4 (flags %x)\n", load_flags)); @@ -126,10 +146,17 @@ _systemstats_v4(netsnmp_container* container, u_int load_flags) */ NETSNMP_IGNORE_RESULT(fgets(line, sizeof(line), devin)); len = strlen(line); - if (224 != len) { + switch (len) { + case 224: + expected_scan_count = 19; + break; + case 237: + expected_scan_count = 20; + break; + default: fclose(devin); snmp_log(LOG_ERR, "systemstats_linux: unexpected header length in /proc/net/snmp." - " %d != 224\n", len); + " %d not in { 224, 237 } \n", len); return -4; } @@ -143,7 +170,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 == ' ') @@ -164,8 +191,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; } @@ -180,20 +205,20 @@ _systemstats_v4(netsnmp_container* container, u_int load_flags) memset(scan_vals, 0x0, sizeof(scan_vals)); scan_count = sscanf(stats, "%llu %llu %llu %llu %llu %llu %llu %llu %llu %llu" - "%llu %llu %llu %llu %llu %llu %llu %llu %llu", + "%llu %llu %llu %llu %llu %llu %llu %llu %llu %llu", &scan_vals[0],&scan_vals[1],&scan_vals[2], &scan_vals[3],&scan_vals[4],&scan_vals[5], &scan_vals[6],&scan_vals[7],&scan_vals[8], &scan_vals[9],&scan_vals[10],&scan_vals[11], &scan_vals[12],&scan_vals[13],&scan_vals[14], &scan_vals[15],&scan_vals[16],&scan_vals[17], - &scan_vals[18]); + &scan_vals[18],&scan_vals[19]); DEBUGMSGTL(("access:systemstats", " read %d values\n", scan_count)); - if(scan_count != 19) { + if(scan_count != expected_scan_count) { snmp_log(LOG_ERR, "error scanning systemstats data (expected %d, got %d)\n", - 19, scan_count); + expected_scan_count, scan_count); netsnmp_access_systemstats_entry_free(entry); return -4; } @@ -225,6 +250,7 @@ _systemstats_v4(netsnmp_container* container, u_int load_flags) entry->stats.HCOutFragFails.high = scan_vals[17] >> 32; entry->stats.HCOutFragCreates.low = scan_vals[18] & 0xffffffff; entry->stats.HCOutFragCreates.high = scan_vals[18] >> 32; + /* entry->stats. = scan_vals[19]; / * OutTransmits */ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINRECEIVES] = 1; entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INHDRERRORS] = 1; @@ -385,7 +411,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])) diff --git a/vendor/agent/mibgroup/ip-mib/data_access/systemstats_sysctl.c b/vendor/agent/mibgroup/ip-mib/data_access/systemstats_sysctl.c index 563d638..a6ad471 100644 --- a/vendor/agent/mibgroup/ip-mib/data_access/systemstats_sysctl.c +++ b/vendor/agent/mibgroup/ip-mib/data_access/systemstats_sysctl.c @@ -13,15 +13,8 @@ #include "../ipSystemStatsTable/ipSystemStatsTable.h" #include "systemstats_private.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 +#include #include #include @@ -29,16 +22,26 @@ #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_NETINET_ICMP6_H +#ifdef HAVE_NETINET_ICMP6_H #include #endif -#if HAVE_NETINET6_IP6_VAR_H +#ifdef HAVE_NETINET6_IP6_VAR_H #include #include #endif @@ -584,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; @@ -691,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; @@ -709,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/vendor/agent/mibgroup/ip-mib/inetNetToMediaTable.h b/vendor/agent/mibgroup/ip-mib/inetNetToMediaTable.h index c2faab8..80b1c70 100644 --- a/vendor/agent/mibgroup/ip-mib/inetNetToMediaTable.h +++ b/vendor/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/vendor/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable.c b/vendor/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable.c index aaae2e3..cdcd704 100644 --- a/vendor/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable.c +++ b/vendor/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable.c @@ -1058,7 +1058,7 @@ inetNetToMediaTable_commit(inetNetToMediaTable_rowreq_ctx * rowreq_ctx) } /* - * if we successfully commited this row, set the dirty flag. + * if we successfully committed this row, set the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags |= MFD_ROW_DIRTY; @@ -1110,7 +1110,7 @@ inetNetToMediaTable_undo_commit(inetNetToMediaTable_rowreq_ctx * /* - * if we successfully un-commited this row, clear the dirty flag. + * if we successfully un-committed this row, clear the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags &= ~MFD_ROW_DIRTY; diff --git a/vendor/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable.h b/vendor/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable.h index 73afae6..56791e4 100644 --- a/vendor/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable.h +++ b/vendor/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* */ /* @@ -192,12 +192,9 @@ config_require(ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access) int inetNetToMediaTable_check_dependencies (inetNetToMediaTable_rowreq_ctx * rowreq_ctx); - int - inetNetToMediaTable_commit(inetNetToMediaTable_rowreq_ctx * - rowreq_ctx); - inetNetToMediaTable_rowreq_ctx - * inetNetToMediaTable_row_find_by_mib_index + inetNetToMediaTable_rowreq_ctx * + inetNetToMediaTable_row_find_by_mib_index (inetNetToMediaTable_mib_index * mib_idx); extern const oid inetNetToMediaTable_oid[]; @@ -396,12 +393,6 @@ config_require(ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access) inetNetToMediaRowStatus_undo(inetNetToMediaTable_rowreq_ctx * rowreq_ctx); - - int - inetNetToMediaTable_check_dependencies - (inetNetToMediaTable_rowreq_ctx * ctx); - - /* * DUMMY markers, ignore * diff --git a/vendor/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access.c b/vendor/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access.c index 723ca66..9bcf0f3 100644 --- a/vendor/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access.c +++ b/vendor/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access.c @@ -163,9 +163,11 @@ typedef struct { * Put all entries with outdated generation to deletion list. */ static void -_collect_invalid_arp_ctx(inetNetToMediaTable_rowreq_ctx *ctx, - _collect_ctx *cctx) +_collect_invalid_arp_ctx(void *p, void *q) { + inetNetToMediaTable_rowreq_ctx *ctx = p; + _collect_ctx *cctx = q; + if (ctx->data->generation != cctx->generation) CONTAINER_INSERT(cctx->to_delete, ctx); } @@ -178,9 +180,7 @@ static void _arp_hook_gc(netsnmp_arp_access *access) cctx.to_delete = netsnmp_container_find("lifo"); cctx.generation = access->generation; - CONTAINER_FOR_EACH(container, - (netsnmp_container_obj_func *) _collect_invalid_arp_ctx, - &cctx); + CONTAINER_FOR_EACH(container, _collect_invalid_arp_ctx, &cctx); while (CONTAINER_SIZE(cctx.to_delete)) { inetNetToMediaTable_rowreq_ctx *ctx = (inetNetToMediaTable_rowreq_ctx*)CONTAINER_FIRST(cctx.to_delete); @@ -309,8 +309,8 @@ 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 - * some other existing data, or peforming calculations to derive the data), + * If, however, the accessing the data involves more work (e.g. parsing + * some other existing data, or performing 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 * inetNetToMediaTable_row_prep() for populating data. diff --git a/vendor/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_interface.c b/vendor/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_interface.c index 59e2f3f..39c7b7a 100644 --- a/vendor/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_interface.c +++ b/vendor/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_interface.c @@ -1023,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) && @@ -1101,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) @@ -1175,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) { @@ -1650,7 +1646,7 @@ _mfd_inetNetToMediaTable_commit(netsnmp_mib_handler *handler, if (rowreq_ctx->rowreq_flags & MFD_ROW_DIRTY) { /* - * if we successfully commited this row, set the dirty flag. Use the + * if we successfully committed this row, set the dirty flag. Use the * current value + 1 (i.e. dirty = # rows changed). * this is checked in post_request... */ @@ -1903,9 +1899,10 @@ _cache_free(netsnmp_cache * cache, void *magic) * @internal */ static void -_container_item_free(inetNetToMediaTable_rowreq_ctx * rowreq_ctx, - void *context) +_container_item_free(void *p, void *context) { + inetNetToMediaTable_rowreq_ctx *rowreq_ctx = p; + DEBUGMSGTL(("internal:inetNetToMediaTable:_container_item_free", "called\n")); @@ -1938,9 +1935,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 */ /** diff --git a/vendor/agent/mibgroup/ip-mib/ipAddressPrefixTable.h b/vendor/agent/mibgroup/ip-mib/ipAddressPrefixTable.h index abfa100..95f2b7e 100644 --- a/vendor/agent/mibgroup/ip-mib/ipAddressPrefixTable.h +++ b/vendor/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/vendor/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable.h b/vendor/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable.h index 24b22a2..40a437e 100644 --- a/vendor/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable.h +++ b/vendor/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/vendor/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_data_access.c b/vendor/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_data_access.c index 5000de8..f6bf5f0 100644 --- a/vendor/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_data_access.c +++ b/vendor/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_data_access.c @@ -188,8 +188,8 @@ 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 - * some other existing data, or peforming calculations to derive the data), + * If, however, the accessing the data involves more work (e.g. parsing + * some other existing data, or performing 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 * ipAddressPrefixTable_row_prep() for populating data. @@ -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/vendor/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_interface.c b/vendor/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_interface.c index e7e3311..d647010 100644 --- a/vendor/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_interface.c +++ b/vendor/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_interface.c @@ -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) && @@ -937,8 +937,7 @@ _cache_free(netsnmp_cache * cache, void *magic) * @internal */ static void -_container_item_free(ipAddressPrefixTable_rowreq_ctx * rowreq_ctx, - void *context) +_container_item_free(void *rowreq_ctx, void *context) { DEBUGMSGTL(("internal:ipAddressPrefixTable:_container_item_free", "called\n")); @@ -972,9 +971,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 */ /** diff --git a/vendor/agent/mibgroup/ip-mib/ipAddressTable.h b/vendor/agent/mibgroup/ip-mib/ipAddressTable.h index 8d4d274..d14d944 100644 --- a/vendor/agent/mibgroup/ip-mib/ipAddressTable.h +++ b/vendor/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/vendor/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.c b/vendor/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.c index 4ad89b6..6ddc066 100644 --- a/vendor/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.c +++ b/vendor/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.c @@ -53,14 +53,14 @@ _init_ipAddressTable(int majorID, int minorID, void *serverargs, netsnmp_access_interface_init(); /* - * TODO:300:o: Perform ipAddressTable one-time module initialization. + * 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. */ - - /* - * here we initialize all the tables we're planning on supporting - */ - if (should_init("ipAddressTable")) + if (should_init("ipAddressTable")) { + shutdown_table_ipAddressTable(); initialize_table_ipAddressTable(); + } return 0; } @@ -1332,7 +1332,7 @@ ipAddressTable_commit(ipAddressTable_rowreq_ctx * rowreq_ctx) } /* - * if we successfully commited this row, set the dirty flag. + * if we successfully committed this row, set the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags |= MFD_ROW_DIRTY; @@ -1399,7 +1399,7 @@ ipAddressTable_undo_commit(ipAddressTable_rowreq_ctx * rowreq_ctx) } /* - * if we successfully un-commited this row, clear the dirty flag. + * if we successfully un-committed this row, clear the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags &= ~MFD_ROW_DIRTY; diff --git a/vendor/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.h b/vendor/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.h index fe8f04a..c66e432 100644 --- a/vendor/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.h +++ b/vendor/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* */ /* @@ -186,14 +186,7 @@ config_require(ip-mib/ipAddressTable/ipAddressTable_data_access) ipAddressTable_data *ipAddressTable_allocate_data(void); void ipAddressTable_release_data(ipAddressTable_data * data); - - int - ipAddressTable_check_dependencies(ipAddressTable_rowreq_ctx * - rowreq_ctx); - int ipAddressTable_commit(ipAddressTable_rowreq_ctx * - rowreq_ctx); - - ipAddressTable_rowreq_ctx + ipAddressTable_rowreq_ctx * ipAddressTable_row_find_by_mib_index(ipAddressTable_mib_index * mib_idx); diff --git a/vendor/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable_data_access.c b/vendor/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable_data_access.c index 1c56489..07fc193 100644 --- a/vendor/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable_data_access.c +++ b/vendor/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable_data_access.c @@ -80,8 +80,10 @@ ipAddressTable_init_data(ipAddressTable_registration * ipAddressTable_reg) * check entry for update */ static void -_clear_times(ipAddressTable_rowreq_ctx * rowreq_ctx, void *magic) +_clear_times(void *p, void *magic) { + ipAddressTable_rowreq_ctx *rowreq_ctx = p; + rowreq_ctx->ipAddressLastChanged = rowreq_ctx->ipAddressCreated = 0; } @@ -145,9 +147,7 @@ ipAddressTable_container_init(netsnmp_container **container_ptr_ptr, (*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, - (netsnmp_container_obj_func *) _clear_times, - NULL); + CONTAINER_FOR_EACH(*container_ptr_ptr, _clear_times, NULL); } if (NULL == cache) { @@ -195,25 +195,19 @@ 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 */ /** * check entry for update */ static void -_check_entry_for_updates(ipAddressTable_rowreq_ctx * rowreq_ctx, - void **magic) +_check_entry_for_updates(void *p, void *q) { - netsnmp_container *ipaddress_container = (netsnmp_container*)magic[0]; - netsnmp_container *to_delete = (netsnmp_container*)magic[1]; - netsnmp_container *to_ignore = (netsnmp_container*)magic[2]; + ipAddressTable_rowreq_ctx *rowreq_ctx = p; + void **magic = q; + netsnmp_container *ipaddress_container = magic[0]; + netsnmp_container *to_delete = magic[1]; + netsnmp_container *to_ignore = magic[2]; /* * check for matching entry using secondary index. @@ -262,11 +256,12 @@ _check_entry_for_updates(ipAddressTable_rowreq_ctx * rowreq_ctx, * add new entry */ static void -_add_new_entry(netsnmp_ipaddress_entry *ipaddress_entry, - void **magic) +_add_new_entry(void *p, void *q) { - netsnmp_container *container = magic[0]; - netsnmp_container *to_ignore = magic[2]; + netsnmp_ipaddress_entry *ipaddress_entry = p; + void **magic = q; + netsnmp_container *container = magic[0]; + netsnmp_container *to_ignore = magic[2]; ipAddressTable_rowreq_ctx *rowreq_ctx; @@ -337,8 +332,8 @@ _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 - * some other existing data, or peforming calculations to derive the data), + * If, however, the accessing the data involves more work (e.g. parsing + * some other existing data, or performing 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 * ipAddressTable_row_prep() for populating data. @@ -380,16 +375,13 @@ ipAddressTable_container_load(netsnmp_container *container) tmp_ptr[0] = ipaddress_container->next; 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); + CONTAINER_FOR_EACH(container, _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, - tmp_ptr); + CONTAINER_FOR_EACH(ipaddress_container, _add_new_entry, tmp_ptr); /* * free the container. we've either claimed each entry, or released it, diff --git a/vendor/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable_interface.c b/vendor/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable_interface.c index 4366795..e65674b 100644 --- a/vendor/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable_interface.c +++ b/vendor/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable_interface.c @@ -1010,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) && @@ -1065,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) @@ -1710,7 +1707,7 @@ _mfd_ipAddressTable_commit(netsnmp_mib_handler *handler, if (rowreq_ctx->rowreq_flags & MFD_ROW_DIRTY) { /* - * if we successfully commited this row, set the dirty flag. Use the + * if we successfully committed this row, set the dirty flag. Use the * current value + 1 (i.e. dirty = # rows changed). * this is checked in post_request... */ @@ -1972,7 +1969,7 @@ _cache_free(netsnmp_cache * cache, void *magic) * @internal */ static void -_container_item_free(ipAddressTable_rowreq_ctx * rowreq_ctx, void *context) +_container_item_free(void *rowreq_ctx, void *context) { DEBUGMSGTL(("internal:ipAddressTable:_container_item_free", "called\n")); @@ -1991,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 @@ -2005,9 +1999,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 */ /** diff --git a/vendor/agent/mibgroup/ip-mib/ipDefaultRouterTable.h b/vendor/agent/mibgroup/ip-mib/ipDefaultRouterTable.h index 28ed84b..5325062 100644 --- a/vendor/agent/mibgroup/ip-mib/ipDefaultRouterTable.h +++ b/vendor/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/vendor/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable.h b/vendor/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable.h index f2ef29a..67bcce3 100644 --- a/vendor/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable.h +++ b/vendor/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/vendor/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_access.c b/vendor/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_access.c index efdabf8..1476e9b 100644 --- a/vendor/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_access.c +++ b/vendor/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_access.c @@ -167,9 +167,10 @@ ipDefaultRouterTable_container_shutdown(netsnmp_container * container_ptr) * check entry for update */ static void -_check_entry_for_updates(ipDefaultRouterTable_rowreq_ctx * rowreq_ctx, - void **magic) +_check_entry_for_updates(void *p, void *q) { + ipDefaultRouterTable_rowreq_ctx *rowreq_ctx = p; + void **magic = q; netsnmp_container *defaultrouter_container = magic[0]; netsnmp_container *to_delete = (netsnmp_container *) magic[1]; @@ -209,9 +210,10 @@ _check_entry_for_updates(ipDefaultRouterTable_rowreq_ctx * rowreq_ctx, * add new entry */ static void -_add_new_entry(netsnmp_defaultrouter_entry *defaultrouter_entry, - netsnmp_container *container) +_add_new_entry(void *p, void *q) { + netsnmp_defaultrouter_entry *defaultrouter_entry = p; + netsnmp_container *container = q; ipDefaultRouterTable_rowreq_ctx *rowreq_ctx; DEBUGMSGTL(("ipDefaultRouterTable:access", "creating new entry\n")); @@ -273,8 +275,8 @@ _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 - * some other existing data, or peforming calculations to derive the data), + * If, however, the accessing the data involves more work (e.g. parsing + * some other existing data, or performing 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 * ipDefaultRouterTable_row_prep() for populating data. @@ -313,16 +315,12 @@ ipDefaultRouterTable_container_load(netsnmp_container * container) */ tmp_ptr[0] = defaultrouter_container->next; tmp_ptr[1] = NULL; - CONTAINER_FOR_EACH(container, - (netsnmp_container_obj_func *) _check_entry_for_updates, - tmp_ptr); + CONTAINER_FOR_EACH(container, _check_entry_for_updates, tmp_ptr); /* * now add any new interfaces */ - CONTAINER_FOR_EACH(defaultrouter_container, - (netsnmp_container_obj_func *) _add_new_entry, - container); + CONTAINER_FOR_EACH(defaultrouter_container, _add_new_entry, container); /* * free the container. we've either claimed each entry, or released it, diff --git a/vendor/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_interface.c b/vendor/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_interface.c index 8284e97..ffa50be 100644 --- a/vendor/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_interface.c +++ b/vendor/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_interface.c @@ -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) && @@ -900,8 +900,7 @@ _cache_free(netsnmp_cache * cache, void *magic) * @internal */ static void -_container_item_free(ipDefaultRouterTable_rowreq_ctx * rowreq_ctx, - void *context) +_container_item_free(void *rowreq_ctx, void *context) { DEBUGMSGTL(("internal:ipDefaultRouterTable:_container_item_free", "called\n")); @@ -935,9 +934,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 */ /** diff --git a/vendor/agent/mibgroup/ip-mib/ipIfStatsTable.h b/vendor/agent/mibgroup/ip-mib/ipIfStatsTable.h index da1d85c..0461ec3 100644 --- a/vendor/agent/mibgroup/ip-mib/ipIfStatsTable.h +++ b/vendor/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/vendor/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.h b/vendor/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.h index bda956f..6f962b8 100644 --- a/vendor/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.h +++ b/vendor/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/vendor/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_access.c b/vendor/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_access.c index 7919dea..7ad0d2e 100644 --- a/vendor/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_access.c +++ b/vendor/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_access.c @@ -154,9 +154,10 @@ ipIfStatsTable_container_init(netsnmp_container ** container_ptr_ptr, * check entry for update */ static void -_check_for_updates(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - netsnmp_container *stats) +_check_for_updates(void *p, void *q) { + ipIfStatsTable_rowreq_ctx *rowreq_ctx = p; + netsnmp_container *stats = q; netsnmp_systemstats_entry *ifstats_entry; /* @@ -206,9 +207,10 @@ _check_for_updates(ipIfStatsTable_rowreq_ctx * rowreq_ctx, * add new entry */ static void -_add_new(netsnmp_systemstats_entry *ifstats_entry, - netsnmp_container *container) +_add_new(void *p, void *q) { + netsnmp_systemstats_entry *ifstats_entry = p; + netsnmp_container *container = q; ipIfStatsTable_rowreq_ctx *rowreq_ctx; DEBUGMSGTL(("ipIfStatsTable:access", "creating new entry\n")); @@ -293,8 +295,8 @@ 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 - * some other existing data, or peforming calculations to derive the data), + * If, however, the accessing the data involves more work (e.g. parsing + * some other existing data, or performing 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 * ipIfStatsTable_row_prep() for populating data. @@ -330,14 +332,12 @@ ipIfStatsTable_container_load(netsnmp_container * container) * we just got a fresh copy of data. compare it to * what we've already got, and make any adjustements... */ - CONTAINER_FOR_EACH(container, (netsnmp_container_obj_func *) - _check_for_updates, stats); + CONTAINER_FOR_EACH(container, _check_for_updates, stats); /* * now add any new entries */ - CONTAINER_FOR_EACH(stats, (netsnmp_container_obj_func *) - _add_new, container); + CONTAINER_FOR_EACH(stats, _add_new, container); /* diff --git a/vendor/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.c b/vendor/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.c index ada8827..1466bf6 100644 --- a/vendor/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.c +++ b/vendor/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.c @@ -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) && @@ -1298,7 +1298,7 @@ _cache_free(netsnmp_cache * cache, void *magic) * @internal */ static void -_container_item_free(ipIfStatsTable_rowreq_ctx * rowreq_ctx, void *context) +_container_item_free(void *rowreq_ctx, void *context) { DEBUGMSGTL(("internal:ipIfStatsTable:_container_item_free", "called\n")); @@ -1331,9 +1331,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 */ /** diff --git a/vendor/agent/mibgroup/ip-mib/ipSystemStatsTable.h b/vendor/agent/mibgroup/ip-mib/ipSystemStatsTable.h index 047db74..515a2f0 100644 --- a/vendor/agent/mibgroup/ip-mib/ipSystemStatsTable.h +++ b/vendor/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/vendor/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.h b/vendor/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.h index 5c3823e..9f309f9 100644 --- a/vendor/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.h +++ b/vendor/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* */ /* diff --git a/vendor/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access.c b/vendor/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access.c index 300ed7a..c101f58 100644 --- a/vendor/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access.c +++ b/vendor/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access.c @@ -152,9 +152,10 @@ ipSystemStatsTable_container_init(netsnmp_container **container_ptr_ptr, * check entry for update */ static void -_check_for_updates(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - netsnmp_container *stats) +_check_for_updates(void *p, void *q) { + ipSystemStatsTable_rowreq_ctx *rowreq_ctx = p; + netsnmp_container *stats = q; /* * check for matching entry. works because indexes are the same. */ @@ -202,9 +203,10 @@ _check_for_updates(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, * add new entry */ static void -_add_new(netsnmp_systemstats_entry *systemstats_entry, - netsnmp_container *container) +_add_new(void *p, void *q) { + netsnmp_systemstats_entry *systemstats_entry = p; + netsnmp_container *container = q; ipSystemStatsTable_rowreq_ctx *rowreq_ctx; DEBUGMSGTL(("ipSystemStatsTable:access", "creating new entry\n")); @@ -287,8 +289,8 @@ 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 - * some other existing data, or peforming calculations to derive the data), + * If, however, the accessing the data involves more work (e.g. parsing + * some other existing data, or performing 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 * ipSystemStatsTable_row_prep() for populating data. @@ -323,14 +325,12 @@ ipSystemStatsTable_container_load(netsnmp_container *container) * we just got a fresh copy of data. compare it to * what we've already got, and make any adjustements... */ - CONTAINER_FOR_EACH(container, (netsnmp_container_obj_func *) - _check_for_updates, stats); + CONTAINER_FOR_EACH(container, _check_for_updates, stats); /* * now add any new entries */ - CONTAINER_FOR_EACH(stats, (netsnmp_container_obj_func *) - _add_new, container); + CONTAINER_FOR_EACH(stats, _add_new, container); /* * free the container. we've either claimed each ifentry, or released it, diff --git a/vendor/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_interface.c b/vendor/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_interface.c index 6e89de4..df849bc 100644 --- a/vendor/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_interface.c +++ b/vendor/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_interface.c @@ -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) && @@ -1264,7 +1264,7 @@ _cache_free(netsnmp_cache * cache, void *magic) * @internal */ static void -_container_item_free(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, +_container_item_free(void *rowreq_ctx, void *context) { DEBUGMSGTL(("internal:ipSystemStatsTable:_container_item_free", @@ -1299,9 +1299,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 */ /** diff --git a/vendor/agent/mibgroup/ip-mib/ip_scalars.c b/vendor/agent/mibgroup/ip-mib/ip_scalars.c index 66cb73b..2037b0b 100644 --- a/vendor/agent/mibgroup/ip-mib/ip_scalars.c +++ b/vendor/agent/mibgroup/ip-mib/ip_scalars.c @@ -403,7 +403,9 @@ handle_ipAddressSpinLock(netsnmp_mib_handler *handler, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests) { +#ifndef NETSNMP_NO_WRITE_SUPPORT long value; +#endif /* We are never called for a GETNEXT if it's registered as a "instance", as it's "magically" handled for us. */ diff --git a/vendor/agent/mibgroup/ip-mib/ip_scalars.h b/vendor/agent/mibgroup/ip-mib/ip_scalars.h index 7670a49..75713d7 100644 --- a/vendor/agent/mibgroup/ip-mib/ip_scalars.h +++ b/vendor/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/vendor/agent/mibgroup/ip-mib/ipv4InterfaceTable.h b/vendor/agent/mibgroup/ip-mib/ipv4InterfaceTable.h index 2ebd768..8059a64 100644 --- a/vendor/agent/mibgroup/ip-mib/ipv4InterfaceTable.h +++ b/vendor/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/vendor/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable.c b/vendor/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable.c index 91646f7..b951859 100644 --- a/vendor/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable.c +++ b/vendor/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable.c @@ -704,7 +704,7 @@ ipv4InterfaceTable_commit(ipv4InterfaceTable_rowreq_ctx * rowreq_ctx) } /* - * if we successfully commited this row, set the dirty flag. + * if we successfully committed this row, set the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags |= MFD_ROW_DIRTY; @@ -754,7 +754,7 @@ ipv4InterfaceTable_undo_commit(ipv4InterfaceTable_rowreq_ctx * rowreq_ctx) /* - * if we successfully un-commited this row, clear the dirty flag. + * if we successfully un-committed this row, clear the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags &= ~MFD_ROW_DIRTY; diff --git a/vendor/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable.h b/vendor/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable.h index 8123908..4412d2e 100644 --- a/vendor/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable.h +++ b/vendor/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* */ /* @@ -102,12 +102,6 @@ config_require(ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_data_access) ipv4InterfaceTable_rowreq_ctx_cleanup(ipv4InterfaceTable_rowreq_ctx * rowreq_ctx); - int ipv4InterfaceTable_commit(ipv4InterfaceTable_rowreq_ctx - * rowreq_ctx); - ipv4InterfaceTable_rowreq_ctx - * ipv4InterfaceTable_row_find_by_mib_index - (ipv4InterfaceTable_mib_index * mib_idx); - extern const oid ipv4InterfaceTable_oid[]; extern const int ipv4InterfaceTable_oid_size; diff --git a/vendor/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_data_access.c b/vendor/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_data_access.c index c9e14ff..ca92d27 100644 --- a/vendor/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_data_access.c +++ b/vendor/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_data_access.c @@ -226,8 +226,8 @@ 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 - * some other existing data, or peforming calculations to derive the data), + * If, however, the accessing the data involves more work (e.g. parsing + * some other existing data, or performing 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 * ipv4InterfaceTable_row_prep() for populating data. diff --git a/vendor/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_interface.c b/vendor/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_interface.c index ca0322a..36560dc 100644 --- a/vendor/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_interface.c +++ b/vendor/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_interface.c @@ -648,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) && @@ -1051,7 +1051,7 @@ _mfd_ipv4InterfaceTable_commit(netsnmp_mib_handler *handler, if (rowreq_ctx->rowreq_flags & MFD_ROW_DIRTY) { /* - * if we successfully commited this row, set the dirty flag. Use the + * if we successfully committed this row, set the dirty flag. Use the * current value + 1 (i.e. dirty = # rows changed). * this is checked in post_request... */ diff --git a/vendor/agent/mibgroup/ip-mib/ipv6InterfaceTable.h b/vendor/agent/mibgroup/ip-mib/ipv6InterfaceTable.h index 471eaa0..42dda5b 100644 --- a/vendor/agent/mibgroup/ip-mib/ipv6InterfaceTable.h +++ b/vendor/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/vendor/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable.c b/vendor/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable.c index a69bcbb..9f52615 100644 --- a/vendor/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable.c +++ b/vendor/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable.c @@ -976,7 +976,7 @@ ipv6InterfaceTable_commit(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx) } /* - * if we successfully commited this row, set the dirty flag. + * if we successfully committed this row, set the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags |= MFD_ROW_DIRTY; @@ -1026,7 +1026,7 @@ ipv6InterfaceTable_undo_commit(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx) /* - * if we successfully un-commited this row, clear the dirty flag. + * if we successfully un-committed this row, clear the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags &= ~MFD_ROW_DIRTY; diff --git a/vendor/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable.h b/vendor/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable.h index e6b77a5..f5445f2 100644 --- a/vendor/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable.h +++ b/vendor/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* */ /* @@ -119,8 +119,6 @@ config_require(ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_data_access) 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_mib_index * mib_idx); diff --git a/vendor/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_data_access.c b/vendor/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_data_access.c index 33c65a9..f2a7497 100644 --- a/vendor/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_data_access.c +++ b/vendor/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_data_access.c @@ -252,8 +252,8 @@ 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 - * some other existing data, or peforming calculations to derive the data), + * If, however, the accessing the data involves more work (e.g. parsing + * some other existing data, or performing 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 * ipv6InterfaceTable_row_prep() for populating data. diff --git a/vendor/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_interface.c b/vendor/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_interface.c index 618470f..2327c23 100644 --- a/vendor/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_interface.c +++ b/vendor/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_interface.c @@ -661,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) && @@ -1129,7 +1129,7 @@ _mfd_ipv6InterfaceTable_commit(netsnmp_mib_handler *handler, if (rowreq_ctx->rowreq_flags & MFD_ROW_DIRTY) { /* - * if we successfully commited this row, set the dirty flag. Use the + * if we successfully committed this row, set the dirty flag. Use the * current value + 1 (i.e. dirty = # rows changed). * this is checked in post_request... */ diff --git a/vendor/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable.h b/vendor/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable.h index 779bd75..090e762 100644 --- a/vendor/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable.h +++ b/vendor/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/vendor/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable.h b/vendor/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable.h index 2974fee..885a002 100644 --- a/vendor/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable.h +++ b/vendor/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/vendor/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_data_access.c b/vendor/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_data_access.c index 0025dd3..85ad419 100644 --- a/vendor/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_data_access.c +++ b/vendor/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_data_access.c @@ -154,9 +154,10 @@ ipv6ScopeZoneIndexTable_container_shutdown(netsnmp_container *container_ptr) * */ static void -_snarf_zoneindex_entry(netsnmp_v6scopezone_entry *scopezone_entry, - netsnmp_container *container) +_snarf_zoneindex_entry(void *p, void *q) { + netsnmp_v6scopezone_entry *scopezone_entry = p; + netsnmp_container *container = q; ipv6ScopeZoneIndexTable_rowreq_ctx *rowreq_ctx; DEBUGTRACE; @@ -196,8 +197,8 @@ _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 - * some other existing data, or peforming calculations to derive the data), + * If, however, the accessing the data involves more work (e.g. parsing + * some other existing data, or performing 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 * ipv6ScopeZoneIndexTable_row_prep() for populating data. @@ -234,9 +235,7 @@ ipv6ScopeZoneIndexTable_container_load(netsnmp_container * container) * the container. */ - CONTAINER_FOR_EACH(zoneindex, - (netsnmp_container_obj_func *) _snarf_zoneindex_entry, - container); + CONTAINER_FOR_EACH(zoneindex, _snarf_zoneindex_entry, container); /* * free the container. we've either claimed each entry, or released it, * so the access function doesn't need to clear the container. diff --git a/vendor/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_interface.c b/vendor/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_interface.c index 8253e73..150fd2b 100644 --- a/vendor/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_interface.c +++ b/vendor/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_interface.c @@ -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) && @@ -979,8 +979,7 @@ _mfd_ipv6ScopeZoneIndexTable_get_values(netsnmp_mib_handler *handler, * @internal */ static void -_container_item_free(ipv6ScopeZoneIndexTable_rowreq_ctx * rowreq_ctx, - void *context) +_container_item_free(void *rowreq_ctx, void *context) { DEBUGMSGTL(("internal:ipv6ScopeZoneIndexTable:_container_item_free", "called\n")); @@ -1014,9 +1013,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 */ /** diff --git a/vendor/agent/mibgroup/kernel_sunos5.c b/vendor/agent/mibgroup/kernel_sunos5.c index c2b01d9..91c973e 100644 --- a/vendor/agent/mibgroup/kernel_sunos5.c +++ b/vendor/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. */ @@ -303,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", @@ -316,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", @@ -406,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 */ } @@ -440,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 */ } @@ -561,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 */ } @@ -595,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 */ } @@ -1022,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; @@ -1620,6 +1626,7 @@ 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 @@ -1633,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; @@ -1756,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, ':')) diff --git a/vendor/agent/mibgroup/kernel_sunos5.h b/vendor/agent/mibgroup/kernel_sunos5.h index 3b4b82e..ed05314 100644 --- a/vendor/agent/mibgroup/kernel_sunos5.h +++ b/vendor/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; /*- diff --git a/vendor/agent/mibgroup/mibII.h b/vendor/agent/mibgroup/mibII.h index 3e20565..f0558c2 100644 --- a/vendor/agent/mibgroup/mibII.h +++ b/vendor/agent/mibgroup/mibII.h @@ -2,55 +2,55 @@ * module to include the modules relavent to the mib-II mib(s) */ -config_require(mibII/system_mib) -config_require(mibII/sysORTable) -config_require(mibII/snmp_mib) -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/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) +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) +config_require(mibII/ipv6); #endif /* defined(NETSNMP_ENABLE_IPV6) */ #endif /* !defined(darwin) || defined(HAVE_STRUCT_IN_IFADDR_IA_SUBNETMASK) */ -config_require(mibII/icmp) +config_require(mibII/icmp); #endif /* !defined(cygwin) || defined(HAVE_IPHLPAPI_H) */ -config_require(if-mib) +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(ip-forward-mib) -config_require(ip-mib/ipAddressTable ip-mib/ipAddressPrefixTable) -config_require(ip-mib/ipDefaultRouterTable) +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/ipIfStatsTable) +config_require(ip-mib/ipSystemStatsTable ip-mib/ipIfStatsTable); /* Still missing: * ip-mib/inetNetToMediaTable * ip-mib/ipv6ScopeZoneIndexTable diff --git a/vendor/agent/mibgroup/mibII/at.c b/vendor/agent/mibgroup/mibII/at.c index 80e6d88..9f1631e 100644 --- a/vendor/agent/mibgroup/mibII/at.c +++ b/vendor/agent/mibgroup/mibII/at.c @@ -18,6 +18,9 @@ #include #include #include "at.h" +#ifdef solaris2 +#include "kernel_sunos5.h" +#endif /* * define the structure we're going to ask the agent to register our diff --git a/vendor/agent/mibgroup/mibII/at.h b/vendor/agent/mibgroup/mibII/at.h index bdbba8c..51ae349 100644 --- a/vendor/agent/mibgroup/mibII/at.h +++ b/vendor/agent/mibgroup/mibII/at.h @@ -6,7 +6,7 @@ #ifndef _MIBGROUP_AT_H #define _MIBGROUP_AT_H -#if HAVE_NET_ROUTE_H +#ifdef HAVE_NET_ROUTE_H #include #endif @@ -45,19 +45,19 @@ 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) +config_require(mibII/data_access/at_iphlpapi); #elif defined(solaris2) -config_require(kernel_sunos5) -config_require(mibII/data_access/at_solaris) +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) +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) +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) +config_require(mibII/data_access/at_nlist); +config_require(mibII/data_access/at_unix); #endif #endif /* _MIBGROUP_AT_H */ diff --git a/vendor/agent/mibgroup/mibII/data_access/at_hpux.c b/vendor/agent/mibgroup/mibII/data_access/at_hpux.c index 241affc..5ece8e3 100644 --- a/vendor/agent/mibgroup/mibII/data_access/at_hpux.c +++ b/vendor/agent/mibgroup/mibII/data_access/at_hpux.c @@ -19,12 +19,12 @@ #include #include #include "../at.h" -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif #if defined(NETSNMP_IFNET_NEEDS_KERNEL) && !defined(_KERNEL) @@ -32,56 +32,56 @@ #define _I_DEFINED_KERNEL #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_SOCKET_H +#ifdef HAVE_SYS_SOCKET_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_IF_ETHER_H +#ifdef HAVE_NETINET_IF_ETHER_H #include #endif -#if HAVE_INET_MIB2_H +#ifdef HAVE_INET_MIB2_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_NET_IF_DL_H +#ifdef HAVE_NET_IF_DL_H #ifndef dynix #include #else #include #endif #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 #ifdef solaris2 diff --git a/vendor/agent/mibgroup/mibII/data_access/at_iphlpapi.c b/vendor/agent/mibgroup/mibII/data_access/at_iphlpapi.c index 06ea001..3fe0060 100644 --- a/vendor/agent/mibgroup/mibII/data_access/at_iphlpapi.c +++ b/vendor/agent/mibgroup/mibII/data_access/at_iphlpapi.c @@ -159,7 +159,7 @@ var_atEntry(struct variable *vp, memcpy((char *) name, (char *) lowest, oid_length * sizeof(oid)); *length = oid_length; *write_method = write_arp; - netsnmp_assert(0 <= i && i < pIpNetTable->dwNumEntries); + netsnmp_assert(i < pIpNetTable->dwNumEntries); *arp_row = pIpNetTable->table[i]; switch (vp->magic) { diff --git a/vendor/agent/mibgroup/mibII/data_access/at_solaris.c b/vendor/agent/mibgroup/mibII/data_access/at_solaris.c index 72bda42..a007acd 100644 --- a/vendor/agent/mibgroup/mibII/data_access/at_solaris.c +++ b/vendor/agent/mibgroup/mibII/data_access/at_solaris.c @@ -148,7 +148,7 @@ var_atEntry(struct variable * vp, return (u_char *) & long_return; case IPMEDIAPHYSADDRESS: *var_len = Lowentry.ipNetToMediaPhysAddress.o_length; - return Lowentry.ipNetToMediaPhysAddress.o_bytes; + return (u_char *) Lowentry.ipNetToMediaPhysAddress.o_bytes; case IPMEDIANETADDRESS: *var_len = sizeof(addr_ret); addr_ret = Lowentry.ipNetToMediaNetAddress; diff --git a/vendor/agent/mibgroup/mibII/data_access/at_sysctl.c b/vendor/agent/mibgroup/mibII/data_access/at_sysctl.c index dfc207c..c9b5ad4 100644 --- a/vendor/agent/mibgroup/mibII/data_access/at_sysctl.c +++ b/vendor/agent/mibgroup/mibII/data_access/at_sysctl.c @@ -19,22 +19,22 @@ #include #include #include "../at.h" -#if HAVE_NET_IF_H +#ifdef HAVE_NET_IF_H #include #endif -#if HAVE_NET_IF_DL_H +#ifdef HAVE_NET_IF_DL_H #include #endif -#if HAVE_NETINET_IF_ETHER_H +#ifdef HAVE_NETINET_IF_ETHER_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_SYS_SYSCTL_H +#ifdef HAVE_SYS_SYSCTL_H #include #endif diff --git a/vendor/agent/mibgroup/mibII/data_access/at_unix.c b/vendor/agent/mibgroup/mibII/data_access/at_unix.c index 8064301..39c3375 100644 --- a/vendor/agent/mibgroup/mibII/data_access/at_unix.c +++ b/vendor/agent/mibgroup/mibII/data_access/at_unix.c @@ -136,7 +136,7 @@ var_atEntry(struct variable *vp, case IPMEDIAIFINDEX: /* also ATIFINDEX */ *var_len = sizeof long_return; long_return = lowIfIndex ? lowIfIndex : 1; -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES if (lowIfIndex == 0) return NULL; #endif diff --git a/vendor/agent/mibgroup/mibII/icmp.c b/vendor/agent/mibgroup/mibII/icmp.c index a78e2ae..80da4b0 100644 --- a/vendor/agent/mibgroup/mibII/icmp.c +++ b/vendor/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 @@ -638,7 +638,7 @@ init_icmp(void) netsnmp_iterator_info *iinfo; netsnmp_iterator_info *msg_stats_iinfo; netsnmp_table_registration_info *table_info = NULL; - netsnmp_table_registration_info *msg_stats_table_info; + netsnmp_table_registration_info *msg_stats_table_info = NULL; #endif netsnmp_handler_registration *scalar_reginfo = NULL; int rc; @@ -751,6 +751,8 @@ init_icmp(void) netsnmp_handler_registration_free(msg_stats_reginfo); if (table_reginfo) netsnmp_handler_registration_free(table_reginfo); + if (msg_stats_table_info) + free(msg_stats_table_info); #endif if (scalar_reginfo) netsnmp_handler_registration_free(scalar_reginfo); diff --git a/vendor/agent/mibgroup/mibII/icmp.h b/vendor/agent/mibgroup/mibII/icmp.h index 040da25..6214e5d 100644 --- a/vendor/agent/mibgroup/mibII/icmp.h +++ b/vendor/agent/mibgroup/mibII/icmp.h @@ -6,14 +6,14 @@ #define _MIBGROUP_ICMP_H #if defined(solaris2) -config_require(kernel_sunos5) +config_require(kernel_sunos5); #elif defined(linux) -config_require(mibII/kernel_linux) +config_require(mibII/kernel_linux); #elif defined(freebsd4) || defined(openbsd4) || defined(dragonfly2) || \ - defined(darwin10) -config_require(mibII/kernel_sysctl) -#elif defined(netbsd) || defined(netbsdelf) -config_require(mibII/kernel_netbsd) + defined(darwin) +config_require(mibII/kernel_sysctl); +#elif defined(netbsd5) || defined(netbsdelf5) +config_require(mibII/kernel_netbsd); #endif #include diff --git a/vendor/agent/mibgroup/mibII/ifTable.h b/vendor/agent/mibgroup/mibII/ifTable.h index 277e7d2..dcdb26b 100644 --- a/vendor/agent/mibgroup/mibII/ifTable.h +++ b/vendor/agent/mibgroup/mibII/ifTable.h @@ -3,4 +3,4 @@ * */ -config_require(if-mib/ifTable) +config_require(if-mib/ifTable); diff --git a/vendor/agent/mibgroup/mibII/interfaces.c b/vendor/agent/mibgroup/mibII/interfaces.c index 73c0b6f..d0cd681 100644 --- a/vendor/agent/mibgroup/mibII/interfaces.c +++ b/vendor/agent/mibgroup/mibII/interfaces.c @@ -29,19 +29,19 @@ netsnmp_feature_provide(interface_legacy); #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 @@ -49,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 @@ -170,7 +170,7 @@ netsnmp_feature_provide(interface_legacy); #include #endif -#if HAVE_SYS_SYSCTL_H +#ifdef HAVE_SYS_SYSCTL_H #include #if defined(freebsd3) || defined(freebsd4) || defined(freebsd5) @@ -188,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 @@ -292,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 @@ -621,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 @@ -678,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; @@ -692,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 @@ -706,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 @@ -802,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 */ @@ -817,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) @@ -833,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; @@ -863,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 */ @@ -897,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 */ @@ -910,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 @@ -920,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 */ @@ -955,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 */ @@ -976,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 */ @@ -989,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 @@ -999,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 */ @@ -1066,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) @@ -1578,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++; @@ -2030,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 diff --git a/vendor/agent/mibgroup/mibII/interfaces.h b/vendor/agent/mibgroup/mibII/interfaces.h index 72e779e..93281cd 100644 --- a/vendor/agent/mibgroup/mibII/interfaces.h +++ b/vendor/agent/mibgroup/mibII/interfaces.h @@ -8,19 +8,19 @@ /*********************************************************************** * 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) +config_require(kernel_sunos5); #endif /* @@ -28,7 +28,7 @@ config_require(kernel_sunos5) * 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/vendor/agent/mibgroup/mibII/ip.c b/vendor/agent/mibgroup/mibII/ip.c index 7f6040f..b0bc1cc 100644 --- a/vendor/agent/mibgroup/mibII/ip.c +++ b/vendor/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" @@ -247,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 @@ -277,7 +285,7 @@ ip_handler(netsnmp_mib_handler *handler, { netsnmp_request_info *request; netsnmp_variable_list *requestvb; - long ret_value; + long ret_value = 0; oid subid; int type = ASN_COUNTER; @@ -407,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 @@ -415,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 @@ -423,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 @@ -431,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 @@ -439,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 @@ -455,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 @@ -473,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 */ @@ -482,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 @@ -490,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 @@ -498,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 @@ -712,7 +720,7 @@ ip_load(netsnmp_cache *cache, void *vmagic) struct nmparms p; unsigned int ulen; int ret; - int magic = (int) vmagic; + int magic = (uintptr_t)vmagic; if ((fd = open_mib("/dev/ip", O_RDONLY, 0, NM_ASYNC_OFF)) < 0) { DEBUGMSGTL(("mibII/ip", "Failed to load IP object %d (hpux11)\n", magic)); @@ -921,7 +929,7 @@ int ip_load(netsnmp_cache *cache, void *vmagic) { long ret_value = -1; - int magic = (int) vmagic; + int magic = (uintptr_t)vmagic; switch (magic) { case IPFORWARDING: @@ -955,7 +963,7 @@ int ip_load(netsnmp_cache *cache, void *vmagic) { long ret_value = -1; - int magic = (int) vmagic; + int magic = (uintptr_t)vmagic; switch (magic) { case IPFORWARDING: diff --git a/vendor/agent/mibgroup/mibII/ip.h b/vendor/agent/mibgroup/mibII/ip.h index 3a4d508..5537d9f 100644 --- a/vendor/agent/mibgroup/mibII/ip.h +++ b/vendor/agent/mibgroup/mibII/ip.h @@ -7,23 +7,23 @@ #define _MIBGROUP_IP_H -config_require(mibII/ifTable) +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) +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_require(mibII/at); #ifdef solaris2 -config_require(kernel_sunos5) +config_require(kernel_sunos5); #elif defined(linux) -config_require(mibII/kernel_linux) -#elif defined(netbsd) || defined(netbsdelf) -config_require(mibII/kernel_netbsd) +config_require(mibII/kernel_linux); +#elif defined(netbsd5) || defined(netbsdelf5) +config_require(mibII/kernel_netbsd); #endif #include "var_route.h" diff --git a/vendor/agent/mibgroup/mibII/ipAddr.c b/vendor/agent/mibgroup/mibII/ipAddr.c index 4d1f44a..a89255f 100644 --- a/vendor/agent/mibgroup/mibII/ipAddr.c +++ b/vendor/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,55 @@ #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 HAVE_NETINET_IN_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 @@ -938,7 +941,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/vendor/agent/mibgroup/mibII/ipAddr.h b/vendor/agent/mibgroup/mibII/ipAddr.h index ec69cf3..d9cbf74 100644 --- a/vendor/agent/mibgroup/mibII/ipAddr.h +++ b/vendor/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/vendor/agent/mibgroup/mibII/ipCidrRouteTable.h b/vendor/agent/mibgroup/mibII/ipCidrRouteTable.h index 3c508af..8ce040b 100644 --- a/vendor/agent/mibgroup/mibII/ipCidrRouteTable.h +++ b/vendor/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/vendor/agent/mibgroup/mibII/ipv6.c b/vendor/agent/mibgroup/mibII/ipv6.c index 19a322e..f41b3ea 100644 --- a/vendor/agent/mibgroup/mibII/ipv6.c +++ b/vendor/agent/mibgroup/mibII/ipv6.c @@ -5,41 +5,41 @@ #include #include -/* For FreeBSD */ -#define _WANT_INPCB 1 -#define _WANT_TCPCB 1 #include #include -#if HAVE_SYS_IOCTL_H +#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 -#if HAVE_SYS_SOCKETVAR_H +#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_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 @@ -48,10 +48,10 @@ #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 @@ -61,10 +61,10 @@ #ifdef _I_DEFINED_KERNEL #define _KERNEL 1 #endif -#if HAVE_NET_IF_VAR_H +#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 @@ -74,79 +74,85 @@ #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_NETINET_ICMP6_H +#ifdef HAVE_NETINET_ICMP6_H # include #endif -#if HAVE_NETINET6_IP6_VAR_H +#ifdef HAVE_NETINET6_IP6_VAR_H # include # include #endif #include -#if HAVE_NETINET_IP_H +#ifdef HAVE_NETINET_IP_H # include #endif -#if HAVE_NETINET_IN_PCB_H +#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_SYS_CALLOUT_H +# include +# endif +# ifdef HAVE_SYS_OSD_H +# include +# endif +# 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 -#if HAVE_KVM_GETFILES +#ifdef HAVE_KVM_GETFILES #if defined(HAVE_KVM_GETFILE2) || !defined(openbsd5) #undef HAVE_KVM_GETFILES #endif #endif -#if HAVE_KVM_GETFILES +#ifdef HAVE_KVM_GETFILES #include #include #define _KERNEL @@ -173,7 +179,7 @@ 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 @@ -322,8 +328,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, @@ -398,7 +404,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, @@ -407,7 +413,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, @@ -416,7 +422,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 @@ -696,7 +702,7 @@ if_getifnet(int idx, struct ifnet *result) #endif /* !__OpenBSD__ */ -#if TRUST_IFLASTCHANGE /*untrustable value returned... */ +#ifdef TRUST_IFLASTCHANGE /*untrustable value returned... */ #ifdef HAVE_NET_IF_MIB_H #if defined(HAVE_SYS_SYSCTL_H) && defined(CTL_NET) static int @@ -1060,7 +1066,7 @@ var_ifv6Entry(register struct variable * vp, #endif return (u_char *) & long_return; } -#if TRUST_IFLASTCHANGE /*untrustable value returned... */ +#ifdef TRUST_IFLASTCHANGE /*untrustable value returned... */ case IPV6IFLASTCHANGE: { struct timeval lastchange; @@ -1414,7 +1420,7 @@ var_icmpv6Entry(register struct variable * vp, #endif } -#if HAVE_KVM_GETFILES +#ifdef HAVE_KVM_GETFILES u_char * var_udp6(register struct variable * vp, @@ -1510,8 +1516,10 @@ var_udp6(register struct variable * vp, int result; int i, j; caddr_t p; -#if defined(openbsd4) || defined(freebsd3) +#if defined(openbsd4) || defined(dragonfly) static struct inpcb in6pcb, savpcb; +#elif defined(freebsd3) + static struct xinpcb in6pcb, savpcb; #else static struct in6pcb in6pcb, savpcb; #endif @@ -1610,9 +1618,8 @@ var_udp6(register struct variable * vp, ) { DEBUGMSGTL(("mibII/ipv6", "looping: p=%p\n", p)); -#if defined(freebsd3) - /* To do: fill in in6pcb properly. */ - memset(&in6pcb, 0, sizeof(in6pcb)); +#if defined(freebsd3) &&!defined(dragonfly) + in6pcb = *(struct xinpcb *) xig; #elif defined(darwin) in6pcb = ((struct xinpcb *) xig)->xi_inp; #else @@ -1624,8 +1631,13 @@ var_udp6(register struct variable * vp, } #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; @@ -1647,6 +1659,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]; @@ -1690,6 +1711,9 @@ var_udp6(register struct variable * vp, #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; @@ -1730,6 +1754,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 = @@ -1944,7 +1974,7 @@ var_tcp6(register struct variable * vp, return NULL; } -#elif HAVE_KVM_GETFILES +#elif defined(HAVE_KVM_GETFILES) u_char * var_tcp6(register struct variable * vp, @@ -1956,7 +1986,7 @@ var_tcp6(register struct variable * vp, oid savname[MAX_OID_LEN]; int result, count, found, savnameLen, savstate; int p, i, j; - u_char *lsa, *savlsa, *fsa, *savfsa; + u_char *lsa, *fsa; struct kinfo_file *tcp; static int tcp6statemap[16]; static int initialized = 0; @@ -2004,8 +2034,6 @@ var_tcp6(register struct variable * vp, if (exact && result == 0) { savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); - savlsa = lsa; - savfsa = fsa; savstate = tcp[p].t_state; found++; break; @@ -2015,10 +2043,8 @@ var_tcp6(register struct variable * vp, */ if (savnameLen == 0 || snmp_oid_compare(savname, savnameLen, newname, j) > 0) { savnameLen = j; - savlsa = lsa; - savfsa = fsa; - savstate = tcp[p].t_state; memcpy(savname, newname, j * sizeof(oid)); + savstate = tcp[p].t_state; found++; } } @@ -2086,12 +2112,18 @@ var_tcp6(register struct variable * vp, int result; int i, j; caddr_t p; -#if defined(openbsd4) || defined(freebsd3) +#if defined(openbsd4) || defined(dragonfly) static struct inpcb in6pcb, savpcb; +#elif defined(freebsd3) + static struct xinpcb in6pcb; + static int savstate; #else static struct in6pcb in6pcb, savpcb; #endif +#if !defined(freebsd3) || defined(dragonfly) struct tcpcb tcpcb; +#endif + int state; int found, savnameLen; #if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 || defined(openbsd4) /*1.6Y*/ struct inpcbtable tcbtable; @@ -2185,11 +2217,10 @@ var_tcp6(register struct variable * vp, ) { DEBUGMSGTL(("mibII/ipv6", "looping: p=%p\n", p)); -#if defined(freebsd3) - /* To do: fill in in6pcb properly. */ - memset(&in6pcb, 0, sizeof(in6pcb)); -#elif defined(dragonfly) +#if defined(dragonfly) in6pcb = xtp->xt_inp; +#elif defined(freebsd3) + in6pcb = ((struct xtcpcb *) xig)->xt_inp; #elif defined(darwin) in6pcb = ((struct xinpcb *) xig)->xi_inp; #else @@ -2201,8 +2232,13 @@ var_tcp6(register struct variable * vp, } #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; @@ -2226,6 +2262,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]; @@ -2246,12 +2294,20 @@ 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); if (exact && (result == 0)) { +#if defined(freebsd3) && !defined(dragonfly) + savstate = ((struct xtcpcb *) xig)->t_state; +#else memcpy(&savpcb, &in6pcb, sizeof(savpcb)); +#endif savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; @@ -2262,7 +2318,11 @@ var_tcp6(register struct variable * vp, */ if ((savnameLen == 0) || (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) { +#if defined(freebsd3) && !defined(dragonfly) + savstate = ((struct xtcpcb *) xig)->t_state; +#else memcpy(&savpcb, &in6pcb, sizeof(savpcb)); +#endif savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; @@ -2276,6 +2336,9 @@ var_tcp6(register struct variable * vp, #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; @@ -2298,6 +2361,18 @@ var_tcp6(register struct variable * vp, return NULL; *length = savnameLen; memcpy((char *) name, (char *) savname, *length * sizeof(oid)); +#if defined(freebsd3) && !defined(dragonfly) + state = savstate; +#elif defined(__NetBSD__) && __NetBSD_Version__ >= 999010400 + memcpy(&in6pcb, &savpcb, sizeof(savpcb)); + 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)); + found = 0; + return NULL; + } + state = (int)tcpcb.t_state; +#else memcpy(&in6pcb, &savpcb, sizeof(savpcb)); if (!NETSNMP_KLOOKUP(in6pcb.inp_ppcb, (char *) &tcpcb, sizeof(tcpcb))) { DEBUGMSGTL(("mibII/ipv6", "klookup fail for tcb6.tcpcb at %p\n", @@ -2305,6 +2380,8 @@ var_tcp6(register struct variable * vp, found = 0; return NULL; } + state = (int)tcpcb.t_state; +#endif *write_method = 0; *var_len = sizeof(long); /* default to 'long' results */ @@ -2316,7 +2393,7 @@ var_tcp6(register struct variable * vp, DEBUGMSGTL(("mibII/ipv6", "magic=%d\n", vp->magic)); switch (vp->magic) { case IPV6TCPCONNSTATE: - long_return = mapTcpState((int)tcpcb.t_state); + long_return = mapTcpState(state); return (u_char *) & long_return; default: break; diff --git a/vendor/agent/mibgroup/mibII/ipv6.h b/vendor/agent/mibgroup/mibII/ipv6.h index 7b207d3..392b7f1 100644 --- a/vendor/agent/mibgroup/mibII/ipv6.h +++ b/vendor/agent/mibgroup/mibII/ipv6.h @@ -13,17 +13,17 @@ struct ip6_mib { }; #endif -config_require(mibII/ifTable mibII/at) +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) +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) +config_add_mib(IPV6-ICMP-MIB:IPV6-MIB:IPV6-TCP-MIB:IPV6-UDP-MIB); #ifdef solaris2 -config_require(kernel_sunos5) +config_require(kernel_sunos5); #endif #include "var_route.h" #include "route_write.h" diff --git a/vendor/agent/mibgroup/mibII/kernel_linux.c b/vendor/agent/mibgroup/mibII/kernel_linux.c index a06f0dd..7587ad6 100644 --- a/vendor/agent/mibgroup/mibII/kernel_linux.c +++ b/vendor/agent/mibgroup/mibII/kernel_linux.c @@ -8,11 +8,11 @@ #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 diff --git a/vendor/agent/mibgroup/mibII/kernel_sysctl.c b/vendor/agent/mibgroup/mibII/kernel_sysctl.c index 166f664..0b240bc 100644 --- a/vendor/agent/mibgroup/mibII/kernel_sysctl.c +++ b/vendor/agent/mibgroup/mibII/kernel_sysctl.c @@ -20,6 +20,16 @@ #include "kernel_sysctl.h" +#ifndef MLD_LISTENER_QUERY +#define MLD_LISTENER_QUERY MLD6_LISTENER_QUERY +#endif +#ifndef MLD_LISTENER_REPORT +#define MLD_LISTENER_REPORT MLD6_LISTENER_REPORT +#endif +#ifndef MLD_LISTENER_DONE +#define MLD_LISTENER_DONE MLD6_LISTENER_DONE +#endif + #if defined(NETSNMP_CAN_USE_SYSCTL) int diff --git a/vendor/agent/mibgroup/mibII/mibII_common.h b/vendor/agent/mibgroup/mibII/mibII_common.h index 0ea8914..dedf399 100644 --- a/vendor/agent/mibgroup/mibII/mibII_common.h +++ b/vendor/agent/mibgroup/mibII/mibII_common.h @@ -1,38 +1,38 @@ -#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 @@ -41,50 +41,50 @@ #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 diff --git a/vendor/agent/mibgroup/mibII/mta_sendmail.c b/vendor/agent/mibgroup/mibII/mta_sendmail.c index 084f238..3d63d15 100644 --- a/vendor/agent/mibgroup/mibII/mta_sendmail.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/mibII/mta_sendmail.h b/vendor/agent/mibgroup/mibII/mta_sendmail.h index 8368ca9..834a4b9 100644 --- a/vendor/agent/mibgroup/mibII/mta_sendmail.h +++ b/vendor/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/vendor/agent/mibgroup/mibII/route_headers.h b/vendor/agent/mibgroup/mibII/route_headers.h index eace2e2..2cce38f 100644 --- a/vendor/agent/mibgroup/mibII/route_headers.h +++ b/vendor/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/vendor/agent/mibgroup/mibII/route_write.c b/vendor/agent/mibgroup/mibII/route_write.c index c8b1b03..a308eb3 100644 --- a/vendor/agent/mibgroup/mibII/route_write.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/mibII/route_write.h b/vendor/agent/mibgroup/mibII/route_write.h index 4d6b912..296bbde 100644 --- a/vendor/agent/mibgroup/mibII/route_write.h +++ b/vendor/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/vendor/agent/mibgroup/mibII/setSerialNo.c b/vendor/agent/mibgroup/mibII/setSerialNo.c index fd278cf..b6de052 100644 --- a/vendor/agent/mibgroup/mibII/setSerialNo.c +++ b/vendor/agent/mibgroup/mibII/setSerialNo.c @@ -13,15 +13,15 @@ netsnmp_feature_require(watcher_spinlock); /* * 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,7 +42,8 @@ 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, @@ -61,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/vendor/agent/mibgroup/mibII/snmp_mib.h b/vendor/agent/mibgroup/mibII/snmp_mib.h index 87a9a28..78a5cad 100644 --- a/vendor/agent/mibgroup/mibII/snmp_mib.h +++ b/vendor/agent/mibgroup/mibII/snmp_mib.h @@ -1,3 +1,3 @@ -config_require(mibII/updates) +config_require(mibII/updates); void init_snmp_mib(void); diff --git a/vendor/agent/mibgroup/mibII/system_mib.c b/vendor/agent/mibgroup/mibII/system_mib.c index 4a103d7..a6caac5 100644 --- a/vendor/agent/mibgroup/mibII/system_mib.c +++ b/vendor/agent/mibgroup/mibII/system_mib.c @@ -16,23 +16,23 @@ #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 @@ -216,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 @@ -248,7 +248,7 @@ init_system_mib(void) utsName.machine); version_descr[ sizeof(version_descr)-1 ] = 0; #else -#if HAVE_EXECV +#ifdef HAVE_EXECV struct extensible extmp; /* diff --git a/vendor/agent/mibgroup/mibII/system_mib.h b/vendor/agent/mibgroup/mibII/system_mib.h index 19f5b88..a274933 100644 --- a/vendor/agent/mibgroup/mibII/system_mib.h +++ b/vendor/agent/mibgroup/mibII/system_mib.h @@ -5,7 +5,7 @@ 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; diff --git a/vendor/agent/mibgroup/mibII/tcp.c b/vendor/agent/mibgroup/mibII/tcp.c index 8569687..420fea0 100644 --- a/vendor/agent/mibgroup/mibII/tcp.c +++ b/vendor/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,35 @@ #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 +#if __FreeBSD_version >= 1500048 +#define PR_SLOWHZ 2 /* 2 slow timeouts per second */ +#define _KERNEL +#define max(x, y) (((x) > (y)) ? (x) : (y)) +#define MSEC_2_TICKS(m) max(1, (uint32_t)((hz == 1000) ? \ + (m) : ((uint64_t)(m) * (uint64_t)hz)/(uint64_t)1000)) +#endif #include +#if __FreeBSD_version >= 1500048 +#undef _KERNEL +#endif +#endif +#ifdef HAVE_NETINET_TCP_VAR_H +#ifdef openbsd7 +#define _KERNEL /* OpenBSD 7.3 */ #endif -#if HAVE_NETINET_TCP_VAR_H #include +#ifdef openbsd7 +#undef _KERNEL #endif -#if HAVE_NETINET_TCP_FSM_H +#endif +#ifdef HAVE_NETINET_TCP_FSM_H #include #endif @@ -189,6 +205,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 @@ -324,6 +345,75 @@ tcp_handler(netsnmp_mib_handler *handler, #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/vendor/agent/mibgroup/mibII/tcp.h b/vendor/agent/mibgroup/mibII/tcp.h index 0812dc4..e867c20 100644 --- a/vendor/agent/mibgroup/mibII/tcp.h +++ b/vendor/agent/mibgroup/mibII/tcp.h @@ -6,14 +6,14 @@ #define _MIBGROUP_TCP_H -config_require(mibII/tcpTable) +config_require(mibII/tcpTable); #ifdef solaris2 -config_require(kernel_sunos5) +config_require(kernel_sunos5); #elif defined(linux) -config_require(mibII/kernel_linux) -#elif defined(netbsd) || defined(netbsdelf) -config_require(mibII/kernel_netbsd) +config_require(mibII/kernel_linux); +#elif defined(netbsd5) || defined(netbsdelf5) +config_require(mibII/kernel_netbsd); #endif extern void init_tcp(void); diff --git a/vendor/agent/mibgroup/mibII/tcpTable.c b/vendor/agent/mibgroup/mibII/tcpTable.c index 38589f9..772b16a 100644 --- a/vendor/agent/mibgroup/mibII/tcpTable.c +++ b/vendor/agent/mibgroup/mibII/tcpTable.c @@ -18,31 +18,31 @@ #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 -#if HAVE_KVM_GETFILES +#ifdef HAVE_KVM_GETFILES #if defined(HAVE_KVM_GETFILE2) || !defined(openbsd5) #undef HAVE_KVM_GETFILES #endif #endif -#if HAVE_KVM_GETFILES +#ifdef HAVE_KVM_GETFILES #include #include #define _KERNEL @@ -107,7 +107,7 @@ struct netsnmp_tcpConnEntry_s { #define TCPTABLE_REMOTEPORT inp_fport #define TCPTABLE_IS_LINKED_LIST -#elif HAVE_KVM_GETFILES +#elif defined(HAVE_KVM_GETFILES) #define TCPTABLE_ENTRY_TYPE struct kinfo_file #define TCPTABLE_STATE t_state #define TCPTABLE_LOCALADDRESS inp_laddru[0] @@ -122,6 +122,8 @@ 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 @@ -132,11 +134,21 @@ 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 /* hpux11 */ @@ -239,7 +251,7 @@ tcpTable_handler(netsnmp_mib_handler *handler, netsnmp_variable_list *requestvb; netsnmp_table_request_info *table_info; TCPTABLE_ENTRY_TYPE *entry; -#if HAVE_KVM_GETFILES +#ifdef HAVE_KVM_GETFILES int StateMap[] = { 1, 2, 3, 4, 5, 8, 6, 10, 9, 7, 11 }; #endif oid subid; @@ -265,7 +277,7 @@ tcpTable_handler(netsnmp_mib_handler *handler, switch (subid) { case TCPCONNSTATE: -#if HAVE_KVM_GETFILES +#ifdef HAVE_KVM_GETFILES state = StateMap[entry->TCPTABLE_STATE]; #else state = entry->TCPTABLE_STATE; @@ -381,7 +393,7 @@ tcpTable_next_entry( void **loop_context, netsnmp_variable_list *idx; long port; -#if HAVE_KVM_GETFILES +#ifdef HAVE_KVM_GETFILES while (i < tcp_size && (tcp_head[i].so_protocol != IPPROTO_TCP || tcp_head[i].so_family != AF_INET)) i++; @@ -607,7 +619,7 @@ tcpTable_load(netsnmp_cache *cache, void *vmagic) 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 */ @@ -757,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; } @@ -868,7 +880,7 @@ tcpTable_load(netsnmp_cache *cache, void *vmagic) return -1; } -#elif HAVE_KVM_GETFILES +#elif defined(HAVE_KVM_GETFILES) int tcpTable_load(netsnmp_cache *cache, void *vmagic) @@ -1057,18 +1069,22 @@ tcpTable_load(netsnmp_cache *cache, void *vmagic) /* * Set up a linked list */ +#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; } @@ -1081,7 +1097,11 @@ tcpTable_load(netsnmp_cache *cache, void *vmagic) nnew->inp_next = tcp_head; tcp_head = nnew; +#if defined(__NetBSD__) && __NetBSD_Version__ >= 699002800 + if (entry == TAILQ_FIRST(&table.inpt_queue)) +#else if (entry == table.INP_FIRST_SYMBOL) +#endif break; } diff --git a/vendor/agent/mibgroup/mibII/tcpTable.h b/vendor/agent/mibgroup/mibII/tcpTable.h index 8ab443c..dc152ec 100644 --- a/vendor/agent/mibgroup/mibII/tcpTable.h +++ b/vendor/agent/mibgroup/mibII/tcpTable.h @@ -6,10 +6,10 @@ #define _MIBGROUP_TCPTABLE_H #ifdef solaris2 -config_require(kernel_sunos5) +config_require(kernel_sunos5); #endif #if !defined(NETSNMP_ENABLE_MFD_REWRITES) -config_require(mibII/ip) +config_require(mibII/ip); #endif #ifdef linux diff --git a/vendor/agent/mibgroup/mibII/udp.c b/vendor/agent/mibgroup/mibII/udp.c index 1ddcbc5..7b0f40f 100644 --- a/vendor/agent/mibgroup/mibII/udp.c +++ b/vendor/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/vendor/agent/mibgroup/mibII/udp.h b/vendor/agent/mibgroup/mibII/udp.h index 2289e23..c9624eb 100644 --- a/vendor/agent/mibgroup/mibII/udp.h +++ b/vendor/agent/mibgroup/mibII/udp.h @@ -6,14 +6,14 @@ #define _MIBGROUP_UDP_H -config_require(mibII/udpTable) +config_require(mibII/udpTable); #ifdef solaris2 -config_require(kernel_sunos5) +config_require(kernel_sunos5); #elif defined(linux) -config_require(mibII/kernel_linux) -#elif defined(netbsd) || defined(netbsdelf) -config_require(mibII/kernel_netbsd) +config_require(mibII/kernel_linux); +#elif defined(netbsd5) || defined(netbsdelf5) +config_require(mibII/kernel_netbsd); #endif extern void init_udp(void); diff --git a/vendor/agent/mibgroup/mibII/udpTable.c b/vendor/agent/mibgroup/mibII/udpTable.c index b2909d6..e60f7c5 100644 --- a/vendor/agent/mibgroup/mibII/udpTable.c +++ b/vendor/agent/mibgroup/mibII/udpTable.c @@ -17,20 +17,20 @@ #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 -#if HAVE_KVM_GETFILES +#ifdef HAVE_KVM_GETFILES #if defined(HAVE_KVM_GETFILE2) || !defined(openbsd5) #undef HAVE_KVM_GETFILES #endif #endif -#if HAVE_KVM_GETFILES +#ifdef HAVE_KVM_GETFILES #include #include #define _KERNEL @@ -108,6 +108,10 @@ struct netsnmp_inpcb_s { #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 @@ -326,7 +330,7 @@ udpTable_next_entry( void **loop_context, int i = (intptr_t)*loop_context; long port; -#if HAVE_KVM_GETFILES +#ifdef HAVE_KVM_GETFILES while (i < udp_size && (udp_head[i].so_protocol != IPPROTO_UDP || udp_head[i].so_family != AF_INET)) i++; @@ -430,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; } @@ -440,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); } @@ -553,7 +569,7 @@ udpTable_load(netsnmp_cache *cache, void *vmagic) return 0; } -#elif HAVE_KVM_GETFILES +#elif defined(HAVE_KVM_GETFILES) int udpTable_load(netsnmp_cache *cache, void *vmagic) @@ -752,7 +768,11 @@ udpTable_load(netsnmp_cache *cache, void *vmagic) /* * Set up a linked list */ +#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); @@ -768,7 +788,11 @@ udpTable_load(netsnmp_cache *cache, void *vmagic) nnew->INP_NEXT_SYMBOL = udp_head; udp_head = nnew; +#if defined(__NetBSD__) && __NetBSD_Version__ >= 699002800 + if (entry == TAILQ_FIRST(&table.inpt_queue)) +#else if (entry == table.INP_FIRST_SYMBOL) +#endif break; } @@ -809,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; } diff --git a/vendor/agent/mibgroup/mibII/udpTable.h b/vendor/agent/mibgroup/mibII/udpTable.h index 41b54d8..4eeddde 100644 --- a/vendor/agent/mibgroup/mibII/udpTable.h +++ b/vendor/agent/mibgroup/mibII/udpTable.h @@ -6,9 +6,9 @@ #define _MIBGROUP_UDPTABLE_H #ifdef solaris2 -config_require(kernel_sunos5) +config_require(kernel_sunos5); #endif -config_require(mibII/ip) +config_require(mibII/ip); extern void init_udpTable(void); extern Netsnmp_Node_Handler udpTable_handler; diff --git a/vendor/agent/mibgroup/mibII/vacm_conf.c b/vendor/agent/mibgroup/mibII/vacm_conf.c index 01b13de..30911d9 100644 --- a/vendor/agent/mibgroup/mibII/vacm_conf.c +++ b/vendor/agent/mibgroup/mibII/vacm_conf.c @@ -19,30 +19,30 @@ #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 diff --git a/vendor/agent/mibgroup/mibII/vacm_conf.h b/vendor/agent/mibgroup/mibII/vacm_conf.h index 7864ce1..a05bb4c 100644 --- a/vendor/agent/mibgroup/mibII/vacm_conf.h +++ b/vendor/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/vendor/agent/mibgroup/mibII/vacm_context.c b/vendor/agent/mibgroup/mibII/vacm_context.c index aab1688..09d2bf0 100644 --- a/vendor/agent/mibgroup/mibII/vacm_context.c +++ b/vendor/agent/mibgroup/mibII/vacm_context.c @@ -11,7 +11,7 @@ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include diff --git a/vendor/agent/mibgroup/mibII/vacm_vars.c b/vendor/agent/mibgroup/mibII/vacm_vars.c index 5f182b7..ad6f6dd 100644 --- a/vendor/agent/mibgroup/mibII/vacm_vars.c +++ b/vendor/agent/mibgroup/mibII/vacm_vars.c @@ -19,30 +19,30 @@ #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 @@ -54,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 @@ -997,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; @@ -1171,14 +1174,15 @@ write_vacmAccessStatus(int action, free(newGroupName); free(newContextPrefix); } else if (action == ACTION) { - access_parse_oid(&name[ACCESS_MIB_LENGTH], - name_len - ACCESS_MIB_LENGTH, - (u_char **) & newGroupName, &groupNameLen, - (u_char **) & newContextPrefix, &contextPrefixLen, - &model, &level); - aptr = - vacm_getAccessEntry(newGroupName, newContextPrefix, model, - level); + if (access_parse_oid(&name[ACCESS_MIB_LENGTH], + name_len - ACCESS_MIB_LENGTH, + (u_char **) & newGroupName, &groupNameLen, + (u_char **) & newContextPrefix, &contextPrefixLen, + &model, &level)) { + return SNMP_ERR_INCONSISTENTNAME; + } + + aptr = vacm_getAccessEntry(newGroupName, newContextPrefix, model, level); if (aptr != NULL) { if (long_ret == RS_CREATEANDGO || long_ret == RS_ACTIVE) { @@ -1198,14 +1202,15 @@ write_vacmAccessStatus(int action, free(newGroupName); free(newContextPrefix); } else if (action == COMMIT) { - access_parse_oid(&name[ACCESS_MIB_LENGTH], - name_len - ACCESS_MIB_LENGTH, - (u_char **) & newGroupName, &groupNameLen, - (u_char **) & newContextPrefix, &contextPrefixLen, - &model, &level); - aptr = - vacm_getAccessEntry(newGroupName, newContextPrefix, model, - level); + if (access_parse_oid(&name[ACCESS_MIB_LENGTH], + name_len - ACCESS_MIB_LENGTH, + (u_char **) & newGroupName, &groupNameLen, + (u_char **) & newContextPrefix, &contextPrefixLen, + &model, &level)) { + return SNMP_ERR_INCONSISTENTNAME; + } + + aptr = vacm_getAccessEntry(newGroupName, newContextPrefix, model, level); if (aptr) { if (long_ret == RS_DESTROY) { @@ -1217,21 +1222,22 @@ write_vacmAccessStatus(int action, free(newContextPrefix); } else if (action == UNDO) { if (long_ret == RS_CREATEANDGO || long_ret == RS_CREATEANDWAIT) { - access_parse_oid(&name[ACCESS_MIB_LENGTH], - name_len - ACCESS_MIB_LENGTH, - (u_char **) & newGroupName, &groupNameLen, - (u_char **) & newContextPrefix, - &contextPrefixLen, &model, &level); - aptr = - vacm_getAccessEntry(newGroupName, newContextPrefix, model, - level); + if (access_parse_oid(&name[ACCESS_MIB_LENGTH], + name_len - ACCESS_MIB_LENGTH, + (u_char **) & newGroupName, &groupNameLen, + (u_char **) & newContextPrefix, &contextPrefixLen, + &model, &level)) { + return SNMP_ERR_INCONSISTENTNAME; + } + + aptr = vacm_getAccessEntry(newGroupName, newContextPrefix, model, level); if (aptr != NULL) { vacm_destroyAccessEntry(newGroupName, newContextPrefix, model, level); } + free(newGroupName); + free(newContextPrefix); } - free(newGroupName); - free(newContextPrefix); } return SNMP_ERR_NOERROR; diff --git a/vendor/agent/mibgroup/mibII/vacm_vars.h b/vendor/agent/mibgroup/mibII/vacm_vars.h index 471f759..d9cc1de 100644 --- a/vendor/agent/mibgroup/mibII/vacm_vars.h +++ b/vendor/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/vendor/agent/mibgroup/mibII/var_route.c b/vendor/agent/mibgroup/mibII/var_route.c index 93b8b8d..54e6075 100644 --- a/vendor/agent/mibgroup/mibII/var_route.c +++ b/vendor/agent/mibgroup/mibII/var_route.c @@ -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,7 +408,7 @@ init_var_route(void) #ifndef solaris2 -#if NEED_KLGETSA +#ifdef NEED_KLGETSA static union { struct sockaddr_in sin; u_short data[128]; @@ -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; @@ -914,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 @@ -948,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 @@ -972,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 @@ -1177,7 +1183,7 @@ Route_Scan_Reload(void) #else -#if HAVE_SYS_MBUF_H +#ifdef HAVE_SYS_MBUF_H netsnmp_feature_require(string_append_int); netsnmp_feature_require(interface_legacy); static void @@ -1429,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); @@ -1501,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) { @@ -1850,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 */ @@ -1909,6 +1918,7 @@ var_ipRouteEntry(struct variable * vp, if (rt == NULL) return NULL; +#if 0 /* * Save in the 'cache' */ @@ -1917,6 +1927,7 @@ var_ipRouteEntry(struct variable * vp, saveNameLen = *length; saveExact = exact; savert = rt; +#endif /* * Return the name @@ -1980,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; @@ -2047,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/vendor/agent/mibgroup/mibII/var_route.h b/vendor/agent/mibgroup/mibII/var_route.h index da800f5..ce984f5 100644 --- a/vendor/agent/mibgroup/mibII/var_route.h +++ b/vendor/agent/mibgroup/mibII/var_route.h @@ -5,9 +5,16 @@ #ifndef _MIBGROUP_VAR_ROUTE_H #define _MIBGROUP_VAR_ROUTE_H -config_require(mibII/ip) +config_require(mibII/ip); #ifdef solaris2 -config_require(kernel_sunos5) +config_require(kernel_sunos5); +#endif + +#if defined(HAVE_SYS_SYSCTL_H) && !defined(linux) +const struct sockaddr * +get_address(const void *_ap, int addresses, int wanted); +const struct in_addr * +get_in_address(const void *ap, int addresses, int wanted); #endif #if defined(HAVE_IPHLPAPI_H) diff --git a/vendor/agent/mibgroup/mibincl.h b/vendor/agent/mibgroup/mibincl.h index 3d48768..cbcfba3 100644 --- a/vendor/agent/mibgroup/mibincl.h +++ b/vendor/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/vendor/agent/mibgroup/misc/ipfwacc.c b/vendor/agent/mibgroup/misc/ipfwacc.c index 5b65fb9..23568cc 100644 --- a/vendor/agent/mibgroup/misc/ipfwacc.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/misc/ipfwacc.h b/vendor/agent/mibgroup/misc/ipfwacc.h index 639c739..b83494e 100644 --- a/vendor/agent/mibgroup/misc/ipfwacc.h +++ b/vendor/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/vendor/agent/mibgroup/notification-log-mib.h b/vendor/agent/mibgroup/notification-log-mib.h index 925190d..2495f6a 100644 --- a/vendor/agent/mibgroup/notification-log-mib.h +++ b/vendor/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/vendor/agent/mibgroup/notification-log-mib/notification_log.c b/vendor/agent/mibgroup/notification-log-mib/notification_log.c index afcdb95..04d3935 100644 --- a/vendor/agent/mibgroup/notification-log-mib/notification_log.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/notification.h b/vendor/agent/mibgroup/notification.h index ff3a3ea..b748d02 100644 --- a/vendor/agent/mibgroup/notification.h +++ b/vendor/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/vendor/agent/mibgroup/notification/notification_data.h b/vendor/agent/mibgroup/notification/notification_data.h index 8cffbbe..caff9c0 100644 --- a/vendor/agent/mibgroup/notification/notification_data.h +++ b/vendor/agent/mibgroup/notification/notification_data.h @@ -1,4 +1,4 @@ -config_require(notification/snmpNotifyTable_data) -config_require(snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage) -config_require(notification/snmpNotifyFilterProfileTable_data) +config_require(notification/snmpNotifyTable_data); +config_require(snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage); +config_require(notification/snmpNotifyFilterProfileTable_data); diff --git a/vendor/agent/mibgroup/notification/snmpNotifyFilterProfileTable.c b/vendor/agent/mibgroup/notification/snmpNotifyFilterProfileTable.c index 28e9554..1a59ed0 100644 --- a/vendor/agent/mibgroup/notification/snmpNotifyFilterProfileTable.c +++ b/vendor/agent/mibgroup/notification/snmpNotifyFilterProfileTable.c @@ -15,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 @@ -50,9 +50,10 @@ netsnmp_feature_require(header_complex_find_entry); oid snmpNotifyFilterProfileTable_variables_oid[] = { 1, 3, 6, 1, 6, 3, 13, 1, 2 }; +#ifndef NETSNMP_NO_WRITE_SUPPORT static const size_t table_offset = sizeof(snmpNotifyFilterProfileTable_variables_oid)/sizeof(oid) + 3 - 1; - +#endif /* * variable2 snmpNotifyFilterProfileTable_variables: @@ -199,12 +200,10 @@ var_snmpNotifyFilterProfileTable(struct variable *vp, return NULL; } - +#ifndef NETSNMP_NO_WRITE_SUPPORT static struct snmpNotifyFilterProfileTable_data *StorageNew; -#ifndef NETSNMP_NO_WRITE_SUPPORT - int write_snmpNotifyFilterProfileName(int action, u_char * var_val, diff --git a/vendor/agent/mibgroup/notification/snmpNotifyFilterProfileTable.h b/vendor/agent/mibgroup/notification/snmpNotifyFilterProfileTable.h index e531dd4..e7e3f75 100644 --- a/vendor/agent/mibgroup/notification/snmpNotifyFilterProfileTable.h +++ b/vendor/agent/mibgroup/notification/snmpNotifyFilterProfileTable.h @@ -16,7 +16,7 @@ /* * we may use header_complex from the header_complex module */ -config_require(notification/snmpNotifyFilterProfileTable_data) +config_require(notification/snmpNotifyFilterProfileTable_data); #include "snmpNotifyFilterProfileTable_data.h" diff --git a/vendor/agent/mibgroup/notification/snmpNotifyFilterProfileTable_data.c b/vendor/agent/mibgroup/notification/snmpNotifyFilterProfileTable_data.c index 26fe93b..b790810 100644 --- a/vendor/agent/mibgroup/notification/snmpNotifyFilterProfileTable_data.c +++ b/vendor/agent/mibgroup/notification/snmpNotifyFilterProfileTable_data.c @@ -15,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 @@ -318,6 +318,7 @@ parse_snmpNotifyFilterProfileTable(const char *token, char *line) &StorageTmp->snmpTargetParamsNameLen); if (StorageTmp->snmpTargetParamsName == NULL) { config_perror("invalid specification for snmpTargetParamsName"); + free(StorageTmp); return; } diff --git a/vendor/agent/mibgroup/notification/snmpNotifyFilterProfileTable_data.h b/vendor/agent/mibgroup/notification/snmpNotifyFilterProfileTable_data.h index 5708c7a..f170072 100644 --- a/vendor/agent/mibgroup/notification/snmpNotifyFilterProfileTable_data.h +++ b/vendor/agent/mibgroup/notification/snmpNotifyFilterProfileTable_data.h @@ -11,7 +11,7 @@ #ifndef _MIBGROUP_SNMPNOTIFYFILTERPROFILETABLE_DATA_H #define _MIBGROUP_SNMPNOTIFYFILTERPROFILETABLE_DATA_H -config_require(header_complex) +config_require(header_complex); /* * our storage structure(s) diff --git a/vendor/agent/mibgroup/notification/snmpNotifyTable.c b/vendor/agent/mibgroup/notification/snmpNotifyTable.c index da3a3bc..4508cdc 100644 --- a/vendor/agent/mibgroup/notification/snmpNotifyTable.c +++ b/vendor/agent/mibgroup/notification/snmpNotifyTable.c @@ -16,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 @@ -312,9 +312,9 @@ snmpTagValid(const char *tag, const size_t tagLen) return 1; } -static struct snmpNotifyTable_data *StorageNew; +#ifndef NETSNMP_NO_WRITE_SUPPORT -#ifndef NETSNMP_NO_WRITE_SUPPORT +static struct snmpNotifyTable_data *StorageNew; static const int snmpNotifyTable_offset = sizeof(snmpNotifyTable_variables_oid) / sizeof(oid) + 3 - 1; @@ -614,7 +614,7 @@ write_snmpNotifyRowStatus(int action, StorageNew->snmpNotifyStorageType = ST_NONVOLATILE; StorageNew->snmpNotifyType = SNMPNOTIFYTYPE_TRAP; StorageNew->snmpNotifyTagLen = 0; - StorageNew->snmpNotifyTag = (char *) calloc(sizeof(char), 1); + StorageNew->snmpNotifyTag = (char *) calloc(1, sizeof(char)); if (StorageNew->snmpNotifyTag == NULL) { return SNMP_ERR_RESOURCEUNAVAILABLE; } diff --git a/vendor/agent/mibgroup/notification/snmpNotifyTable.h b/vendor/agent/mibgroup/notification/snmpNotifyTable.h index ec8494d..43d2347 100644 --- a/vendor/agent/mibgroup/notification/snmpNotifyTable.h +++ b/vendor/agent/mibgroup/notification/snmpNotifyTable.h @@ -18,9 +18,9 @@ */ -config_require(notification/snmpNotifyTable_data) -config_require(target) -config_add_mib(SNMP-NOTIFICATION-MIB) +config_require(notification/snmpNotifyTable_data); +config_require(target); +config_add_mib(SNMP-NOTIFICATION-MIB); #include "snmpNotifyTable_data.h" diff --git a/vendor/agent/mibgroup/notification/snmpNotifyTable_data.c b/vendor/agent/mibgroup/notification/snmpNotifyTable_data.c index bcdedc3..8641fc4 100644 --- a/vendor/agent/mibgroup/notification/snmpNotifyTable_data.c +++ b/vendor/agent/mibgroup/notification/snmpNotifyTable_data.c @@ -15,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 @@ -274,7 +274,7 @@ notifyTable_register_notifications(int major, int minor, struct targetAddrTable_struct *ptr = NULL; struct targetParamTable_struct *pptr = NULL; struct snmpNotifyTable_data *nptr = NULL; - int confirm, i; + int confirm, close_sess, i; char buf[SNMP_MAXBUF_SMALL]; netsnmp_transport *t = NULL; struct agent_add_trap_args *args = @@ -289,6 +289,7 @@ notifyTable_register_notifications(int major, int minor, args->rc = SNMPERR_GENERR; confirm = args->confirm; ss = args->ss; + close_sess = args->close_sess; name = args->nameData; nameLen = args->nameLen; tag = args->tagData; @@ -360,6 +361,7 @@ notifyTable_register_notifications(int major, int minor, ptr->storageType = ST_READONLY; ptr->rowStatus = RS_ACTIVE; ptr->sess = ss; + ptr->close_sess = close_sess; DEBUGMSGTL(("trapsess", "adding %s to trap table\n", ptr->nameData)); snmpTargetAddrTable_add(ptr); @@ -469,6 +471,7 @@ notifyTable_register_notifications(int major, int minor, if (NULL != nptr) snmpNotifyTable_remove(nptr); + free(nptr); if (NULL != pptr) snmpTargetParamTable_remove(pptr); diff --git a/vendor/agent/mibgroup/notification/snmpNotifyTable_data.h b/vendor/agent/mibgroup/notification/snmpNotifyTable_data.h index bf86e16..73510fb 100644 --- a/vendor/agent/mibgroup/notification/snmpNotifyTable_data.h +++ b/vendor/agent/mibgroup/notification/snmpNotifyTable_data.h @@ -15,9 +15,9 @@ /* * 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) +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 diff --git a/vendor/agent/mibgroup/rmon-mib.h b/vendor/agent/mibgroup/rmon-mib.h index 6f09df7..e660b66 100644 --- a/vendor/agent/mibgroup/rmon-mib.h +++ b/vendor/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/vendor/agent/mibgroup/rmon-mib/data_access/etherstats.h b/vendor/agent/mibgroup/rmon-mib/data_access/etherstats.h index e35dd61..dd66078 100644 --- a/vendor/agent/mibgroup/rmon-mib/data_access/etherstats.h +++ b/vendor/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/vendor/agent/mibgroup/rmon-mib/data_access/etherstats_linux.c b/vendor/agent/mibgroup/rmon-mib/data_access/etherstats_linux.c index 204a6ff..532884c 100644 --- a/vendor/agent/mibgroup/rmon-mib/data_access/etherstats_linux.c +++ b/vendor/agent/mibgroup/rmon-mib/data_access/etherstats_linux.c @@ -5,7 +5,7 @@ #include #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif @@ -130,8 +130,8 @@ etherstats_interface_ioctl_ifindex_get (int fd, const char *name) { rc = _etherStats_ioctl_get(fd, SIOCGIFINDEX, &ifrq, name); if (rc < 0) { DEBUGMSGTL(("access:etherStats:ioctl", - "ifindex_get error on inerface '%s'\n", name)); - snmp_log (LOG_ERR, "access:etherStatsTable:ioctl, ifindex_get error on inerface '%s'\n", name); + "ifindex_get error on interface '%s'\n", name)); + snmp_log (LOG_ERR, "access:etherStatsTable:ioctl, ifindex_get error on interface '%s'\n", name); return 0; } @@ -143,7 +143,7 @@ etherstats_interface_ioctl_ifindex_get (int fd, const char *name) { /* * @retval 0 success * @retval -1 cannot get ETHTOOL_DRVINFO failed - * @retval -2 n_stats zero - no statistcs available + * @retval -2 n_stats zero - no statistics available * @retval -3 memory allocation for holding the statistics failed * @retval -4 cannot get ETHTOOL_GSTRINGS information * @retval -5 cannot get ETHTOOL_GSTATS information @@ -359,7 +359,7 @@ _etherStats_ioctl_get(int fd, int which, struct ifreq *ifrq, const char* name) if(ourfd < 0) { DEBUGMSGTL(("access:etherStatsTable:ioctl", "_etherStats_ioctl_get couldn't create a socket\n")); - snmp_log (LOG_ERR, "access:etherStatsTable:ioctl, _etherStats_ioctl_get error on inerface '%s'\n", name); + snmp_log (LOG_ERR, "access:etherStatsTable:ioctl, _etherStats_ioctl_get error on interface '%s'\n", name); return -2; } diff --git a/vendor/agent/mibgroup/rmon-mib/etherStatsTable.h b/vendor/agent/mibgroup/rmon-mib/etherStatsTable.h index 772845e..7d2da79 100644 --- a/vendor/agent/mibgroup/rmon-mib/etherStatsTable.h +++ b/vendor/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/vendor/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable.h b/vendor/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable.h index 9f7f03c..388a071 100644 --- a/vendor/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable.h +++ b/vendor/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable.h @@ -270,9 +270,6 @@ extern "C" { etherStatsTable_rowreq_ctx_cleanup(etherStatsTable_rowreq_ctx * rowreq_ctx); - int etherStatsTable_commit(etherStatsTable_rowreq_ctx * - rowreq_ctx); - etherStatsTable_rowreq_ctx *etherStatsTable_row_find_by_mib_index(etherStatsTable_mib_index * mib_idx); diff --git a/vendor/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable_data_access.c b/vendor/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable_data_access.c index 67cd8aa..e2e21fd 100644 --- a/vendor/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable_data_access.c +++ b/vendor/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable_data_access.c @@ -11,7 +11,7 @@ #include #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif @@ -189,8 +189,8 @@ 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 - * some other existing data, or peforming calculations to derive the data), + * If, however, the accessing the data involves more work (e.g. parsing + * some other existing data, or performing 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 * etherStatsTable_row_prep() for populating data. @@ -241,7 +241,7 @@ etherStatsTable_container_load(netsnmp_container * container) } /* - * get the interface names of the devices present in the system, in case of failure retval suggests the reson for failure + * get the interface names of the devices present in the system, in case of failure retval suggests the reason for failure * and list_head contains null */ @@ -260,7 +260,7 @@ etherStatsTable_container_load(netsnmp_container * container) } /* - * Walk over the list of interface names present in the system and retreive the statistics + * Walk over the list of interface names present in the system and retrieve the statistics */ for (p = list_head; p; p = p->ifn_next) { diff --git a/vendor/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable_data_set.c b/vendor/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable_data_set.c index 27f3a26..1840bd5 100644 --- a/vendor/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable_data_set.c +++ b/vendor/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable_data_set.c @@ -236,7 +236,7 @@ etherStatsTable_undo_cleanup(etherStatsTable_rowreq_ctx * rowreq_ctx) * this commit will not fail. * * Should you need different behavior depending on which columns were - * set, rowreq_ctx->column_set_flags will indicate which writeable columns were + * set, rowreq_ctx->column_set_flags will indicate which writable columns were * set. The definitions for the COLUMN_*_FLAG bits can be found in * etherStatsTable_oids.h. * A new row will have the MFD_ROW_CREATED bit set in rowreq_flags. @@ -325,7 +325,7 @@ etherStatsTable_commit(etherStatsTable_rowreq_ctx * rowreq_ctx) } /* - * if we successfully commited this row, set the dirty flag. + * if we successfully committed this row, set the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags |= MFD_ROW_DIRTY; @@ -344,7 +344,7 @@ etherStatsTable_commit(etherStatsTable_rowreq_ctx * rowreq_ctx) * undo commit new values. * * Should you need different behavior depending on which columns were - * set, rowreq_ctx->column_set_flags will indicate which writeable columns were + * set, rowreq_ctx->column_set_flags will indicate which writable columns were * set. The definitions for the COLUMN_*_FLAG bits can be found in * etherStatsTable_oids.h. * A new row will have the MFD_ROW_CREATED bit set in rowreq_flags. @@ -376,7 +376,7 @@ etherStatsTable_undo_commit(etherStatsTable_rowreq_ctx * rowreq_ctx) /* - * if we successfully un-commited this row, clear the dirty flag. + * if we successfully un-committed this row, clear the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags &= ~MFD_ROW_DIRTY; @@ -399,7 +399,7 @@ etherStatsTable_undo_commit(etherStatsTable_rowreq_ctx * rowreq_ctx) * Description: This object identifies the source of the data that this etherStats entry is configured to analyze. This - source can be any ethernet interface on this device. + source can be any Ethernet interface on this device. In order to identify a particular interface, this object shall identify the instance of the ifIndex object, defined in RFC 2233 [17], for the desired interface. @@ -413,7 +413,7 @@ This object identifies the source of the data that An agent may or may not be able to tell if fundamental changes to the media of the interface have occurred and necessitate an invalidation of this entry. For example, a - hot-pluggable ethernet card could be pulled out and replaced + hot-pluggable Ethernet card could be pulled out and replaced by a token-ring card. In such a case, if the agent has such knowledge of the change, it is recommended that it invalidate this entry. @@ -450,7 +450,7 @@ This object identifies the source of the data that * is detailed in the description for an object). * * You should check that the requested change between the undo value and the - * new value is legal (ie, the transistion from one value to another + * new value is legal (ie, the transition from one value to another * is legal). * *@note @@ -646,7 +646,7 @@ The entity that configured this entry and is therefore * is detailed in the description for an object). * * You should check that the requested change between the undo value and the - * new value is legal (ie, the transistion from one value to another + * new value is legal (ie, the transition from one value to another * is legal). * *@note @@ -838,7 +838,7 @@ The status of this etherStats entry. * is detailed in the description for an object). * * You should check that the requested change between the undo value and the - * new value is legal (ie, the transistion from one value to another + * new value is legal (ie, the transition from one value to another * is legal). * *@note diff --git a/vendor/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable_interface.c b/vendor/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable_interface.c index 766ccb5..3b38596 100644 --- a/vendor/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable_interface.c +++ b/vendor/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable_interface.c @@ -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; } @@ -1859,7 +1859,7 @@ _mfd_etherStatsTable_commit(netsnmp_mib_handler *handler, if (rowreq_ctx->rowreq_flags & MFD_ROW_DIRTY) { /* - * if we successfully commited this row, set the dirty flag. Use the + * if we successfully committed this row, set the dirty flag. Use the * current value + 1 (i.e. dirty = # rows changed). * this is checked in post_request... */ @@ -2110,8 +2110,7 @@ _cache_free(netsnmp_cache * cache, void *magic) * @internal */ static void -_container_item_free(etherStatsTable_rowreq_ctx * rowreq_ctx, - void *context) +_container_item_free(void* rowreq_ctx, void *context) { DEBUGMSGTL(("internal:etherStatsTable:_container_item_free", "called\n")); @@ -2144,9 +2143,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 */ /** diff --git a/vendor/agent/mibgroup/sctp-mib.h b/vendor/agent/mibgroup/sctp-mib.h index d2844fb..0511069 100644 --- a/vendor/agent/mibgroup/sctp-mib.h +++ b/vendor/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/vendor/agent/mibgroup/sctp-mib/sctpAssocTable.c b/vendor/agent/mibgroup/sctp-mib/sctpAssocTable.c index 9919075..4f4157d 100644 --- a/vendor/agent/mibgroup/sctp-mib/sctpAssocTable.c +++ b/vendor/agent/mibgroup/sctp-mib/sctpAssocTable.c @@ -420,9 +420,8 @@ _cache_load(netsnmp_cache * cache, void *vmagic) */ /** remove a row from the table */ static void -sctpAssocTable_freeEntry_cb(sctpAssocTable_entry * entry, void *magic) +sctpAssocTable_freeEntry_cb(void *entry, void *magic) { - sctpAssocTable_entry_free(entry); } @@ -445,8 +444,7 @@ _cache_free(netsnmp_cache * cache, void *magic) /* * empty (but don't free) cache here */ - CONTAINER_CLEAR(container, (netsnmp_container_obj_func *) - sctpAssocTable_freeEntry_cb, NULL); + CONTAINER_CLEAR(container, sctpAssocTable_freeEntry_cb, NULL); } /* _cache_free */ sctpAssocTable_entry * diff --git a/vendor/agent/mibgroup/sctp-mib/sctpScalars.h b/vendor/agent/mibgroup/sctp-mib/sctpScalars.h index 8dbb8b5..ef0c452 100644 --- a/vendor/agent/mibgroup/sctp-mib/sctpScalars.h +++ b/vendor/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/vendor/agent/mibgroup/sctp-mib/sctpScalars_freebsd.c b/vendor/agent/mibgroup/sctp-mib/sctpScalars_freebsd.c index b8c723f..0f00a75 100644 --- a/vendor/agent/mibgroup/sctp-mib/sctpScalars_freebsd.c +++ b/vendor/agent/mibgroup/sctp-mib/sctpScalars_freebsd.c @@ -17,7 +17,7 @@ #include void -netsnmp_access_sctp_stats_arch_init() +netsnmp_access_sctp_stats_arch_init(void) { } @@ -53,7 +53,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/vendor/agent/mibgroup/sctp-mib/sctpTables.h b/vendor/agent/mibgroup/sctp-mib/sctpTables.h index d22aea0..311ef37 100644 --- a/vendor/agent/mibgroup/sctp-mib/sctpTables.h +++ b/vendor/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/vendor/agent/mibgroup/sctp-mib/sctpTables_freebsd.c b/vendor/agent/mibgroup/sctp-mib/sctpTables_freebsd.c index 516e9f5..d17ec90 100644 --- a/vendor/agent/mibgroup/sctp-mib/sctpTables_freebsd.c +++ b/vendor/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/vendor/agent/mibgroup/smux.h b/vendor/agent/mibgroup/smux.h index bc76929..3f42d61 100644 --- a/vendor/agent/mibgroup/smux.h +++ b/vendor/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/vendor/agent/mibgroup/smux/smux.c b/vendor/agent/mibgroup/smux/smux.c index 27fd368..078c4c6 100644 --- a/vendor/agent/mibgroup/smux/smux.c +++ b/vendor/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 @@ -81,7 +81,6 @@ int smux_listen_sd = -1; static struct timeval smux_rcv_timeout; static long smux_reqid; -void init_smux(void); static u_char *smux_open_process(int, u_char *, size_t *, int *); static u_char *smux_rreq_process(int, u_char *, size_t *); static u_char *smux_close_process(int, u_char *, size_t *); diff --git a/vendor/agent/mibgroup/smux/smux.h b/vendor/agent/mibgroup/smux/smux.h index 9c7496c..f8f0822 100644 --- a/vendor/agent/mibgroup/smux/smux.h +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/smux/snmp_bgp.c b/vendor/agent/mibgroup/smux/snmp_bgp.c index a97ca35..9d64f52 100644 --- a/vendor/agent/mibgroup/smux/snmp_bgp.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/smux/snmp_bgp.h b/vendor/agent/mibgroup/smux/snmp_bgp.h index 74ee6ec..3046630 100644 --- a/vendor/agent/mibgroup/smux/snmp_bgp.h +++ b/vendor/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/vendor/agent/mibgroup/smux/snmp_ospf.c b/vendor/agent/mibgroup/smux/snmp_ospf.c index 4b6d640..0e440ad 100644 --- a/vendor/agent/mibgroup/smux/snmp_ospf.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/smux/snmp_ospf.h b/vendor/agent/mibgroup/smux/snmp_ospf.h index 4cb50f6..45d58d8 100644 --- a/vendor/agent/mibgroup/smux/snmp_ospf.h +++ b/vendor/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/vendor/agent/mibgroup/smux/snmp_rip2.c b/vendor/agent/mibgroup/smux/snmp_rip2.c index 9d49a30..976648c 100644 --- a/vendor/agent/mibgroup/smux/snmp_rip2.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/smux/snmp_rip2.h b/vendor/agent/mibgroup/smux/snmp_rip2.h index c9e1f25..918fa82 100644 --- a/vendor/agent/mibgroup/smux/snmp_rip2.h +++ b/vendor/agent/mibgroup/smux/snmp_rip2.h @@ -5,7 +5,7 @@ #ifndef _MIBGROUP_SNMP_RIP2_H #define _MIBGROUP_SNMP_RIP2_H -config_require(smux/smux) +config_require(smux/smux); extern FindVarMethod var_rip2; void init_snmp_rip2(void); diff --git a/vendor/agent/mibgroup/smux_gated.h b/vendor/agent/mibgroup/smux_gated.h index 60de796..412c521 100644 --- a/vendor/agent/mibgroup/smux_gated.h +++ b/vendor/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/vendor/agent/mibgroup/snmp-notification-mib.h b/vendor/agent/mibgroup/snmp-notification-mib.h index 1fb84f7..8c21360 100644 --- a/vendor/agent/mibgroup/snmp-notification-mib.h +++ b/vendor/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/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable.h b/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable.h index f9b6173..3ccc16a 100644 --- a/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable.h +++ b/vendor/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/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.c b/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.c index 251712e..862f5c4 100644 --- a/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.c +++ b/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.c @@ -972,7 +972,7 @@ snmpNotifyFilterTable_commit(snmpNotifyFilterTable_rowreq_ctx * rowreq_ctx) */ /* - * if we successfully commited this row, set the dirty flag. + * if we successfully committed this row, set the dirty flag. */ rowreq_ctx->rowreq_flags |= MFD_ROW_DIRTY; @@ -1015,7 +1015,7 @@ snmpNotifyFilterTable_undo_commit(snmpNotifyFilterTable_rowreq_ctx * /* - * if we successfully un-commited this row, clear the dirty flag. + * if we successfully un-committed this row, clear the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags &= ~MFD_ROW_DIRTY; diff --git a/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h b/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h index 2fafea6..a09bf22 100644 --- a/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h +++ b/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h @@ -26,8 +26,8 @@ extern "C" { * 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* */ /* @@ -258,50 +258,7 @@ config_require(snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable snmpNotifyFilterTable_rowreq_ctx_cleanup (snmpNotifyFilterTable_rowreq_ctx * rowreq_ctx); - int - - - - - - - - - - - - - - - - snmpNotifyFilterTable_check_dependencies - (snmpNotifyFilterTable_rowreq_ctx * rowreq_ctx); - int - - - - - - - - - - - - - - - - snmpNotifyFilterTable_commit(snmpNotifyFilterTable_rowreq_ctx * - rowreq_ctx); - - - - - - - - snmpNotifyFilterTable_rowreq_ctx + snmpNotifyFilterTable_rowreq_ctx * snmpNotifyFilterTable_row_find_by_mib_index (snmpNotifyFilterTable_mib_index * mib_idx); diff --git a/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access.c b/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access.c index eba6010..e461bd2 100644 --- a/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access.c +++ b/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access.c @@ -21,7 +21,7 @@ */ #include "snmpNotifyFilterTable.h" - +#include "snmpNotifyFilterTable_data_storage.h" #include "snmpNotifyFilterTable_data_access.h" netsnmp_feature_require(snmpNotifyFilterTable_container_get); @@ -110,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 */ @@ -161,8 +161,8 @@ 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 - * some other existing data, or peforming calculations to derive the data), + * If, however, the accessing the data involves more work (e.g. parsing + * some other existing data, or performing 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 * snmpNotifyFilterTable_row_prep() for populating data. diff --git a/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.c b/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.c index 8afbd33..fb993bc 100644 --- a/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.c +++ b/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.c @@ -211,6 +211,7 @@ snmpNotifyFilter_storage_add(const u_char *profileName, size_t profileName_len, if (NULL == data) return NULL; + data->snmpNotifyFilterMask_len = filterMask_len; memcpy(data->snmpNotifyFilterMask, filterMask, filterMask_len); data->snmpNotifyFilterType = filterType; @@ -258,8 +259,8 @@ snmpNotifyFilter_vacm_view_subtree(const char *profile) /* * allocate temporary storage */ - tmp = (struct vacm_viewEntry*)calloc(sizeof(struct vacm_viewEntry), - s->size + 1); + tmp = (struct vacm_viewEntry*)calloc(s->size + 1, + sizeof(struct vacm_viewEntry)); if (NULL == tmp) { free(s->array); free(s); diff --git a/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.h b/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.h index e96631c..a09de34 100644 --- a/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.h +++ b/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.h @@ -71,6 +71,7 @@ extern "C" { ********************************************************************* * function declarations */ + netsnmp_container *snmpNotifyFilter_storage_container_create(void); void init_snmpNotifyFilterTable_data_storage(void); void shutdown_snmpNotifyFilterTable_data_storage(void); diff --git a/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.c b/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.c index 4e06a67..798681d 100644 --- a/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.c +++ b/vendor/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.c @@ -172,6 +172,7 @@ static Netsnmp_Node_Handler _mfd_snmpNotifyFilterTable_post_request; static Netsnmp_Node_Handler _mfd_snmpNotifyFilterTable_object_lookup; static Netsnmp_Node_Handler _mfd_snmpNotifyFilterTable_get_values; #ifndef NETSNMP_DISABLE_SET_SUPPORT +#ifndef NETSNMP_NO_WRITE_SUPPORT static Netsnmp_Node_Handler _mfd_snmpNotifyFilterTable_check_objects; static Netsnmp_Node_Handler _mfd_snmpNotifyFilterTable_undo_setup; static Netsnmp_Node_Handler _mfd_snmpNotifyFilterTable_set_values; @@ -181,6 +182,7 @@ static Netsnmp_Node_Handler _mfd_snmpNotifyFilterTable_commit; static Netsnmp_Node_Handler _mfd_snmpNotifyFilterTable_undo_commit; static Netsnmp_Node_Handler _mfd_snmpNotifyFilterTable_irreversible_commit; static Netsnmp_Node_Handler _mfd_snmpNotifyFilterTable_check_dependencies; +#endif NETSNMP_STATIC_INLINE int _snmpNotifyFilterTable_undo_column(snmpNotifyFilterTable_rowreq_ctx * @@ -1024,7 +1026,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) && @@ -1125,9 +1127,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) { @@ -1634,7 +1634,7 @@ _mfd_snmpNotifyFilterTable_commit(netsnmp_mib_handler *handler, if (rowreq_ctx->rowreq_flags & MFD_ROW_DIRTY) { /* - * if we successfully commited this row, set the dirty flag. Use the + * if we successfully committed this row, set the dirty flag. Use the * current value + 1 (i.e. dirty = # rows changed). * this is checked in post_request... */ @@ -1842,6 +1842,7 @@ _mfd_snmpNotifyFilterTable_irreversible_commit(netsnmp_mib_handler * DATA ACCESS * ***********************************************************************/ +#if 0 /** * @internal */ @@ -1881,10 +1882,9 @@ _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 */ +#endif /** * @internal @@ -1917,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 */ /*********************************************************************** diff --git a/vendor/agent/mibgroup/snmp-usm-dh-objects-mib.h b/vendor/agent/mibgroup/snmp-usm-dh-objects-mib.h index 3aacf43..f0de819 100644 --- a/vendor/agent/mibgroup/snmp-usm-dh-objects-mib.h +++ b/vendor/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/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHParameters.h b/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHParameters.h index c277ab0..35b0365 100644 --- a/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHParameters.h +++ b/vendor/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/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHParameters/usmDHParameters.c b/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHParameters/usmDHParameters.c index 62adeef..94287dd 100644 --- a/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHParameters/usmDHParameters.c +++ b/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHParameters/usmDHParameters.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable.h b/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable.h index 84f2169..9eb1b31 100644 --- a/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable.h +++ b/vendor/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/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable.h b/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable.h index b343d78..2bef3cd 100644 --- a/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable.h +++ b/vendor/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* */ /* @@ -185,16 +185,8 @@ config_require(snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_ usmDHUserKeyTable_data *usmDHUserKeyTable_allocate_data(void); void usmDHUserKeyTable_release_data(usmDHUserKeyTable_data * data); - - int - usmDHUserKeyTable_check_dependencies(usmDHUserKeyTable_rowreq_ctx * - rowreq_ctx); int usmDHUserKeyTable_commit(usmDHUserKeyTable_rowreq_ctx * rowreq_ctx); - int - usmDHUserKeyTable_irreversible_commit(usmDHUserKeyTable_rowreq_ctx - * rowreq_ctx); - usmDHUserKeyTable_rowreq_ctx *usmDHUserKeyTable_row_find_by_mib_index (usmDHUserKeyTable_mib_index * mib_idx); diff --git a/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_access.c b/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_access.c index a139c9f..a07092b 100644 --- a/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_access.c +++ b/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_access.c @@ -188,8 +188,8 @@ 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 - * some other existing data, or peforming calculations to derive the data), + * If, however, the accessing the data involves more work (e.g. parsing + * some other existing data, or performing 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 * usmDHUserKeyTable_row_prep() for populating data. diff --git a/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_get.c b/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_get.c index d2b86db..f98076c 100644 --- a/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_get.c +++ b/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_get.c @@ -8,6 +8,7 @@ * standard Net-SNMP includes */ #include +#include #include #include #include @@ -62,8 +63,8 @@ int usmDHGetUserKeyChange(struct usmUser *user, int for_auth_key, u_char **keyobj, size_t *keyobj_len) { - DH *dh; - const BIGNUM *pub_key; + DH *dh = NULL; + const BIGNUM *pub_key = NULL; dh = usmDHGetUserDHptr(user, for_auth_key); @@ -155,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 */ diff --git a/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_set.c b/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_set.c index 567d20e..0c3492a 100644 --- a/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_set.c +++ b/vendor/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; } @@ -348,7 +362,7 @@ usmDHUserKeyTable_commit(usmDHUserKeyTable_rowreq_ctx * rowreq_ctx) */ /* - * if we successfully commited this row, set the dirty flag. + * if we successfully committed this row, set the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags |= MFD_ROW_DIRTY; @@ -393,7 +407,7 @@ usmDHUserKeyTable_undo_commit(usmDHUserKeyTable_rowreq_ctx * rowreq_ctx) /* - * if we successfully un-commited this row, clear the dirty flag. + * if we successfully un-committed this row, clear the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags &= ~MFD_ROW_DIRTY; diff --git a/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_set.h b/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_set.h index e7c7059..932dbef 100644 --- a/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_set.h +++ b/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_set.h @@ -42,8 +42,6 @@ extern "C" { rowreq_ctx); int usmDHUserKeyTable_undo(usmDHUserKeyTable_rowreq_ctx * rowreq_ctx); - int usmDHUserKeyTable_commit(usmDHUserKeyTable_rowreq_ctx * - rowreq_ctx); int usmDHUserKeyTable_undo_commit(usmDHUserKeyTable_rowreq_ctx * rowreq_ctx); diff --git a/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_interface.c b/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_interface.c index 112e752..e593959 100644 --- a/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_interface.c +++ b/vendor/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_interface.c @@ -873,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) && @@ -1408,7 +1408,7 @@ _mfd_usmDHUserKeyTable_commit(netsnmp_mib_handler *handler, if (rowreq_ctx->rowreq_flags & MFD_ROW_DIRTY) { /* - * if we successfully commited this row, set the dirty flag. Use the + * if we successfully committed this row, set the dirty flag. Use the * current value + 1 (i.e. dirty = # rows changed). * this is checked in post_request... */ @@ -1667,8 +1667,7 @@ _cache_free(netsnmp_cache * cache, void *magic) * @internal */ static void -_container_item_free(usmDHUserKeyTable_rowreq_ctx * rowreq_ctx, - void *context) +_container_item_free(void *rowreq_ctx, void *context) { DEBUGMSGTL(("internal:usmDHUserKeyTable:_container_item_free", "called\n")); @@ -1701,9 +1700,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 */ /** diff --git a/vendor/agent/mibgroup/snmpv3/snmpEngine.h b/vendor/agent/mibgroup/snmpv3/snmpEngine.h index b62a220..a233c90 100644 --- a/vendor/agent/mibgroup/snmpv3/snmpEngine.h +++ b/vendor/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/vendor/agent/mibgroup/snmpv3/snmpMPDStats.h b/vendor/agent/mibgroup/snmpv3/snmpMPDStats.h index 3234016..50add5e 100644 --- a/vendor/agent/mibgroup/snmpv3/snmpMPDStats.h +++ b/vendor/agent/mibgroup/snmpv3/snmpMPDStats.h @@ -1,7 +1,7 @@ #ifndef _MIBGROUP_SNMPMPDSTATS_H #define _MIBGROUP_SNMPMPDSTATS_H -config_add_mib(SNMP-MPD-MIB) +config_add_mib(SNMP-MPD-MIB); void init_snmpMPDStats(void); void shutdown_snmpMPDStats(void); diff --git a/vendor/agent/mibgroup/snmpv3/usmConf.h b/vendor/agent/mibgroup/snmpv3/usmConf.h index d27f12e..e30ae97 100644 --- a/vendor/agent/mibgroup/snmpv3/usmConf.h +++ b/vendor/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/vendor/agent/mibgroup/snmpv3/usmStats.h b/vendor/agent/mibgroup/snmpv3/usmStats.h index 7cec5f3..ed3206d 100644 --- a/vendor/agent/mibgroup/snmpv3/usmStats.h +++ b/vendor/agent/mibgroup/snmpv3/usmStats.h @@ -1,7 +1,7 @@ #ifndef _MIBGROUP_USMSTATS_H #define _MIBGROUP_USMSTATS_H -config_add_mib(SNMP-USER-BASED-SM-MIB) +config_add_mib(SNMP-USER-BASED-SM-MIB); void init_usmStats(void); void shutdown_usmStats(void); diff --git a/vendor/agent/mibgroup/snmpv3/usmUser.c b/vendor/agent/mibgroup/snmpv3/usmUser.c index f34e2ea..608637e 100644 --- a/vendor/agent/mibgroup/snmpv3/usmUser.c +++ b/vendor/agent/mibgroup/snmpv3/usmUser.c @@ -15,7 +15,7 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -1113,7 +1113,7 @@ write_usmUserPrivKeyChange(int action, if ((uptr = usm_parse_user(name, name_len)) == NULL) { return SNMP_ERR_INCONSISTENTNAME; } else { - netsnmp_priv_alg_info *pai = + const netsnmp_priv_alg_info *pai = sc_get_priv_alg_byoid(uptr->privProtocol, uptr->privProtocolLen); if (NULL == pai) { @@ -1505,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/vendor/agent/mibgroup/snmpv3/usmUser.h b/vendor/agent/mibgroup/snmpv3/usmUser.h index 53d1412..2d9b9af 100644 --- a/vendor/agent/mibgroup/snmpv3/usmUser.h +++ b/vendor/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/vendor/agent/mibgroup/snmpv3mibs.h b/vendor/agent/mibgroup/snmpv3mibs.h index 43f7c48..36d6035 100644 --- a/vendor/agent/mibgroup/snmpv3mibs.h +++ b/vendor/agent/mibgroup/snmpv3mibs.h @@ -6,11 +6,11 @@ * snmpv3 mib(s) */ -config_require(snmpv3/snmpEngine) -config_require(snmpv3/snmpMPDStats) +config_require(snmpv3/snmpEngine); +config_require(snmpv3/snmpMPDStats); #ifdef NETSNMP_SECMOD_USM -config_require(snmpv3/usmStats) -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/vendor/agent/mibgroup/struct.h b/vendor/agent/mibgroup/struct.h index c8bc36a..d6c69c0 100644 --- a/vendor/agent/mibgroup/struct.h +++ b/vendor/agent/mibgroup/struct.h @@ -30,7 +30,7 @@ struct extensible { struct myproc { char name[STRMAX]; -#if HAVE_PCRE_H +#ifdef HAVE_PCRE_H netsnmp_regex_ptr regexp; #endif char fixcmd[STRMAX]; diff --git a/vendor/agent/mibgroup/target.h b/vendor/agent/mibgroup/target.h index 39fadfe..d9096ee 100644 --- a/vendor/agent/mibgroup/target.h +++ b/vendor/agent/mibgroup/target.h @@ -1,5 +1,5 @@ -config_require(target/snmpTargetAddrEntry) -config_require(target/snmpTargetParamsEntry) -config_require(target/target) -config_require(target/target_counters) -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/vendor/agent/mibgroup/target/snmpTargetAddrEntry.c b/vendor/agent/mibgroup/target/snmpTargetAddrEntry.c index 03adb26..bd87260 100644 --- a/vendor/agent/mibgroup/target/snmpTargetAddrEntry.c +++ b/vendor/agent/mibgroup/target/snmpTargetAddrEntry.c @@ -11,7 +11,7 @@ */ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include diff --git a/vendor/agent/mibgroup/target/snmpTargetAddrEntry.h b/vendor/agent/mibgroup/target/snmpTargetAddrEntry.h index a72ed67..a9379fd 100644 --- a/vendor/agent/mibgroup/target/snmpTargetAddrEntry.h +++ b/vendor/agent/mibgroup/target/snmpTargetAddrEntry.h @@ -16,7 +16,7 @@ * 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" @@ -24,7 +24,7 @@ config_require(util_funcs/header_generic) * 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); /* diff --git a/vendor/agent/mibgroup/target/snmpTargetAddrEntry_data.c b/vendor/agent/mibgroup/target/snmpTargetAddrEntry_data.c index 8a60945..e737094 100644 --- a/vendor/agent/mibgroup/target/snmpTargetAddrEntry_data.c +++ b/vendor/agent/mibgroup/target/snmpTargetAddrEntry_data.c @@ -11,7 +11,7 @@ */ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -78,6 +78,8 @@ snmpTargetAddrTable_create(void) newEntry->storageType = SNMP_STORAGE_NONVOLATILE; newEntry->rowStatus = SNMP_ROW_NONEXISTENT; + + newEntry->close_sess = 1; } return newEntry; @@ -94,10 +96,9 @@ snmpTargetAddrTable_dispose(struct targetAddrTable_struct *reaped) if (NULL == reaped) return; - if (reaped->sess) + if (reaped->sess && reaped->close_sess) snmp_close(reaped->sess); - else - SNMP_FREE(reaped->tAddress); + SNMP_FREE(reaped->tAddress); SNMP_FREE(reaped->nameData); SNMP_FREE(reaped->tagListData); SNMP_FREE(reaped->paramsData); @@ -263,7 +264,7 @@ init_snmpTargetAddrEntry_data(void) snmpd_register_config_handler("targetAddr", snmpd_parse_config_targetAddr, - (void (*)(void))0, NULL); + NULL, NULL); /* * we need to be called back later diff --git a/vendor/agent/mibgroup/target/snmpTargetAddrEntry_data.h b/vendor/agent/mibgroup/target/snmpTargetAddrEntry_data.h index 0af434e..4db3d0d 100644 --- a/vendor/agent/mibgroup/target/snmpTargetAddrEntry_data.h +++ b/vendor/agent/mibgroup/target/snmpTargetAddrEntry_data.h @@ -56,6 +56,7 @@ int rowStatus; struct targetAddrTable_struct *next; netsnmp_session *sess; /* a snmp session to the target host */ + int close_sess; time_t sessionCreationTime; }; diff --git a/vendor/agent/mibgroup/target/snmpTargetParamsEntry.c b/vendor/agent/mibgroup/target/snmpTargetParamsEntry.c index a2f2e70..71c878a 100644 --- a/vendor/agent/mibgroup/target/snmpTargetParamsEntry.c +++ b/vendor/agent/mibgroup/target/snmpTargetParamsEntry.c @@ -11,7 +11,7 @@ */ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -96,7 +96,7 @@ init_snmpTargetParamsEntry(void) snmpd_register_config_handler("targetParams", snmpd_parse_config_targetParams, - (void (*)(void))0, NULL); + NULL, NULL); } /* init_snmpTargetParmsEntry */ diff --git a/vendor/agent/mibgroup/target/snmpTargetParamsEntry_data.c b/vendor/agent/mibgroup/target/snmpTargetParamsEntry_data.c index a128cd9..54aecf3 100644 --- a/vendor/agent/mibgroup/target/snmpTargetParamsEntry_data.c +++ b/vendor/agent/mibgroup/target/snmpTargetParamsEntry_data.c @@ -10,7 +10,7 @@ */ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include diff --git a/vendor/agent/mibgroup/target/target.c b/vendor/agent/mibgroup/target/target.c index cc14292..239b35a 100644 --- a/vendor/agent/mibgroup/target/target.c +++ b/vendor/agent/mibgroup/target/target.c @@ -7,7 +7,7 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include diff --git a/vendor/agent/mibgroup/target/target.h b/vendor/agent/mibgroup/target/target.h index 3a88748..994eea6 100644 --- a/vendor/agent/mibgroup/target/target.h +++ b/vendor/agent/mibgroup/target/target.h @@ -25,7 +25,7 @@ typedef int (TargetFilterFunction) (struct targetAddrTable_struct * netsnmp_session *get_target_sessions(char *taglist, TargetFilterFunction *, void *filterArg); -config_require(target/snmpTargetAddrEntry_data) -config_require(target/snmpTargetParamsEntry_data) +config_require(target/snmpTargetAddrEntry_data); +config_require(target/snmpTargetParamsEntry_data); #endif /* SNMP_TARGET_H */ diff --git a/vendor/agent/mibgroup/target/target_counters.c b/vendor/agent/mibgroup/target/target_counters.c index 9725ddc..7c48052 100644 --- a/vendor/agent/mibgroup/target/target_counters.c +++ b/vendor/agent/mibgroup/target/target_counters.c @@ -2,7 +2,7 @@ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include diff --git a/vendor/agent/mibgroup/tcp-mib.h b/vendor/agent/mibgroup/tcp-mib.h index 866d1b4..ed94ce5 100644 --- a/vendor/agent/mibgroup/tcp-mib.h +++ b/vendor/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/vendor/agent/mibgroup/tcp-mib/data_access/tcpConn.h b/vendor/agent/mibgroup/tcp-mib/data_access/tcpConn.h index 0c13a0f..18c7018 100644 --- a/vendor/agent/mibgroup/tcp-mib/data_access/tcpConn.h +++ b/vendor/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/vendor/agent/mibgroup/tcp-mib/data_access/tcpConn_common.c b/vendor/agent/mibgroup/tcp-mib/data_access/tcpConn_common.c index 19b6680..95e67cd 100644 --- a/vendor/agent/mibgroup/tcp-mib/data_access/tcpConn_common.c +++ b/vendor/agent/mibgroup/tcp-mib/data_access/tcpConn_common.c @@ -16,8 +16,7 @@ /* * local static prototypes */ -static void _access_tcpconn_entry_release(netsnmp_tcpconn_entry * entry, - void *unused); +static void _access_tcpconn_entry_release(void *entry, void *unused); /**---------------------------------------------------------------------*/ /* @@ -87,9 +86,7 @@ netsnmp_access_tcpconn_container_free(netsnmp_container *container, u_int free_f /* * free all items. */ - CONTAINER_CLEAR(container, - (netsnmp_container_obj_func*)_access_tcpconn_entry_release, - NULL); + CONTAINER_CLEAR(container, _access_tcpconn_entry_release, NULL); } if(! (free_flags & NETSNMP_ACCESS_TCPCONN_FREE_KEEP_CONTAINER)) @@ -229,7 +226,7 @@ netsnmp_access_tcpconn_entry_update(netsnmp_tcpconn_entry *lhs, /** */ void -_access_tcpconn_entry_release(netsnmp_tcpconn_entry * entry, void *context) +_access_tcpconn_entry_release(void *entry, void *context) { netsnmp_access_tcpconn_entry_free(entry); } diff --git a/vendor/agent/mibgroup/tcp-mib/data_access/tcpConn_freebsd4.c b/vendor/agent/mibgroup/tcp-mib/data_access/tcpConn_freebsd4.c index 4e2a41a..89e4f5c 100644 --- a/vendor/agent/mibgroup/tcp-mib/data_access/tcpConn_freebsd4.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/tcp-mib/data_access/tcpConn_linux.c b/vendor/agent/mibgroup/tcp-mib/data_access/tcpConn_linux.c index b56e8d2..6954f7b 100644 --- a/vendor/agent/mibgroup/tcp-mib/data_access/tcpConn_linux.c +++ b/vendor/agent/mibgroup/tcp-mib/data_access/tcpConn_linux.c @@ -242,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); @@ -389,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/vendor/agent/mibgroup/tcp-mib/data_access/tcpConn_netbsd.c b/vendor/agent/mibgroup/tcp-mib/data_access/tcpConn_netbsd.c index b4229ff..9a80192 100644 --- a/vendor/agent/mibgroup/tcp-mib/data_access/tcpConn_netbsd.c +++ b/vendor/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/vendor/agent/mibgroup/tcp-mib/data_access/tcpConn_openbsd.c b/vendor/agent/mibgroup/tcp-mib/data_access/tcpConn_openbsd.c index 41a8c4c..56e2c3d 100644 --- a/vendor/agent/mibgroup/tcp-mib/data_access/tcpConn_openbsd.c +++ b/vendor/agent/mibgroup/tcp-mib/data_access/tcpConn_openbsd.c @@ -13,26 +13,26 @@ #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 -#if HAVE_KVM_GETFILES +#ifdef HAVE_KVM_GETFILES #if defined(HAVE_KVM_GETFILE2) || !defined(openbsd5) #undef HAVE_KVM_GETFILES #endif #endif -#if HAVE_KVM_GETFILES +#ifdef HAVE_KVM_GETFILES #include #include #define _KERNEL /* for DTYPE_SOCKET */ diff --git a/vendor/agent/mibgroup/tcp-mib/tcpConnTable.h b/vendor/agent/mibgroup/tcp-mib/tcpConnTable.h index f588c1c..da7af70 100644 --- a/vendor/agent/mibgroup/tcp-mib/tcpConnTable.h +++ b/vendor/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/vendor/agent/mibgroup/tcp-mib/tcpConnectionTable.h b/vendor/agent/mibgroup/tcp-mib/tcpConnectionTable.h index c697aaa..9de6c0f 100644 --- a/vendor/agent/mibgroup/tcp-mib/tcpConnectionTable.h +++ b/vendor/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/vendor/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.c b/vendor/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.c index c2c288f..2974901 100644 --- a/vendor/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.c +++ b/vendor/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.c @@ -843,7 +843,7 @@ tcpConnectionTable_commit(tcpConnectionTable_rowreq_ctx * rowreq_ctx) } /* - * if we successfully commited this row, set the dirty flag. + * if we successfully committed this row, set the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags |= MFD_ROW_DIRTY; @@ -893,7 +893,7 @@ tcpConnectionTable_undo_commit(tcpConnectionTable_rowreq_ctx * rowreq_ctx) /* - * if we successfully un-commited this row, clear the dirty flag. + * if we successfully un-committed this row, clear the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags &= ~MFD_ROW_DIRTY; diff --git a/vendor/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.h b/vendor/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.h index 17d3105..6ea34f3 100644 --- a/vendor/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.h +++ b/vendor/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* */ /* @@ -269,35 +269,7 @@ config_require(tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access) tcpConnectionTable_data *tcpConnectionTable_allocate_data(void); void tcpConnectionTable_release_data(tcpConnectionTable_data * data); - - int - - - - - - - - - - - - - - - - tcpConnectionTable_check_dependencies(tcpConnectionTable_rowreq_ctx - * rowreq_ctx); - int tcpConnectionTable_commit(tcpConnectionTable_rowreq_ctx - * rowreq_ctx); - - - - - - - - tcpConnectionTable_rowreq_ctx + tcpConnectionTable_rowreq_ctx * tcpConnectionTable_row_find_by_mib_index (tcpConnectionTable_mib_index * mib_idx); diff --git a/vendor/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access.c b/vendor/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access.c index dfb9649..23c5178 100644 --- a/vendor/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access.c +++ b/vendor/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access.c @@ -166,8 +166,10 @@ tcpConnectionTable_container_shutdown(netsnmp_container *container_ptr) * add new entry */ static void -_add_connection(netsnmp_tcpconn_entry *entry, netsnmp_container *container) +_add_connection(void *p, void *q) { + netsnmp_tcpconn_entry *entry = p; + netsnmp_container *container = q; tcpConnectionTable_rowreq_ctx *rowreq_ctx; DEBUGMSGTL(("tcpConnectionTable:access", "creating new entry\n")); @@ -227,8 +229,8 @@ _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 - * some other existing data, or peforming calculations to derive the data), + * If, however, the accessing the data involves more work (e.g. parsing + * some other existing data, or performing 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 * tcpConnectionTable_row_prep() for populating data. @@ -254,8 +256,7 @@ tcpConnectionTable_container_load(netsnmp_container *container) /* * got all the connections. pull out the active ones. */ - CONTAINER_FOR_EACH(raw_data, (netsnmp_container_obj_func *) - _add_connection, container); + CONTAINER_FOR_EACH(raw_data, _add_connection, container); /* * free the container. we've either claimed each entry, or released it, diff --git a/vendor/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_interface.c b/vendor/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_interface.c index 66f2084..5c338df 100644 --- a/vendor/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_interface.c +++ b/vendor/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_interface.c @@ -995,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) && @@ -1466,7 +1466,7 @@ _mfd_tcpConnectionTable_commit(netsnmp_mib_handler *handler, if (rowreq_ctx->rowreq_flags & MFD_ROW_DIRTY) { /* - * if we successfully commited this row, set the dirty flag. Use the + * if we successfully committed this row, set the dirty flag. Use the * current value + 1 (i.e. dirty = # rows changed). * this is checked in post_request... */ @@ -1697,8 +1697,7 @@ _cache_free(netsnmp_cache * cache, void *magic) * @internal */ static void -_container_item_free(tcpConnectionTable_rowreq_ctx * rowreq_ctx, - void *context) +_container_item_free(void *rowreq_ctx, void *context) { DEBUGMSGTL(("internal:tcpConnectionTable:_container_item_free", "called\n")); @@ -1732,9 +1731,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 */ /** diff --git a/vendor/agent/mibgroup/tcp-mib/tcpListenerTable.h b/vendor/agent/mibgroup/tcp-mib/tcpListenerTable.h index 7024f79..8336221 100644 --- a/vendor/agent/mibgroup/tcp-mib/tcpListenerTable.h +++ b/vendor/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/vendor/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.h b/vendor/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.h index 08a741a..fecd46c 100644 --- a/vendor/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.h +++ b/vendor/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/vendor/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_data_access.c b/vendor/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_data_access.c index 4aa14ff..4147de1 100644 --- a/vendor/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_data_access.c +++ b/vendor/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_data_access.c @@ -167,8 +167,10 @@ tcpListenerTable_container_shutdown(netsnmp_container *container_ptr) * add new entry */ static void -_add_connection(netsnmp_tcpconn_entry *entry, netsnmp_container *container) +_add_connection(void *p, void *q) { + netsnmp_tcpconn_entry *entry = p; + netsnmp_container *container = q; tcpListenerTable_rowreq_ctx *rowreq_ctx; DEBUGMSGTL(("tcpListenerTable:access", "creating new entry\n")); @@ -178,23 +180,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,8 +221,8 @@ _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 - * some other existing data, or peforming calculations to derive the data), + * If, however, the accessing the data involves more work (e.g. parsing + * some other existing data, or performing 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 * tcpListenerTable_row_prep() for populating data. @@ -247,8 +249,7 @@ tcpListenerTable_container_load(netsnmp_container *container) /* * got all the connections. pull out the active ones. */ - CONTAINER_FOR_EACH(raw_data, (netsnmp_container_obj_func *) - _add_connection, container); + CONTAINER_FOR_EACH(raw_data, _add_connection, container); /* * free the container. we've either claimed each entry, or released it, diff --git a/vendor/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_interface.c b/vendor/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_interface.c index ab583e1..4ca4079 100644 --- a/vendor/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_interface.c +++ b/vendor/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_interface.c @@ -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) && @@ -881,8 +881,7 @@ _cache_free(netsnmp_cache * cache, void *magic) * @internal */ static void -_container_item_free(tcpListenerTable_rowreq_ctx * rowreq_ctx, - void *context) +_container_item_free(void *rowreq_ctx, void *context) { DEBUGMSGTL(("internal:tcpListenerTable:_container_item_free", "called\n")); @@ -915,9 +914,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 */ /** diff --git a/vendor/agent/mibgroup/testhandler.c b/vendor/agent/mibgroup/testhandler.c index e83bc18..2e19afd 100644 --- a/vendor/agent/mibgroup/testhandler.c +++ b/vendor/agent/mibgroup/testhandler.c @@ -4,7 +4,7 @@ #ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -31,7 +31,18 @@ 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_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; +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) @@ -39,10 +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_row *row; DEBUGMSGTL(("testhandler", "initializing\n")); @@ -50,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, @@ -77,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 @@ -128,22 +135,32 @@ init_testhandler(void) * 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, diff --git a/vendor/agent/mibgroup/testhandler.h b/vendor/agent/mibgroup/testhandler.h index 20806ab..6c5995b 100644 --- a/vendor/agent/mibgroup/testhandler.h +++ b/vendor/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/vendor/agent/mibgroup/tlstm-mib.h b/vendor/agent/mibgroup/tlstm-mib.h index 50e6985..c4be721 100644 --- a/vendor/agent/mibgroup/tlstm-mib.h +++ b/vendor/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/vendor/agent/mibgroup/tlstm-mib/snmpTlstmAddrTable.h b/vendor/agent/mibgroup/tlstm-mib/snmpTlstmAddrTable.h index 7b10905..fd9b6b0 100644 --- a/vendor/agent/mibgroup/tlstm-mib/snmpTlstmAddrTable.h +++ b/vendor/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/vendor/agent/mibgroup/tlstm-mib/snmpTlstmAddrTable/snmpTlstmAddrTable.c b/vendor/agent/mibgroup/tlstm-mib/snmpTlstmAddrTable/snmpTlstmAddrTable.c index f46d344..feb9c9b 100644 --- a/vendor/agent/mibgroup/tlstm-mib/snmpTlstmAddrTable/snmpTlstmAddrTable.c +++ b/vendor/agent/mibgroup/tlstm-mib/snmpTlstmAddrTable/snmpTlstmAddrTable.c @@ -40,12 +40,12 @@ netsnmp_feature_require(table_tdata_insert_row); typedef struct tlstmAddrTable_undo_s { char fate; char copied; - char is_consistent; + signed char is_consistent; netsnmp_request_info *req[TLSTMADDRTABLE_MAX_COLUMN + 1]; /* * undo Column space */ - char tlstmAddrServerFingerprint[TLSTMADDRSERVERFINGERPRINT_MAX_SIZE]; + char tlstmAddrServerFingerprint[TLSTMADDRSERVERFINGERPRINT_MAX_SIZE]; size_t tlstmAddrServerFingerprint_len; char tlstmAddrServerIdentity[TLSTMADDRSERVERIDENTITY_MAX_SIZE]; size_t tlstmAddrServerIdentity_len; @@ -83,19 +83,25 @@ typedef struct tlstmAddrTable_entry_s { /* * user data */ - struct netsnmp_cert_s *cert; char addr_flags; } tlstmAddrTable_entry; +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); -static void _cache_free(netsnmp_cache *cache, netsnmp_tdata *table); +static int _cache_load(netsnmp_cache *cache, void *table); +static void _cache_free(netsnmp_cache *cache, void *table); static uint32_t _last_changed = 0; 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); @@ -114,44 +120,38 @@ 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; } /* * cache init */ - cache = netsnmp_cache_create(30, (NetsnmpCacheLoad*)_cache_load, - (NetsnmpCacheFree*)_cache_free, + cache = netsnmp_cache_create(30, _cache_load, _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; @@ -159,57 +159,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; - - netsnmp_tdata_register(reg, _table_data, table_info); + addr_table_info->min_column = TLSTMADDRTABLE_MIN_COLUMN; + addr_table_info->max_column = TLSTMADDRTABLE_MAX_COLUMN; - 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); } /*********************************************************************** @@ -331,8 +381,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); @@ -356,7 +406,6 @@ tlstmAddrTable_handler(netsnmp_mib_handler *handler, netsnmp_request_info *request = NULL; netsnmp_table_request_info *table_info; netsnmp_tdata *table_data; - netsnmp_tdata_row *table_row; tlstmAddrTable_entry *table_entry; int ret = SNMP_ERR_NOERROR; @@ -493,6 +542,8 @@ tlstmAddrTable_handler(netsnmp_mib_handler *handler, */ case MODE_SET_RESERVE2: for (request = requests; request; request = request->next) { + netsnmp_tdata_row *table_row = NULL; + table_entry = (tlstmAddrTable_entry *) netsnmp_tdata_extract_entry(request); table_data = netsnmp_tdata_extract_table(request); @@ -574,7 +625,7 @@ tlstmAddrTable_handler(netsnmp_mib_handler *handler, * release undo resources, remove any newly created rows */ for (request = requests; request; request = request->next) { - table_row = netsnmp_tdata_extract_row(request); + netsnmp_tdata_row *table_row = netsnmp_tdata_extract_row(request); table_data = netsnmp_tdata_extract_table(request); table_entry = (tlstmAddrTable_entry *) table_row ? table_row-> @@ -748,7 +799,7 @@ tlstmAddrTable_handler(netsnmp_mib_handler *handler, */ case MODE_SET_UNDO: for (request = requests; request; request = request->next) { - table_row = netsnmp_tdata_extract_row(request); + netsnmp_tdata_row *table_row = netsnmp_tdata_extract_row(request); table_entry = (tlstmAddrTable_entry *) table_row ? table_row-> data : NULL; @@ -799,7 +850,7 @@ tlstmAddrTable_handler(netsnmp_mib_handler *handler, * or remove any newly created rows */ for (request = requests; request; request = request->next) { - table_row = netsnmp_tdata_extract_row(request); + netsnmp_tdata_row *table_row = netsnmp_tdata_extract_row(request); table_entry = (tlstmAddrTable_entry *) table_row ? table_row-> data : NULL; @@ -826,7 +877,7 @@ tlstmAddrTable_handler(netsnmp_mib_handler *handler, */ case MODE_SET_COMMIT: for (request = requests; request; request = request->next) { - table_row = netsnmp_tdata_extract_row(request); + netsnmp_tdata_row *table_row = netsnmp_tdata_extract_row(request); table_data = netsnmp_tdata_extract_table(request); table_info = netsnmp_extract_table_info(request); table_entry = (tlstmAddrTable_entry *) @@ -887,7 +938,6 @@ tlstmAddrTable_handler(netsnmp_mib_handler *handler, /** disassociate row with requests */ netsnmp_remove_tdata_row(request, table_row); tlstmAddrTable_removeEntry(table_data, table_row); - table_row = NULL; table_entry = NULL; } /** release undo data */ @@ -1098,8 +1148,9 @@ _entry_from_addr(snmpTlstmAddr *addr) } static int -_cache_load(netsnmp_cache *cache, netsnmp_tdata *table) +_cache_load(netsnmp_cache *cache, void *q) { + netsnmp_tdata *table = q; netsnmp_container *addrs; netsnmp_iterator *itr; snmpTlstmAddr *addr; @@ -1150,8 +1201,9 @@ _cache_load(netsnmp_cache *cache, netsnmp_tdata *table) } static void -_cache_free(netsnmp_cache *cache, netsnmp_tdata *table) +_cache_free(netsnmp_cache *cache, void *q) { + netsnmp_tdata *table = q; netsnmp_tdata_row *row; netsnmp_iterator *tbl_itr; tlstmAddrTable_entry *entry; @@ -1192,9 +1244,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"; diff --git a/vendor/agent/mibgroup/tlstm-mib/snmpTlstmAddrTable/snmpTlstmAddrTable.h b/vendor/agent/mibgroup/tlstm-mib/snmpTlstmAddrTable/snmpTlstmAddrTable.h index 8c0b80a..54ee179 100644 --- a/vendor/agent/mibgroup/tlstm-mib/snmpTlstmAddrTable/snmpTlstmAddrTable.h +++ b/vendor/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/vendor/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable.h b/vendor/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable.h index ebfa0ec..a484710 100644 --- a/vendor/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable.h +++ b/vendor/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/vendor/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.c b/vendor/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.c index ea68ab4..5fe5a07 100644 --- a/vendor/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.c +++ b/vendor/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.c @@ -39,7 +39,7 @@ netsnmp_feature_require(table_tdata_insert_row); typedef struct certToTSN_undo_s { char fate; char copied; - char is_consistent; + signed char is_consistent; netsnmp_request_info *req[SNMPTLSTMCERTTOTSN_TABLE_MAX_COL+1]; /* @@ -83,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), - "snmpTlstmCertToTSNCount"); - } - - 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 */ @@ -338,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 @@ -876,7 +840,6 @@ tlstmCertToTSNTable_handler(netsnmp_mib_handler *handler, /** disassociate row with requests */ netsnmp_remove_tdata_row(request, row); tlstmCertToTSNTable_removeEntry(table, row); - row = NULL; entry = NULL; } /** release undo data */ @@ -939,90 +902,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; - 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) { @@ -1064,8 +943,9 @@ _entry_from_map(netsnmp_cert_map *map) } static int -_cache_load(netsnmp_cache *cache, netsnmp_tdata *table) +_cache_load(netsnmp_cache *cache, void *q) { + netsnmp_tdata *table = q; netsnmp_container *maps; netsnmp_iterator *map_itr; netsnmp_cert_map *map; @@ -1119,8 +999,9 @@ _cache_load(netsnmp_cache *cache, netsnmp_tdata *table) } static void -_cache_free(netsnmp_cache *cache, netsnmp_tdata *table) +_cache_free(netsnmp_cache *cache, void *q) { + netsnmp_tdata *table = q; netsnmp_tdata_row *row; netsnmp_iterator *tbl_itr; certToTSN_entry *entry; @@ -1337,40 +1218,154 @@ _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, _cache_load, _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; + + if (NULL != contextName) + to_tsn_count_reg->contextName = strdup(contextName); + + 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; + watcher = netsnmp_create_watcher_info((void*)&_last_changed, + sizeof(_last_changed), + ASN_TIMETICKS, + WATCHER_FIXED_SIZE); + if (watcher) { + to_tsn_last_changed_reg = netsnmp_create_handler_registration( + "snmpTlstmCertToTSNTableLastChanged", NULL, reg_oid, + OID_LENGTH(reg_oid), HANDLER_CAN_RONLY); + } + if (!watcher || !to_tsn_last_changed_reg) { + snmp_log(LOG_ERR, + "could not create handler for snmpTlstmCertToTSNCount\n"); + free(watcher); + } + 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"); + +} - memcpy(val, _tsnm_base, _tsnm_base_len + sizeof(oid)); - val[_tsnm_base_len + sizeof(oid)] = type; +/** Initializes the tlstmCertToTSNTable module */ +void +init_snmpTlstmCertToTSNTable(void) +{ + init_snmpTlstmCertToTSNTable_context(NULL); +} - return 0; +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/vendor/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.h b/vendor/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.h index 42b8097..985cdfb 100644 --- a/vendor/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.h +++ b/vendor/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/vendor/agent/mibgroup/tlstm-mib/snmpTlstmParamsTable.h b/vendor/agent/mibgroup/tlstm-mib/snmpTlstmParamsTable.h index d814be2..451fea1 100644 --- a/vendor/agent/mibgroup/tlstm-mib/snmpTlstmParamsTable.h +++ b/vendor/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/vendor/agent/mibgroup/tlstm-mib/snmpTlstmParamsTable/snmpTlstmParamsTable.c b/vendor/agent/mibgroup/tlstm-mib/snmpTlstmParamsTable/snmpTlstmParamsTable.c index 346b0d9..849d1a0 100644 --- a/vendor/agent/mibgroup/tlstm-mib/snmpTlstmParamsTable/snmpTlstmParamsTable.c +++ b/vendor/agent/mibgroup/tlstm-mib/snmpTlstmParamsTable/snmpTlstmParamsTable.c @@ -45,7 +45,7 @@ netsnmp_feature_require(table_tdata_insert_row); typedef struct snmpTlstmParamsTable_undo_s { char fate; char copied; - char is_consistent; + signed char is_consistent; netsnmp_request_info *req[SNMPTLSTMPARAMSTABLE_MAX_COLUMN + 1]; /* undo Column space */ char snmpTlstmParamsClientFingerprint[SNMPTLSTMPARAMSCLIENTFINGERPRINT_MAX_SIZE]; @@ -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); } /** ************************************************************************** @@ -523,7 +579,6 @@ snmpTlstmParamsTable_handler( netsnmp_request_info *request = NULL; netsnmp_table_request_info *table_info; netsnmp_tdata *table_data; - netsnmp_tdata_row *table_row; snmpTlstmParamsTable_entry *table_entry; int ret = SNMP_ERR_NOERROR; @@ -647,6 +702,8 @@ snmpTlstmParamsTable_handler( */ case MODE_SET_RESERVE2: for (request=requests; request; request=request->next) { + netsnmp_tdata_row *table_row = NULL; + table_entry = (snmpTlstmParamsTable_entry *) netsnmp_tdata_extract_entry(request); table_data = netsnmp_tdata_extract_table(request); @@ -729,7 +786,8 @@ snmpTlstmParamsTable_handler( * remove any newly created rows */ for (request=requests; request; request=request->next) { - table_row = netsnmp_tdata_extract_row( request); + netsnmp_tdata_row *table_row = netsnmp_tdata_extract_row(request); + table_data = netsnmp_tdata_extract_table(request); table_entry = (snmpTlstmParamsTable_entry *) netsnmp_tdata_extract_entry(request); @@ -875,7 +933,6 @@ snmpTlstmParamsTable_handler( for (request=requests; request; request=request->next) { table_entry = (snmpTlstmParamsTable_entry *) netsnmp_tdata_extract_entry(request); - table_row = netsnmp_tdata_extract_row( request); table_data = netsnmp_tdata_extract_table(request); table_info = netsnmp_extract_table_info( request); @@ -907,7 +964,8 @@ snmpTlstmParamsTable_handler( * or remove any newly created rows */ for (request=requests; request; request=request->next) { - table_row = netsnmp_tdata_extract_row( request); + netsnmp_tdata_row *table_row = netsnmp_tdata_extract_row(request); + table_entry = (snmpTlstmParamsTable_entry *) netsnmp_tdata_extract_entry(request); @@ -933,7 +991,8 @@ snmpTlstmParamsTable_handler( */ case MODE_SET_COMMIT: for (request=requests; request; request=request->next) { - table_row = netsnmp_tdata_extract_row( request); + netsnmp_tdata_row *table_row = netsnmp_tdata_extract_row(request); + table_data = netsnmp_tdata_extract_table(request); table_info = netsnmp_extract_table_info( request); table_entry = (snmpTlstmParamsTable_entry *) @@ -993,7 +1052,6 @@ snmpTlstmParamsTable_handler( /** disassociate row with requests */ netsnmp_remove_tdata_row( request, table_row ); snmpTlstmParamsTable_removeEntry(table_data, table_row ); - table_row = NULL; table_entry = NULL; } /** release undo data */ @@ -1060,8 +1118,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); diff --git a/vendor/agent/mibgroup/tlstm-mib/snmpTlstmParamsTable/snmpTlstmParamsTable.h b/vendor/agent/mibgroup/tlstm-mib/snmpTlstmParamsTable/snmpTlstmParamsTable.h index ae33cac..2427f8a 100644 --- a/vendor/agent/mibgroup/tlstm-mib/snmpTlstmParamsTable/snmpTlstmParamsTable.h +++ b/vendor/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/vendor/agent/mibgroup/tlstm-mib/snmpTlstmSession.h b/vendor/agent/mibgroup/tlstm-mib/snmpTlstmSession.h index 9bf4ef8..5b3b93a 100644 --- a/vendor/agent/mibgroup/tlstm-mib/snmpTlstmSession.h +++ b/vendor/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/vendor/agent/mibgroup/tsm-mib.h b/vendor/agent/mibgroup/tsm-mib.h index aec01fe..ffcef9b 100644 --- a/vendor/agent/mibgroup/tsm-mib.h +++ b/vendor/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/vendor/agent/mibgroup/tsm-mib/snmpTsmStats.h b/vendor/agent/mibgroup/tsm-mib/snmpTsmStats.h index d1c4101..1a31c32 100644 --- a/vendor/agent/mibgroup/tsm-mib/snmpTsmStats.h +++ b/vendor/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/vendor/agent/mibgroup/tunnel.h b/vendor/agent/mibgroup/tunnel.h index 232ddb3..1f369f3 100644 --- a/vendor/agent/mibgroup/tunnel.h +++ b/vendor/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/vendor/agent/mibgroup/tunnel/tunnel.c b/vendor/agent/mibgroup/tunnel/tunnel.c index 8ed70cd..c54d411 100644 --- a/vendor/agent/mibgroup/tunnel/tunnel.c +++ b/vendor/agent/mibgroup/tunnel/tunnel.c @@ -441,6 +441,7 @@ updateTunnels(void) } if (!updateTunnel(tunnel)) { + free(tunnel->ifname); free(tunnel); continue; } diff --git a/vendor/agent/mibgroup/ucd-snmp/disk.c b/vendor/agent/mibgroup/ucd-snmp/disk.c deleted file mode 100644 index 5206235..0000000 --- a/vendor/agent/mibgroup/ucd-snmp/disk.c +++ /dev/null @@ -1,933 +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; - static char empty_str[1]; - -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: - free(errmsg); - errmsg = NULL; - *var_len = 0; - if (entry.dskErrorFlag) { - if ((disks[disknum].minimumspace >= 0 && - asprintf(&errmsg, "%s: less than %d free (= %d)", - disks[disknum].path, disks[disknum].minimumspace, - (int) entry.dskAvail) >= 0) || - (disks[disknum].minimumspace < 0 && - asprintf(&errmsg, "%s: less than %d%% free (= %d%%)", - disks[disknum].path, disks[disknum].minpercent, - (int)entry.dskPercent) >= 0)) { - *var_len = strlen(errmsg); - } - } - return (u_char *)(errmsg ? errmsg : empty_str); - } - return NULL; -} diff --git a/vendor/agent/mibgroup/ucd-snmp/disk.h b/vendor/agent/mibgroup/ucd-snmp/disk.h deleted file mode 100644 index 20e9332..0000000 --- a/vendor/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/vendor/agent/mibgroup/ucd-snmp/disk_hw.c b/vendor/agent/mibgroup/ucd-snmp/disk_hw.c index e8b09a2..a4056c6 100644 --- a/vendor/agent/mibgroup/ucd-snmp/disk_hw.c +++ b/vendor/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,220 +33,237 @@ #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 allDisksMinPercent = 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 }; +static netsnmp_fsys_info ** +_expand_disk_array(char *cptr) +{ + int prev_max = maxdisks; + netsnmp_fsys_info **new_disks; -void -init_disk_hw(void) + if (maxdisks == 0) + maxdisks = 50; + else + maxdisks *= 2; + + new_disks = realloc(disks, maxdisks * sizeof(netsnmp_fsys_info *)); + if (!new_disks) { + config_perror("malloc failed for new disk allocation."); + netsnmp_config_error("\tignoring: %s", cptr); + return NULL; + } + + disks = new_disks; + memset(disks + prev_max, 0, (maxdisks - prev_max) * + sizeof(netsnmp_fsys_info *)); + + return disks; +} + +static void +disk_parse_config(const char *token, 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; - allDisksMinPercent = 0; + 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 -disk_free_config(void) +disk_parse_config_all(const char *token, char *cptr) { - 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; - allDisksMinPercent = 0; + 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_parse_config(const char *token, char *cptr) +static void +disk_free_config(void) { - 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; - } + 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; + allDisksMinPercent = 0; } -static void -disk_parse_config_all(const char *token, 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 +}; + +void +init_disk_hw(void) { - 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; - } + /* + * 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; } -/* add new entries to dskTable dynamically */ -static void _refresh_disks(int minpercent) +/* + * 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 )) { + 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; + /* + * this is new disk, add it to the table + */ + entry->minspace = -1; entry->minpercent = minpercent; - entry->flags |= NETSNMP_FS_FLAG_UCD; + entry->flags |= NETSNMP_FS_FLAG_UCD; /* * Ensure there is space for the new entry */ if (numdisks == maxdisks) { - if (!_expand_disk_array( entry->device )) + if (!_expand_disk_array(entry->device)) return; } disks[numdisks++] = entry; @@ -254,43 +271,23 @@ static void _refresh_disks(int minpercent) } } -static int _percent( unsigned long long value, unsigned long long total ) { - float v=value, t=total, pct; +static int +_percent(unsigned long long value, unsigned long long total) +{ + float v = value, t = total, pct; - /* avoid division by zero */ + /* + * 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; + pct = (v * 100) / t; /* Calculate percentage using floating point + * arithmetic, to avoid overflow errors */ + pct += 0.5; /* rounding */ + return (int) pct; } -static netsnmp_fsys_info ** -_expand_disk_array( char *cptr ) { - - 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; - } - - if ( maxdisks == 50 ) - memset(disks, 0, maxdisks * sizeof( netsnmp_fsys_info*)); - else - memset(disks + maxdisks/2, 0, maxdisks/2 * sizeof( netsnmp_fsys_info*)); - - return disks; -} - - /* * var_extensible_disk(... * Arguments: @@ -305,36 +302,39 @@ _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; 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 (!entry) { if (exact) return NULL; goto tryAgain; } - if (!(entry->flags & NETSNMP_FS_FLAG_ACTIVE) || !(entry->flags & NETSNMP_FS_FLAG_UCD)) { + if (!(entry->flags & NETSNMP_FS_FLAG_ACTIVE) + || !(entry->flags & NETSNMP_FS_FLAG_UCD)) { if (exact) return NULL; goto tryAgain; @@ -346,10 +346,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)); @@ -362,7 +362,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; @@ -370,13 +370,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; @@ -390,7 +390,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; @@ -400,21 +400,22 @@ 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)); @@ -428,12 +429,13 @@ var_extensible_disk(struct variable *vp, 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)) + 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 (u_char *) (errmsg ? errmsg : empty_str); } return NULL; } diff --git a/vendor/agent/mibgroup/ucd-snmp/disk_hw.h b/vendor/agent/mibgroup/ucd-snmp/disk_hw.h index ff42ed9..85c96de 100644 --- a/vendor/agent/mibgroup/ucd-snmp/disk_hw.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/diskio.c b/vendor/agent/mibgroup/ucd-snmp/diskio.c index 1c2d9eb..9f5f937 100644 --- a/vendor/agent/mibgroup/ucd-snmp/diskio.c +++ b/vendor/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 @@ -88,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 @@ -102,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)) @@ -306,17 +306,19 @@ init_diskio(void) #ifdef linux - char *app = netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, - NETSNMP_DS_LIB_APPTYPE); - netsnmp_ds_register_config(ASN_BOOLEAN, app, "diskio_exclude_fd", - NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_DISKIO_NO_FD); - netsnmp_ds_register_config(ASN_BOOLEAN, app, "diskio_exclude_loop", - NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_DISKIO_NO_LOOP); - netsnmp_ds_register_config(ASN_BOOLEAN, app, "diskio_exclude_ram", - NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_DISKIO_NO_RAM); + { + char *app = netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_APPTYPE); + netsnmp_ds_register_config(ASN_BOOLEAN, app, "diskio_exclude_fd", + NETSNMP_DS_APPLICATION_ID, + NETSNMP_DS_AGENT_DISKIO_NO_FD); + netsnmp_ds_register_config(ASN_BOOLEAN, app, "diskio_exclude_loop", + NETSNMP_DS_APPLICATION_ID, + NETSNMP_DS_AGENT_DISKIO_NO_LOOP); + netsnmp_ds_register_config(ASN_BOOLEAN, app, "diskio_exclude_ram", + NETSNMP_DS_APPLICATION_ID, + NETSNMP_DS_AGENT_DISKIO_NO_RAM); + } snmpd_register_config_handler("diskio", diskio_parse_config_disks, diskio_free_config, "path | device"); @@ -465,7 +467,7 @@ add_device(char *path, int addNewDisks ) static void diskio_parse_config_disks(const char *token, char *cptr) { -#if HAVE_FSTAB_H || HAVE_GETMNTENT || HAVE_STATFS +#if defined(HAVE_FSTAB_H) || defined(HAVE_GETMNTENT) || defined(HAVE_STATFS) char path[STRMAX]; @@ -1019,7 +1021,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; @@ -1031,7 +1033,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; @@ -1093,7 +1095,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); @@ -1189,14 +1191,14 @@ var_diskio(struct variable * vp, *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 +#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 +#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; @@ -1204,7 +1206,7 @@ var_diskio(struct variable * vp, 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; @@ -1214,7 +1216,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; @@ -1223,14 +1225,14 @@ var_diskio(struct variable * vp, c64_ret.high = longlong_ret >> 32; return (u_char *) & c64_ret; case DISKIO_READS: -#if HAVE_DEVSTAT_GETDEVS +#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 +#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; @@ -1327,7 +1329,9 @@ static int get_sysfs_stats(void) head.length = 0; for(i = 0; i < numdisks; i++) { + linux_diskio* pTemp; FILE *f = fopen(disks[i].syspath, "r"); + if ( f == NULL ) { DEBUGMSGTL(("ucd-snmp/diskio", "Can't open %s, skipping", disks[i].syspath)); continue; @@ -1339,7 +1343,6 @@ static int get_sysfs_stats(void) 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)); @@ -1414,7 +1417,7 @@ getstats(void) } } else if (stat("/proc/vz", &stbuf) == 0) { - // OpenVZ / Virtuozzo containers do not have /proc/diskstats + /* OpenVZ / Virtuozzo containers do not have /proc/diskstats */ goto update_cache_time; } else { diff --git a/vendor/agent/mibgroup/ucd-snmp/diskio.h b/vendor/agent/mibgroup/ucd-snmp/diskio.h index 75b8193..8d45122 100644 --- a/vendor/agent/mibgroup/ucd-snmp/diskio.h +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/ucd-snmp/dlmod.c b/vendor/agent/mibgroup/ucd-snmp/dlmod.c index d69ca09..2cc8739 100644 --- a/vendor/agent/mibgroup/ucd-snmp/dlmod.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/ucd-snmp/dlmod.h b/vendor/agent/mibgroup/ucd-snmp/dlmod.h index 9592bdd..b5dfa8b 100644 --- a/vendor/agent/mibgroup/ucd-snmp/dlmod.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/errormib.c b/vendor/agent/mibgroup/ucd-snmp/errormib.c index 7f3bcb1..53f4ea9 100644 --- a/vendor/agent/mibgroup/ucd-snmp/errormib.c +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/errormib.h b/vendor/agent/mibgroup/ucd-snmp/errormib.h index 501642c..ef4c2d0 100644 --- a/vendor/agent/mibgroup/ucd-snmp/errormib.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/extensible.c b/vendor/agent/mibgroup/ucd-snmp/extensible.c index 3a4b1d4..6158498 100644 --- a/vendor/agent/mibgroup/ucd-snmp/extensible.c +++ b/vendor/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 @@ -458,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: @@ -613,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: diff --git a/vendor/agent/mibgroup/ucd-snmp/extensible.h b/vendor/agent/mibgroup/ucd-snmp/extensible.h index c0d103f..3a83d6f 100644 --- a/vendor/agent/mibgroup/ucd-snmp/extensible.h +++ b/vendor/agent/mibgroup/ucd-snmp/extensible.h @@ -7,10 +7,10 @@ void init_extensible(void); -config_require(ucd-snmp/pass) -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; diff --git a/vendor/agent/mibgroup/ucd-snmp/file.c b/vendor/agent/mibgroup/ucd-snmp/file.c index 9e345d8..21bc313 100644 --- a/vendor/agent/mibgroup/ucd-snmp/file.c +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/file.h b/vendor/agent/mibgroup/ucd-snmp/file.h index 455086f..71577f4 100644 --- a/vendor/agent/mibgroup/ucd-snmp/file.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/hpux.c b/vendor/agent/mibgroup/ucd-snmp/hpux.c index 9c5f9f9..64e6dd1 100644 --- a/vendor/agent/mibgroup/ucd-snmp/hpux.c +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/lmSensors.h b/vendor/agent/mibgroup/ucd-snmp/lmSensors.h index 92098a6..12ca5bf 100644 --- a/vendor/agent/mibgroup/ucd-snmp/lmSensors.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/lmsensorsMib.c b/vendor/agent/mibgroup/ucd-snmp/lmsensorsMib.c index bcd4fa1..1c85b97 100644 --- a/vendor/agent/mibgroup/ucd-snmp/lmsensorsMib.c +++ b/vendor/agent/mibgroup/ucd-snmp/lmsensorsMib.c @@ -9,17 +9,16 @@ #include "hardware/sensors/hw_sensors.h" #include "ucd-snmp/lmsensorsMib.h" -netsnmp_container *sensorContainer = NULL; +struct reg_and_table { + netsnmp_handler_registration *reg; + netsnmp_table_registration_info *table; +}; -static void initialize_lmSensorsTable(const char *tableName, - const oid *tableOID, - netsnmp_container_op *filter, - int mult); - -static int _sensor_filter_temp( netsnmp_container *c, const void *v ); -static int _sensor_filter_fan( netsnmp_container *c, const void *v ); -static int _sensor_filter_volt( netsnmp_container *c, const void *v ); -static 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}; @@ -29,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 ) { @@ -61,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, @@ -93,11 +74,11 @@ initialize_lmSensorsTable(const char *tableName, const oid *tableOID, table_info = SNMP_MALLOC_TYPEDEF( netsnmp_table_registration_info ); netsnmp_table_helper_add_indexes(table_info, ASN_INTEGER, 0); table_info->min_column = COLUMN_LMSENSORS_INDEX; - table_info->max_column = COLUMN_LMSENSORS_VALUE; + table_info->max_column = COLUMN_LMSENSORS_SIGNED; 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; + return res; } /* @@ -111,6 +92,9 @@ initialize_lmSensorsTable(const char *tableName, const oid *tableOID, "table_container"); } + res.reg = reg; + res.table = table_info; + return res; } @@ -119,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 ) || @@ -147,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 @@ -203,6 +226,15 @@ lmSensorsTables_handler( snmp_set_var_typed_integer( request->requestvb, ASN_GAUGE, (int)(mult*sensor_info->value)); break; + case COLUMN_LMSENSORS_SIGNED: + /* Only avalable for temperature table */ + if (reginfo->rootoid[9] != 2) + netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHOBJECT); + else + /* Multiply the value by the appropriate scaling factor for this table */ + snmp_set_var_typed_integer( request->requestvb, ASN_INTEGER, + (int)(mult*sensor_info->value)); + break; default: netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHOBJECT); diff --git a/vendor/agent/mibgroup/ucd-snmp/lmsensorsMib.h b/vendor/agent/mibgroup/ucd-snmp/lmsensorsMib.h index 9d85dd1..b0d36bb 100644 --- a/vendor/agent/mibgroup/ucd-snmp/lmsensorsMib.h +++ b/vendor/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 @@ -19,5 +20,6 @@ Netsnmp_Node_Handler lmSensorsTables_handler; #define COLUMN_LMSENSORS_INDEX 1 #define COLUMN_LMSENSORS_DEVICE 2 #define COLUMN_LMSENSORS_VALUE 3 +#define COLUMN_LMSENSORS_SIGNED 4 #endif /* LM_SENSORS_MIB_H */ diff --git a/vendor/agent/mibgroup/ucd-snmp/loadave.c b/vendor/agent/mibgroup/ucd-snmp/loadave.c index 3178330..1a50cb2 100644 --- a/vendor/agent/mibgroup/ucd-snmp/loadave.c +++ b/vendor/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 @@ -235,7 +235,10 @@ loadave_parse_config(const char *token, char *cptr) if (cptr != NULL) maxload[i] = atof(cptr); else - maxload[i] = maxload[i - 1]; + if (i > 0) + maxload[i] = maxload[i - 1]; + else + maxload[i] = NETSNMP_DEFMAXLOADAVE; cptr = skip_not_white(cptr); cptr = skip_white(cptr); } @@ -475,10 +478,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/vendor/agent/mibgroup/ucd-snmp/loadave.h b/vendor/agent/mibgroup/ucd-snmp/loadave.h index 4f5e7a5..c848d07 100644 --- a/vendor/agent/mibgroup/ucd-snmp/loadave.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/logmatch.c b/vendor/agent/mibgroup/ucd-snmp/logmatch.c index a1082b6..a96849e 100644 --- a/vendor/agent/mibgroup/ucd-snmp/logmatch.c +++ b/vendor/agent/mibgroup/ucd-snmp/logmatch.c @@ -194,8 +194,9 @@ updateLogmatch(int iindex) * ------------------------------------ */ - if (!fseek - (logmatchTable[iindex].logfile, pos, SEEK_SET)) { + if ((long)pos >= 0 && + !fseek(logmatchTable[iindex].logfile, pos, + SEEK_SET)) { /* @@ -340,9 +341,10 @@ updateLogmatch(int iindex) static void -updateLogmatch_Scheduled(unsigned int registrationNumber, - struct logmatchstat *logmatchtable) +updateLogmatch_Scheduled(unsigned int registrationNumber, void *p) { + struct logmatchstat *logmatchtable = p; + updateLogmatch(logmatchtable->thisIndex); } @@ -451,8 +453,7 @@ logmatch_parse_config(const char *token, char *cptr) } else if (logmatchTable[logmatchCount].frequency > 0) { snmp_alarm_register(logmatchTable[logmatchCount].frequency, - SA_REPEAT, - (SNMPAlarmCallback *) updateLogmatch_Scheduled, + SA_REPEAT, updateLogmatch_Scheduled, &logmatchTable[logmatchCount]); } diff --git a/vendor/agent/mibgroup/ucd-snmp/logmatch.h b/vendor/agent/mibgroup/ucd-snmp/logmatch.h index b94ad3a..76c7515 100644 --- a/vendor/agent/mibgroup/ucd-snmp/logmatch.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/memory.c b/vendor/agent/mibgroup/ucd-snmp/memory.c index 371a77e..158b28e 100644 --- a/vendor/agent/mibgroup/ucd-snmp/memory.c +++ b/vendor/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, 26); + 1, 27); netsnmp_register_scalar( netsnmp_create_handler_registration("memSwapError", handle_memory, memSwapError_oid, OID_LENGTH(memSwapError_oid), @@ -272,6 +272,16 @@ handle_memory(netsnmp_mib_handler *handler, 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) diff --git a/vendor/agent/mibgroup/ucd-snmp/memory.h b/vendor/agent/mibgroup/ucd-snmp/memory.h index ded2140..03303ca 100644 --- a/vendor/agent/mibgroup/ucd-snmp/memory.h +++ b/vendor/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 @@ -41,6 +41,7 @@ Netsnmp_Node_Handler handle_memory; #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/vendor/agent/mibgroup/ucd-snmp/memory_aix4.c b/vendor/agent/mibgroup/ucd-snmp/memory_aix4.c index 786e5eb..7c74cfd 100644 --- a/vendor/agent/mibgroup/ucd-snmp/memory_aix4.c +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/memory_aix4.h b/vendor/agent/mibgroup/ucd-snmp/memory_aix4.h index c39596c..e1cb6bb 100644 --- a/vendor/agent/mibgroup/ucd-snmp/memory_aix4.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/memory_darwin7.c b/vendor/agent/mibgroup/ucd-snmp/memory_darwin7.c index 0747541..1578d33 100644 --- a/vendor/agent/mibgroup/ucd-snmp/memory_darwin7.c +++ b/vendor/agent/mibgroup/ucd-snmp/memory_darwin7.c @@ -303,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; @@ -381,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/vendor/agent/mibgroup/ucd-snmp/memory_darwin7.h b/vendor/agent/mibgroup/ucd-snmp/memory_darwin7.h index ab5d264..fb3f59b 100644 --- a/vendor/agent/mibgroup/ucd-snmp/memory_darwin7.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/memory_dynix.h b/vendor/agent/mibgroup/ucd-snmp/memory_dynix.h index 4fb5294..aff3092 100644 --- a/vendor/agent/mibgroup/ucd-snmp/memory_dynix.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/memory_freebsd2.c b/vendor/agent/mibgroup/ucd-snmp/memory_freebsd2.c index 22dde4c..927adcb 100644 --- a/vendor/agent/mibgroup/ucd-snmp/memory_freebsd2.c +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/memory_hpux.c b/vendor/agent/mibgroup/ucd-snmp/memory_hpux.c index c2b2478..cbad70c 100644 --- a/vendor/agent/mibgroup/ucd-snmp/memory_hpux.c +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/memory_netbsd1.c b/vendor/agent/mibgroup/ucd-snmp/memory_netbsd1.c index 3d26a44..6a8dddc 100644 --- a/vendor/agent/mibgroup/ucd-snmp/memory_netbsd1.c +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/memory_netbsd1.h b/vendor/agent/mibgroup/ucd-snmp/memory_netbsd1.h index a195f85..2d23a4f 100644 --- a/vendor/agent/mibgroup/ucd-snmp/memory_netbsd1.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/memory_solaris2.c b/vendor/agent/mibgroup/ucd-snmp/memory_solaris2.c index 2d36278..8caa238 100644 --- a/vendor/agent/mibgroup/ucd-snmp/memory_solaris2.c +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/memory_solaris2.h b/vendor/agent/mibgroup/ucd-snmp/memory_solaris2.h index fff5f79..44f5ea9 100644 --- a/vendor/agent/mibgroup/ucd-snmp/memory_solaris2.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/pass.c b/vendor/agent/mibgroup/ucd-snmp/pass.c index ca867b8..88e95d3 100644 --- a/vendor/agent/mibgroup/ucd-snmp/pass.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/ucd-snmp/pass.h b/vendor/agent/mibgroup/ucd-snmp/pass.h index 51c0689..a3c57f3 100644 --- a/vendor/agent/mibgroup/ucd-snmp/pass.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/pass_common.c b/vendor/agent/mibgroup/ucd-snmp/pass_common.c index 71e0450..4c3d40e 100644 --- a/vendor/agent/mibgroup/ucd-snmp/pass_common.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/ucd-snmp/pass_persist.c b/vendor/agent/mibgroup/ucd-snmp/pass_persist.c index 4d88ff2..15272d4 100644 --- a/vendor/agent/mibgroup/ucd-snmp/pass_persist.c +++ b/vendor/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 @@ -48,8 +48,8 @@ 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; @@ -452,7 +452,7 @@ setPassPersist(int action, 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\n", buf, + if (asprintf(&persistpassthru->command, "set\n%s\n%s", buf, buf2) < 0) { persistpassthru->command = NULL; return SNMP_ERR_GENERR; @@ -509,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; } /** @@ -538,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 } @@ -623,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")); } @@ -683,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", @@ -697,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) { /* @@ -816,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/vendor/agent/mibgroup/ucd-snmp/pass_persist.h b/vendor/agent/mibgroup/ucd-snmp/pass_persist.h index 0537abc..42845e4 100644 --- a/vendor/agent/mibgroup/ucd-snmp/pass_persist.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/proc.c b/vendor/agent/mibgroup/ucd-snmp/proc.c index c8dfdb0..00e2a38 100644 --- a/vendor/agent/mibgroup/ucd-snmp/proc.c +++ b/vendor/agent/mibgroup/ucd-snmp/proc.c @@ -6,40 +6,40 @@ #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_PCRE_H +#ifdef HAVE_PCRE_H #include #endif @@ -134,7 +134,7 @@ proc_free_config(void) for (ptmp = procwatch; ptmp != NULL;) { ptmp2 = ptmp; ptmp = ptmp->next; -#if HAVE_PCRE_H +#ifdef HAVE_PCRE_H free(ptmp2->regexp.regex_ptr); #endif free(ptmp2); @@ -208,7 +208,7 @@ proc_parse_config(const char *token, char *cptr) if (*procp == NULL) return; /* memory alloc error */ numprocs++; -#if HAVE_PCRE_H +#ifdef HAVE_PCRE_H (*procp)->regexp.regex_ptr = NULL; #endif /* @@ -220,7 +220,7 @@ proc_parse_config(const char *token, char *cptr) cptr = skip_not_white(cptr); if ((cptr = skip_white(cptr))) { (*procp)->min = atoi(cptr); -#if HAVE_PCRE_H +#ifdef HAVE_PCRE_H cptr = skip_not_white(cptr); if ((cptr = skip_white(cptr))) { const char *pcre_error; @@ -406,7 +406,7 @@ sh_count_procs(char *procname) return swrun_count_processes_by_name( procname ); } -#if HAVE_PCRE_H +#ifdef HAVE_PCRE_H netsnmp_feature_require(swrun_count_processes_by_regex); int sh_count_procs_by_regex(char *procname, netsnmp_regex_ptr regexp) diff --git a/vendor/agent/mibgroup/ucd-snmp/proc.h b/vendor/agent/mibgroup/ucd-snmp/proc.h index dd95082..ea6d5ab 100644 --- a/vendor/agent/mibgroup/ucd-snmp/proc.h +++ b/vendor/agent/mibgroup/ucd-snmp/proc.h @@ -4,7 +4,7 @@ #ifndef _MIBGROUP_PROC_H #define _MIBGROUP_PROC_H -config_require(util_funcs) +config_require(util_funcs); void init_proc(void); diff --git a/vendor/agent/mibgroup/ucd-snmp/proxy.c b/vendor/agent/mibgroup/ucd-snmp/proxy.c index e0ee96b..e850a9f 100644 --- a/vendor/agent/mibgroup/ucd-snmp/proxy.c +++ b/vendor/agent/mibgroup/ucd-snmp/proxy.c @@ -17,10 +17,10 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_NETINET_IN_H @@ -120,10 +120,8 @@ proxy_parse_config(const char *token, char *line) argv[argn] = strdup(buff); if (!argv[argn]) { config_perror("could not allocate memory for argv[n]"); - while(argn--) - SNMP_FREE(argv[argn]); SNMP_FREE(buff); - return; + goto free_argv; } argn++; } @@ -134,6 +132,8 @@ proxy_parse_config(const char *token, char *line) argv[arg])); } + memset(&session, 0, sizeof(session)); + DEBUGMSGTL(("proxy_config", "parsing args: %d\n", argn)); /* Call special parse_args that allows for no specified community string */ arg = netsnmp_parse_args(argn, argv, &session, "C:", proxyOptProc, @@ -146,19 +146,13 @@ proxy_parse_config(const char *token, char *line) if (arg < 0) { config_perror("failed to parse proxy args"); - /* Free the memory allocated */ - while(argn--) - SNMP_FREE(argv[argn]); - return; + goto cleanup_session; } DEBUGMSGTL(("proxy_config", "done parsing args\n")); if (arg >= argn) { config_perror("missing base oid"); - /* Free the memory allocated */ - while(argn--) - SNMP_FREE(argv[argn]); - return; + goto cleanup_session; } /* @@ -173,6 +167,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); */ @@ -181,10 +176,7 @@ proxy_parse_config(const char *token, char *line) * diagnose snmp_open errors with the input netsnmp_session pointer */ snmp_sess_perror("snmpget", &session); - /* Free the memory allocated */ - while(argn--) - SNMP_FREE(argv[argn]); - return; + goto cleanup_session; } newp = (struct simple_proxy *) calloc(1, sizeof(struct simple_proxy)); @@ -197,9 +189,7 @@ proxy_parse_config(const char *token, char *line) config_perror("illegal proxy oid specified\n"); /*deallocate the memory previously allocated*/ SNMP_FREE(newp); - while(argn--) - SNMP_FREE(argv[argn]); - return; + goto cleanup_session; } if (arg < argn) { @@ -209,10 +199,7 @@ proxy_parse_config(const char *token, char *line) snmp_perror("proxy"); config_perror("illegal variable name specified (base oid)\n"); SNMP_FREE(newp); - /* Free the memory allocated */ - while(argn--) - SNMP_FREE(argv[argn]); - return; + goto cleanup_session; } } if ( context_string ) @@ -259,6 +246,11 @@ proxy_parse_config(const char *token, char *line) reg->contextName = strdup(context_string); netsnmp_register_handler(reg); + +cleanup_session: + netsnmp_cleanup_session(&session); + +free_argv: /* Free the memory allocated */ while(argn--) SNMP_FREE(argv[argn]); @@ -280,7 +272,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); @@ -369,7 +360,7 @@ proxy_free_filled_in_session_args(netsnmp_session *session, void **configured) session->community_len = 0; } - free((u_char *)(*configured)); + free(*configured); *configured = NULL; } @@ -463,7 +454,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 diff --git a/vendor/agent/mibgroup/ucd-snmp/proxy.h b/vendor/agent/mibgroup/ucd-snmp/proxy.h index b715d43..af770cc 100644 --- a/vendor/agent/mibgroup/ucd-snmp/proxy.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/versioninfo.c b/vendor/agent/mibgroup/ucd-snmp/versioninfo.c index 38b50f3..b49b81b 100644 --- a/vendor/agent/mibgroup/ucd-snmp/versioninfo.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/ucd-snmp/versioninfo.h b/vendor/agent/mibgroup/ucd-snmp/versioninfo.h index 007424e..81e79a2 100644 --- a/vendor/agent/mibgroup/ucd-snmp/versioninfo.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/vmstat.h b/vendor/agent/mibgroup/ucd-snmp/vmstat.h index 9fdf4f0..3ac5f4a 100644 --- a/vendor/agent/mibgroup/ucd-snmp/vmstat.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/vmstat_aix4.h b/vendor/agent/mibgroup/ucd-snmp/vmstat_aix4.h index a13fcce..56e209a 100644 --- a/vendor/agent/mibgroup/ucd-snmp/vmstat_aix4.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/vmstat_bsdi4.c b/vendor/agent/mibgroup/ucd-snmp/vmstat_bsdi4.c index e35b6cd..4abccb2 100644 --- a/vendor/agent/mibgroup/ucd-snmp/vmstat_bsdi4.c +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/vmstat_bsdi4.h b/vendor/agent/mibgroup/ucd-snmp/vmstat_bsdi4.h index 74bf31b..8f2adc1 100644 --- a/vendor/agent/mibgroup/ucd-snmp/vmstat_bsdi4.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/vmstat_darwin7.c b/vendor/agent/mibgroup/ucd-snmp/vmstat_darwin7.c index d96c55c..87f7798 100644 --- a/vendor/agent/mibgroup/ucd-snmp/vmstat_darwin7.c +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/vmstat_darwin7.h b/vendor/agent/mibgroup/ucd-snmp/vmstat_darwin7.h index b1a301d..31a40c0 100644 --- a/vendor/agent/mibgroup/ucd-snmp/vmstat_darwin7.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/vmstat_dynix.c b/vendor/agent/mibgroup/ucd-snmp/vmstat_dynix.c index 33f5412..798fff3 100644 --- a/vendor/agent/mibgroup/ucd-snmp/vmstat_dynix.c +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/vmstat_dynix.h b/vendor/agent/mibgroup/ucd-snmp/vmstat_dynix.h index 8954e35..0d97983 100644 --- a/vendor/agent/mibgroup/ucd-snmp/vmstat_dynix.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/vmstat_freebsd2.c b/vendor/agent/mibgroup/ucd-snmp/vmstat_freebsd2.c index 3de89b2..f8d9c0a 100644 --- a/vendor/agent/mibgroup/ucd-snmp/vmstat_freebsd2.c +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/vmstat_freebsd2.h b/vendor/agent/mibgroup/ucd-snmp/vmstat_freebsd2.h index 26b44b6..30ad6d3 100644 --- a/vendor/agent/mibgroup/ucd-snmp/vmstat_freebsd2.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/vmstat_hpux.h b/vendor/agent/mibgroup/ucd-snmp/vmstat_hpux.h index 8f26594..c5132ed 100644 --- a/vendor/agent/mibgroup/ucd-snmp/vmstat_hpux.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/vmstat_linux.c b/vendor/agent/mibgroup/ucd-snmp/vmstat_linux.c index fa7032e..02c5869 100644 --- a/vendor/agent/mibgroup/ucd-snmp/vmstat_linux.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/ucd-snmp/vmstat_linux.h b/vendor/agent/mibgroup/ucd-snmp/vmstat_linux.h index 6f7c50f..fdd4a36 100644 --- a/vendor/agent/mibgroup/ucd-snmp/vmstat_linux.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/vmstat_netbsd1.c b/vendor/agent/mibgroup/ucd-snmp/vmstat_netbsd1.c index 9706c42..c06300f 100644 --- a/vendor/agent/mibgroup/ucd-snmp/vmstat_netbsd1.c +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/vmstat_netbsd1.h b/vendor/agent/mibgroup/ucd-snmp/vmstat_netbsd1.h index adf5d46..5f7d59f 100644 --- a/vendor/agent/mibgroup/ucd-snmp/vmstat_netbsd1.h +++ b/vendor/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/vendor/agent/mibgroup/ucd-snmp/vmstat_solaris2.h b/vendor/agent/mibgroup/ucd-snmp/vmstat_solaris2.h index d5f0ee9..894f107 100644 --- a/vendor/agent/mibgroup/ucd-snmp/vmstat_solaris2.h +++ b/vendor/agent/mibgroup/ucd-snmp/vmstat_solaris2.h @@ -19,13 +19,13 @@ * Dependency requirements */ #ifdef solaris2 -config_require(kernel_sunos5) +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/vendor/agent/mibgroup/ucd_snmp.h b/vendor/agent/mibgroup/ucd_snmp.h index 6fb8e56..c490f76 100644 --- a/vendor/agent/mibgroup/ucd_snmp.h +++ b/vendor/agent/mibgroup/ucd_snmp.h @@ -1,21 +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/proxy); #ifdef HAVE_REGEX_H -config_require(ucd-snmp/logmatch) +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) +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/vendor/agent/mibgroup/udp-mib.h b/vendor/agent/mibgroup/udp-mib.h index 754e506..4d89aeb 100644 --- a/vendor/agent/mibgroup/udp-mib.h +++ b/vendor/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/vendor/agent/mibgroup/udp-mib/data_access/udp_endpoint.h b/vendor/agent/mibgroup/udp-mib/data_access/udp_endpoint.h index d9dec1d..e31c82b 100644 --- a/vendor/agent/mibgroup/udp-mib/data_access/udp_endpoint.h +++ b/vendor/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/vendor/agent/mibgroup/udp-mib/data_access/udp_endpoint_freebsd4.c b/vendor/agent/mibgroup/udp-mib/data_access/udp_endpoint_freebsd4.c index 53e17a9..b548d30 100644 --- a/vendor/agent/mibgroup/udp-mib/data_access/udp_endpoint_freebsd4.c +++ b/vendor/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 diff --git a/vendor/agent/mibgroup/udp-mib/data_access/udp_endpoint_netbsd.c b/vendor/agent/mibgroup/udp-mib/data_access/udp_endpoint_netbsd.c index f68314b..62891e8 100644 --- a/vendor/agent/mibgroup/udp-mib/data_access/udp_endpoint_netbsd.c +++ b/vendor/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/vendor/agent/mibgroup/udp-mib/data_access/udp_endpoint_openbsd.c b/vendor/agent/mibgroup/udp-mib/data_access/udp_endpoint_openbsd.c index 727087a..ae1da66 100644 --- a/vendor/agent/mibgroup/udp-mib/data_access/udp_endpoint_openbsd.c +++ b/vendor/agent/mibgroup/udp-mib/data_access/udp_endpoint_openbsd.c @@ -14,20 +14,20 @@ #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 -#if HAVE_KVM_GETFILES +#ifdef HAVE_KVM_GETFILES #if defined(HAVE_KVM_GETFILE2) || !defined(openbsd5) #undef HAVE_KVM_GETFILES #endif #endif -#if HAVE_KVM_GETFILES +#ifdef HAVE_KVM_GETFILES #include #include #define _KERNEL /* for DTYPE_SOCKET */ diff --git a/vendor/agent/mibgroup/udp-mib/data_access/udp_endpoint_solaris2.c b/vendor/agent/mibgroup/udp-mib/data_access/udp_endpoint_solaris2.c index 505f1c4..3117246 100644 --- a/vendor/agent/mibgroup/udp-mib/data_access/udp_endpoint_solaris2.c +++ b/vendor/agent/mibgroup/udp-mib/data_access/udp_endpoint_solaris2.c @@ -109,7 +109,7 @@ _load_udp_endpoint_table_v4(netsnmp_container *container, int flag) /* * remote address/port. The address length is the same as the * local address, so no check needed. If the remote address is - * unspecfied, then the type should be set to "unknown" (per RFC 4113). + * unspecified, then the type should be set to "unknown" (per RFC 4113). */ if (ue.udpEntryInfo.ue_RemoteAddress == INADDR_ANY) { ep->rmt_addr_len = 0; diff --git a/vendor/agent/mibgroup/udp-mib/udpEndpointTable.h b/vendor/agent/mibgroup/udp-mib/udpEndpointTable.h index 95f49fd..d964b5b 100644 --- a/vendor/agent/mibgroup/udp-mib/udpEndpointTable.h +++ b/vendor/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/vendor/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable.h b/vendor/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable.h index 0deda03..e36a7d8 100644 --- a/vendor/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable.h +++ b/vendor/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/vendor/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_data_access.c b/vendor/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_data_access.c index 776273c..42fee8e 100644 --- a/vendor/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_data_access.c +++ b/vendor/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_data_access.c @@ -185,8 +185,8 @@ 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 - * some other existing data, or peforming calculations to derive the data), + * If, however, the accessing the data involves more work (e.g. parsing + * some other existing data, or performing 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 * udpEndpointTable_row_prep() for populating data. diff --git a/vendor/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_interface.c b/vendor/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_interface.c index a0fad23..fb52c8a 100644 --- a/vendor/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_interface.c +++ b/vendor/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_interface.c @@ -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) && @@ -973,8 +973,7 @@ _cache_free(netsnmp_cache * cache, void *magic) * @internal */ static void -_container_item_free(udpEndpointTable_rowreq_ctx * rowreq_ctx, - void *context) +_container_item_free(void *rowreq_ctx, void *context) { DEBUGMSGTL(("internal:udpEndpointTable:_container_item_free", "called\n")); @@ -1007,9 +1006,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 */ /** diff --git a/vendor/agent/mibgroup/util_funcs.c b/vendor/agent/mibgroup/util_funcs.c index f6c2b09..444c8e5 100644 --- a/vendor/agent/mibgroup/util_funcs.c +++ b/vendor/agent/mibgroup/util_funcs.c @@ -17,14 +17,17 @@ #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 @@ -33,7 +36,7 @@ #define _myBSD #endif #endif -#if HAVE_SYS_WAIT_H +#ifdef HAVE_SYS_WAIT_H # include #endif #ifdef __alpha @@ -48,38 +51,38 @@ #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 @@ -107,7 +110,7 @@ typedef __u8 u8; /* ditto */ #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 @@ -150,7 +153,7 @@ make_tempfile(void) int shell_command(struct extensible *ex) { -#if HAVE_SYSTEM +#ifdef HAVE_SYSTEM const char *ofname; char *shellline = NULL; FILE *shellout; @@ -258,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; @@ -409,68 +412,59 @@ get_exec_output(struct extensible *ex) #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) { -#if defined(HAVE_EXECV) && defined(__uClinux__) - int in, out; - char fifo_in_path[256]; - char fifo_out_path[256]; - pid_t tpid; + int i, cnt; + const char *cptr1; + char *cptr2, **argv, **aptr; - /* - * 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 ((tpid = vfork()) == 0) { - /* child */ - execve(cmd, NULL,NULL); - perror(cmd); - exit(1); - } else if (tpid > 0) { - /* parent */ - snprintf(fifo_in_path, sizeof(fifo_in_path), "/flash/cp_%d", tpid); - snprintf(fifo_out_path, sizeof(fifo_out_path), "/flash/pc_%d", tpid); - - in = mkfifo(fifo_in_path, S_IRWXU); /*Create Input Pipe, 700*/ - if (in) { - perror("parent: inpipe"); - return 0; + *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++; } - out = mkfifo(fifo_out_path, S_IRWXU); /*Create Output Pipe, 700*/ - if (out) { - perror("parent: outpipe"); - return 0; + } + 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; +} - in = open(fifo_in_path,O_RDONLY); /*open the Input Pipe read Only*/ - if (in < 0) { - perror("parent: input"); - return 0; - } - out = open(fifo_out_path,O_WRONLY); /*open the Output Pipe write Only*/ - if (out < 0) { - perror("parent: output"); - return 0; - } +#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; - *fdIn = in; /*read*/ - *fdOut = out; /*write*/ - *pid = tpid; - return 1; - } else { - /* pid < 0 */ - setPerrorstatus("vfork"); - return 0; - } -#elif defined(HAVE_EXECV) - int fd[2][2], i, cnt; - char ctmp[STRMAX], *cptr1, *cptr2, argvs[STRMAX], **argv, - **aptr; /* * Setup our pipes */ @@ -481,15 +475,13 @@ get_exec_pipes(char *cmd, int *fdIn, int *fdOut, netsnmp_pid_t *pid) if ((*pid = fork()) == 0) { /* First handle for the child */ close(fd[0][1]); close(fd[1][0]); - close(0); - if (dup(fd[0][0]) != 0) { - setPerrorstatus("dup 0"); + if (dup2(fd[0][0], STDIN_FILENO) < 0) { + setPerrorstatus("dup stdin"); return 0; } close(fd[0][0]); - close(1); - if (dup(fd[1][1]) != 1) { - setPerrorstatus("dup 1"); + if (dup2(fd[1][1], STDOUT_FILENO) < 0) { + setPerrorstatus("dup stdout"); return 0; } close(fd[1][1]); @@ -500,39 +492,19 @@ get_exec_pipes(char *cmd, int *fdIn, int *fdOut, netsnmp_pid_t *pid) /* * close all non-standard open file descriptors */ - netsnmp_close_fds(1); - NETSNMP_IGNORE_RESULT(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]); @@ -547,7 +519,75 @@ 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... */ } -#elif defined(HAVE__GET_OSFHANDLE) && defined(HAVE__OPEN_OSFHANDLE) +} +#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; @@ -642,7 +682,8 @@ 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)) { + 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); @@ -688,7 +729,21 @@ get_exec_pipes(char *cmd, int *fdIn, int *fdOut, netsnmp_pid_t *pid) 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; } @@ -1186,13 +1241,14 @@ int netsnmp_get_link_settings(struct netsnmp_linux_link_settings *nlls, #ifdef ETHTOOL_GLINKSETTINGS { /* - * For Linux kernel v5.2 __ETHTOOL_LINK_MODE_MASK_NBITS == 67 or - * 3 32-bit words. Increase the 'nwords' constant if necessary. + * 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 = 4 }; - struct { + enum { mask_nwords = 8 }; + union { struct ethtool_link_settings elinkset; - uint32_t masks[3 * mask_nwords]; + uint8_t _data[sizeof(struct ethtool_link_settings) + + mask_nwords * 3 * 4]; } data; memset(&data, 0, sizeof(data)); diff --git a/vendor/agent/mibgroup/util_funcs.h b/vendor/agent/mibgroup/util_funcs.h index e4283f1..62eca55 100644 --- a/vendor/agent/mibgroup/util_funcs.h +++ b/vendor/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); diff --git a/vendor/agent/mibgroup/util_funcs/Exit.c b/vendor/agent/mibgroup/util_funcs/Exit.c index c848fd8..540453b 100644 --- a/vendor/agent/mibgroup/util_funcs/Exit.c +++ b/vendor/agent/mibgroup/util_funcs/Exit.c @@ -7,7 +7,7 @@ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif diff --git a/vendor/agent/mibgroup/util_funcs/get_pid_from_inode.c b/vendor/agent/mibgroup/util_funcs/get_pid_from_inode.c index aee907d..5788e1d 100644 --- a/vendor/agent/mibgroup/util_funcs/get_pid_from_inode.c +++ b/vendor/agent/mibgroup/util_funcs/get_pid_from_inode.c @@ -7,17 +7,20 @@ #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:[" diff --git a/vendor/agent/mibgroup/util_funcs/get_pid_from_inode.h b/vendor/agent/mibgroup/util_funcs/get_pid_from_inode.h index ad887a7..4f95210 100644 --- a/vendor/agent/mibgroup/util_funcs/get_pid_from_inode.h +++ b/vendor/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/vendor/agent/mibgroup/util_funcs/header_simple_table.c b/vendor/agent/mibgroup/util_funcs/header_simple_table.c index 81fe160..f99b7fc 100644 --- a/vendor/agent/mibgroup/util_funcs/header_simple_table.c +++ b/vendor/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/vendor/agent/mibgroup/util_funcs/restart.c b/vendor/agent/mibgroup/util_funcs/restart.c index 0e8fbac..a8f9d4d 100644 --- a/vendor/agent/mibgroup/util_funcs/restart.c +++ b/vendor/agent/mibgroup/util_funcs/restart.c @@ -10,7 +10,7 @@ #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include @@ -47,21 +47,21 @@ 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 diff --git a/vendor/agent/mibgroup/utilities.h b/vendor/agent/mibgroup/utilities.h index ffb9240..1175832 100644 --- a/vendor/agent/mibgroup/utilities.h +++ b/vendor/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/vendor/agent/mibgroup/utilities/execute.c b/vendor/agent/mibgroup/utilities/execute.c index 2040ba1..98c0484 100644 --- a/vendor/agent/mibgroup/utilities/execute.c +++ b/vendor/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 @@ -62,7 +62,7 @@ int 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) @@ -158,7 +158,7 @@ run_shell_command(const char *command, const char *input, #endif } -#if HAVE_EXECV +#ifdef HAVE_EXECV /* * Split the given command up into separate tokens, * ready to be passed to 'execv' @@ -204,7 +204,7 @@ int 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; diff --git a/vendor/agent/mibgroup/utilities/execute.h b/vendor/agent/mibgroup/utilities/execute.h index 5fc9530..4954856 100644 --- a/vendor/agent/mibgroup/utilities/execute.h +++ b/vendor/agent/mibgroup/utilities/execute.h @@ -1,7 +1,7 @@ #ifndef _MIBGROUP_EXECUTE_H #define _MIBGROUP_EXECUTE_H -config_belongs_in(agent_module) +config_belongs_in(agent_module); int run_shell_command(const char *command, const char *input, char *output, int *out_len); diff --git a/vendor/agent/mibgroup/utilities/iquery.c b/vendor/agent/mibgroup/utilities/iquery.c index eff55cc..7c6e8a2 100644 --- a/vendor/agent/mibgroup/utilities/iquery.c +++ b/vendor/agent/mibgroup/utilities/iquery.c @@ -224,7 +224,7 @@ netsnmp_session *netsnmp_iquery_session(char* secName, int version, ss->securityEngineIDLen = engIDLen; if ( version == SNMP_VERSION_3 ) { ss->securityNameLen = strlen(secName); - ss->securityName = netsnmp_memdup(secName, ss->securityNameLen); + ss->securityName = netsnmp_memdup(secName, ss->securityNameLen + 1); } else { ss->community = netsnmp_memdup(secName, strlen(secName)); ss->community_len = strlen(secName); diff --git a/vendor/agent/mibgroup/utilities/iquery.h b/vendor/agent/mibgroup/utilities/iquery.h index f98bd91..c234fa2 100644 --- a/vendor/agent/mibgroup/utilities/iquery.h +++ b/vendor/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/vendor/agent/mibgroup/utilities/override.c b/vendor/agent/mibgroup/utilities/override.c index 14cc92c..8084872 100644 --- a/vendor/agent/mibgroup/utilities/override.c +++ b/vendor/agent/mibgroup/utilities/override.c @@ -34,7 +34,9 @@ override_handler(netsnmp_mib_handler *handler, { override_data *data = (override_data*)handler->myvoid; +#ifndef NETSNMP_NO_WRITE_SUPPORT void *tmpptr; +#endif if (!data) { netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_GENERR); diff --git a/vendor/agent/mibgroup/winExtDLL.c b/vendor/agent/mibgroup/winExtDLL.c index 7336f04..bac1c4a 100644 --- a/vendor/agent/mibgroup/winExtDLL.c +++ b/vendor/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 @@ -84,6 +84,7 @@ #include #include #include +#include #ifdef USING_WINEXTDLL_MODULE @@ -291,6 +292,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) }; @@ -338,11 +340,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 +386,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); @@ -381,16 +400,14 @@ init_winExtDLL(void) GetProcAddress(ext_dll_info->dll_handle, "SnmpExtensionInit"); ext_dll_info->pfSnmpExtensionInitEx = (PFNSNMPEXTENSIONINITEX)(uintptr_t) - GetProcAddress(ext_dll_info->dll_handle, - "SnmpExtensionInitEx"); + GetProcAddress(ext_dll_info->dll_handle, "SnmpExtensionInitEx"); ext_dll_info->pfSnmpExtensionClose = (PFNSNMPEXTENSIONCLOSE) GetProcAddress(ext_dll_info->dll_handle, "SnmpExtensionClose"); ext_dll_info->pfSnmpExtensionQuery = (PFNSNMPEXTENSIONQUERY)(uintptr_t) GetProcAddress(ext_dll_info->dll_handle, "SnmpExtensionQuery"); ext_dll_info->pfSnmpExtensionQueryEx = (PFNSNMPEXTENSIONQUERYEX)(uintptr_t) - GetProcAddress(ext_dll_info->dll_handle, - "SnmpExtensionQueryEx"); + GetProcAddress(ext_dll_info->dll_handle, "SnmpExtensionQueryEx"); ext_dll_info->pfSnmpExtensionTrap = (PFNSNMPEXTENSIONTRAP)(uintptr_t) GetProcAddress(ext_dll_info->dll_handle, "SnmpExtensionTrap"); @@ -402,21 +419,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() @@ -454,25 +456,10 @@ init_winExtDLL(void) "init_winExtDLL: DLL %s view length %d\n", ext_dll_info->dll_name, view.idLength)); if (view.idLength) { - /* - * 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)); - } else { - 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); } /* @@ -631,7 +618,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, @@ -658,7 +645,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 { @@ -870,14 +859,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; } @@ -956,6 +946,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; @@ -964,24 +958,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; @@ -1141,10 +1151,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) { @@ -1204,8 +1211,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; } @@ -1455,7 +1461,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, @@ -1541,7 +1547,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); @@ -1586,7 +1592,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/vendor/agent/netsnmp_close_fds.c b/vendor/agent/netsnmp_close_fds.c index 556c3dc..2e2f46e 100644 --- a/vendor/agent/netsnmp_close_fds.c +++ b/vendor/agent/netsnmp_close_fds.c @@ -1,10 +1,10 @@ #include #include -#if HAVE_DIRENT_H +#ifdef HAVE_DIRENT_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif @@ -44,8 +44,13 @@ void netsnmp_close_fds(int fd) closedir(dir); } #endif - if (largest_fd < 0) + 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); diff --git a/vendor/agent/snmp_agent.c b/vendor/agent/snmp_agent.c index 3376357..113ebda 100644 --- a/vendor/agent/snmp_agent.c +++ b/vendor/agent/snmp_agent.c @@ -54,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 @@ -85,7 +85,7 @@ SOFTWARE. #include #include "agent_global_vars.h" -#if HAVE_SYSLOG_H +#ifdef HAVE_SYSLOG_H #include #endif @@ -142,9 +142,10 @@ netsnmp_get_pdu_stats(void) return _pdu_stats; } -int _pdu_stats_compare(const netsnmp_pdu_stats * lhs, - const netsnmp_pdu_stats * rhs) +int _pdu_stats_compare(const void *p, const void *q) { + const netsnmp_pdu_stats *lhs = p, *rhs = q; + if (NULL == lhs || NULL == rhs) { snmp_log(LOG_WARNING, "WARNING: results undefined for compares with NULL\n"); @@ -178,7 +179,7 @@ _pdu_stats_init(void) { return; } - _pdu_stats->compare = (netsnmp_container_compare*)_pdu_stats_compare; + _pdu_stats->compare = _pdu_stats_compare; _pdu_stats->get_subset = NULL; /** subsets not supported */ _pdu_stats_max = netsnmp_ds_get_int(NETSNMP_DS_APPLICATION_ID, @@ -1042,6 +1043,11 @@ netsnmp_agent_check_packet(netsnmp_session * session, char *tcpudpaddr = NULL, *name; short not_log_connection; + /* 'char *' wrapers on 'const char *' STRING_UNKNOWN value for hosts_ctl */ + char name_unknown[sizeof(STRING_UNKNOWN)] = STRING_UNKNOWN; + char addr_unknown[sizeof(STRING_UNKNOWN)] = STRING_UNKNOWN; + char user_unknown[sizeof(STRING_UNKNOWN)] = STRING_UNKNOWN; + name = netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_APPTYPE); @@ -1084,7 +1090,7 @@ netsnmp_agent_check_packet(netsnmp_session * session, if (xp) *xp = '\0'; - if (hosts_ctl(name, STRING_UNKNOWN, sbuf, STRING_UNKNOWN)) { + if (hosts_ctl(name, name_unknown, sbuf, user_unknown)) { if (!not_log_connection) { snmp_log(allow_severity, "Connection from %s\n", addr_string); } @@ -1101,7 +1107,7 @@ netsnmp_agent_check_packet(netsnmp_session * session, */ if (0 == strncmp(addr_string, "callback", 8)) ; - else if (hosts_ctl(name, STRING_UNKNOWN, STRING_UNKNOWN, STRING_UNKNOWN)){ + else if (hosts_ctl(name, name_unknown, addr_unknown, user_unknown)){ if (!not_log_connection) { snmp_log(allow_severity, "Connection from (%s)\n", addr_string); }; @@ -1475,17 +1481,17 @@ init_master_agent(void) if (cptr) { buf = strdup(cptr); - if (!buf) { - snmp_log(LOG_ERR, - "Error processing transport \"%s\"\n", cptr); - return 1; - } } else { /* * No, so just specify the default port. */ buf = strdup(""); } + if (!buf) { + snmp_log(LOG_ERR, + "Error processing transport \"%s\"\n", cptr ? cptr : "default"); + return 1; + } DEBUGMSGTL(("snmp_agent", "final port spec: \"%s\"\n", buf)); st = buf; @@ -2221,6 +2227,8 @@ handle_snmp_packet(int op, netsnmp_session * session, int reqid, if (magic == NULL) { asp = init_agent_snmp_session(session, pdu); status = SNMP_ERR_NOERROR; + if (asp == NULL) + return 1; } else { asp = (netsnmp_agent_session *) magic; status = asp->status; @@ -2655,7 +2663,7 @@ netsnmp_create_subtree_cache(netsnmp_agent_session *asp) * enough varbinds to fill the packet vs retrieving varbinds * that will be discarded to make the response fit the packet size. */ - if (avgvarbind == 0) + if (avgvarbind <= 0) avgvarbind = 15; if (maxresponses > (asp->pdu->msgMaxSize / avgvarbind)) { @@ -2965,7 +2973,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; } @@ -3719,12 +3727,46 @@ netsnmp_handle_request(netsnmp_agent_session *asp, int status) return 1; } +#ifndef NETSNMP_NO_WRITE_SUPPORT +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; +} +#endif /* NETSNMP_NO_WRITE_SUPPORT */ + 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 */ @@ -3768,7 +3810,9 @@ handle_pdu(netsnmp_agent_session *asp) case SNMP_MSG_INTERNAL_SET_RESERVE1: #endif /* NETSNMP_NO_WRITE_SUPPORT */ asp->vbcount = count_varbinds(asp->pdu->variables); - asp->requests = calloc(asp->vbcount, sizeof(netsnmp_request_info)); + asp->requests = + calloc(asp->vbcount ? asp->vbcount : 1, + sizeof(netsnmp_request_info)); /* * collect varbinds */ diff --git a/vendor/agent/snmp_perl.c b/vendor/agent/snmp_perl.c index 3846ddf..1c8c751 100644 --- a/vendor/agent/snmp_perl.c +++ b/vendor/agent/snmp_perl.c @@ -1,5 +1,9 @@ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-qual" +#pragma GCC diagnostic ignored "-Wdeclaration-after-statement" #include #include "perl.h" +#pragma GCC diagnostic pop #include #include diff --git a/vendor/agent/snmp_vars.c b/vendor/agent/snmp_vars.c index ea5d4ca..9da66b2 100644 --- a/vendor/agent/snmp_vars.c +++ b/vendor/agent/snmp_vars.c @@ -61,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 @@ -75,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 @@ -164,19 +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 - /* * Each variable name is placed in the variable table, without the * terminating substring that determines the instance of the variable. When diff --git a/vendor/agent/snmpd.c b/vendor/agent/snmpd.c index ae73eda..fa9e87a 100644 --- a/vendor/agent/snmpd.c +++ b/vendor/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 @@ -236,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 @@ -264,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 @@ -289,6 +289,8 @@ usage(char *prog) " -S d|i|0-7\t\tuse -Ls instead\n" "\n" ); + SOCK_CLEANUP; + exit(1); } static void @@ -381,7 +383,7 @@ main(int argc, char *argv[]) #endif { static const char options[] = "aAc:CdD::fhHI:l:L:m:M:n:p:P:qrsS:UvV-:Y:" -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H "g:u:" #endif #if defined(USING_AGENTX_SUBAGENT_MODULE)|| defined(USING_AGENTX_MASTER_MODULE) @@ -400,7 +402,7 @@ main(int argc, char *argv[]) #ifndef WIN32 int prepared_sockets = 0; #endif -#if HAVE_GETPID +#ifdef HAVE_GETPID int fd; FILE *PID; #endif @@ -494,7 +496,6 @@ main(int argc, char *argv[]) case '-': if (strcasecmp(optarg, "help") == 0) { usage(argv[0]); - goto out; } if (strcasecmp(optarg, "version") == 0) { version(); @@ -548,19 +549,22 @@ 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; info = getgrnam(optarg); - gid = info ? info->gr_gid : -1; + if (info) + gid = info->gr_gid; + else + gid = -1; endgrent(); } #endif @@ -726,19 +730,22 @@ 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; info = getpwnam(optarg); - uid = info ? info->pw_uid : -1; + if (info) + uid = info->pw_uid; + else + uid = -1; endpwent(); } #endif @@ -783,7 +790,6 @@ main(int argc, char *argv[]) fprintf(stderr, "%s: Illegal argument -X:" "AgentX support not compiled in.\n", argv[0]); usage(argv[0]); - goto out; #endif break; @@ -816,15 +822,17 @@ main(int argc, char *argv[]) */ DEBUGMSGTL(("snmpd/main", "optind %d, argc %d\n", optind, argc)); for (i = optind; i < argc; i++) { - char *c, *astring; + char *c; if ((c = netsnmp_ds_get_string(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_PORTS))) { - astring = (char*)malloc(strlen(c) + 2 + strlen(argv[i])); + char *astring; + size_t alen = strlen(c) + 2 + strlen(argv[i]); + astring = (char*)malloc(alen); if (astring == NULL) { fprintf(stderr, "malloc failure processing argv[%d]\n", i); goto out; } - sprintf(astring, "%s,%s", c, argv[i]); + snprintf(astring, alen, "%s,%s", c, argv[i]); netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_PORTS, astring); SNMP_FREE(astring); @@ -874,12 +882,13 @@ main(int argc, char *argv[]) fprintf(stderr, "malloc failure processing argvrestart\n"); goto out; } - strcpy(argvrestartname, argv[0]); + strlcpy(argvrestartname, argv[0], strlen(argv[0])+1); for (cptr = argvrestart, i = 0; i < argc; i++) { - strcpy(cptr, argv[i]); + strlcpy(cptr, argv[i], ret); *(argvptr++) = cptr; cptr += strlen(argv[i]) + 1; + ret -= strlen(argv[i]) + 1; } } #endif /* USING_UTIL_FUNCS_RESTART_MODULE */ @@ -938,7 +947,7 @@ main(int argc, char *argv[]) } } -#if HAVE_GETPID +#ifdef HAVE_GETPID if (pid_file != NULL) { /* * unlink the pid_file, if it exists, prior to open. Without @@ -955,17 +964,13 @@ main(int argc, char *argv[]) } } else { if ((PID = fdopen(fd, "w")) == NULL) { + close(fd); snmp_log_perror(pid_file); 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 @@ -1008,7 +1013,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; /* @@ -1154,6 +1159,33 @@ 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()); + read_premib_configs(); + 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 * @@ -1195,23 +1227,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 diff --git a/vendor/apps/Makefile.depend b/vendor/apps/Makefile.depend index 3e2d8ac..1cee711 100644 --- a/vendor/apps/Makefile.depend +++ b/vendor/apps/Makefile.depend @@ -1,6 +1,9 @@ # DO NOT DELETE THIS LINE -- make depend depends on it. ./agentxtrap.lo: ../include/net-snmp/net-snmp-config.h +./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 @@ -30,7 +33,9 @@ ./agentxtrap.lo: ../include/net-snmp/library/snmpTCPDomain.h ./agentxtrap.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -49,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 @@ -71,8 +75,8 @@ ./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 @@ -107,7 +111,9 @@ ./encode_keychange.lo: ../include/net-snmp/library/snmpTCPDomain.h ./encode_keychange.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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,8 +153,8 @@ ./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 ../include/net-snmp/types.h ./snmpbulkget.lo: ../include/net-snmp/library/oid.h @@ -177,7 +182,9 @@ ./snmpbulkget.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmpbulkget.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -195,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 @@ -218,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 @@ -248,7 +254,9 @@ ./snmpbulkwalk.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmpbulkwalk.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -268,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 @@ -289,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 @@ -318,7 +325,9 @@ ./snmpdelta.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmpdelta.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -338,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 @@ -359,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 @@ -387,7 +395,9 @@ ./snmpdf.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmpdf.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -406,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 @@ -426,8 +435,8 @@ ./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 ../include/net-snmp/types.h ./snmpget.lo: ../include/net-snmp/library/oid.h @@ -455,7 +464,9 @@ ./snmpget.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmpget.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -472,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 @@ -495,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 @@ -525,7 +535,9 @@ ./snmpgetnext.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmpgetnext.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -545,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 @@ -566,8 +577,8 @@ ./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 @@ -595,7 +606,9 @@ ./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 @@ -615,13 +628,13 @@ ./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/factory.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 ../include/net-snmp/config_api.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 @@ -635,12 +648,13 @@ ./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/snmptsm.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 ../include/net-snmp/types.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 @@ -665,7 +679,9 @@ ./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 @@ -685,13 +701,13 @@ ./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/factory.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 ../include/net-snmp/config_api.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 @@ -705,8 +721,8 @@ ./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/snmptsm.h -./snmpping.lo: ../include/net-snmp/library/snmpusm.h ../snmplib/inet_ntop.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 @@ -733,7 +749,9 @@ ./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 @@ -752,7 +770,6 @@ ./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/factory.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 @@ -772,8 +789,8 @@ ./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/snmptsm.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 @@ -801,7 +818,9 @@ ./snmpset.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmpset.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -820,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 @@ -840,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 @@ -869,7 +887,9 @@ ./snmpstatus.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmpstatus.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -887,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 @@ -910,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 @@ -939,7 +958,9 @@ ./snmptable.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmptable.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -959,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 @@ -980,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 @@ -1009,7 +1029,9 @@ ./snmptest.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmptest.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1029,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 @@ -1049,8 +1071,8 @@ ./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 @@ -1079,7 +1101,9 @@ ./snmptls.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmptls.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1097,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 @@ -1117,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 @@ -1189,7 +1212,9 @@ ./snmptranslate.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmptranslate.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1207,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 @@ -1247,7 +1271,9 @@ ./snmptrap.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmptrap.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1267,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 @@ -1287,8 +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 +./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 @@ -1316,7 +1342,9 @@ ./snmptrapd.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmptrapd.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1336,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 @@ -1357,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 @@ -1397,7 +1424,7 @@ ./snmptrapd.lo: ../include/net-snmp/agent/mfd.h ./snmptrapd.lo: ../include/net-snmp/agent/snmp_get_statistic.h ./snmptrapd.lo: ../include/net-snmp/agent/netsnmp_close_fds.h -./snmptrapd.lo: ../agent/agent_global_vars.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 @@ -1436,7 +1463,9 @@ ./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 @@ -1456,7 +1485,6 @@ ./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 @@ -1477,8 +1505,8 @@ ./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: ../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 @@ -1513,7 +1541,9 @@ ./snmptrapd_handlers.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmptrapd_handlers.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1536,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 @@ -1553,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 @@ -1624,7 +1653,9 @@ ./snmptrapd_log.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmptrapd_log.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1644,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 @@ -1665,8 +1695,8 @@ ./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/snmptsm.h ./snmptrapd_log.lo: ../include/net-snmp/library/snmpusm.h +./snmptrapd_log.lo: ../include/net-snmp/library/snmptsm.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 @@ -1697,7 +1727,9 @@ ./snmpusm.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmpusm.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1716,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 @@ -1736,8 +1767,8 @@ ./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 @@ -1766,7 +1797,9 @@ ./snmpvacm.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmpvacm.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1786,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 @@ -1806,8 +1839,8 @@ ./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 ../include/net-snmp/types.h @@ -1835,7 +1868,9 @@ ./snmpwalk.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmpwalk.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1855,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 @@ -1875,8 +1910,8 @@ ./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 @@ -1907,7 +1942,9 @@ ./snmpnetstat/if.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmpnetstat/if.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1927,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 @@ -1948,8 +1984,8 @@ ./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/inet.lo: ../include/net-snmp/net-snmp-config.h @@ -1980,7 +2016,9 @@ ./snmpnetstat/inet.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmpnetstat/inet.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2000,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 @@ -2021,8 +2058,8 @@ ./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 @@ -2052,7 +2089,9 @@ ./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 @@ -2072,7 +2111,6 @@ ./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 @@ -2093,8 +2131,8 @@ ./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: ../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 @@ -2124,7 +2162,9 @@ ./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2144,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 @@ -2165,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 @@ -2196,7 +2235,9 @@ ./snmpnetstat/main.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmpnetstat/main.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2216,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 @@ -2237,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 @@ -2268,7 +2308,9 @@ ./snmpnetstat/route.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmpnetstat/route.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2288,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 @@ -2309,8 +2350,8 @@ ./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 @@ -2341,7 +2382,9 @@ ./snmpnetstat/routex.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmpnetstat/routex.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2361,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 @@ -2382,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 @@ -2413,7 +2455,9 @@ ./snmpnetstat/winstub.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmpnetstat/winstub.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2433,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 @@ -2454,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/vendor/apps/Makefile.in b/vendor/apps/Makefile.in index 43f3b9c..57b8524 100644 --- a/vendor/apps/Makefile.in +++ b/vendor/apps/Makefile.in @@ -53,8 +53,6 @@ mysubdir=apps @NETSNMP_HAVE_AGENTX_LIBS_TRUE@AGENTXTRAP = agentxtrap$(EXEEXT) @NETSNMP_HAVE_AGENTX_LIBS_FALSE@AGENTXTRAP = -INSTALLBINPROGS_LIBCURSES_TRUE = snmpps$(EXEEXT) - INSTALLBINPROGS = snmpget$(EXEEXT) \ snmpgetnext$(EXEEXT) \ $(SNMPSETINSTALLBINPROG) \ @@ -68,7 +66,7 @@ INSTALLBINPROGS = snmpget$(EXEEXT) \ snmpdelta$(EXEEXT) \ snmptest$(EXEEXT) \ snmpdf$(EXEEXT) \ - $(INSTALLBINPROGS_LIBCURSES_@HAVE_LIBCURSES@) \ + snmpps$(EXEEXT) \ $(SNMPPINGINSTALLBINPROG) \ $(AGENTXTRAP) \ $(SNMPVACMINSTALLBINPROG) \ @@ -233,11 +231,11 @@ snmpps$(EXEEXT): snmpps.$(OSUFFIX) $(USELIBS) snmpping$(EXEEXT): snmpping.$(OSUFFIX) $(USELIBS) $(LINK) ${CFLAGS} -o $@ snmpping.$(OSUFFIX) ${LDFLAGS} ${LIBS} -lm -snmppcap$(EXEEXT): snmppcap.$(OSUFFIX) $(USELIBS) - $(LINK) ${CFLAGS} -o $@ snmppcap.$(OSUFFIX) ${LDFLAGS} ${LIBS} -lpcap +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) $(LDFLAGS) + $(LIB_LD_CMD) $@ ${LLIBTRAPD_OBJS} $(MIBLIB) $(MYSQL_LIBS) $(USELIBS) $(PERLLDOPTS_FOR_LIBS) $(LDFLAGS) $(RANLIB) $@ snmpinforminstall: diff --git a/vendor/apps/encode_keychange.c b/vendor/apps/encode_keychange.c index 850d202..8f31729 100644 --- a/vendor/apps/encode_keychange.c +++ b/vendor/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 @@ -131,8 +131,9 @@ main(int argc, char **argv) fprintf(stderr, "%s: out of memory!", local_progname); exit(-1); } - sprintf(local_passphrase_filename, "%s/%s", PASSPHRASE_DIR, - PASSPHRASE_FILE); + snprintf(local_passphrase_filename, sizeof(PASSPHRASE_DIR) + + sizeof(PASSPHRASE_FILE) + 4, + "%s/%s", PASSPHRASE_DIR, PASSPHRASE_FILE); @@ -374,7 +375,7 @@ usage_synopsis(FILE * ofp) void usage_to_file(FILE * ofp) { - char *s; + const char *s; usage_synopsis(ofp); @@ -387,7 +388,7 @@ usage_to_file(FILE * ofp) Ku=>Kul, and to hash the old Kul with the random bits.\n\ \n\ Passphrase will be taken from the first successful source as follows:\n", - (s = getenv("HOME")) ? s : "$HOME", local_passphrase_filename, + (s = netsnmp_gethomedir()) ? s : "$HOME", local_passphrase_filename, "-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\ @@ -460,7 +461,8 @@ get_user_passphrases(void) char *obuf = NULL, *nbuf = NULL; - char path[SNMP_MAXBUF], buf[SNMP_MAXBUF], *s = NULL; + char path[SNMP_MAXBUF], buf[SNMP_MAXBUF]; + const char *s = NULL; struct stat statbuf; FILE *fp = NULL; @@ -483,7 +485,7 @@ get_user_passphrases(void) * path for existence and access first. Refuse to read * if the permissions are wrong. */ - s = getenv("HOME"); + s = netsnmp_gethomedir(); snprintf(path, sizeof(path), "%s/%s", s, PASSPHRASE_DIR); path[ sizeof(path)-1 ] = 0; @@ -537,7 +539,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) @@ -553,7 +555,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) @@ -744,7 +746,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); diff --git a/vendor/apps/snmpbulkget.c b/vendor/apps/snmpbulkget.c index 2e72a2b..87f15c6 100644 --- a/vendor/apps/snmpbulkget.c +++ b/vendor/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 @@ -249,6 +249,7 @@ main(int argc, char *argv[]) snmp_close(ss); out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return exitval; } diff --git a/vendor/apps/snmpbulkwalk.c b/vendor/apps/snmpbulkwalk.c index 7c56bde..155e97d 100644 --- a/vendor/apps/snmpbulkwalk.c +++ b/vendor/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 @@ -385,6 +385,7 @@ main(int argc, char *argv[]) } out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return exitval; } diff --git a/vendor/apps/snmpdelta.c b/vendor/apps/snmpdelta.c index 5c7c4cb..0a48c23 100644 --- a/vendor/apps/snmpdelta.c +++ b/vendor/apps/snmpdelta.c @@ -28,45 +28,46 @@ #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 +#define MAX_DESCRIPTOR 64 #define MAX_ARGS 256 #define NETSNMP_DS_APP_DONT_FIX_PDUS 0 @@ -80,7 +81,7 @@ struct varInfo { oid *info_oid; int type; size_t oidlen; - char descriptor[64]; + char descriptor[MAX_DESCRIPTOR]; u_int value; struct counter64 c64value; float max; @@ -186,8 +187,8 @@ int wait_for_peak_start(int period, int peak) { struct timeval m_time, *tv = &m_time; - struct tm tm; - time_t SecondsAtNextHour; + struct tm tm, *local_time; + time_t SecondsAtNextHour, tv_sec; int target = 0; int seconds; @@ -201,7 +202,12 @@ wait_for_peak_start(int period, int peak) /* * Create a tm struct from it */ - memcpy(&tm, localtime((time_t *) & tv->tv_sec), sizeof(tm)); + tv_sec = tv->tv_sec; + local_time = localtime(&tv_sec); + if (local_time) + memcpy(&tm, local_time, sizeof(tm)); + else + memset(&tm, 0, sizeof(tm)); /* * Calculate the next hour @@ -210,6 +216,8 @@ wait_for_peak_start(int period, int peak) tm.tm_min = 0; tm.tm_hour++; SecondsAtNextHour = mktime(&tm); + if (SecondsAtNextHour == (time_t)-1) + return -1; /* * Now figure out the amount of time to sleep @@ -261,7 +269,7 @@ sprint_descriptor(char *buffer, struct varInfo *vip) cp++; if (cp < buf) cp = buf; - strcpy(buffer, cp); + strlcpy(buffer, cp, MAX_DESCRIPTOR); if (buf != NULL) { free(buf); @@ -314,7 +322,7 @@ wait_for_period(int period) Sleep(period * 1000); #else /* WIN32 */ struct timeval m_time, *tv = &m_time; - struct tm tm; + struct tm tm, *local_time; int count; static int target = 0; time_t nexthour; @@ -324,11 +332,18 @@ wait_for_period(int period) if (target) { target += period; } else { - memcpy(&tm, localtime((time_t *) & tv->tv_sec), sizeof(tm)); + time_t tv_sec = tv->tv_sec; + local_time = localtime(&tv_sec); + if (local_time) + memcpy(&tm, local_time, sizeof(tm)); + else + memset(&tm, 0, sizeof(tm)); tm.tm_sec = 0; tm.tm_min = 0; tm.tm_hour++; nexthour = mktime(&tm); + if (nexthour == (time_t)-1) + return; target = (nexthour - tv->tv_sec) % period; if (target == 0) @@ -389,7 +404,7 @@ main(int argc, char *argv[]) int sum; /* what the heck is this for, its never used? */ char filename[128] = { 0 }; struct timeval tv; - struct tm tm; + struct tm tm, *local_time; char timestring[64] = { 0 }, valueStr[64] = { 0}, maxStr[64] = { 0}; @@ -512,17 +527,25 @@ main(int argc, char *argv[]) if (status == STAT_SUCCESS) { if (response->errstat == SNMP_ERR_NOERROR) { if (timestamp) { - gettimeofday(&tv, (struct timezone *) 0); - memcpy(&tm, localtime((time_t *) & tv.tv_sec), - sizeof(tm)); + time_t tv_sec; + + gettimeofday(&tv, NULL); + tv_sec = tv.tv_sec; + local_time = localtime(&tv_sec); + if (local_time) + memcpy(&tm, local_time, sizeof(tm)); + else + memset(&tm, 0, sizeof(tm)); if (((period % 60) && (!peaks || ((period * peaks) % 60))) || keepSeconds) - sprintf(timestring, " [%02d:%02d:%02d %d/%d]", + snprintf(timestring, sizeof timestring, + " [%02d:%02d:%02d %d/%d]", tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_mon + 1, tm.tm_mday); else - sprintf(timestring, " [%02d:%02d %d/%d]", + snprintf(timestring, sizeof timestring, + " [%02d:%02d %d/%d]", tm.tm_hour, tm.tm_min, tm.tm_mon + 1, tm.tm_mday); } @@ -577,12 +600,12 @@ main(int argc, char *argv[]) if (tableForm) { if (count == begin) { - sprintf(outstr, "%s", timestring + 1); + snprintf(outstr, sizeof outstr, "%s", timestring + 1); } else { outstr[0] = '\0'; } } else { - sprintf(outstr, "%s %s", timestring, + snprintf(outstr, sizeof outstr, "%s %s", timestring, vip->descriptor); } @@ -595,24 +618,25 @@ main(int argc, char *argv[]) printvalue = ((float) value * 100) / delta_time; if (tableForm) - sprintf(valueStr, "\t%.2f", printvalue); + snprintf(valueStr, sizeof valueStr, "\t%.2f", printvalue); else - sprintf(valueStr, " /sec: %.2f", + snprintf(valueStr, sizeof valueStr, " /sec: %.2f", printvalue); } } else { printvalue = (float) value; - sprintf(valueStr, " /%d sec: ", period); + snprintf(valueStr, sizeof valueStr, " /%d sec: ", period); if (vip->type == ASN_COUNTER64) printU64(valueStr + strlen(valueStr), &c64value); else - sprintf(valueStr + strlen(valueStr), "%u", - value); + snprintf(valueStr + strlen(valueStr), + sizeof(valueStr) - strlen(valueStr), + "%u", value); } if (!peaks) { - strcat(outstr, valueStr); + strlcat(outstr, valueStr, sizeof outstr); } else { print = 0; if (vip->peak_count == -1) { @@ -624,13 +648,13 @@ main(int argc, char *argv[]) vip->peak = printvalue; if (++vip->peak_count == peaks) { if (deltat) - sprintf(peakStr, + snprintf(peakStr, sizeof peakStr, " /sec: %.2f (%d sec Peak: %.2f)", vip->peak_average / vip->peak_count, period, vip->peak); else - sprintf(peakStr, + snprintf(peakStr, sizeof peakStr, " /%d sec: %.0f (%d sec Peak: %.0f)", period, vip->peak_average / @@ -640,7 +664,7 @@ main(int argc, char *argv[]) vip->peak = 0; vip->peak_count = 0; print = 1; - strcat(outstr, peakStr); + strlcat(outstr, peakStr, sizeof outstr); } } } @@ -650,15 +674,15 @@ main(int argc, char *argv[]) vip->max = printvalue; } if (deltat) - sprintf(maxStr, " (Max: %.2f)", vip->max); + snprintf(maxStr, sizeof maxStr, " (Max: %.2f)", vip->max); else - sprintf(maxStr, " (Max: %.0f)", vip->max); - strcat(outstr, maxStr); + snprintf(maxStr, sizeof maxStr, " (Max: %.0f)", vip->max); + strlcat(outstr, maxStr, sizeof outstr); } if (print) { if (fileout) { - sprintf(filename, "%s-%s", gateway, + snprintf(filename, sizeof filename, "%s-%s", gateway, vip->descriptor); print_log(filename, outstr + 1); } else { @@ -748,6 +772,7 @@ main(int argc, char *argv[]) snmp_close(ss); out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return (exit_code); } diff --git a/vendor/apps/snmpdf.c b/vendor/apps/snmpdf.c index 4a0b47e..751ee6c 100644 --- a/vendor/apps/snmpdf.c +++ b/vendor/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 @@ -466,6 +466,7 @@ main(int argc, char *argv[]) snmp_close(ss); out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return exit_code; } /* end main() */ diff --git a/vendor/apps/snmpget.c b/vendor/apps/snmpget.c index a5487c2..ea1bf7f 100644 --- a/vendor/apps/snmpget.c +++ b/vendor/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 @@ -180,8 +180,10 @@ main(int argc, char *argv[]) } else snmp_add_null_var(pdu, name, name_length); } - if (failures) + if (failures) { + snmp_free_pdu(pdu); goto close_session; + } exitval = 0; @@ -249,6 +251,7 @@ main(int argc, char *argv[]) snmp_close(ss); out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return exitval; } /* end main() */ diff --git a/vendor/apps/snmpgetnext.c b/vendor/apps/snmpgetnext.c index 7f49851..d05ee12 100644 --- a/vendor/apps/snmpgetnext.c +++ b/vendor/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 @@ -234,6 +234,7 @@ main(int argc, char *argv[]) snmp_close(ss); out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return exitval; } diff --git a/vendor/apps/snmpnetstat/Makefile.depend b/vendor/apps/snmpnetstat/Makefile.depend index 317ef07..f6d23d5 100644 --- a/vendor/apps/snmpnetstat/Makefile.depend +++ b/vendor/apps/snmpnetstat/Makefile.depend @@ -2,10 +2,12 @@ ./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 -./if.lo: ../../include/net-snmp/types.h +./if.lo: ../../include/net-snmp/definitions.h ../../include/net-snmp/types.h ./if.lo: ../../include/net-snmp/library/oid.h ./if.lo: ../../include/net-snmp/library/types.h ./if.lo: ../../include/net-snmp/library/snmp_api.h @@ -30,7 +32,9 @@ ./if.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./if.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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,9 +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: main.h netstat.h +./if.lo: ../../include/net-snmp/library/snmptsm.h +./if.lo: main.h +./if.lo: 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 @@ -102,7 +106,9 @@ ./inet.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./inet.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -122,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 @@ -143,8 +148,8 @@ ./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 @@ -173,7 +178,9 @@ ./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 @@ -193,7 +200,6 @@ ./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 @@ -214,8 +220,8 @@ ./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 +./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 @@ -244,7 +250,9 @@ ./inetx.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./inetx.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -264,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 @@ -285,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 @@ -315,7 +322,9 @@ ./main.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./main.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -335,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 @@ -356,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 @@ -386,7 +394,9 @@ ./route.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./route.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -406,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 @@ -427,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 ffs.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 @@ -457,7 +466,9 @@ ./routex.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./routex.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -477,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 @@ -498,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 @@ -528,7 +538,9 @@ ./winstub.lo: ../../include/net-snmp/library/snmpTCPDomain.h ./winstub.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -548,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 @@ -569,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/vendor/apps/snmpnetstat/ffs.c b/vendor/apps/snmpnetstat/ffs.c index dffd59d..f436c41 100644 --- a/vendor/apps/snmpnetstat/ffs.c +++ b/vendor/apps/snmpnetstat/ffs.c @@ -1,4 +1,6 @@ -/* $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. @@ -13,28 +15,28 @@ 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/vendor/apps/snmpnetstat/ffs.h b/vendor/apps/snmpnetstat/ffs.h index 717d309..c5b47bb 100644 --- a/vendor/apps/snmpnetstat/ffs.h +++ b/vendor/apps/snmpnetstat/ffs.h @@ -1 +1 @@ -int _ffs(int mask); +int _ffs(int mask); diff --git a/vendor/apps/snmpnetstat/if.c b/vendor/apps/snmpnetstat/if.c index 1676815..8a6c757 100644 --- a/vendor/apps/snmpnetstat/if.c +++ b/vendor/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 @@ -34,10 +38,10 @@ #include #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_NET_IF_H +#ifdef HAVE_NET_IF_H #include #endif #ifndef _XOPEN_SOURCE @@ -54,88 +58,112 @@ #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 @@ -153,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)); } } @@ -164,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 @@ -227,142 +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 */ - 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 */ - sprintf(cur_if->s_ibytes, "%lu", *vp->val.integer); + case 10: /* ifInOctets */ + snprintf(cur_if->s_ibytes, sizeof 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); + snprintf(cur_if->s_ipkts, sizeof 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); + snprintf(cur_if->s_ipkts, sizeof 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 */ - sprintf(cur_if->s_ierrs, "%lu", *vp->val.integer); + case 14: /* ifInErrors */ + snprintf(cur_if->s_ierrs, sizeof 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 */ - sprintf(cur_if->s_obytes, "%lu", *vp->val.integer); + case 16: /* ifOutOctets */ + snprintf(cur_if->s_obytes, sizeof 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); + snprintf(cur_if->s_opkts, sizeof 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); + snprintf(cur_if->s_opkts, sizeof 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 */ - sprintf(cur_if->s_oerrs, "%lu", *vp->val.integer); + case 20: /* ifOutErrors */ + snprintf(cur_if->s_oerrs, sizeof 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 */ - sprintf(cur_if->s_outq, "%lu", *vp->val.integer); + case 21: /* ifOutQLen */ + snprintf(cur_if->s_outq, sizeof 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; @@ -378,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; @@ -401,104 +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. @@ -523,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); } @@ -590,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; @@ -654,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; } @@ -797,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/vendor/apps/snmpnetstat/inet.c b/vendor/apps/snmpnetstat/inet.c index 19c97b2..f27c0d8 100644 --- a/vendor/apps/snmpnetstat/inet.c +++ b/vendor/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 @@ -33,22 +37,22 @@ #include #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_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif @@ -58,20 +62,20 @@ #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]; }; -static char *inetname(struct in_addr *); +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 @@ -92,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); } /* @@ -183,37 +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 */ + 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 @@ -226,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); /* @@ -269,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 */ @@ -283,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. @@ -299,7 +308,7 @@ tcpprotopr_bulkget(const char *name, oid *root, size_t root_len) */ running = 0; } - } + } } else { /* * error in response, print it @@ -314,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) { @@ -332,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_varbind( 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) @@ -382,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); } @@ -405,16 +418,16 @@ _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, "%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"}, + {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"}, @@ -425,10 +438,10 @@ ip_stats(const char *name) {18, "%14lu fragmentation failure%s"}, {19, "%14lu fragment%s created"}, {23, "%14lu route%s discarded"}, - { 0, ""} + {0, ""} }; - _dump_stats( name, ipstats_oid, ipstats_len, ipstats_tbl ); + _dump_stats(name, ipstats_oid, ipstats_len, ipstats_tbl); } @@ -438,28 +451,28 @@ 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, "%14lu total message%s received"}, - { 2, "%14lu message%s dropped due to errors"}, + {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, ""} + {0, ""} }; struct stat_table icmp_inhistogram[] = { - { 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"}, + {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, ""} + {0, ""} }; struct stat_table icmp_outhistogram[] = { {16, " Destination unreachable: %lu"}, @@ -476,11 +489,11 @@ icmp_stats(const char *name) {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); } @@ -490,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, "%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"}, + {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, ""} + {0, ""} }; - _dump_stats( "tcp", tcpstats_oid, tcpstats_len, tcpstats_tbl ); + _dump_stats("tcp", tcpstats_oid, tcpstats_len, tcpstats_tbl); } @@ -515,8 +528,8 @@ 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, "%14lu total datagram%s received"}, {2, "%14lu datagram%s to invalid port"}, @@ -524,7 +537,7 @@ udp_stats(const char *name) {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); } @@ -541,9 +554,9 @@ udp_stats(const char *name) * Dump IPCOMP statistics */ - /* - * Utility routines - */ + /* + * Utility routines + */ /* * Translation of RPC service names - Omitted @@ -554,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); } /* @@ -585,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/vendor/apps/snmpnetstat/inet6.c b/vendor/apps/snmpnetstat/inet6.c index 9be2b3c..574ca6d 100644 --- a/vendor/apps/snmpnetstat/inet6.c +++ b/vendor/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 @@ -31,26 +35,26 @@ #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 @@ -60,15 +64,15 @@ #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]; }; -static char *inet6name(const unsigned char *); +static char *inet6name(const struct in6_addr *); /* * Print a summary of TCPv6 connections @@ -89,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; @@ -126,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); } /* @@ -158,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 * @@ -206,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); } @@ -277,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"}, @@ -300,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); } /* @@ -317,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"}, @@ -342,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"}, @@ -363,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); } /* @@ -389,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 { \ @@ -401,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); } /* @@ -433,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/vendor/apps/snmpnetstat/inetx.c b/vendor/apps/snmpnetstat/inetx.c index ef15a2d..fd17e08 100644 --- a/vendor/apps/snmpnetstat/inetx.c +++ b/vendor/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 @@ -31,26 +35,26 @@ #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 @@ -60,15 +64,16 @@ #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 @@ -89,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} }; @@ -200,91 +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; + strlcpy(lname, "tcp", sizeof lname); + 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); } /* @@ -294,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; + strlcpy(lname, "tcp", sizeof lname); + 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); } /* @@ -351,156 +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_free_varbind(var); + 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 */ - snmp_free_varbind(var); + 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; + strlcpy(lname, "udp", sizeof lname); + 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); } @@ -508,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); } } @@ -548,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); } @@ -568,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/vendor/apps/snmpnetstat/main.c b/vendor/apps/snmpnetstat/main.c index 42dcd4c..6f00d1e 100644 --- a/vendor/apps/snmpnetstat/main.c +++ b/vendor/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,115 +35,122 @@ */ #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 */ +#endif /* not lint */ #include #include #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_NETDB_H +#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; +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[] = { +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': @@ -162,23 +173,23 @@ optProc( int argc, char *const *argv, int opt ) 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 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); + (void) fprintf(stderr, + "%s: %s: unknown address family\n", + progname, optarg); exit(1); } return; @@ -197,49 +208,56 @@ optProc( int argc, char *const *argv, int opt ) 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 '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': *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': 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); + (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 'q': NetBSD: IRQ information + * OpenBSD: Suppress inactive I/Fs + * qflag = 1; + * break; + */ case 'r': rflag = 1; break; @@ -261,22 +279,23 @@ optProc( int argc, char *const *argv, int opt ) } optind++; break; - case 'S': /* FreeBSD: - NetBSD: Semi-numeric display - OpenBSD: Show route source selector */ + 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 't': FreeBSD: + * OpenBSD: Display watchdog timers + * tflag = 1; + * break; + * case 'u': OpenBSD: unix sockets only + * af = AF_UNIX; + * break; + */ case 'v': vflag = 1; break; @@ -292,21 +311,21 @@ optProc( int argc, char *const *argv, int opt ) 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) */ 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; } } @@ -315,19 +334,19 @@ main(int argc, char *argv[]) { netsnmp_session session; struct protoent *p; - char *cp; - int exit_code = 1; + char *cp; + int exit_code = 1; SOCK_STARTUP; af = AF_UNSPEC; - cp = strrchr( argv[0], '/' ); + cp = strrchr(argv[0], '/'); if (cp) - progname = cp+1; + progname = cp + 1; else progname = argv[0]; - switch (snmp_parse_args( argc, argv, &session, "C:iRs", optProc)) { + switch (snmp_parse_args(argc, argv, &session, "C:iRs", optProc)) { case NETSNMP_PARSE_ARGS_ERROR: goto out; case NETSNMP_PARSE_ARGS_SUCCESS_EXIT: @@ -368,9 +387,9 @@ main(int argc, char *argv[]) #if 0 if (mflag) { /* - mbpr(nl[N_MBSTAT].n_value, nl[N_MBPOOL].n_value, - nl[N_MCLPOOL].n_value); - */ + * mbpr(nl[N_MBSTAT].n_value, nl[N_MBPOOL].n_value, + * nl[N_MCLPOOL].n_value); + */ exit_code = 0; goto out; } @@ -393,52 +412,55 @@ main(int argc, char *argv[]) } if (rflag) { /* - if (sflag) - rt_stats(); - else - */ + * if (sflag) + * rt_stats(); + * else + */ if (Lflag || routexpr(af) == 0) { - if (route4pr(af) == 0 && af == AF_INET) routepr(); + 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; - } - */ + * 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? */ + /* + * 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) @@ -450,34 +472,36 @@ main(int argc, char *argv[]) case AF_INET: for (tp = protox; tp->pr_name; tp++) printproto(tp, tp->pr_name); - /* FALL THROUGH */ + /* + * FALL THROUGH + */ case AF_INET6: for (tp = ip6protox; tp->pr_name; tp++) printproto(tp, tp->pr_name); } - } - else { + } else { for (tp = ipxprotox; tp->pr_name; tp++) - if (!pname || strcmp(pname,tp->pr_name) == 0) + 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_code = 0; -out: + out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return exit_code; } @@ -489,7 +513,7 @@ main(int argc, char *argv[]) static void printproto(struct protox *tp, const char *name) { - void (*pr)(const char *); + void (*pr)(const char *); if (sflag) { pr = tp->pr_stats; @@ -497,14 +521,14 @@ printproto(struct protox *tp, const char *name) pr = tp->pr_cblocks; } if (pr != NULL) - (*pr)(name); + (*pr) (name); } /* * Read kernel memory - Omitted */ -const char * +const char * plural(int n) { return (n != 1 ? "s" : ""); @@ -531,8 +555,8 @@ knownname(const char *name) static struct protox * name2protox(const char *name) { - struct protox *tp; - char **alias; /* alias from p->aliases */ + struct protox *tp; + char **alias; /* alias from p->aliases */ struct protoent *p; /* @@ -542,9 +566,11 @@ name2protox(const char *name) if ((tp = knownname(name))) return (tp); - setprotoent(1); /* make protocol lookup cheaper */ + setprotoent(1); /* make protocol lookup cheaper */ while ((p = getprotoent())) { - /* netsnmp_assert: name not same as p->name */ + /* + * netsnmp_assert: name not same as p->name + */ for (alias = p->p_aliases; *alias; alias++) if (strcmp(name, *alias) == 0) { endprotoent(); @@ -558,12 +584,16 @@ name2protox(const char *name) 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); + (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/vendor/apps/snmpnetstat/main.h b/vendor/apps/snmpnetstat/main.h index 1272321..ee8aa50 100644 --- a/vendor/apps/snmpnetstat/main.h +++ b/vendor/apps/snmpnetstat/main.h @@ -3,16 +3,7 @@ #define MAXHOSTNAMELEN 64 #endif -extern netsnmp_session *ss; -NETSNMP_IMPORT -int netsnmp_query_get( netsnmp_variable_list *list, - netsnmp_session *session); -NETSNMP_IMPORT -int netsnmp_query_getnext(netsnmp_variable_list *list, - netsnmp_session *session); -NETSNMP_IMPORT -int netsnmp_query_walk( netsnmp_variable_list *list, - netsnmp_session *session); +extern netsnmp_session *ss; #ifndef AF_INET6 #define AF_INET6 10 diff --git a/vendor/apps/snmpnetstat/netstat.h b/vendor/apps/snmpnetstat/netstat.h index ba61eb3..41a537c 100644 --- a/vendor/apps/snmpnetstat/netstat.h +++ b/vendor/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/vendor/apps/snmpnetstat/route.c b/vendor/apps/snmpnetstat/route.c index a0b1cf5..f3dcecf 100644 --- a/vendor/apps/snmpnetstat/route.c +++ b/vendor/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 @@ -32,23 +36,23 @@ #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 @@ -59,10 +63,12 @@ #include "main.h" #include "netstat.h" #include "ffs.h" -#if HAVE_WINSOCK_H +#ifdef HAVE_WINSOCK_H #include "winstub.h" #endif +#define MAX_IFNAME 64 + #define SET_MASK 0x01 #define SET_GWAY 0x02 #define SET_IFNO 0x04 @@ -79,10 +85,10 @@ struct route_entry { int proto; int af; int set_bits; - char ifname[64]; + char ifname[MAX_IFNAME]; }; -void p_rtnode( struct route_entry *rp ); +void p_rtnode(struct route_entry *rp); /* * Print routing tables. @@ -90,80 +96,82 @@ void p_rtnode( struct route_entry *rp ); 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); } } @@ -171,47 +179,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; @@ -224,43 +232,43 @@ 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); @@ -270,26 +278,26 @@ route4pr(int af) struct iflist { int index; - char name[64]; + char name[MAX_IFNAME]; struct iflist *next; } *Iflist = NULL; 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) break; } if (ip) { - strcpy(name, ip->name); + strlcpy(name, ip->name, MAX_IFNAME); return; } ip = (struct iflist *) malloc(sizeof(struct iflist)); @@ -299,50 +307,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); - snmp_free_varbind(var); - return; + strlcpy(name, ip->name, MAX_IFNAME); + 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); + snmp_free_varbind(var); } else { - sprintf(ip->name, "if%d", ifIndex); + snprintf(ip->name, MAX_IFNAME, "if%d", ifIndex); } - strcpy(name, ip->name); + strlcpy(name, ip->name, MAX_IFNAME); } -/* 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. @@ -350,247 +366,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/vendor/apps/snmpnetstat/routex.c b/vendor/apps/snmpnetstat/routex.c index 1f59e41..778204d 100644 --- a/vendor/apps/snmpnetstat/routex.c +++ b/vendor/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 @@ -32,23 +36,25 @@ #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 @@ -58,11 +64,13 @@ #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 @@ -71,11 +79,15 @@ #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; @@ -93,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. @@ -102,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; @@ -226,7 +251,7 @@ routexpr(int af) hdr_af = rp->af; pr_rtxhdr(hdr_af, "inetCidrRouteTable"); } - p_rtnodex( rp ); + p_rtnodex(rp); printed++; } snmp_free_varbind(var); @@ -239,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 @@ -300,47 +326,52 @@ 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; - break; - 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); @@ -348,16 +379,22 @@ route6pr(int af) } -/* 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. @@ -367,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; } @@ -422,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) + strlcpy(line, host, sizeof line); + 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) + strlcpy(line, host, sizeof line); + 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/vendor/apps/snmpnetstat/winstub.c b/vendor/apps/snmpnetstat/winstub.c index 13bfe99..d0823b3 100644 --- a/vendor/apps/snmpnetstat/winstub.c +++ b/vendor/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,16 +19,16 @@ #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 @@ -74,7 +74,7 @@ pre_env(void) if (cp) { ; /* - * printf ("Root is '%s'\n", cp); + * printf ("Root is '%s'\n", cp); */ } else cp = "C:\\WINNT"; @@ -102,7 +102,7 @@ pre_env(void) } /* - * sets can open. ends must close. + * sets can open. ends must close. */ void endhostent(void) @@ -171,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) { @@ -195,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) @@ -242,6 +243,7 @@ getprotoent(void) return 0; } + struct netent * getnetent(void) { @@ -255,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) @@ -273,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) @@ -285,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/vendor/apps/snmpnetstat/winstub.h b/vendor/apps/snmpnetstat/winstub.h index 8fc51dd..312c4f7 100644 --- a/vendor/apps/snmpnetstat/winstub.h +++ b/vendor/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/vendor/apps/snmppcap.c b/vendor/apps/snmppcap.c index f51740e..aa101e4 100644 --- a/vendor/apps/snmppcap.c +++ b/vendor/apps/snmppcap.c @@ -32,6 +32,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -73,6 +76,12 @@ typedef struct mystuff { 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) { @@ -84,6 +93,19 @@ snmppcap_recv(netsnmp_transport *t, void *buf, int bufsiz, void **opaque, int *o } } +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. */ @@ -106,6 +128,12 @@ snmppcap_callback(int op, netsnmp_session *sess, int reqid, netsnmp_pdu *pdu, 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; } @@ -164,6 +192,28 @@ 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) @@ -172,16 +222,13 @@ int main(int argc, char **argv) netsnmp_transport *transport; int arg; char errbuf[PCAP_ERRBUF_SIZE]; + const char *app_name; char *fname; pcap_t *p; mystuff_t mystuff; ss = SNMP_MALLOC_TYPEDEF(netsnmp_session); - /* - * snmp_parse_args usage here is totally overkill, but trying to - * parse -D - */ - switch (arg = snmp_parse_args(argc, argv, ss, "", NULL)) { + switch (arg = snmp_parse_args(argc, argv, ss, "C:", optProc)) { case NETSNMP_PARSE_ARGS_ERROR: exit(1); case NETSNMP_PARSE_ARGS_SUCCESS_EXIT: @@ -207,6 +254,17 @@ int main(int argc, char **argv) fprintf(stderr, "Only Ethernet pcaps currently supported\n"); return 2; } + + 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" ); @@ -218,6 +276,8 @@ int main(int argc, char **argv) */ 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; @@ -239,5 +299,9 @@ int main(int argc, char **argv) pcap_loop(p, -1, handle_pcap, (void *)&mystuff); + pcap_close(p); + + SNMP_FREE(ss); + return 0; } diff --git a/vendor/apps/snmpping.c b/vendor/apps/snmpping.c index 4847ba4..6003e84 100644 --- a/vendor/apps/snmpping.c +++ b/vendor/apps/snmpping.c @@ -45,21 +45,21 @@ #include -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_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_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_IO_H +#ifdef HAVE_IO_H #include #endif @@ -636,7 +636,7 @@ int main(int argc, char **argv) usernameLen = strlen(username); } if (1 /* !have-testname-arg */) { - snprintf(testname, sizeof(testname) - 1, "snmpping-%d", getpid()); + snprintf(testname, sizeof(testname) - 1, "snmpping-%ld", (long)getpid()); testname[32] = '\0'; testnameLen = strlen(testname); } diff --git a/vendor/apps/snmpps.c b/vendor/apps/snmpps.c index c991539..19c15ec 100644 --- a/vendor/apps/snmpps.c +++ b/vendor/apps/snmpps.c @@ -31,45 +31,45 @@ 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 -#if HAVE_NCURSES_CURSES_H +#ifdef HAVE_NCURSES_CURSES_H #include -#elif HAVE_CURSES_H +#elif defined(HAVE_CURSES_H) #include #endif #include @@ -190,7 +190,7 @@ add(netsnmp_pdu *pdu, const char *mibnodename, snmp_perror(mibnodename); fprintf(stderr, "couldn't find mib node %s, giving up\n", mibnodename); -#if HAVE_CURSES_H +#ifdef HAVE_CURSES_H endwin(); #endif exit(1); @@ -229,7 +229,7 @@ collect_procs(netsnmp_session *ss, netsnmp_pdu *pdu, status = snmp_synch_response(ss, pdu, &response); if (status != STAT_SUCCESS || !response) { snmp_sess_perror(progname, ss); -#if HAVE_CURSES_H +#ifdef HAVE_CURSES_H endwin(); #endif exit(1); @@ -237,7 +237,7 @@ collect_procs(netsnmp_session *ss, netsnmp_pdu *pdu, if (response->errstat != SNMP_ERR_NOERROR) { fprintf(stderr, "%s: Error in packet: %s\n", progname, snmp_errstring(response->errstat)); -#if HAVE_CURSES_H +#ifdef HAVE_CURSES_H endwin(); #endif exit(1); @@ -322,7 +322,7 @@ collect_perf(netsnmp_session *ss, struct hrSWRunTable **fproc) status = snmp_synch_response(ss, pdu, &response); if (status != STAT_SUCCESS || !response) { snmp_sess_perror(progname, ss); -#if HAVE_CURSES_H +#ifdef HAVE_CURSES_H endwin(); #endif exit(1); @@ -730,13 +730,15 @@ snmpps(int argc, char *argv[]) pinx++; } + free_perf(procs, count); snmp_close(ss); + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return 0; } -#if HAVE_CURSES_H +#ifdef HAVE_CURSES_H static void endtop(int sig) { endwin(); @@ -878,7 +880,10 @@ int snmptop(int argc, char **argv) clock = time(NULL); ptm = localtime(&clock); - strftime(timestr, sizeof(timestr), "%H:%M:%S", ptm); + if (ptm) + strftime(timestr, sizeof(timestr), "%H:%M:%S", ptm); + else + snprintf(timestr, sizeof(timestr), "(unknown)"); clear(); move(0, 0); @@ -989,8 +994,8 @@ int snmptop(int argc, char **argv) endwin(); free_perf(oproc, ocount); - snmp_close(ss); + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return 0; } diff --git a/vendor/apps/snmpset.c b/vendor/apps/snmpset.c index 50f33db..69dc43e 100644 --- a/vendor/apps/snmpset.c +++ b/vendor/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 @@ -182,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': @@ -282,6 +283,7 @@ main(int argc, char *argv[]) snmp_close(ss); out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return exitval; } diff --git a/vendor/apps/snmpstatus.c b/vendor/apps/snmpstatus.c index d2f6504..5f67ecf 100644 --- a/vendor/apps/snmpstatus.c +++ b/vendor/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 @@ -276,6 +276,7 @@ main(int argc, char *argv[]) uptime_string(uptime, buf)); } + free(sysdescr); if (response) snmp_free_pdu(response); @@ -394,6 +395,7 @@ main(int argc, char *argv[]) snmp_close(ss); out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return exitval; } diff --git a/vendor/apps/snmptable.c b/vendor/apps/snmptable.c index 9aee178..f309c1f 100644 --- a/vendor/apps/snmptable.c +++ b/vendor/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 @@ -363,6 +363,7 @@ main(int argc, char *argv[]) snmp_close(ss); out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return exitval; } @@ -381,24 +382,26 @@ print_table(void) for (field = 0; field < fields; field++) { if (column_width != 0) - sprintf(string_buf, "%%%s%d.%ds", left_justify_flag, - column_width + 1, column_width ); + snprintf(string_buf, sizeof string_buf, "%%%s%d.%ds", + left_justify_flag, column_width + 1, column_width ); else if (field_separator == NULL) - sprintf(string_buf, "%%%s%ds", left_justify_flag, - column[field].width + 1); + snprintf(string_buf, sizeof string_buf, "%%%s%ds", + left_justify_flag, column[field].width + 1); else if (field == 0 && !show_index) - sprintf(string_buf, "%%s"); + snprintf(string_buf, sizeof string_buf, "%%s"); else - sprintf(string_buf, "%s%%s", field_separator); + snprintf(string_buf, sizeof string_buf, "%s%%s", + field_separator); column[field].fmt = strdup(string_buf); } if (show_index) { if (column_width) - sprintf(string_buf, "\nindex: %%s\n"); + snprintf(string_buf, sizeof string_buf, "\nindex: %%s\n"); else if (field_separator == NULL) - sprintf(string_buf, "%%%s%ds", left_justify_flag, index_width); + snprintf(string_buf, sizeof string_buf, "%%%s%ds", + left_justify_flag, index_width); else - sprintf(string_buf, "%%s"); + snprintf(string_buf, sizeof string_buf, "%%s"); index_fmt = strdup(string_buf); } @@ -755,7 +758,6 @@ get_table_entries(netsnmp_session * ss) if (dp[col]) { fprintf(stderr, "OID not increasing: %s\n", buf); running = 0; - vars = NULL; end_of_table = 1; exitval = 2; break; diff --git a/vendor/apps/snmptest.c b/vendor/apps/snmptest.c index b10cb6e..5e5893e 100644 --- a/vendor/apps/snmptest.c +++ b/vendor/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 @@ -151,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) { @@ -185,6 +185,8 @@ main(int argc, char *argv[]) } } } + if (copy) + snmp_free_pdu(copy); copy = snmp_clone_pdu(pdu); if (command == SNMP_MSG_TRAP2) { /* @@ -282,6 +284,7 @@ main(int argc, char *argv[]) /* NOTREACHED */ out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return exit_code; } @@ -306,7 +309,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/vendor/apps/snmptls.c b/vendor/apps/snmptls.c index dc1202e..c0977b6 100644 --- a/vendor/apps/snmptls.c +++ b/vendor/apps/snmptls.c @@ -13,7 +13,7 @@ netsnmp_feature_require(tls_fingerprint_build); netsnmp_feature_require(row_create); #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif @@ -558,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/vendor/apps/snmptranslate.c b/vendor/apps/snmptranslate.c index 54ae4ec..ec40dc7 100644 --- a/vendor/apps/snmptranslate.c +++ b/vendor/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 @@ -170,7 +170,8 @@ int main(int argc, char *argv[]) { int arg; - char *current_name = NULL, *cp = NULL; + char *current_name = NULL; + const char *cp = NULL; oid name[MAX_OID_LEN]; size_t name_length; int description = 0; diff --git a/vendor/apps/snmptrap.c b/vendor/apps/snmptrap.c index 77090f0..fb229a3 100644 --- a/vendor/apps/snmptrap.c +++ b/vendor/apps/snmptrap.c @@ -25,42 +25,42 @@ 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 @@ -119,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; @@ -323,7 +323,7 @@ main(int argc, char *argv[]) trap = argv[arg]; if (*trap == 0) { sysuptime = get_uptime(); - sprintf(csysuptime, "%ld", sysuptime); + snprintf(csysuptime, sizeof csysuptime, "%ld", sysuptime); trap = csysuptime; } snmp_add_var(pdu, objid_sysuptime, @@ -381,6 +381,7 @@ main(int argc, char *argv[]) snmp_shutdown(NETSNMP_APPLICATION_CONFIG_TYPE); out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return exitval; } diff --git a/vendor/apps/snmptrapd.c b/vendor/apps/snmptrapd.c index 8be85c3..d12bc8d 100644 --- a/vendor/apps/snmptrapd.c +++ b/vendor/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 @@ -98,6 +98,7 @@ SOFTWARE. #include #include #include +#include #include "../snmplib/snmp_syslog.h" #include "../agent_global_vars.h" #include "../agent/mibgroup/snmpv3/snmpEngine.h" @@ -127,7 +128,7 @@ SOFTWARE. #endif -#if NETSNMP_USE_LIBWRAP +#ifdef NETSNMP_USE_LIBWRAP #include #endif @@ -145,7 +146,7 @@ char *logfile = NULL; 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 @@ -201,7 +202,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 @@ -214,7 +215,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 @@ -224,7 +225,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 @@ -281,8 +282,13 @@ 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; + /* 'char *' wrapers on 'const char *' STRING_UNKNOWN value for hosts_ctl */ + char name[sizeof("snmptrapd")] = "snmptrapd"; + char name_unknown[sizeof(STRING_UNKNOWN)] = STRING_UNKNOWN; + char addr_unknown[sizeof(STRING_UNKNOWN)] = STRING_UNKNOWN; + char user_unknown[sizeof(STRING_UNKNOWN)] = STRING_UNKNOWN; if (transport != NULL && transport->f_fmtaddr != NULL) { /* @@ -307,8 +313,7 @@ pre_parse(netsnmp_session * session, netsnmp_transport *transport, if (xp) *xp = '\0'; - if (hosts_ctl("snmptrapd", STRING_UNKNOWN, - sbuf, STRING_UNKNOWN) == 0) { + if (hosts_ctl(name, name_unknown, sbuf, user_unknown) == 0) { DEBUGMSGTL(("snmptrapd:libwrap", "%s rejected", addr_string)); SNMP_FREE(addr_string); return 0; @@ -316,8 +321,7 @@ pre_parse(netsnmp_session * session, netsnmp_transport *transport, } SNMP_FREE(addr_string); } else { - if (hosts_ctl("snmptrapd", STRING_UNKNOWN, - STRING_UNKNOWN, STRING_UNKNOWN) == 0) { + if (hosts_ctl(name, name_unknown, addr_unknown, user_unknown) == 0) { DEBUGMSGTL(("snmptrapd:libwrap", "[unknown] rejected")); return 0; } @@ -370,11 +374,12 @@ parse_trapd_address(const char *token, char *cptr) if (default_port == ddefault_port) { default_port = strdup(buf); } else { - p = malloc(strlen(buf) + 1 + strlen(default_port) + 1); + size_t len = strlen(buf) + 1 + strlen(default_port) + 1; + p = malloc(len); if (p) { - strcpy(p, buf); - strcat(p, ","); - strcat(p, default_port ); + strlcpy(p, buf, len); + strlcat(p, ",", len); + strlcat(p, default_port, len); } free(default_port); default_port = p; @@ -541,14 +546,13 @@ main(int argc, char *argv[]) #endif { static const char options[] = "aAc:CdD::efF:g:hHI:L:m:M:no:O:Ptu:vx:X-:" -#if HAVE_GETPID +#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) @@ -602,7 +606,7 @@ 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 @@ -702,7 +706,7 @@ main(int argc, char *argv[]) } else { /* Old style: implicitly "print=format" */ trap1_fmt_str_remember = malloc(strlen(optarg) + 7); - sprintf( trap1_fmt_str_remember, "print %s", optarg ); + snprintf( trap1_fmt_str_remember, strlen(optarg) + 7, "print %s", optarg ); } } else { usage(); @@ -710,10 +714,29 @@ main(int argc, char *argv[]) } break; -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H case 'g': if (optarg != NULL) { - 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); + if (info) + gid = info->gr_gid; + else + 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(); @@ -799,7 +822,7 @@ main(int argc, char *argv[]) } break; -#if HAVE_GETPID +#ifdef HAVE_GETPID case 'p': if (optarg != NULL) { parse_config_pidFile(NULL, optarg); @@ -824,18 +847,22 @@ main(int argc, char *argv[]) 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; info = getpwnam(optarg); - uid = info ? info->pw_uid : -1; + if (info) + uid = info->pw_uid; + else + uid = -1; endpwent(); } #endif @@ -887,12 +914,13 @@ main(int argc, char *argv[]) for (i = optind; i < argc; i++) { char *astring; if (listen_ports != NULL) { - astring = malloc(strlen(listen_ports) + 2 + strlen(argv[i])); + size_t len = strlen(listen_ports) + 2 + strlen(argv[i]); + astring = malloc(len); if (astring == NULL) { fprintf(stderr, "malloc failure processing argv[%d]\n", i); goto out; } - sprintf(astring, "%s,%s", listen_ports, argv[i]); + snprintf(astring, len, "%s,%s", listen_ports, argv[i]); free(listen_ports); listen_ports = astring; } else { @@ -1124,7 +1152,7 @@ main(int argc, char *argv[]) if (dofork && netsnmp_running) { int fd; -#if HAVE_FORKALL +#ifdef HAVE_FORKALL switch (forkall()) { #else switch (fork()) { @@ -1159,7 +1187,7 @@ 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"); @@ -1178,8 +1206,11 @@ 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) { DEBUGMSGTL(("snmptrapd/main", "Changing gid to %d.\n", gid)); @@ -1195,8 +1226,12 @@ main(int argc, char *argv[]) } } } + } #endif #ifdef HAVE_SETUID + { + int uid; + if ((uid = netsnmp_ds_get_int(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_USERID)) > 0) { DEBUGMSGTL(("snmptrapd/main", "Changing uid to %d.\n", uid)); @@ -1208,6 +1243,7 @@ main(int argc, char *argv[]) } } } + } #endif #endif @@ -1233,12 +1269,18 @@ main(int argc, char *argv[]) if (snmp_get_do_logging()) { struct tm *tm; time_t timer; + time(&timer); tm = localtime(&timer); - snmp_log(LOG_INFO, + if (tm) { + snmp_log(LOG_INFO, "%.4d-%.2d-%.2d %.2d:%.2d:%.2d NET-SNMP version %s Stopped.\n", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, netsnmp_get_version()); + } else { + snmp_log(LOG_INFO, "NET-SNMP version %s Stopped.\n", + netsnmp_get_version()); + } } snmp_log(LOG_INFO, "Stopping snmptrapd\n"); diff --git a/vendor/apps/snmptrapd_auth.c b/vendor/apps/snmptrapd_auth.c index 666801b..892fe49 100644 --- a/vendor/apps/snmptrapd_auth.c +++ b/vendor/apps/snmptrapd_auth.c @@ -9,13 +9,13 @@ */ #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 diff --git a/vendor/apps/snmptrapd_handlers.c b/vendor/apps/snmptrapd_handlers.c index 6bf19ec..38cff6a 100644 --- a/vendor/apps/snmptrapd_handlers.c +++ b/vendor/apps/snmptrapd_handlers.c @@ -1,32 +1,35 @@ #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_ARPA_INET_H +#ifdef HAVE_ARPA_INET_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 -#if HAVE_SYS_WAIT_H +#ifdef HAVE_SYS_WAIT_H #include #endif +#ifdef HAVE_LIMITS_H +#include +#endif #include #include @@ -302,7 +305,7 @@ void free_trap1_fmt(void) { if (print_format1 && print_format1 != trap1_std_str) - free((char *) print_format1); + free(print_format1); print_format1 = NULL; } @@ -318,7 +321,7 @@ void free_trap2_fmt(void) { if (print_format2 && print_format2 != trap2_std_str) - free((char *) print_format2); + free(print_format2); print_format2 = NULL; } @@ -835,7 +838,7 @@ int command_handler( netsnmp_pdu *pdu, * If there's a format string registered for this trap, then use it. * Otherwise use the standard execution format setting. */ - if (handler && handler->format && *handler->format) { + if (handler->format && *handler->format) { DEBUGMSGTL(( "snmptrapd", "format = '%s'\n", handler->format)); realloc_format_trap(&rbuf, &r_len, &o_len, 1, handler->format, @@ -1112,6 +1115,12 @@ snmp_input(int op, netsnmp_session *session, */ if (pdu->trap_type == SNMP_TRAP_ENTERPRISESPECIFIC) { trapOidLen = pdu->enterprise_length; + /* + * Drop packets that would trigger an out-of-bounds trapOid[] + * access. + */ + if (trapOidLen < 1 || trapOidLen > OID_LENGTH(trapOid) - 2) + return 1; memcpy(trapOid, pdu->enterprise, sizeof(oid) * trapOidLen); if (trapOid[trapOidLen - 1] != 0) { trapOid[trapOidLen++] = 0; @@ -1120,6 +1129,9 @@ snmp_input(int op, netsnmp_session *session, } else { memcpy(trapOid, stdTrapOidRoot, sizeof(stdTrapOidRoot)); trapOidLen = OID_LENGTH(stdTrapOidRoot); /* 9 */ + /* Drop packets with an invalid trap type. */ + if (pdu->trap_type == LONG_MAX) + return 1; trapOid[trapOidLen++] = pdu->trap_type+1; } break; @@ -1141,6 +1153,8 @@ snmp_input(int op, netsnmp_session *session, * Let's look through the full list.... */ for ( vars = pdu->variables; vars; vars=vars->next_variable) { + if (vars->type != ASN_OBJECT_ID) + continue; if (!snmp_oid_compare(vars->name, vars->name_length, snmpTrapOid, OID_LENGTH(snmpTrapOid))) break; @@ -1153,8 +1167,8 @@ snmp_input(int op, netsnmp_session *session, return 1; /* ??? */ } } - memcpy(trapOid, vars->val.objid, vars->val_len); - trapOidLen = vars->val_len /sizeof(oid); + trapOidLen = SNMP_MIN(sizeof(trapOid), vars->val_len) / sizeof(oid); + memcpy(trapOid, vars->val.objid, trapOidLen * sizeof(oid)); break; default: diff --git a/vendor/apps/snmptrapd_log.c b/vendor/apps/snmptrapd_log.c index fb7eaba..067c7f6 100644 --- a/vendor/apps/snmptrapd_log.c +++ b/vendor/apps/snmptrapd_log.c @@ -25,62 +25,62 @@ 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 @@ -386,7 +386,8 @@ realloc_output_temp_bfr(u_char ** buf, size_t * buf_len, size_t * out_len, return 0; } } - if (options->leading_zeroes || zeroes_to_write-- > 0) { + if (options->leading_zeroes || + (zeroes_to_write && zeroes_to_write-- > 0)) { *(*buf + *out_len) = '0'; } else { *(*buf + *out_len) = ' '; @@ -461,6 +462,8 @@ realloc_handle_time_fmt(u_char ** buf, size_t * buf_len, size_t * out_len, return 0; } + memset(&time_val, 0, sizeof(time_val)); + /* * Get the time field to output. */ @@ -519,64 +522,67 @@ realloc_handle_time_fmt(u_char ** buf, size_t * buf_len, size_t * out_len, parsed_time = localtime(&time_val); } - switch (fmt_cmd) { - - /* - * Output year. The year field is unusual: if there's a restriction - * on precision, we want to truncate from the left of the number, - * not the right, so someone printing the year 1972 with 2 digit - * precision gets "72" not "19". - */ - case CHR_CUR_YEAR: - case CHR_UP_YEAR: - sprintf(safe_bfr, "%d", parsed_time->tm_year + 1900); - break; - - /* - * output month - */ - case CHR_CUR_MONTH: - case CHR_UP_MONTH: - sprintf(safe_bfr, "%d", parsed_time->tm_mon + 1); - break; - - /* - * output day of month - */ - case CHR_CUR_MDAY: - case CHR_UP_MDAY: - sprintf(safe_bfr, "%d", parsed_time->tm_mday); - break; - - /* - * output hour - */ - case CHR_CUR_HOUR: - case CHR_UP_HOUR: - sprintf(safe_bfr, "%d", parsed_time->tm_hour); - break; - - /* - * output minute - */ - case CHR_CUR_MIN: - case CHR_UP_MIN: - sprintf(safe_bfr, "%d", parsed_time->tm_min); - break; - - /* - * output second - */ - case CHR_CUR_SEC: - case CHR_UP_SEC: - sprintf(safe_bfr, "%d", parsed_time->tm_sec); - break; - - /* - * unknown format command - just output the character - */ - default: - sprintf(safe_bfr, "%c", fmt_cmd); + if (!parsed_time) { + sprintf(safe_bfr, "(unknown)"); + } else { + switch (fmt_cmd) { + /* + * Output year. The year field is unusual: if there's a + * restriction on precision, we want to truncate from the left + * of the number, not the right, so someone printing the year + * 1972 with 2 digit precision gets "72" not "19". + */ + case CHR_CUR_YEAR: + case CHR_UP_YEAR: + sprintf(safe_bfr, "%d", parsed_time->tm_year + 1900); + break; + + /* + * output month + */ + case CHR_CUR_MONTH: + case CHR_UP_MONTH: + sprintf(safe_bfr, "%d", parsed_time->tm_mon + 1); + break; + + /* + * output day of month + */ + case CHR_CUR_MDAY: + case CHR_UP_MDAY: + sprintf(safe_bfr, "%d", parsed_time->tm_mday); + break; + + /* + * output hour + */ + case CHR_CUR_HOUR: + case CHR_UP_HOUR: + sprintf(safe_bfr, "%d", parsed_time->tm_hour); + break; + + /* + * output minute + */ + case CHR_CUR_MIN: + case CHR_UP_MIN: + sprintf(safe_bfr, "%d", parsed_time->tm_min); + break; + + /* + * output second + */ + case CHR_CUR_SEC: + case CHR_UP_SEC: + sprintf(safe_bfr, "%d", parsed_time->tm_sec); + break; + + /* + * unknown format command - just output the character + */ + default: + sprintf(safe_bfr, "%c", fmt_cmd); + } } } @@ -587,6 +593,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, @@ -609,7 +629,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; @@ -642,26 +662,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; @@ -1335,7 +1343,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) { @@ -1349,10 +1357,13 @@ realloc_format_plain_trap(u_char ** buf, size_t * buf_len, */ time(&now); now_parsed = localtime(&now); - sprintf(safe_bfr, "%.4d-%.2d-%.2d %.2d:%.2d:%.2d ", + if (now_parsed) + sprintf(safe_bfr, "%.4d-%.2d-%.2d %.2d:%.2d:%.2d ", now_parsed->tm_year + 1900, now_parsed->tm_mon + 1, now_parsed->tm_mday, now_parsed->tm_hour, now_parsed->tm_min, now_parsed->tm_sec); + else + sprintf(safe_bfr, "(unknown)"); if (!snmp_strcat (buf, buf_len, out_len, allow_realloc, (const u_char *) safe_bfr)) { @@ -1362,36 +1373,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/vendor/apps/snmptrapd_sql.c b/vendor/apps/snmptrapd_sql.c index 8dbc7f3..5ca0d22 100644 --- a/vendor/apps/snmptrapd_sql.c +++ b/vendor/apps/snmptrapd_sql.c @@ -23,33 +23,35 @@ #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 -#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_NETINET_IN_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif @@ -199,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 char _no_v3; +static typeof(*((MYSQL_BIND*)NULL)->is_null) _no_v3; static void _sql_process_queue(u_int dontcare, void *meeither); @@ -454,7 +456,7 @@ netsnmp_mysql_init(void) char **not_argv = not_args; /** load .my.cnf values */ -#if HAVE_MY_LOAD_DEFAULTS +#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); @@ -561,7 +563,7 @@ netsnmp_mysql_init(void) return -1; } -#if HAVE_MYSQL_OPTIONS +#ifdef HAVE_MYSQL_OPTIONS mysql_options(_sql.conn, MYSQL_READ_DEFAULT_GROUP, "snmptrapd"); #endif @@ -593,8 +595,9 @@ netsnmp_mysql_init(void) * to CONTAINER_FOR_EACH. */ static void -_sql_log(sql_buf *sqlb, void* dontcare) +_sql_log(void *p, void *dontcare) { + sql_buf *sqlb = p; netsnmp_iterator *it; sql_vb_buf *sqlvb; @@ -653,8 +656,10 @@ _sql_log(sql_buf *sqlb, void* dontcare) * to CONTAINER_FOR_EACH. */ static void -_sql_vb_buf_free(sql_vb_buf *sqlvb, void* dontcare) +_sql_vb_buf_free(void *p, void *dontcare) { + sql_vb_buf *sqlvb = p; + if (NULL == sqlvb) return; @@ -670,15 +675,16 @@ _sql_vb_buf_free(sql_vb_buf *sqlvb, void* dontcare) * to CONTAINER_FOR_EACH. */ static void -_sql_buf_free(sql_buf *sqlb, void* dontcare) +_sql_buf_free(void *p, void* dontcare) { + sql_buf *sqlb = p; + if (NULL == sqlb) return; /** do varbinds first */ if (sqlb->varbinds) { - CONTAINER_CLEAR(sqlb->varbinds, - (netsnmp_container_obj_func*)_sql_vb_buf_free, NULL); + CONTAINER_CLEAR(sqlb->varbinds, _sql_vb_buf_free, NULL); CONTAINER_FREE(sqlb->varbinds); } @@ -744,14 +750,16 @@ _sql_save_trap_info(sql_buf *sqlb, netsnmp_pdu *pdu, /** time */ (void) time(&now); cur_time = localtime(&now); - sqlb->time.year = cur_time->tm_year + 1900; - sqlb->time.month = cur_time->tm_mon + 1; - sqlb->time.day = cur_time->tm_mday; - sqlb->time.hour = cur_time->tm_hour; - sqlb->time.minute = cur_time->tm_min; - sqlb->time.second = cur_time->tm_sec; - sqlb->time.second_part = 0; - sqlb->time.neg = 0; + if (cur_time) { + sqlb->time.year = cur_time->tm_year + 1900; + sqlb->time.month = cur_time->tm_mon + 1; + sqlb->time.day = cur_time->tm_mday; + sqlb->time.hour = cur_time->tm_hour; + sqlb->time.minute = cur_time->tm_min; + sqlb->time.second = cur_time->tm_sec; + sqlb->time.second_part = 0; + sqlb->time.neg = 0; + } /** host name */ buf_host_len_t = 0; @@ -974,8 +982,9 @@ mysql_handler(netsnmp_pdu *pdu, * save a buffered trap to sql database */ static void -_sql_save(sql_buf *sqlb, void *dontcare) +_sql_save(void *p, void *dontcare) { + sql_buf *sqlb = p; netsnmp_iterator *it; sql_vb_buf *sqlvb; u_long trap_id; @@ -1103,7 +1112,7 @@ _sql_save(sql_buf *sqlb, void *dontcare) static void _sql_process_queue(u_int dontcare, void *meeither) { - int rc; + int sql_has_connected, rc; /** bail if the queue is empty */ if( 0 == CONTAINER_SIZE(_sql.queue)) @@ -1121,21 +1130,21 @@ _sql_process_queue(u_int dontcare, void *meeither) (void) netsnmp_mysql_connect(); } - CONTAINER_FOR_EACH(_sql.queue, (netsnmp_container_obj_func*)_sql_save, - NULL); + sql_has_connected = _sql.connected; + + CONTAINER_FOR_EACH(_sql.queue, _sql_save, NULL); if (_sql.connected) { rc = mysql_commit(_sql.conn); if (rc) { /* nuts... now what? */ netsnmp_sql_error("commit failed"); - CONTAINER_FOR_EACH(_sql.queue, - (netsnmp_container_obj_func*)_sql_log, - NULL); + CONTAINER_FOR_EACH(_sql.queue, _sql_log, NULL); } } - CONTAINER_CLEAR(_sql.queue, (netsnmp_container_obj_func*)_sql_buf_free, - NULL); + if (!sql_has_connected || _sql.connected) { + CONTAINER_CLEAR(_sql.queue, _sql_buf_free, NULL); + } } #else diff --git a/vendor/apps/snmpusm.c b/vendor/apps/snmpusm.c index 942361c..a492238 100644 --- a/vendor/apps/snmpusm.c +++ b/vendor/apps/snmpusm.c @@ -17,46 +17,47 @@ * 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 @@ -90,26 +91,23 @@ static const char *successNotes[CMD_NUM] = { #define USM_OID_LEN 12 #define DH_USM_OID_LEN 11 -static oid - -authKeyOid[MAX_OID_LEN] = { 1, 3, 6, 1, 6, 3, 15, 1, 2, 2, 1, 6 }, -ownAuthKeyOid[MAX_OID_LEN] = {1, 3, 6, 1, 6, 3, 15, 1, 2, 2, 1, 7}, -privKeyOid[MAX_OID_LEN] = {1, 3, 6, 1, 6, 3, 15, 1, 2, 2, 1, 9}, -ownPrivKeyOid[MAX_OID_LEN] = {1, 3, 6, 1, 6, 3, 15, 1, 2, 2, 1, 10}, -usmUserCloneFrom[MAX_OID_LEN] = {1, 3, 6, 1, 6, 3, 15, 1, 2, 2, 1, 4}, -usmUserSecurityName[MAX_OID_LEN] = {1, 3, 6, 1, 6, 3, 15, 1, 2, 2, 1, 3}, -usmUserPublic[MAX_OID_LEN] = {1, 3, 6, 1, 6, 3, 15, 1, 2, 2, 1, 11}, -usmUserStatus[MAX_OID_LEN] = {1, 3, 6, 1, 6, 3, 15, 1, 2, 2, 1, 13}, +static oid authKeyOid[MAX_OID_LEN] = { 1, 3, 6, 1, 6, 3, 15, 1, 2, 2, 1, 6 }; +static oid ownAuthKeyOid[MAX_OID_LEN] = {1, 3, 6, 1, 6, 3, 15, 1, 2, 2, 1, 7}; +static oid privKeyOid[MAX_OID_LEN] = {1, 3, 6, 1, 6, 3, 15, 1, 2, 2, 1, 9}; +static oid ownPrivKeyOid[MAX_OID_LEN] = {1, 3, 6, 1, 6, 3, 15, 1, 2, 2, 1, 10}; +static oid usmUserCloneFrom[MAX_OID_LEN] = {1, 3, 6, 1, 6, 3, 15, 1, 2, 2, 1, 4}; +static oid usmUserSecurityName[MAX_OID_LEN] = {1, 3, 6, 1, 6, 3, 15, 1, 2, 2, 1, 3}; +static oid usmUserPublic[MAX_OID_LEN] = {1, 3, 6, 1, 6, 3, 15, 1, 2, 2, 1, 11}; +static oid usmUserStatus[MAX_OID_LEN] = {1, 3, 6, 1, 6, 3, 15, 1, 2, 2, 1, 13}; /* diffie helman change key objects */ -usmDHUserAuthKeyChange[MAX_OID_LEN] = {1, 3, 6, 1, 3, 101, 1, 1, 2, 1, 1 }, -usmDHUserPrivKeyChange[MAX_OID_LEN] = {1, 3, 6, 1, 3, 101, 1, 1, 2, 1, 3 }, +static oid usmDHUserAuthKeyChange[MAX_OID_LEN] = {1, 3, 6, 1, 3, 101, 1, 1, 2, 1, 1 }; +static oid usmDHUserPrivKeyChange[MAX_OID_LEN] = {1, 3, 6, 1, 3, 101, 1, 1, 2, 1, 3 }; #if defined(HAVE_OPENSSL_DH_H) && defined(HAVE_LIBCRYPTO) -usmDHUserOwnAuthKeyChange[MAX_OID_LEN] = {1, 3, 6, 1, 3, 101, 1, 1, 2, 1, 2 }, -usmDHUserOwnPrivKeyChange[MAX_OID_LEN] = {1, 3, 6, 1, 3, 101, 1, 1, 2, 1, 4 }, +static oid usmDHUserOwnAuthKeyChange[MAX_OID_LEN] = {1, 3, 6, 1, 3, 101, 1, 1, 2, 1, 2 }; +static oid usmDHUserOwnPrivKeyChange[MAX_OID_LEN] = {1, 3, 6, 1, 3, 101, 1, 1, 2, 1, 4 }; +static oid usmDHParameters[] = { 1,3,6,1,3,101,1,1,1,0 }; +static size_t usmDHParameters_len = OID_LENGTH(usmDHParameters); #endif /* HAVE_OPENSSL_DH_H && HAVE_LIBCRYPTO */ -usmDHParameters[] = { 1,3,6,1,3,101,1,1,1,0 } -; -size_t usmDHParameters_len = OID_LENGTH(usmDHParameters); static oid *authKeyChange = authKeyOid, *privKeyChange = privKeyOid; @@ -118,7 +116,7 @@ oid *dhauthKeyChange = usmDHUserAuthKeyChange, int doauthkey = 0, doprivkey = 0, uselocalizedkey = 0; size_t usmUserEngineIDLen = 0; u_char *usmUserEngineID = NULL; -char *usmUserPublic_val = NULL; +const char *usmUserPublic_val = NULL; int docreateandwait = 0; @@ -144,7 +142,7 @@ usage(void) fprintf(stderr, "\t-CE ENGINE-ID\tSet usmUserEngineID (e.g. 800000020109840301).\n"); fprintf(stderr, "\t-Cp STRING\tSet usmUserPublic value to STRING.\n"); fprintf(stderr, "\t-Cw\t\tCreate the user with createAndWait.\n"); - fprintf(stderr, "\t\t\t(it won't be active until you active it)\n"); + fprintf(stderr, "\t\t\t(it won't be active until you activate 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 one to use localized key (must start with 0x)\n"); @@ -367,7 +365,7 @@ main(int argc, char *argv[]) keychange_len = SNMP_MAXBUF_SMALL, keychangepriv_len = SNMP_MAXBUF_SMALL; - char *newpass = NULL, *oldpass = NULL; + const char *newpass = NULL, *oldpass = NULL; u_char oldKu[SNMP_MAXBUF_SMALL], newKu[SNMP_MAXBUF_SMALL], oldkul[SNMP_MAXBUF_SMALL], @@ -446,7 +444,7 @@ main(int argc, char *argv[]) * XXX: Uses the auth type of the calling user, a MD5 user can't * change a SHA user's key. */ - char *passwd_user; + const char *passwd_user; command = CMD_PASSWD; oldpass = argv[++arg]; @@ -477,7 +475,8 @@ main(int argc, char *argv[]) * 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. @@ -551,7 +550,7 @@ main(int argc, char *argv[]) */ rval = generate_Ku(session.securityAuthProto, session.securityAuthProtoLen, - (u_char *) oldpass, strlen(oldpass), + (const u_char *) oldpass, strlen(oldpass), oldKu, &oldKu_len); if (rval != SNMPERR_SUCCESS) { @@ -595,7 +594,7 @@ main(int argc, char *argv[]) } else { rval = generate_Ku(session.securityAuthProto, session.securityAuthProtoLen, - (u_char *) newpass, strlen(newpass), + (const u_char *) newpass, strlen(newpass), newKu, &newKu_len); if (rval != SNMPERR_SUCCESS) { @@ -872,7 +871,7 @@ main(int argc, char *argv[]) * change the key of a user if DH is available */ - char *passwd_user; + const char *passwd_user; netsnmp_pdu *dhpdu, *dhresponse = NULL; netsnmp_variable_list *vars, *dhvar; @@ -889,7 +888,8 @@ main(int argc, char *argv[]) * Change the user supplied on command line. */ if ((passwd_user != NULL) && (strlen(passwd_user) > 0)) { - session.securityName = passwd_user; + free(session.securityName); + session.securityName = strdup(passwd_user); } else { /* * Use own key object if no user was supplied. @@ -1046,6 +1046,7 @@ main(int argc, char *argv[]) snmp_close(ss); out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return exitval; } diff --git a/vendor/apps/snmpvacm.c b/vendor/apps/snmpvacm.c index 9c1162d..fee67e4 100644 --- a/vendor/apps/snmpvacm.c +++ b/vendor/apps/snmpvacm.c @@ -5,40 +5,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 @@ -708,6 +708,7 @@ main(int argc, char *argv[]) snmp_close(ss); out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return exitval; } diff --git a/vendor/apps/snmpwalk.c b/vendor/apps/snmpwalk.c index e8ac9db..8308cc8 100644 --- a/vendor/apps/snmpwalk.c +++ b/vendor/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 @@ -430,6 +430,7 @@ main(int argc, char *argv[]) } out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return exitval; } diff --git a/vendor/apps/sshtosnmp.c b/vendor/apps/sshtosnmp.c index 20aed4b..a8e3965 100644 --- a/vendor/apps/sshtosnmp.c +++ b/vendor/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 @@ -26,13 +26,16 @@ #include #include #include +#ifdef HAVE_STRING_H +#include +#endif #ifndef MAXPATHLEN #warning no system max path length detected #define MAXPATHLEN 2048 #endif -#define DEFAULT_SOCK_PATH "/var/net-snmp/sshdomainsocket" +#define DEFAULT_SOCK_PATH NETSNMP_PERSISTENT_DIRECTORY "/sshdomainsocket" #define NETSNMP_SSHTOSNMP_VERSION_NUMBER 1 @@ -87,6 +90,7 @@ main(int argc, char **argv) { exit(1); } +#if defined(SO_PASSCRED) /* set the SO_PASSCRED option so we can pass uid */ /* XXX: according to the unix(1) manual this shouldn't be needed on the sending side? */ @@ -95,6 +99,15 @@ main(int argc, char **argv) { setsockopt(sock, SOL_SOCKET, SO_PASSCRED, (void *) &one, sizeof(one)); } +#elif defined(LOCAL_CREDS) + { + int one = 1; + setsockopt(sock, SOL_SOCKET, LOCAL_CREDS, (void *) &one, + sizeof(one)); + } +#else +#error Cannot pass credentials +#endif if (connect(sock, (struct sockaddr *) &addr, sizeof(struct sockaddr_un)) != 0) { @@ -122,42 +135,51 @@ main(int argc, char **argv) { /* send the prelim message and the credentials together using sendmsg() */ { - struct msghdr m; - /* - * 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 msghdr msg = { 0 }; struct iovec iov = { buf, buf_len }; + struct cmsghdr *cmsg; +#if defined(SCM_CREDENTIALS) + struct ucred ouruser = { 0 }; + char cmsgbuf[sizeof(ouruser)]; + + ouruser.uid = getuid(); + ouruser.gid = getgid(); + ouruser.pid = getpid(); +#elif defined(SCM_CREDS) + struct cmsgcred ouruser = { 0 }; + char cmsgbuf[2*4096]; + + ouruser.cmcred_uid = getuid(); + ouruser.cmcred_gid = getgid(); + ouruser.cmcred_pid = getpid(); +#else +#error cannot encode credentials +#endif + + msg.msg_control = cmsgbuf; + msg.msg_controllen = sizeof(cmsgbuf); + + cmsg = CMSG_FIRSTHDR(&msg); + cmsg->cmsg_len = CMSG_LEN(sizeof(ouruser)); + cmsg->cmsg_level = SOL_SOCKET; +#if defined(SCM_CREDENTIALS) + cmsg->cmsg_type = SCM_CREDENTIALS; +#elif defined(SCM_CREDS) + cmsg->cmsg_type = SCM_CREDS; +#endif + memcpy(CMSG_DATA(cmsg), &ouruser, sizeof(ouruser)); + + msg.msg_name = NULL; + msg.msg_namelen = 0; + iov.iov_base = buf; + iov.iov_len = buf_len; + msg.msg_iov = &iov; + msg.msg_iovlen = 1; - /* Make sure that even padding fields get initialized.*/ - memset(&cmsg, 0, sizeof(cmsg)); - memset(&m, 0, sizeof(m)); - - /* set up the message header */ - cmsg.cm.cmsg_len = sizeof(cmsg); - cmsg.cm.cmsg_level = SOL_SOCKET; - cmsg.cm.cmsg_type = SCM_CREDENTIALS; - - ouruser->uid = getuid(); - ouruser->gid = getgid(); - ouruser->pid = getpid(); - - m.msg_iov = &iov; - m.msg_iovlen = 1; - m.msg_control = &cmsg; - m.msg_controllen = sizeof(cmsg); - m.msg_flags = 0; - DEBUG("sending to sock"); - rc = sendmsg(sock, &m, MSG_NOSIGNAL|MSG_DONTWAIT); + rc = sendmsg(sock, &msg, MSG_NOSIGNAL|MSG_DONTWAIT); if (rc < 0) { - fprintf(stderr, "failed to send startup message\n"); - DEBUG("failed to send startup message\n"); + fprintf(stderr, "failed to send startup message: %s\n", strerror(errno)); exit(1); } } diff --git a/vendor/ci/before.sh b/vendor/ci/before.sh deleted file mode 100644 index a916bae..0000000 --- a/vendor/ci/before.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -case "${TRAVIS_OS_NAME}" in - linux) - sudo sh -c 'apt-get install -y libmariadbclient-dev || sudo apt-get install -y libmariadb-client-lgpl-dev' - - # Add an IPv6 config - see the corresponding Travis issue - # https://github.com/travis-ci/travis-ci/issues/8361 - sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6; printf "\n::1 localhost ipv6-localhost ipv6-loopback\n" >>/etc/hosts';; - osx) - # 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;; -esac - -if [ -n "$CIRRUS_CI" ]; then - cat <>/etc/hosts -127.0.0.1 localhost -::1 localhost ipv6-localhost ipv6-loopback -EOF - - 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 -fi - -head -n 999 /etc/hosts diff --git a/vendor/ci/build.bat b/vendor/ci/build.bat index 2c21c24..a58555f 100644 --- a/vendor/ci/build.bat +++ b/vendor/ci/build.bat @@ -1,7 +1,11 @@ echo "Build type %BUILD%" @echo on @rem dir /b /s "C:\Program Files (x86)" | findstr /i /e "\vcvars64.bat" -set "VCVARSPATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build" +@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 @@ -12,7 +16,7 @@ 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 +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\x64\MD if %errorlevel% neq 0 exit /b %errorlevel% nmake /nologo if %errorlevel% neq 0 exit /b %errorlevel% @@ -29,7 +33,7 @@ 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 +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\x64\MT if %errorlevel% neq 0 exit /b %errorlevel% nmake /nologo if %errorlevel% neq 0 exit /b %errorlevel% @@ -80,11 +84,13 @@ 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 diff --git a/vendor/ci/build.sh b/vendor/ci/build.sh index 13e2e12..a645169 100644 --- a/vendor/ci/build.sh +++ b/vendor/ci/build.sh @@ -19,20 +19,53 @@ 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-libmariadbclient 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-pkgconf || + pacman --noconfirm --sync --needed mingw-w64-x86_64-pkg-config export PATH="/mingw64/bin:$PATH" ;; esac -echo "compiler path: $(type -p gcc)" -"${scriptdir}"/net-snmp-configure V5-8-patches || exit $? -make -s || exit $? case "$MODE" in - disable-set|mini*|read-only) - exit 0;; + Android) + NDK=$PWD/android-ndk-r27d/toolchains/llvm/prebuilt/linux-x86_64/bin + export PATH="${NDK}:${PATH}" + export CC=aarch64-linux-android34-clang + ;; +esac +echo "compiler path: $(type -p "${CC:-gcc}")" +branch_name=$(git rev-parse --abbrev-ref HEAD) +if ! "${scriptdir}"/net-snmp-configure "${branch_name}"; then + echo "========================================" + echo "Configure failed. Dumping config.log:" + echo "========================================" + cat config.log + exit 1 +fi +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 + regular) + if [ -e testing/fuzzing ]; then + make -C testing -s fuzz-tests || exit $? + fi + ;; esac -[ -n "$APPVEYOR" ] && exit 0 -"${scriptdir}"/net-snmp-run-tests || exit $? diff --git a/vendor/ci/install.sh b/vendor/ci/install.sh new file mode 100644 index 0000000..3945580 --- /dev/null +++ b/vendor/ci/install.sh @@ -0,0 +1,93 @@ +#!/bin/sh + +scriptdir="$(cd "$(dirname "$0")" && pwd)" + +install_android_ndk() { + echo "Installing Android NDK..." + wget --quiet https://dl.google.com/android/repository/android-ndk-r27d-linux.zip + unzip -oq android-ndk-r27d-linux.zip +} + +case "$(uname)" in + Linux) + case "$MODE" in + Android) + install_android_ndk + packages=" + make + setpriv + util-linux + " + ;; + *) + packages=" + libatm1-dev + libkrb5-dev + libmariadb-client-lgpl-dev + libmariadb-dev + libmariadb-dev-compat + 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 + util-linux + " + ;; + esac + 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/vendor/ci/net-snmp-configure b/vendor/ci/net-snmp-configure index ec89b93..131f9d8 100644 --- a/vendor/ci/net-snmp-configure +++ b/vendor/ci/net-snmp-configure @@ -12,6 +12,29 @@ ssl_include_path() { 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() { + type -p dpkg-query >/dev/null 2>&1 && + dpkg-query --show -f '${Version}\n' "$1" 2>/dev/null | grep -v '^$' +} + +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 @@ -23,129 +46,82 @@ freebsd_pkg_version() { 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="$(for p in linux-atm-devel; do - rpm -q --qf '%{version}\n' $p 2>/dev/null | - grep -v 'not installed'; - done | - head -n1; - for p in libatm1-dev; do - dpkg-query --show -f '${Version}\n' $p 2>/dev/null; - done | grep -v '^$'; - pacman -Q no-such-library 2>/dev/null | - sed -n 's/^[^[:blank:]]*[[:blank:]]*//p')" -echo "libatmver=$libatmver" +case "$MODE" in + Android) + ;; + *) + libatmver="$(rpm_version linux-atm-devel; + dpkg_version libatm1-dev)" + echo "libatmver=$libatmver" -libmysqlver="$(for p in libmariadb-devel; do - rpm -q --qf '%{version}\n' $p 2>/dev/null | - grep -v 'not installed'; - done | - head -n1; - for p in libmariadbclient-dev libmariadb-client-lgpl-dev; do - dpkg-query --show -f '${Version}\n' $p 2>/dev/null; - done | grep -v '^$'; - pacman -Q mingw-w64-x86_64-libmariadbclient 2>/dev/null | - sed -n 's/^[^[:blank:]]*[[:blank:]]*//p')" -echo "libmysqlver=$libmysqlver" + libmysqlver="$(rpm_version libmariadb-devel; + for p in libmariadb-dev libmariadb-dev-compat \ + libmariadbclient-dev libmariadb-client-lgpl-dev; do + dpkg_version "$p" && break; + done; + pacman_version mingw-w64-x86_64-libmariadbclient)" + echo "libmysqlver=$libmysqlver" -libsensorsver="$(for p in libsensors4-devel; do - rpm -q --qf '%{version}\n' $p 2>/dev/null | - grep -v 'not installed'; - done | - head -n1; - for p in libsensors4-dev; do - dpkg-query --show -f '${Version}\n' $p 2>/dev/null; - done | grep -v '^$'; - pacman -Q no-such-package 2>/dev/null | - sed -n 's/^[^[:blank:]]*[[:blank:]]*//p')" -echo "libsensorsver=$libsensorsver" + libsensorsver="$(rpm_version libsensors4-devel; + dpkg_version libsensors-dev libsensors4-dev)" + echo "libsensorsver=$libsensorsver" -if ! echo "$*" | grep -Eq 'with-openssl=(no|internal)|without-openssl'; then - case "$(uname -a)" in - FreeBSD*) - opensslver="$(freebsd_pkg_version libressl-devel openssl111 openssl\ - 2>/dev/null)" - if [ -z "$opensslver" ]; then - opensslver="$(openssl version 2>&1 | - { read -r a b c; echo "$b"; })" - fi - ;; - Linux*) - opensslver="$( - for p in openssl-devel libopenssl-devel libressl-devel; do - rpm -q --qf '%{version}\n' $p 2>/dev/null | - grep -v 'not installed'; - done; - dpkg-query --show -f '${Version}\n' libssl-dev 2>/dev/null; - pacman -Q mingw-w64-x86_64-openssl 2>/dev/null | - sed -n 's/^[^[:blank:]]*[[:blank:]]*//p')";; - MSYS*x86_64*) - opensslver="$(pacman -Q openssl-devel 2>/dev/null | - sed -n 's/^[^[:blank:]]*[[:blank:]]*//p')";; - MINGW64*) - opensslver="$(pacman -Q mingw-w64-x86_64-openssl 2>/dev/null | - sed -n 's/^[^[:blank:]]*[[:blank:]]*//p')";; - *) - opensslver=1.0;; - esac -fi -if grep -q 'CentOS release 4' /etc/issue 2>/dev/null; then - opensslver="" -fi -echo "opensslver=$opensslver" + 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 -q --qf '%{version}\n' $p 2>/dev/null | - grep -v 'not installed'; - done | - head -n1; - for p in libopenssh2 libssh2-1-dev libssh-dev; do - dpkg-query --show -f '${Version}\n' $p 2>/dev/null; - done | grep -v '^$'; - pacman -Q mingw-w64-x86_64-libssh2 2>/dev/null | - sed -n 's/^[^[:blank:]]*[[:blank:]]*//p')" - ;; -esac -echo "libssh2ver=$libssh2ver" + 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="$(for p in perl; do - rpm -q --qf '%{version}\n' $p 2>/dev/null | - grep -v 'not installed'; - done | - head -n1; - for p in libperl-dev; do - dpkg-query --show -f '${Version}\n' $p 2>/dev/null; - done | grep -v '^$'; - pacman -Q mingw-w64-x86_64-perl 2>/dev/null | - sed -n 's/^[^[:blank:]]*[[:blank:]]*//p')" + 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" ;; esac -echo "perldevver=$perldevver" options=() options+=(--enable-developer) -options+=(--enable-ipv6) options+=("--prefix=/usr/local/net-snmp-${branch_name}") -options+=("--with-cflags=$cflags") +options+=("--with-cflags=$CFLAGS") options+=(--with-defaults) transports=() # Mib names can be found as follows: @@ -153,8 +129,27 @@ transports=() # git grep -lE 'void[[:blank:]]*init_.*\(void\)|config_require\(' | # sed -n 's/\.h$//p') mibs=() +mibs+=(agent/extend) +case "$MODE" in + disable-ipv6) + options+=(--disable-ipv6) + ;; + *) + options+=(--enable-ipv6) + ;; +esac case "$MODE" in read-only) + ;; + Android) + options+=( + --disable-embedded-perl + --host=aarch64-linux-android33 + --with-openssl=internal + --with-out-mib-modules="if-mib default_modules" + --without-perl-modules + --without-python-modules + ) ;; *) mibs+=(examples/data_set) @@ -168,16 +163,18 @@ case "$MODE" in ;; esac -case "$(uname)" in +case "$(uname):${MODE}" in + *:Android*) + ;; Linux*) options+=(--enable-new-features) case "$MODE" in - mini*|read-only) + mini*|read-only|without-nl) ;; *) - $is_5_7_or_above && mibs+=(deliver/deliverByNotify) + mibs+=(deliver/deliverByNotify) mibs+=(disman/event) - #mibs+=(disman/expression) - to do: figure out why this fails on Travis + mibs+=(disman/expression) mibs+=(disman/mteEventNotificationTable) mibs+=(disman/mteEventTable) mibs+=(disman/mteObjectsTable) @@ -219,14 +216,11 @@ case "$(uname)" in mibs+=(rmon-mib) ;; esac - # Disable MySQL support because of the following Perl test failure on - # Travis: - # t/1.t .. Can't load '/home/travis/build/bvanassche/net-snmp/perl/TrapReceiver/../blib/arch/auto/NetSNMP/TrapReceiver/TrapReceiver.so' for module NetSNMP::TrapReceiver: /home/travis/build/bvanassche/net-snmp/apps/.libs/libnetsnmptrapd.so.35: undefined symbol: mysql_sqlstate at /usr/lib/x86_64-linux-gnu/perl/5.22/DynaLoader.pm line 187. - # at t/1.t line 16. - if false && [ -n "$libmysqlver" ]; then + if [ -n "$libmysqlver" ]; then options+=(--with-mysql) fi - if [ -n "$perldevver" ]; then + if [ -n "$perldevver" ] && [ "$perlcc" = "$(compiler_type "${CC:-cc}")" ]; + then options+=(--with-perl-modules) else options+=(--disable-embedded-perl --without-perl-modules) @@ -234,9 +228,11 @@ case "$(uname)" in if [ -n "$libatmver" ]; then transports+=(AAL5PVC) fi - transports+=(IPX) + if [ -e /usr/include/netipx/ipx.h ]; then + transports+=(IPX) + fi transports+=(STD) - $is_5_8_or_above && transports+=(UDPshared) + transports+=(UDPshared) options+=("--with-default-snmp-version=2") options+=("--with-systemd") # Disabled modules because troublesome: Rmon ipfwchains/ipfwchains ucd-snmp/lmSensors @@ -259,12 +255,7 @@ case "$(uname)" in mibs+=(Rmon) ;; esac - if [ "${TRAVIS_OS_NAME}" == "osx" ]; then - options+=("--with-openssl=$(brew --prefix openssl)") - # On Travis OS/X linking the Perl modules fails with "undefined symbol - # _BN_bin2bn" etc. - options+=(--disable-embedded-perl --without-perl-modules) - fi + options+=("--with-openssl=$(brew --prefix openssl)") ;; FreeBSD*) case "$MODE" in @@ -322,39 +313,60 @@ case "$(uname)" in esac with_openssl="" -for o in "${options[@]}"; do - if [ "${o#--with-openssl=}" != "$o" ]; then - with_openssl="${o#--with-openssl=}" - fi -done -if [ "$opensslver" = "" ]; then +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 -rqw BIO_dgram_get_peer "$(ssl_include_path)" 2>/dev/null; then + if grep -rq 'BIO_dgram_get_peer(void)\|define BIO_dgram_get_peer' "${ssl_include_path}" 2>/dev/null; then transports+=(DTLSUDP TLSTCP) + else + echo "BIO_dgram_get_peer() not found:" + grep -r BIO_dgram_get_peer "${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 + if [ -e "${ssl_include_path}/dh.h" ]; then mibs+=(snmp-usm-dh-objects-mib) fi - if [ -e "$(ssl_include_path)/ssl.h" ]; then + if [ -e "${ssl_include_path}/ssl.h" ] && + [ "${ssl_include_path%/wolfssl/openssl}" = "${ssl_include_path}" ] + 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" ]; then - options+=(--enable-blumenthal-aes) +if [ "$with_openssl" != "internal" ] && + [ -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 +if [ "${MODE}" != Android ] && [ -e /usr/include/krb5.h ]; then security_modules+=(ksm) fi -case "$(uname)" in +case "$(uname):${MODE}" in + *:Android*) + ;; MSYS*|MINGW*) # Do not enable Python support on MinGW32 nor for the MSYS build # environment because the Python interpreter has been built on these @@ -372,16 +384,16 @@ case "$(uname)" in 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 + # To do: fix the build of the Python modules when using WolfSSL. if python3 -c 'import setuptools' 1>/dev/null 2>&1 && - [ -z "$CIRRUS_CI" ]; then + [ "$MODE" != "wolfssl" ]; then options+=(--with-python-modules) fi esac case "$MODE" in + disable-ipv6) + ;; disable-set) options+=(--disable-set-support);; mini) @@ -390,7 +402,9 @@ case "$MODE" in options+=(--enable-minimalist);; read-only) options+=(--enable-read-only);; - regular|"") + without-nl) + options+=(--without-nl);; + regular|wolfssl|Android|"") ;; *) echo "Error: unknown build type $MODE" @@ -401,4 +415,5 @@ esac set -x ./configure "${options[@]}" --with-transports="${transports[*]}" \ --with-security-modules="${security_modules[*]}" \ - --with-mib-modules="${mibs[*]}" "$@" + --with-mib-modules="${mibs[*]}" \ + CFLAGS="$CFLAGS" CPPFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" "$@" diff --git a/vendor/ci/net-snmp-run-perl-tests b/vendor/ci/net-snmp-run-perl-tests index 6fd4686..59fa24d 100644 --- a/vendor/ci/net-snmp-run-perl-tests +++ b/vendor/ci/net-snmp-run-perl-tests @@ -1,6 +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' :)" && +LD_LIBRARY_PATH="$(find . -name '*.so' | grep -v NetSNMP/agent/default_store | sed 's,^\./,'"$PWD/"',;s,/[^/]*$,,' | sort -u | tr '\n' :)" && +export LD_LIBRARY_PATH && make perlmakefiles && cd perl && make && diff --git a/vendor/ci/net-snmp-run-python-tests b/vendor/ci/net-snmp-run-python-tests index e041033..711b38b 100644 --- a/vendor/ci/net-snmp-run-python-tests +++ b/vendor/ci/net-snmp-run-python-tests @@ -3,16 +3,16 @@ set -x killall snmpd export LD_LIBRARY_PATH="$PWD/snmplib/.libs:$PWD/agent/.libs:$PWD/agent/helpers/.libs:" -export MIBDIRS=$PWD/mibs +export MIBDIRS="$PWD/mibs" export SNMP_PERSISTENT_DIR=/tmp/net-snmp export SNMP_SNMPD_PORT=1161 -export PYTHONPATH=$PWD/python/netsnmp +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 $? +[ -n "$PYTHONPROG" ] || exit 1 cd python || exit $? $PYTHONPROG setup.py --basedir="$PWD/.." test || exit $? kill $pid diff --git a/vendor/ci/net-snmp-run-tests b/vendor/ci/net-snmp-run-tests index c322760..99831fc 100644 --- a/vendor/ci/net-snmp-run-tests +++ b/vendor/ci/net-snmp-run-tests @@ -5,27 +5,32 @@ 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 - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then - for g in default snmpv3 unit-tests; do - echo "==== Test group $g ====" - ./RUNFULLTESTS -g $g || exit $? - echo "==== End of test group $g ====" - done - elif [ -n "${CIRRUS_CI}" ]; then - for g in default snmpv3 transports unit-tests; do - echo "==== Test group $g ====" - ./RUNFULLTESTS -g $g || exit $? - echo "==== End of test group $g ====" - done - else - ./RUNFULLTESTS -g all -e dtls -e tls - fi + 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 && @@ -34,11 +39,7 @@ make -s && "$scriptdir/net-snmp-run-perl-tests" fi ) && -# Running the Python tests fails as follows on OS/X: -# ImportError: dlopen(/Users/travis/build/bvanassche/net-snmp/python/netsnmp/client_intf.so, 2): Library not loaded: /usr/local/net-snmp-master/lib/libnetsnmp.35.dylib -# Referenced from: /Users/travis/build/bvanassche/net-snmp/python/netsnmp/client_intf.so -# Reason: image not found -if grep -q with-python-modules config.log && - [ "${TRAVIS_OS_NAME}" != "osx" ]; then +# 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/vendor/ci/openssl.bat b/vendor/ci/openssl.bat index 9fbae4e..cdfa4ef 100644 --- a/vendor/ci/openssl.bat +++ b/vendor/ci/openssl.bat @@ -3,6 +3,6 @@ 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-1_1_1g.exe -o openssl.exe +curl -fsS -o openssl.exe https://slproweb.com/download/Win64OpenSSL-3_6_0.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/vendor/ci/perl.bat b/vendor/ci/perl.bat index dc2b882..9d531e9 100644 --- a/vendor/ci/perl.bat +++ b/vendor/ci/perl.bat @@ -1,8 +1,8 @@ REM Download and install Perl setlocal echo on -if %1 == "" goto help -set PERL_VERSION=5.31.10 +if "%1" == "" goto help +set PERL_VERSION=5.40.0 set INST_DRV=c: set INST_TOP=c:\perl-msvc rd /q /s %INST_TOP% diff --git a/vendor/ci/test.sh b/vendor/ci/test.sh new file mode 100644 index 0000000..f735712 --- /dev/null +++ b/vendor/ci/test.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +case "$(uname)" in + Darwin) + # 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' + ;; +esac + +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 + "") + ;; + disable-ipv6|regular) + ;; + *) + exit 0 + ;; +esac + +case $(uname) in + MinGW) + ;; + *) + "${scriptdir}"/net-snmp-run-tests + ;; +esac diff --git a/vendor/ci/wolfssl.sh b/vendor/ci/wolfssl.sh new file mode 100644 index 0000000..fb879ae --- /dev/null +++ b/vendor/ci/wolfssl.sh @@ -0,0 +1,20 @@ +#!/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 +" +# shellcheck disable=SC2086 +./configure ${options} +make -j"$(nproc)" +make install diff --git a/vendor/config.guess b/vendor/config.guess index 2852378..1972fda 100644 --- a/vendor/config.guess +++ b/vendor/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/vendor/config.sub b/vendor/config.sub index 320e303..63c1f1c 100644 --- a/vendor/config.sub +++ b/vendor/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/vendor/configure b/vendor/configure index d206f69..6ef0026 100644 --- a/vendor/configure +++ b/vendor/configure @@ -1,12 +1,13 @@ #! /bin/sh # From configure.ac Revision. # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Net-SNMP 5.9. +# Generated by GNU Autoconf 2.72 for Net-SNMP 5.9.5.2. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -17,63 +18,65 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +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 - case `(set -o) 2>/dev/null` in #( +else case e in #( + e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; 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 || @@ -82,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 #(( @@ -97,43 +93,27 @@ 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 ;; esac -# We did not find ourselves, most probably we were run as `sh COMMAND' +# We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. 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. @@ -154,26 +134,28 @@ case $- in # (((( 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'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 +# 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="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 - case \`(set -o) 2>/dev/null\` in #( +else case e in #( + e) case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi " @@ -188,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 - exitcode=1; echo positional parameters were not saved. +else case e in #( + e) exitcode=1; echo positional parameters were not saved. ;; +esac fi 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 @@ -208,30 +194,39 @@ 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 - as_have_required=no +else case e in #( + e) as_have_required=no ;; +esac 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 - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else case e in #( + e) 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 @@ -239,14 +234,22 @@ 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 : + +else case e in #( + e) 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 ;; +esac +fi - if test "x$CONFIG_SHELL" != x; then : + 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 @@ -263,26 +266,28 @@ case $- in # (((( 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'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +# 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 : - $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$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 $0: the script under such a shell if you do have one." fi exit 1 -fi +fi ;; +esac fi fi SHELL=${CONFIG_SHELL-/bin/sh} @@ -303,6 +308,7 @@ as_fn_unset () } as_unset=as_fn_unset + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -334,7 +340,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" @@ -343,7 +349,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 @@ -382,16 +388,18 @@ as_fn_executable_p () # 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 - as_fn_append () +else case e in #( + e) as_fn_append () { eval $1=\$$1\$2 - } + } ;; +esac fi # as_fn_append # as_fn_arith ARG... @@ -399,16 +407,18 @@ 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 - as_fn_arith () +else case e in #( + e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } + } ;; +esac fi # as_fn_arith @@ -422,9 +432,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 @@ -451,7 +461,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 @@ -484,6 +494,8 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits /[$]LINENO/= ' <$as_myself | sed ' + t clear + :clear s/[$]LINENO.*/&-/ t lineno b @@ -495,7 +507,7 @@ 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 @@ -509,6 +521,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*) @@ -522,6 +538,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 @@ -533,9 +555,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... 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 -pR'. + # 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 -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -560,10 +582,12 @@ 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'" +as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed '$as_sed_sh'" # deprecated SHELL=${CONFIG_SHELL-/bin/sh} @@ -591,48 +615,44 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Net-SNMP' PACKAGE_TARNAME='net-snmp' -PACKAGE_VERSION='5.9' -PACKAGE_STRING='Net-SNMP 5.9' +PACKAGE_VERSION='5.9.5.2' +PACKAGE_STRING='Net-SNMP 5.9.5.2' 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 @@ -681,17 +701,21 @@ NETSNMP_BUILD_TLS_PROG_FALSE NETSNMP_BUILD_TLS_PROG_TRUE NETSNMP_BUILD_SSH_PROG_FALSE NETSNMP_BUILD_SSH_PROG_TRUE -LIBNL3_LIBS -LIBNL3_CFLAGS -PKG_CONFIG_LIBDIR -PKG_CONFIG_PATH -PKG_CONFIG +OPENSSL_LIBS +OPENSSL_CFLAGS NETSNMP_HAVE_AGENTX_LIBS_FALSE NETSNMP_HAVE_AGENTX_LIBS_TRUE NETSNMP_DEFAULT_MIBS ENV_SEPARATOR dllcleans default_mibs_install +LIBNLROUTE3_LIBS +LIBNLROUTE3_CFLAGS +LIBNL3_LIBS +LIBNL3_CFLAGS +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +PKG_CONFIG LMIBLIBS LAGENTLIBS krb5_config @@ -767,6 +791,7 @@ OBJDUMP DLLTOOL AS LINKCC +CPP PERL_SYSTEM_INVOKES_POSIX_SHELL UNAMEPROG PYTHONPROG @@ -783,6 +808,8 @@ LN_S INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM +EGREP +GREP COPY_PERSISTENT_FILES UCDPERSISTENT_DIRECTORY PERSISTENT_DIRECTORY @@ -799,9 +826,6 @@ TRAPLIBS SNMPD INSTALL_PREFIX LIBTOOLFLAGS -EGREP -GREP -CPP OBJEXT EXEEXT ac_ct_CC @@ -829,6 +853,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -886,6 +911,8 @@ with_rsaref enable_rsaref with_openssl enable_openssl +with_wolfssl +enable_wolfssl with_ssl enable_ssl with_pkcs @@ -1092,7 +1119,11 @@ PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR LIBNL3_CFLAGS -LIBNL3_LIBS' +LIBNL3_LIBS +LIBNLROUTE3_CFLAGS +LIBNLROUTE3_LIBS +OPENSSL_CFLAGS +OPENSSL_LIBS' # Initialize some variables set by options. @@ -1131,6 +1162,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}' @@ -1160,8 +1192,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 ;; @@ -1202,9 +1232,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" @@ -1228,9 +1258,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" @@ -1383,6 +1413,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=* \ @@ -1432,9 +1471,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" @@ -1448,9 +1487,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" @@ -1478,8 +1517,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" + -*) as_fn_error $? "unrecognized option: '$ac_option' +Try '$0 --help' for more information" ;; *=*) @@ -1487,16 +1526,16 @@ Try \`$0 --help' for more information" # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: '$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # 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}" ;; @@ -1512,7 +1551,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 @@ -1520,7 +1559,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. @@ -1537,7 +1576,7 @@ do as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done -# There might be people who depend on the old broken behavior: `$host' +# There might be people who depend on the old broken behavior: '$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias @@ -1576,7 +1615,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 @@ -1605,7 +1644,7 @@ if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` @@ -1633,7 +1672,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.9 to adapt to many kinds of systems. +'configure' configures Net-SNMP 5.9.5.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1647,11 +1686,11 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages + -q, --quiet, --silent do not print 'checking ...' messages --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' + -C, --config-cache alias for '--cache-file=config.cache' -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] + --srcdir=DIR find the sources in DIR [configure dir or '..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @@ -1659,10 +1698,10 @@ Installation directories: --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. +By default, 'make install' will install all the files in +'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify +an installation prefix other than '$ac_default_prefix' using '--prefix', +for instance '--prefix=\$HOME'. For better control, use the options below. @@ -1673,6 +1712,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] @@ -1699,7 +1739,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Net-SNMP 5.9:";; + short | recursive ) echo "Configuration of Net-SNMP 5.9.5.2:";; esac cat <<\_ACEOF @@ -1803,6 +1843,7 @@ Compiler Options: --with-openssl=PATH Look for openssl in PATH/lib, or PATH may be "internal" to build with minimal copied OpenSSL code for USM only. + --with-wolfssl=PATH Look for wolfssl in PATH/lib. --with-pkcs=PATH Look for pkcs11 in PATH/lib. --with-krb5=PATH Look for krb5 in PATH/lib. @@ -1818,7 +1859,7 @@ Compiler Options: libraries (eg, HPUX) --with-features-of=version Compile in MIB modules and other features as if this - was release "version" (default is 5.9). + was release "version" (default is 5.9.5.2). Miscellaneous: --with-defaults Use defaults for prompted values. @@ -2071,8 +2112,16 @@ Some influential environment variables: LIBNL3_CFLAGS C compiler flags for LIBNL3, overriding pkg-config LIBNL3_LIBS linker flags for LIBNL3, overriding pkg-config - -Use these variables to override the choices made by `configure' or to help + LIBNLROUTE3_CFLAGS + C compiler flags for LIBNLROUTE3, overriding pkg-config + LIBNLROUTE3_LIBS + linker flags for LIBNLROUTE3, 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. Report bugs to . @@ -2091,9 +2140,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/ ;; @@ -2121,7 +2170,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 @@ -2129,7 +2179,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 @@ -2138,10 +2188,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Net-SNMP configure 5.9 -generated by GNU Autoconf 2.69 +Net-SNMP configure 5.9.5.2 +generated by GNU Autoconf 2.72 -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2023 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -2158,14 +2208,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 @@ -2173,223 +2223,98 @@ $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 case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; + ac_retval=1 ;; esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$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 : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_c_try_cpp +} # ac_fn_c_try_compile -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ac_fn_c_check_header_compile 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 () +# 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 - 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 + { 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 case e in #( + e) 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 +if ac_fn_c_try_compile "$LINENO" +then : + eval "$3=yes" +else case e in #( + e) eval "$3=no" ;; +esac 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 - ;; +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; 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 + { 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_mongrel +} # ac_fn_c_check_header_compile -# ac_fn_c_try_run LINENO +# ac_fn_c_try_cpp LINENO # ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" + if { { ac_try="$ac_cpp conftest.$ac_ext" 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 +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + 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 : ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=$ac_status + ac_retval=1 ;; +esac 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_cpp # ac_fn_c_try_link LINENO # ----------------------- @@ -2397,14 +2322,14 @@ $as_echo "$ac_res" >&6; } 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 @@ -2412,20 +2337,22 @@ $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 || test -x conftest$ac_exeext - }; then : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would @@ -2443,28 +2370,22 @@ 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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { 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 case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #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 (void); below. */ +#include #undef $2 /* Override any GCC internal prototype to avoid an error. @@ -2473,7 +2394,7 @@ else #ifdef __cplusplus extern "C" #endif -char $2 (); +char $2 (void); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ @@ -2482,24 +2403,27 @@ 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 - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac 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_exeext conftest.$ac_ext ;; +esac 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 @@ -2511,16 +2435,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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { 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 case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int -main () +main (void) { static $2 ac_aggr; if (ac_aggr.$3) @@ -2529,14 +2454,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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int -main () +main (void) { static $2 ac_aggr; if (sizeof ac_aggr.$3) @@ -2545,54 +2471,103 @@ 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 - eval "$4=no" +else case e in #( + e) eval "$4=no" ;; +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 ;; +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 ;; +esac 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 test_array [0]; - - ; - return 0; -} + 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 case e in #( + e) 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 ;; +esac +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 : +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; @@ -2602,24 +2577,26 @@ 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 - as_fn_arith $ac_mid + 1 && ac_lo=$as_val +else case e in #( + e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;; +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 done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) 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; @@ -2629,14 +2606,15 @@ 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; @@ -2646,24 +2624,28 @@ 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 - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val +else case e in #( + e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;; +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 done -else - ac_lo= ac_hi= +else case e in #( + e) ac_lo= ac_hi= ;; +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 ;; +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 # 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 @@ -2671,7 +2653,7 @@ 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; @@ -2681,12 +2663,14 @@ 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 - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +else case e in #( + e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;; +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 done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; @@ -2696,12 +2680,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"); @@ -2729,10 +2713,12 @@ 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 - eval "$3=no" + { 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 case e in #( + e) eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in int$2_t 'int' 'long int' \ @@ -2766,7 +2753,7 @@ 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; @@ -2776,13 +2763,14 @@ 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))]; @@ -2793,29 +2781,34 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else - case $ac_type in #( +else case e in #( + e) case $ac_type in #( int$2_t) : eval "$3=yes" ;; #( *) : eval "$3=\$ac_type" ;; +esac ;; 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 - break +else case e in #( + e) break ;; +esac fi - done + done ;; +esac 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 @@ -2827,17 +2820,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 - eval "$3=no" + { 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 case e in #( + e) eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { if (sizeof ($2)) return 0; @@ -2845,12 +2839,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; @@ -2858,18 +2853,21 @@ if (sizeof (($2))) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else - eval "$3=yes" +else case e in #( + e) eval "$3=yes" ;; +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 +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac 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 @@ -2881,12 +2879,13 @@ $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 - eval "$3=no" + { 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 case e in #( + e) eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ @@ -2895,7 +2894,7 @@ 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; @@ -2905,7 +2904,8 @@ 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" ;; #( @@ -2913,40 +2913,46 @@ 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 - break +else case e in #( + e) break ;; +esac fi - done + done ;; +esac 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/ *(.*//'` - 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 + { 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 case e in #( + e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + 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 @@ -2960,27 +2966,52 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$3=yes" -else - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +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 + eval $6=\$ac_save_FLAGS + ;; +esac 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.9, which was -generated by GNU Autoconf 2.69. Invocation command line was +It was created by Net-SNMP $as_me 5.9.5.2, which was +generated by GNU Autoconf 2.72. Invocation command line was - $ $0 $@ + $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log @@ -3013,8 +3044,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 @@ -3049,7 +3084,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'" ;; @@ -3084,11 +3119,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 @@ -3099,8 +3136,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) ;; #( @@ -3124,7 +3161,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -3132,14 +3169,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 @@ -3147,15 +3184,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 @@ -3163,8 +3200,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 && @@ -3178,65 +3215,50 @@ 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; } +See 'config.log' for more details" "$LINENO" 5; } fi done @@ -3244,19 +3266,455 @@ 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 (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; +} + +/* C89 style stringification. */ +#define noexpand_stringify(a) #a +const char *stringified = noexpand_stringify(arbitrary+token=sequence); + +/* C89 style token pasting. Exercises some of the corner cases that + e.g. old MSVC gets wrong, but not very hard. */ +#define noexpand_concat(a,b) a##b +#define expand_concat(a,b) noexpand_concat(a,b) +extern int vA; +extern int vbee; +#define aye A +#define bee B +int *pvA = &expand_concat(v,aye); +int *pvbee = &noexpand_concat(v,bee); + +/* 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 + +// See if C++-style comments work. + +#include +extern int puts (const char *); +extern int printf (const char *, ...); +extern int dprintf (int, const char *, ...); +extern void *malloc (size_t); +extern void free (void *); + +// 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) +{ + // 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; + // Work around memory leak warnings. + free (ia); + + // 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 case e in #( + e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;; +esac +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 @@ -3267,12 +3725,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=: ;; ,);; *) @@ -3281,24 +3739,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 @@ -3308,11 +3766,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. ## @@ -3341,9 +3800,7 @@ 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 "${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\"" @@ -3351,6 +3808,15 @@ CONFIGURE_OPTIONS="\"$ac_configure_args\"" # # Check whether _GNU_SOURCE etc. should be defined # + + + + + + + + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3359,38 +3825,44 @@ 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 +{ 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 case e in #( + e) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { 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 @@ -3399,38 +3871,44 @@ 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 +{ 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 case e in #( + e) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { 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 if test "x$ac_ct_CC" = x; then @@ -3438,8 +3916,8 @@ fi 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 CC=$ac_ct_CC @@ -3452,38 +3930,44 @@ 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 -else - if test -n "$CC"; then +{ 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 case e in #( + e) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { 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 @@ -3492,12 +3976,13 @@ 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 +{ 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 case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no @@ -3505,15 +3990,19 @@ 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 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 + 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" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3529,18 +4018,19 @@ if test $ac_prog_rejected = yes; then # 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+' '}$@" + ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi -fi +fi ;; +esac 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; } + { 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 @@ -3551,38 +4041,44 @@ if test -z "$CC"; then 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 +{ 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 case e in #( + e) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { 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 @@ -3595,38 +4091,44 @@ if test -z "$CC"; 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_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then +{ 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 case e in #( + e) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { 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 @@ -3638,34 +4140,140 @@ done 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 + CC=$ac_ct_CC + fi +fi + +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 case e in #( + e) 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 + +fi ;; +esac +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 + + +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 case e in #( + e) 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 + +fi ;; +esac +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 + + 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 -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +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; } +See 'config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +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; do +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\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -3675,7 +4283,7 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $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; } done @@ -3683,7 +4291,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -3695,9 +4303,9 @@ 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[^ ]*//'` +{ 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.*" @@ -3718,13 +4326,14 @@ 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_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' + 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. @@ -3739,12 +4348,12 @@ do # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + 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' + # 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. @@ -3755,48 +4364,52 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else - ac_file='' +else case e in #( + e) ac_file='' ;; +esac 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 +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 -{ { $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 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +See 'config.log' for more details" "$LINENO" 5; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ;; +esac 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; } +{ 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 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; } +{ 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\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$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'. + 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 @@ -3806,15 +4419,16 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) { { 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; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +printf "%s\n" "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -3823,9 +4437,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { FILE *f = fopen ("conftest.out", "w"); + if (!f) + return 1; return ferror (f) || fclose (f) != 0; ; @@ -3835,8 +4451,8 @@ _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; } +{ 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 @@ -3844,10 +4460,10 @@ 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_link") 2>&5 ac_status=$? - $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; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -3855,39 +4471,41 @@ $as_echo "$ac_try_echo"; } >&5 *) 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_try") 2>&5 ac_status=$? - $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; }; }; 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; } + { { 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } +{ 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 +rm -f conftest.$ac_ext conftest$ac_cv_exeext \ + conftest.o conftest.obj 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 +{ 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 case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -3901,11 +4519,12 @@ 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_compile") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + 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 @@ -3914,31 +4533,34 @@ $as_echo "$ac_try_echo"; } >&5 break;; esac done -else - $as_echo "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$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;} +{ { 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; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext +rm -f conftest.$ac_cv_objext conftest.$ac_ext ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } +{ 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 -{ $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 +{ 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 case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ choke me @@ -3948,30 +4570,36 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else - ac_compiler_gnu=no +else case e in #( + e) ac_compiler_gnu=no ;; +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 ac_cv_c_compiler_gnu=$ac_compiler_gnu - + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } +{ 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 $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+set} +ac_test_CFLAGS=${CFLAGS+y} 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 +{ 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 case e in #( + e) ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" @@ -3979,57 +4607,63 @@ else /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes -else - CFLAGS="" +else case e in #( + e) CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else - ac_c_werror_flag=$ac_save_c_werror_flag +else case e in #( + e) ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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 +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +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 ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag ;; +esac 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 +{ 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 @@ -4044,94 +4678,153 @@ else CFLAGS= fi 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_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 case e in #( + e) ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -struct stat; -/* 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]; +$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 ;; +esac +fi -/* 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]; +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 case e in #( + e) 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 case e in #( + e) { 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" ;; +esac +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 ;; +esac +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 case e in #( + e) 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 ;; +esac +fi -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; -} +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 case e in #( + e) 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 case e in #( + e) { 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" ;; +esac +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 ;; +esac +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 case e in #( + e) 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__" +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 : + if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext +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 +CC=$ac_save_CC ;; +esac +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 case e in #( + e) 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 case e in #( + e) { 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" ;; +esac 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; } ;; + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 ;; esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - +fi fi ac_ext=c @@ -4141,463 +4834,182 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ 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 +ac_header= ac_cache= +for ac_item in $ac_header_c_list 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 : + 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 + + + + + + + + +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 -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 + + + + + + { 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 case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +# define __EXTENSIONS__ 1 + $ac_includes_default +int +main (void) +{ + + ; + return 0; +} _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_safe_to_define___extensions__=yes +else case e in #( + e) ac_cv_safe_to_define___extensions__=no ;; +esac 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 +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac 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; } + + { 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 case e in #( + e) 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. */ - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -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 -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 : - -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; } -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 - - -{ $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" - 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 - $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 - fi -else - ac_cv_path_GREP=$GREP -fi - -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" - 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 - $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 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -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 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 - -int -main () -{ + #include + mbstate_t x; +int +main (void) +{ ; 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 -fi -rm -f conftest* - -fi - -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 : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi +if ac_fn_c_try_compile "$LINENO" +then : -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 +else case e in #( + e) 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))) + #define _XOPEN_SOURCE 500 + #include + mbstate_t x; 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 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 +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_should_define__xopen_source=yes fi - +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi ;; +esac 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}: result: $ac_cv_should_define__xopen_source" >&5 +printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; } -$as_echo "#define STDC_HEADERS 1" >>confdefs.h + printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h -fi + printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h -# 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 + printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h -fi + printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h -done + printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h + printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h + printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h - 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 -else - MINIX= -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 - if test "$MINIX" = yes; then + printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h -$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h + printf "%s\n" "#define __STDC_WANT_IEC_60559_EXT__ 1" >>confdefs.h + printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h -$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h + printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h + printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h -$as_echo "#define _MINIX 1" >>confdefs.h + printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h - fi + 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 "$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. */ + printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h -# define __EXTENSIONS__ 1 - $ac_includes_default -int -main () -{ + printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h - ; - 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 -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else case e in #( + e) MINIX= ;; +esac 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 + if test $ac_cv_safe_to_define___extensions__ = yes +then : + printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h - $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h - - $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h +fi + if test $ac_cv_should_define__xopen_source = yes +then : + printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h +fi ## @@ -4630,33 +5042,37 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } # Check whether --with-cc was given. -if test "${with_cc+set}" = set; then : +if test ${with_cc+y} +then : withval=$with_cc; CC=$with_cc;export CC fi # Check whether --with-linkcc was given. -if test "${with_linkcc+set}" = set; then : +if test ${with_linkcc+y} +then : withval=$with_linkcc; LINKCC=$with_linkcc;export LINKCC fi # Check whether --with-ar was given. -if test "${with_ar+set}" = set; then : +if test ${with_ar+y} +then : withval=$with_ar; AR=$with_ar; export AR fi # Check whether --with-endianness was given. -if test "${with_endianness+set}" = set; then : +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 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-endianness is obsolete" >&5 -$as_echo "$as_me: WARNING: --with-endianness is obsolete" >&2;} + { 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 fi @@ -4664,33 +5080,38 @@ fi # Check whether --with-cflags was given. -if test "${with_cflags+set}" = set; then : +if test ${with_cflags+y} +then : withval=$with_cflags; CFLAGS=$with_cflags; export CFLAGS fi # Check whether --with-ldflags was given. -if test "${with_ldflags+set}" = set; then : +if test ${with_ldflags+y} +then : withval=$with_ldflags; LDFLAGS=$with_ldflags; export LDFLAGS fi # Check whether --enable-as-needed was given. -if test "${enable_as_needed+set}" = set; then : +if test ${enable_as_needed+y} +then : enableval=$enable_as_needed; fi # Check whether --with-libs was given. -if test "${with_libs+set}" = set; then : +if test ${with_libs+y} +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 : +if test ${enable_silent_libtool+y} +then : enableval=$enable_silent_libtool; LIBTOOLFLAGS=--silent fi @@ -4704,7 +5125,8 @@ fi tryrsaref=no # Check whether --with-rsaref was given. -if test "${with_rsaref+set}" = set; then : +if test ${with_rsaref+y} +then : withval=$with_rsaref; if test "x$withval" = "xyes"; then tryrsaref=yes elif test "x$withval" = "xno"; then @@ -4725,17 +5147,19 @@ if test "${with_rsaref+set}" = set; then : fi # Check whether --enable-rsaref was given. -if test "${enable_rsaref+set}" = set; then : +if test ${enable_rsaref+y} +then : enableval=$enable_rsaref; as_fn_error $? "Invalid option. Use --with-rsaref/--without-rsaref instead" "$LINENO" 5 fi -tryopenssl=defaultyes +tryopenssl=yes askedopenssl=no aes_capable=no # Check whether --with-openssl was given. -if test "${with_openssl+set}" = set; then : +if test ${with_openssl+y} +then : withval=$with_openssl; if test "x$withval" = "xyes"; then tryopenssl=yes askedopenssl=yes @@ -4766,47 +5190,62 @@ if test "${with_openssl+set}" = set; then : fi # Check whether --enable-openssl was given. -if test "${enable_openssl+set}" = set; then : +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 - 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 --with-wolfssl was given. +if test ${with_wolfssl+y} +then : + withval=$with_wolfssl; if test "x$withval" = xyes; then + tryopenssl=yes + askedopenssl=yes + CPPFLAGS="-I/usr/include/wolfssl -DWC_NO_HARDEN -DNO_OLD_TIMEVAL_NAME -DOPENSSL_EXTRA -DEXTERNAL_OPTS_OPENVPN $CPPFLAGS" + elif test -d "$withval" && test -d "$withval/include/wolfssl"; then + tryopenssl=yes + askedopenssl=yes + LDFLAGS="-L$withval/lib $LDFLAGS" + CPPFLAGS="-I$withval/include -I$withval/include/wolfssl -DWC_NO_HARDEN -DNO_OLD_TIMEVAL_NAME -DOPENSSL_EXTRA -DEXTERNAL_OPTS_OPENVPN $CPPFLAGS" + else + as_fn_error $? "Cannot find wolfSSL in ${withval}." "$LINENO" 5 + fi - tryopenssl=yes fi + + # Check whether --enable-wolfssl was given. +if test ${enable_wolfssl+y} +then : + enableval=$enable_wolfssl; as_fn_error $? "Invalid option. Use --with-wolfssl/--without-wolfssl instead" "$LINENO" 5 +fi + if test "x$tryopenssl" = "xyes"; then - for ac_header in openssl/aes.h openssl/evp.h + for ac_header in openssl/aes.h openssl/evp.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 : + as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | sed "$as_sed_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 +#define `printf "%s\n" "HAVE_$ac_header" | sed "$as_sed_cpp"` 1 _ACEOF aes_capable=yes fi done - fi # Check whether --with-ssl was given. -if test "${with_ssl+set}" = set; then : +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-ssl was given. -if test "${enable_ssl+set}" = set; then : +if test ${enable_ssl+y} +then : enableval=$enable_ssl; as_fn_error $? "Invalid option. Use --with-openssl/--without-openssl instead" "$LINENO" 5 fi @@ -4814,7 +5253,8 @@ fi askedpkcs=no # Check whether --with-pkcs was given. -if test "${with_pkcs+set}" = set; then : +if test ${with_pkcs+y} +then : withval=$with_pkcs; if test "x$withval" = "xyes"; then askedpkcs=yes elif test "x$withval" = "xno"; then @@ -4835,7 +5275,8 @@ if test "${with_pkcs+set}" = set; then : fi # Check whether --enable-pkcs was given. -if test "${enable_pkcs+set}" = set; then : +if test ${enable_pkcs+y} +then : enableval=$enable_pkcs; as_fn_error $? "Invalid option. Use --with-pkcs/--without-pkcs instead" "$LINENO" 5 fi @@ -4844,7 +5285,8 @@ trykrb5=defaultyes askedkrb5=no # Check whether --with-krb5 was given. -if test "${with_krb5+set}" = set; then : +if test ${with_krb5+y} +then : withval=$with_krb5; if test "x$withval" = "xyes"; then trykrb5=yes askedkrb5=yes @@ -4860,7 +5302,8 @@ if test "${with_krb5+set}" = set; then : fi # Check whether --enable-krb5 was given. -if test "${enable_krb5+set}" = set; then : +if test ${enable_krb5+y} +then : enableval=$enable_krb5; as_fn_error $? "Invalid option. Use --with-krb5/--without-krb5 instead" "$LINENO" 5 fi @@ -4871,37 +5314,44 @@ fi # Check whether --with-dnssec-local-validation was given. -if test "${with_dnssec_local_validation+set}" = set; then : +if test ${with_dnssec_local_validation+y} +then : withval=$with_dnssec_local_validation; want_dnssec=$withval -else - want_dnssec=no +else case e in #( + e) want_dnssec=no ;; +esac fi # Check whether --enable-dnssec-local-validation was given. -if test "${enable_dnssec_local_validation+set}" = set; then : +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-dnssec was given. -if test "${with_dnssec+set}" = set; then : +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+set}" = set; then : +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 # Check whether --with-rpm was given. -if test "${with_rpm+set}" = set; then : +if test ${with_rpm+y} +then : withval=$with_rpm; fi # Check whether --enable-rpm was given. -if test "${enable_rpm+set}" = set; then : +if test ${enable_rpm+y} +then : enableval=$enable_rpm; as_fn_error $? "Invalid option. Use --with-rpm/--without-rpm instead" "$LINENO" 5 fi @@ -4909,14 +5359,17 @@ fi # Check whether --with-pcre was given. -if test "${with_pcre+set}" = set; then : +if test ${with_pcre+y} +then : withval=$with_pcre; with_pcre="$withval" -else - with_pcre="maybe" +else case e in #( + e) with_pcre="maybe" ;; +esac fi # Check whether --enable-pcre was given. -if test "${enable_pcre+set}" = set; then : +if test ${enable_pcre+y} +then : enableval=$enable_pcre; as_fn_error $? "Invalid option. Use --with-pcre/--without-pcre instead" "$LINENO" 5 fi @@ -4929,7 +5382,8 @@ fi # # Check whether --with-install-prefix was given. -if test "${with_install_prefix+set}" = set; then : +if test ${with_install_prefix+y} +then : withval=$with_install_prefix; INSTALL_PREFIX="$withval" fi @@ -4954,13 +5408,15 @@ FTMAINSUBS="" # Agent # # Check whether --enable-agent was given. -if test "${enable_agent+set}" = set; then : +if test ${enable_agent+y} +then : enableval=$enable_agent; fi # Check whether --with-agent was given. -if test "${with_agent+set}" = set; then : +if test ${with_agent+y} +then : withval=$with_agent; as_fn_error $? "Invalid option. Use --enable-agent/--disable-agent instead" "$LINENO" 5 fi @@ -4981,7 +5437,7 @@ else TRAPLIBS='$(TRAPDWITHAGENT)' USETRAPLIBS='$(USEAGENTLIBS)' -$as_echo "#define NETSNMP_DISABLE_AGENT 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_DISABLE_AGENT 1" >>confdefs.h fi @@ -4992,13 +5448,15 @@ fi # Applications # # Check whether --enable-applications was given. -if test "${enable_applications+set}" = set; then : +if test ${enable_applications+y} +then : enableval=$enable_applications; fi # Check whether --with-applications was given. -if test "${with_applications+set}" = set; then : +if test ${with_applications+y} +then : withval=$with_applications; as_fn_error $? "Invalid option. Use --enable-applications/--disable-applications instead" "$LINENO" 5 fi @@ -5008,20 +5466,22 @@ if test "x$enable_applications" != "xno"; then FTMAINSUBS="apps $FTMAINSUBS" else -$as_echo "#define NETSNMP_DISABLE_APPS 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_DISABLE_APPS 1" >>confdefs.h fi # Manual pages # # Check whether --enable-manuals was given. -if test "${enable_manuals+set}" = set; then : +if test ${enable_manuals+y} +then : enableval=$enable_manuals; fi # Check whether --with-manuals was given. -if test "${with_manuals+set}" = set; then : +if test ${with_manuals+y} +then : withval=$with_manuals; as_fn_error $? "Invalid option. Use --enable-manuals/--disable-manuals instead" "$LINENO" 5 fi @@ -5032,13 +5492,15 @@ fi # Supporting scripts # # Check whether --enable-scripts was given. -if test "${enable_scripts+set}" = set; then : +if test ${enable_scripts+y} +then : enableval=$enable_scripts; fi # Check whether --with-scripts was given. -if test "${with_scripts+set}" = set; then : +if test ${with_scripts+y} +then : withval=$with_scripts; as_fn_error $? "Invalid option. Use --enable-scripts/--disable-scripts instead" "$LINENO" 5 fi @@ -5049,7 +5511,8 @@ fi # MIB files # # Check whether --enable-mibs was given. -if test "${enable_mibs+set}" = set; then : +if test ${enable_mibs+y} +then : enableval=$enable_mibs; fi @@ -5060,46 +5523,52 @@ fi -{ $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; } +{ 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; } # MIB module validation (during "configure") # # Check whether --enable-mib-config-checking was given. -if test "${enable_mib_config_checking+set}" = set; then : +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 - with_mib_cfg_checks="no" +else case e in #( + e) with_mib_cfg_checks="no" ;; +esac fi # Check whether --with-mib-config-checking was given. -if test "${with_mib_config_checking+set}" = set; then : +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 --enable-mib-config-debug was given. -if test "${enable_mib_config_debug+set}" = set; then : +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 - with_mib_cfg_debug="no" +else case e in #( + e) with_mib_cfg_debug="no" ;; +esac fi # Check whether --with-mib-config-debug was given. -if test "${with_mib_config_debug+set}" = set; then : +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 @@ -5108,23 +5577,27 @@ fi # Version-specific features # # Check whether --enable-new-features was given. -if test "${enable_new_features+set}" = set; then : +if test ${enable_new_features+y} +then : enableval=$enable_new_features; fi # Check whether --enable-old-features was given. -if test "${enable_old_features+set}" = set; then : +if test ${enable_old_features+y} +then : enableval=$enable_old_features; fi # Check whether --with-features-of was given. -if test "${with_features_of+set}" = set; then : +if test ${with_features_of+y} +then : withval=$with_features_of; -else - with_features_of=$PACKAGE_VERSION +else case e in #( + e) with_features_of=$PACKAGE_VERSION ;; +esac fi @@ -5133,18 +5606,21 @@ fi # # Check whether --with-defaults was given. -if test "${with_defaults+set}" = set; then : +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 - defaults="no" +else case e in #( + e) defaults="no" ;; +esac fi # Check whether --enable-defaults was given. -if test "${enable_defaults+set}" = set; then : +if test ${enable_defaults+y} +then : enableval=$enable_defaults; as_fn_error $? "Invalid option. Use --with-defaults/--without-defaults instead" "$LINENO" 5 fi @@ -5153,13 +5629,15 @@ fi # UCD compatability # # Check whether --enable-ucd-snmp-compatibility was given. -if test "${enable_ucd_snmp_compatibility+set}" = set; then : +if test ${enable_ucd_snmp_compatibility+y} +then : enableval=$enable_ucd_snmp_compatibility; fi # Check whether --with-ucd-snmp-compatibility was given. -if test "${with_ucd_snmp_compatibility+set}" = set; then : +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 @@ -5182,42 +5660,45 @@ fi ## # Check whether --enable-mib-loading was given. -if test "${enable_mib_loading+set}" = set; then : +if test ${enable_mib_loading+y} +then : enableval=$enable_mib_loading; fi # Check whether --with-mib-loading was given. -if test "${with_mib_loading+set}" = set; then : +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 -$as_echo "#define NETSNMP_DISABLE_MIB_LOADING 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_DISABLE_MIB_LOADING 1" >>confdefs.h fi # Check whether --with-mibdirs was given. -if test "${with_mibdirs+set}" = set; then : +if test ${with_mibdirs+y} +then : withval=$with_mibdirs; NETSNMP_DEFAULT_MIBDIRS="$with_mibdirs" -cat >>confdefs.h <<_ACEOF -#define NETSNMP_DEFAULT_MIBDIRS "$with_mibdirs" -_ACEOF +printf "%s\n" "#define NETSNMP_DEFAULT_MIBDIRS \"$with_mibdirs\"" >>confdefs.h fi # Check whether --enable-mibdirs was given. -if test "${enable_mibdirs+set}" = set; then : +if test ${enable_mibdirs+y} +then : enableval=$enable_mibdirs; as_fn_error $? "Invalid option. Use --with-mibdirs/--without-mibdirs instead" "$LINENO" 5 fi # Check whether --with-mibs was given. -if test "${with_mibs+set}" = set; then : +if test ${with_mibs+y} +then : withval=$with_mibs; NETSNMP_DEFAULT_MIBS="$with_mibs" fi @@ -5225,16 +5706,16 @@ fi # Check whether --with-mibfiles was given. -if test "${with_mibfiles+set}" = set; then : +if test ${with_mibfiles+y} +then : withval=$with_mibfiles; -cat >>confdefs.h <<_ACEOF -#define NETSNMP_DEFAULT_MIBFILES "$with_mibfiles" -_ACEOF +printf "%s\n" "#define NETSNMP_DEFAULT_MIBFILES \"$with_mibfiles\"" >>confdefs.h fi # Check whether --enable-mibfiles was given. -if test "${enable_mibfiles+set}" = set; then : +if test ${enable_mibfiles+y} +then : enableval=$enable_mibfiles; as_fn_error $? "Invalid option. Use --with-mibfiles/--without-mibfiles instead" "$LINENO" 5 fi @@ -5245,64 +5726,72 @@ fi ## # Check whether --enable-des was given. -if test "${enable_des+set}" = set; then : +if test ${enable_des+y} +then : enableval=$enable_des; fi # Check whether --with-des was given. -if test "${with_des+set}" = set; then : +if test ${with_des+y} +then : withval=$with_des; as_fn_error $? "Invalid option. Use --enable-des/--disable-des instead" "$LINENO" 5 fi if test "x$enable_des" = "xno"; then -$as_echo "#define NETSNMP_DISABLE_DES 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_DISABLE_DES 1" >>confdefs.h fi # Check whether --enable-privacy was given. -if test "${enable_privacy+set}" = set; then : +if test ${enable_privacy+y} +then : enableval=$enable_privacy; fi # Check whether --with-privacy was given. -if test "${with_privacy+set}" = set; then : +if test ${with_privacy+y} +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 +printf "%s\n" "#define NETSNMP_ENABLE_SCAPI_AUTHPRIV 1" >>confdefs.h fi # Check whether --enable-md5 was given. -if test "${enable_md5+set}" = set; then : +if test ${enable_md5+y} +then : enableval=$enable_md5; fi # Check whether --with-md5 was given. -if test "${with_md5+set}" = set; then : +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 -$as_echo "#define NETSNMP_DISABLE_MD5 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_DISABLE_MD5 1" >>confdefs.h fi # Check whether --enable-internal-md5 was given. -if test "${enable_internal_md5+set}" = set; then : +if test ${enable_internal_md5+y} +then : enableval=$enable_internal_md5; fi # Check whether --with-internal-md5 was given. -if test "${with_internal_md5+set}" = set; then : +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 @@ -5311,26 +5800,28 @@ if test "x$enable_internal_md5" = "xyes"; 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 +printf "%s\n" "#define NETSNMP_USE_INTERNAL_MD5 1" >>confdefs.h fi fi # Check whether --enable-blumenthal-aes was given. -if test "${enable_blumenthal_aes+set}" = set; then : +if test ${enable_blumenthal_aes+y} +then : enableval=$enable_blumenthal_aes; fi # Check whether --with-blumenthal-aes was given. -if test "${with_blumenthal_aes+set}" = set; then : +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 if test "x$enable_blumenthal_aes" = "xyes"; then if test "x$aes_capable" = "xyes"; then -$as_echo "#define NETSNMP_DRAFT_BLUMENTHAL_AES_04 1" >>confdefs.h +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 @@ -5344,49 +5835,56 @@ fi # Check whether --with-opaque-special-types was given. -if test "${with_opaque_special_types+set}" = set; then : +if test ${with_opaque_special_types+y} +then : withval=$with_opaque_special_types; fi # Check whether --enable-opaque-special-types was given. -if test "${enable_opaque_special_types+set}" = set; then : +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 # 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 +printf "%s\n" "#define NETSNMP_WITH_OPAQUE_SPECIAL_TYPES 1" >>confdefs.h fi # Check whether --enable-ipv6 was given. -if test "${enable_ipv6+set}" = set; then : +if test ${enable_ipv6+y} +then : enableval=$enable_ipv6; -else - enable_ipv6="yes" +else case e in #( + e) enable_ipv6="yes" ;; +esac fi # Check whether --with-ipv6 was given. -if test "${with_ipv6+set}" = set; then : +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 -$as_echo "#define NETSNMP_ENABLE_IPV6 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_ENABLE_IPV6 1" >>confdefs.h fi # Check whether --with-logfile was given. -if test "${with_logfile+set}" = set; then : +if test ${with_logfile+y} +then : withval=$with_logfile; ac_cv_user_prompt_NETSNMP_LOGFILE="$with_logfile" fi # Check whether --enable-logfile was given. -if test "${enable_logfile+set}" = set; then : +if test ${enable_logfile+y} +then : enableval=$enable_logfile; as_fn_error $? "Invalid option. Use --with-logfile/--without-logfile instead" "$LINENO" 5 fi @@ -5395,84 +5893,93 @@ if test "$ac_cv_user_prompt_NETSNMP_LOGFILE" = "no"; then fi # Check whether --enable-usmUser-uses-default-auth-priv was given. -if test "${enable_usmUser_uses_default_auth_priv+set}" = set; then : +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 -$as_echo "#define NETSNMP_FORCE_SYSTEM_V3_AUTHPRIV 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_FORCE_SYSTEM_V3_AUTHPRIV 1" >>confdefs.h fi fi # Check whether --with-usmUser-uses-default-auth-priv was given. -if test "${with_usmUser_uses_default_auth_priv+set}" = set; then : +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 # Check whether --enable-daemons-syslog-as-default was given. -if test "${enable_daemons_syslog_as_default+set}" = set; then : +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 -$as_echo "#define NETSNMP_DAEMONS_DEFAULT_LOG_SYSLOG 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_DAEMONS_DEFAULT_LOG_SYSLOG 1" >>confdefs.h fi fi # Check whether --with-daemons-syslog-as-default was given. -if test "${with_daemons_syslog_as_default+set}" = set; then : +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 # Check whether --with-persistent-directory was given. -if test "${with_persistent_directory+set}" = set; then : +if test ${with_persistent_directory+y} +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 : +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 # Check whether --with-persistent-mask was given. -if test "${with_persistent_mask+set}" = set; then : +if test ${with_persistent_mask+y} +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; } + { 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 - withval=077 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using default persistent mask $withval" >&5 -$as_echo "using default persistent mask $withval" >&6; } +else case e in #( + e) 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; } ;; +esac fi # Check whether --enable-persistent-mask was given. -if test "${enable_persistent_mask+set}" = set; then : +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 -cat >>confdefs.h <<_ACEOF -#define NETSNMP_PERSISTENT_MASK $withval -_ACEOF +printf "%s\n" "#define NETSNMP_PERSISTENT_MASK $withval" >>confdefs.h # Check whether --with-copy_persistent_files was given. -if test "${with_copy_persistent_files+set}" = set; then : +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 --enable-copy_persistent_files was given. -if test "${enable_copy_persistent_files+set}" = set; then : +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 @@ -5480,28 +5987,29 @@ fi default_temp_file_pattern="/tmp/snmpdXXXXXX" # Check whether --with-temp-file-pattern was given. -if test "${with_temp_file_pattern+set}" = set; then : +if test ${with_temp_file_pattern+y} +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; } + { 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 - 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; } +else case e in #( + e) 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; } ;; +esac fi # Check whether --enable-temp-file-pattern was given. -if test "${enable_temp_file_pattern+set}" = set; then : +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 -cat >>confdefs.h <<_ACEOF -#define NETSNMP_TEMP_FILE_PATTERN "$withval" -_ACEOF +printf "%s\n" "#define NETSNMP_TEMP_FILE_PATTERN \"$withval\"" >>confdefs.h @@ -5511,38 +6019,42 @@ _ACEOF SNMP_VERSIONS="" # Check whether --enable-snmpv1 was given. -if test "${enable_snmpv1+set}" = set; then : +if test ${enable_snmpv1+y} +then : enableval=$enable_snmpv1; fi # Check whether --with-snmpv1 was given. -if test "${with_snmpv1+set}" = set; then : +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 -$as_echo "#define NETSNMP_DISABLE_SNMPV1 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_DISABLE_SNMPV1 1" >>confdefs.h else SNMP_VERSIONS="$SNMP_VERSIONS 1" fi # Check whether --enable-snmpv2c was given. -if test "${enable_snmpv2c+set}" = set; then : +if test ${enable_snmpv2c+y} +then : enableval=$enable_snmpv2c; fi # Check whether --with-snmpv2c was given. -if test "${with_snmpv2c+set}" = set; then : +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 -$as_echo "#define NETSNMP_DISABLE_SNMPV2C 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_DISABLE_SNMPV2C 1" >>confdefs.h else SNMP_VERSIONS="$SNMP_VERSIONS 2c" @@ -5557,12 +6069,14 @@ EOF # Check whether --with-default-snmp-version was given. -if test "${with_default_snmp_version+set}" = set; then : +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 --enable-default-snmp-version was given. -if test "${enable_default_snmp_version+set}" = set; then : +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 @@ -5584,13 +6098,15 @@ esac # Check whether --with-transports was given. -if test "${with_transports+set}" = set; then : +if test ${with_transports+y} +then : withval=$with_transports; fi # Check whether --with-out_transports was given. -if test "${with_out_transports+set}" = set; then : +if test ${with_out_transports+y} +then : withval=$with_out_transports; fi @@ -5600,13 +6116,15 @@ fi # # Check whether --with-transport was given. -if test "${with_transport+set}" = set; then : +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 --with-out-transport was given. -if test "${with_out_transport+set}" = set; then : +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 @@ -5618,24 +6136,28 @@ fi # Check whether --with-security-modules was given. -if test "${with_security_modules+set}" = set; then : +if test ${with_security_modules+y} +then : withval=$with_security_modules; fi # Check whether --enable-security-modules was given. -if test "${enable_security_modules+set}" = set; then : +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 # Check whether --with-out-security-modules was given. -if test "${with_out_security_modules+set}" = set; then : +if test ${with_out_security_modules+y} +then : withval=$with_out_security_modules; fi # Check whether --enable-out-security-modules was given. -if test "${enable_out_security_modules+set}" = set; then : +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 @@ -5646,24 +6168,27 @@ fi ## # 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 +if test ${enable_debugging+y} +then : + enableval=$enable_debugging; printf "%s\n" "#define NETSNMP_ALWAYS_DEBUG 1" >>confdefs.h fi # Check whether --with-debugging was given. -if test "${with_debugging+set}" = set; then : +if test ${with_debugging+y} +then : withval=$with_debugging; as_fn_error $? "Invalid option. Use --enable-debugging/--disable-debugging instead" "$LINENO" 5 fi if test "x$enable_debugging" = "xno"; then - $as_echo "#define NETSNMP_NO_DEBUGGING 1" >>confdefs.h + printf "%s\n" "#define NETSNMP_NO_DEBUGGING 1" >>confdefs.h fi # Check whether --enable-developer was given. -if test "${enable_developer+set}" = set; then : +if test ${enable_developer+y} +then : enableval=$enable_developer; if test "$enableval" = yes ; then developer="yes" elif test "$enableval" != no ; then @@ -5675,16 +6200,18 @@ fi # Check whether --with-developer was given. -if test "${with_developer+set}" = set; then : +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 --enable-testing-code was given. -if test "${enable_testing_code+set}" = set; then : +if test ${enable_testing_code+y} +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_ENABLE_TESTING_CODE 1" >>confdefs.h elif test "$enableval" != no ; then as_fn_error $? "Please use --enable/--disable-testing-code" "$LINENO" 5 @@ -5693,43 +6220,49 @@ fi # Check whether --with-testing-code was given. -if test "${with_testing_code+set}" = set; then : +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 --enable-reentrant was given. -if test "${enable_reentrant+set}" = set; then : +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 - with_res_locks="no" +else case e in #( + e) with_res_locks="no" ;; +esac fi # Check whether --with-reentrant was given. -if test "${with_reentrant+set}" = set; then : +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 --enable-deprecated was given. -if test "${enable_deprecated+set}" = set; then : +if test ${enable_deprecated+y} +then : enableval=$enable_deprecated; fi # Check whether --with-deprecated was given. -if test "${with_deprecated+set}" = set; then : +if test ${with_deprecated+y} +then : withval=$with_deprecated; as_fn_error $? "Invalid option. Use --enable-deprecated/--disable-deprecated instead" "$LINENO" 5 fi if test "$enable_deprecated" = no ; then -$as_echo "#define NETSNMP_NO_DEPRECATED_FUNCTIONS 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_NO_DEPRECATED_FUNCTIONS 1" >>confdefs.h fi @@ -5741,114 +6274,128 @@ fi # Check whether --with-root-access was given. -if test "${with_root_access+set}" = set; then : +if test ${with_root_access+y} +then : withval=$with_root_access; fi # Check whether --enable-root-access was given. -if test "${enable_root_access+set}" = set; then : +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 -$as_echo "#define NETSNMP_NO_ROOT_ACCESS 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_NO_ROOT_ACCESS 1" >>confdefs.h fi # Check whether --with-kmem-usage was given. -if test "${with_kmem_usage+set}" = set; then : +if test ${with_kmem_usage+y} +then : withval=$with_kmem_usage; fi # Check whether --enable-kmem-usage was given. -if test "${enable_kmem_usage+set}" = set; then : +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 -$as_echo "#define NETSNMP_NO_KMEM_USAGE 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_NO_KMEM_USAGE 1" >>confdefs.h fi # Check whether --with-dummy-values was given. -if test "${with_dummy_values+set}" = set; then : +if test ${with_dummy_values+y} +then : withval=$with_dummy_values; fi # Check whether --enable-dummy-values was given. -if test "${enable_dummy_values+set}" = set; then : +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 -$as_echo "#define NETSNMP_NO_DUMMY_VALUES 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_NO_DUMMY_VALUES 1" >>confdefs.h fi # Check whether --with-systemd was given. -if test "${with_systemd+set}" = set; then : +if test ${with_systemd+y} +then : withval=$with_systemd; fi # Check whether --enable-systemd was given. -if test "${enable_systemd+set}" = set; then : +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 -$as_echo "#define NETSNMP_NO_SYSTEMD 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_NO_SYSTEMD 1" >>confdefs.h fi # Check whether --enable-set-support was given. -if test "${enable_set_support+set}" = set; then : +if test ${enable_set_support+y} +then : enableval=$enable_set_support; fi # Check whether --with-set-support was given. -if test "${with_set_support+set}" = set; then : +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 -$as_echo "#define NETSNMP_DISABLE_SET_SUPPORT 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_DISABLE_SET_SUPPORT 1" >>confdefs.h fi # Check whether --with-sys_contact was given. -if test "${with_sys_contact+set}" = set; then : +if test ${with_sys_contact+y} +then : withval=$with_sys_contact; ac_cv_user_prompt_NETSNMP_SYS_CONTACT="$with_sys_contact" fi # Check whether --enable-sys_contact was given. -if test "${enable_sys_contact+set}" = set; then : +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 --with-sys_location was given. -if test "${with_sys_location+set}" = set; then : +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+set}" = set; then : +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 @@ -5860,80 +6407,87 @@ fi ## # Check whether --enable-local-smux was given. -if test "${enable_local_smux+set}" = set; then : +if test ${enable_local_smux+y} +then : enableval=$enable_local_smux; if test "x$enable_local_smux" = "xyes"; then -$as_echo "#define NETSNMP_ENABLE_LOCAL_SMUX 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_ENABLE_LOCAL_SMUX 1" >>confdefs.h fi fi # Check whether --with-local-smux was given. -if test "${with_local_smux+set}" = set; then : +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+set}" = set; then : +if test ${enable_agentx_dom_sock_only+y} +then : enableval=$enable_agentx_dom_sock_only; -$as_echo "#define NETSNMP_AGENTX_DOM_SOCK_ONLY 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_AGENTX_DOM_SOCK_ONLY 1" >>confdefs.h fi # Check whether --with-agentx-dom-sock-only was given. -if test "${with_agentx_dom_sock_only+set}" = set; then : +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 --enable-snmptrapd-subagent was given. -if test "${enable_snmptrapd_subagent+set}" = set; then : +if test ${enable_snmptrapd_subagent+y} +then : enableval=$enable_snmptrapd_subagent; fi # Check whether --with-snmptrapd-subagent was given. -if test "${with_snmptrapd_subagent+set}" = set; then : +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 -$as_echo "#define NETSNMP_SNMPTRAPD_DISABLE_AGENTX 1" >>confdefs.h +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+set}" = set; then : +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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using AgentX socket $withval" >&5 -$as_echo "using AgentX socket $withval" >&6; } - -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using AgentX socket $withval" >&5 +printf "%s\n" "using AgentX socket $withval" >&6; } +else case e in #( + e) 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; } - + { 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; } + ;; +esac fi # Check whether --enable-agentx-socket was given. -if test "${enable_agentx_socket+set}" = set; then : +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 -cat >>confdefs.h <<_ACEOF -#define NETSNMP_AGENTX_SOCKET "$withval" -_ACEOF +printf "%s\n" "#define NETSNMP_AGENTX_SOCKET \"$withval\"" >>confdefs.h # @@ -5942,19 +6496,21 @@ _ACEOF FEATURE_ADD_FLAGS="" # Check whether --with-features was given. -if test "${with_features+set}" = set; then : +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" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding in features: $withval" >&5 -$as_echo "adding in features: $withval" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: adding in features: $withval" >&5 +printf "%s\n" "adding in features: $withval" >&6; } fi # Check whether --enable-features was given. -if test "${enable_features+set}" = set; then : +if test ${enable_features+y} +then : enableval=$enable_features; as_fn_error $? "Invalid option. Use --with-features/--without-features instead" "$LINENO" 5 fi @@ -5964,7 +6520,8 @@ fi FEATURE_REMOVE_FLAGS="" # Check whether --with-out-features was given. -if test "${with_out_features+set}" = set; then : +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; @@ -5972,15 +6529,16 @@ if test "${with_out_features+set}" = set; then : FEATURE_REMOVE_FLAGS="--remove $withval" FEATURETARGS="features" -$as_echo "#define NETSNMP_MINIMAL_CODE 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_MINIMAL_CODE 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: removing features: $withval" >&5 -$as_echo "removing features: $withval" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: removing features: $withval" >&5 +printf "%s\n" "removing features: $withval" >&6; } fi # Check whether --enable-out-features was given. -if test "${enable_out_features+set}" = set; then : +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 @@ -5990,26 +6548,30 @@ fi # Catch common mistakes # Check whether --with-feature was given. -if test "${with_feature+set}" = set; then : +if test ${with_feature+y} +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 : +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 FEATURETARGS="" # Check whether --enable-minimalist was given. -if test "${enable_minimalist+set}" = set; then : +if test ${enable_minimalist+y} +then : enableval=$enable_minimalist; fi # Check whether --with-minimalist was given. -if test "${with_minimalist+set}" = set; then : +if test ${with_minimalist+y} +then : withval=$with_minimalist; as_fn_error $? "Invalid option. Use --enable-minimalist/--disable-minimalist instead" "$LINENO" 5 fi @@ -6021,14 +6583,15 @@ if test "x$enable_minimalist" = "xyes"; then # needed to bootstrap later checks echo "" > include/net-snmp/feature-details.h -$as_echo "#define NETSNMP_MINIMAL_CODE 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_MINIMAL_CODE 1" >>confdefs.h else FEATUREHEADERS="" fi # Check whether --with-minimalist was given. -if test "${with_minimalist+set}" = set; then : +if test ${with_minimalist+y} +then : withval=$with_minimalist; as_fn_error $? "Invalid option. Use --enable-minimalist/--disable-minimalist instead" "$LINENO" 5 fi @@ -6036,87 +6599,99 @@ fi # Check whether --enable-notify-only was given. -if test "${enable_notify_only+set}" = set; then : +if test ${enable_notify_only+y} +then : enableval=$enable_notify_only; fi # Check whether --with-notify-only was given. -if test "${with_notify_only+set}" = set; then : +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 if test "x$enable_notify_only" = "xyes"; then -$as_echo "#define NETSNMP_NOTIFY_ONLY 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_NOTIFY_ONLY 1" >>confdefs.h fi # Check whether --with-notify-only was given. -if test "${with_notify_only+set}" = set; then : +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+set}" = set; then : +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 # Check whether --enable-no-listen was given. -if test "${enable_no_listen+set}" = set; then : +if test ${enable_no_listen+y} +then : enableval=$enable_no_listen; fi # Check whether --with-no-listen was given. -if test "${with_no_listen+set}" = set; then : +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" -$as_echo "#define NETSNMP_NO_LISTEN_SUPPORT 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_NO_LISTEN_SUPPORT 1" >>confdefs.h fi # Check whether --with-no-listen was given. -if test "${with_no_listen+set}" = set; then : +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+set}" = set; then : +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 # Check whether --enable-read-only was given. -if test "${enable_read_only+set}" = set; then : +if test ${enable_read_only+y} +then : enableval=$enable_read_only; fi # Check whether --with-read-only was given. -if test "${with_read_only+set}" = set; then : +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" -$as_echo "#define NETSNMP_NO_WRITE_SUPPORT 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_NO_WRITE_SUPPORT 1" >>confdefs.h fi # Check whether --with-read-only was given. -if test "${with_read_only+set}" = set; then : +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 # Check whether --enable-readonly was given. -if test "${enable_readonly+set}" = set; then : +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 @@ -6127,13 +6702,15 @@ fi ## # Check whether --enable-mini_agent was given. -if test "${enable_mini_agent+set}" = set; then : +if test ${enable_mini_agent+y} +then : enableval=$enable_mini_agent; fi # Check whether --with-mini_agent was given. -if test "${with_mini_agent+set}" = set; then : +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 @@ -6144,12 +6721,14 @@ else fi # Check whether --with-miniagent was given. -if test "${with_miniagent+set}" = set; then : +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+set}" = set; then : +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 @@ -6158,43 +6737,49 @@ fi # Check whether --enable-mfd-rewrites was given. -if test "${enable_mfd_rewrites+set}" = set; then : +if test ${enable_mfd_rewrites+y} +then : enableval=$enable_mfd_rewrites; fi # Check whether --with-mfd-rewrites was given. -if test "${with_mfd_rewrites+set}" = set; then : +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 -$as_echo "#define NETSNMP_ENABLE_MFD_REWRITES 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_ENABLE_MFD_REWRITES 1" >>confdefs.h fi # Check whether --with-mib_modules was given. -if test "${with_mib_modules+set}" = set; then : +if test ${with_mib_modules+y} +then : withval=$with_mib_modules; fi # Check whether --enable-mib_modules was given. -if test "${enable_mib_modules+set}" = set; then : +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 # Check whether --with-out_mib_modules was given. -if test "${with_out_mib_modules+set}" = set; then : +if test ${with_out_mib_modules+y} +then : withval=$with_out_mib_modules; fi # Check whether --enable-out_mib_modules was given. -if test "${enable_out_mib_modules+set}" = set; then : +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 @@ -6205,38 +6790,44 @@ fi # # Check whether --with-mib-module was given. -if test "${with_mib_module+set}" = set; then : +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 # Check whether --with-module was given. -if test "${with_module+set}" = set; then : +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 # Check whether --with-modules was given. -if test "${with_modules+set}" = set; then : +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 # Check whether --with-out-mib-module was given. -if test "${with_out_mib_module+set}" = set; then : +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+set}" = set; then : +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 # Check whether --with-out-modules was given. -if test "${with_out_modules+set}" = set; then : +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 @@ -6248,113 +6839,104 @@ fi # Check whether --with-enterprise-oid was given. -if test "${with_enterprise_oid+set}" = set; then : +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 - cat >>confdefs.h <<_ACEOF -#define NETSNMP_ENTERPRISE_OID $withval -_ACEOF + printf "%s\n" "#define NETSNMP_ENTERPRISE_OID $withval" >>confdefs.h ent_oid="1,3,6,1,4,1,$withval" - cat >>confdefs.h <<_ACEOF -#define NETSNMP_ENTERPRISE_MIB $ent_oid -_ACEOF + printf "%s\n" "#define NETSNMP_ENTERPRISE_MIB $ent_oid" >>confdefs.h 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; } - -else + printf "%s\n" "#define NETSNMP_ENTERPRISE_DOT_MIB $ent_dot_oid" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using default \"enterprise.net-snmp\"" >&5 -$as_echo "using default \"enterprise.net-snmp\"" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using enterprise number $withval" >&5 +printf "%s\n" "using enterprise number $withval" >&6; } +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using default \"enterprise.net-snmp\"" >&5 +printf "%s\n" "using default \"enterprise.net-snmp\"" >&6; } + ;; +esac fi # Check whether --enable-enterprise-oid was given. -if test "${enable_enterprise_oid+set}" = set; then : +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 # Check whether --with-enterprise-sysoid was given. -if test "${with_enterprise_sysoid+set}" = set; then : +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 sys_oid=`echo "$withval" | sed 's/^\.//' | sed 's/\./\,/g'` - cat >>confdefs.h <<_ACEOF -#define NETSNMP_SYSTEM_MIB $sys_oid -_ACEOF + printf "%s\n" "#define NETSNMP_SYSTEM_MIB $sys_oid" >>confdefs.h sys_dot_oid=`echo "$withval" | sed 's/^\.//'` - cat >>confdefs.h <<_ACEOF -#define NETSNMP_SYSTEM_DOT_MIB $sys_dot_oid -_ACEOF + printf "%s\n" "#define NETSNMP_SYSTEM_DOT_MIB $sys_dot_oid" >>confdefs.h sysoid_len=`echo "$withval" | sed 's/^\.//g' | awk -F\. '{ print NF }'` - cat >>confdefs.h <<_ACEOF -#define NETSNMP_SYSTEM_DOT_MIB_LENGTH $sysoid_len -_ACEOF + printf "%s\n" "#define NETSNMP_SYSTEM_DOT_MIB_LENGTH $sysoid_len" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using enterprise sysOID $withval ...." >&5 -$as_echo "using enterprise sysOID $withval ...." >&6; } - -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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using enterprise sysOID $withval ...." >&5 +printf "%s\n" "using enterprise sysOID $withval ...." >&6; } +else case e in #( + e) + { 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; } + ;; +esac fi # Check whether --enable-enterprise-sysoid was given. -if test "${enable_enterprise_sysoid+set}" = set; then : +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 # Check whether --with-enterprise-notification-oid was given. -if test "${with_enterprise_notification_oid+set}" = set; then : +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 notification_oid=`echo "$withval" | sed 's/^\.//' | sed 's/\./\,/g'` - cat >>confdefs.h <<_ACEOF -#define NETSNMP_NOTIFICATION_MIB $notification_oid -_ACEOF + printf "%s\n" "#define NETSNMP_NOTIFICATION_MIB $notification_oid" >>confdefs.h notification_dot_oid=`echo "$withval" | sed 's/^\.//'` - cat >>confdefs.h <<_ACEOF -#define NETSNMP_NOTIFICATION_DOT_MIB $notification_dot_oid -_ACEOF + printf "%s\n" "#define NETSNMP_NOTIFICATION_DOT_MIB $notification_dot_oid" >>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 - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using enterprise notifications $withval" >&5 -$as_echo "using enterprise notifications $withval" >&6; } + printf "%s\n" "#define NETSNMP_NOTIFICATION_DOT_MIB_LENGTH $notificationoid_len" >>confdefs.h -else - - { $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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using enterprise notifications $withval" >&5 +printf "%s\n" "using enterprise notifications $withval" >&6; } +else case e in #( + e) + { 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; } + ;; +esac fi # Check whether --enable-enterprise-notification-oid was given. -if test "${enable_enterprise_notification_oid+set}" = set; then : +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 @@ -6366,7 +6948,8 @@ fi # Check whether --with-perl-modules was given. -if test "${with_perl_modules+set}" = set; then : +if test ${with_perl_modules+y} +then : withval=$with_perl_modules; if test "$withval" = "no"; then install_perl="no" @@ -6377,38 +6960,45 @@ if test "${with_perl_modules+set}" = set; then : fi fi -else - install_perl="try" +else case e in #( + e) install_perl="try" ;; +esac fi # Check whether --enable-perl-modules was given. -if test "${enable_perl_modules+set}" = set; then : +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 # Check whether --enable-embedded-perl was given. -if test "${enable_embedded_perl+set}" = set; then : +if test ${enable_embedded_perl+y} +then : enableval=$enable_embedded_perl; embed_perl="$enableval" -else - embed_perl="try" +else case e in #( + e) embed_perl="try" ;; +esac fi # Check whether --with-embedded-perl was given. -if test "${with_embedded_perl+set}" = set; then : +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 # Check whether --enable-perl-cc-checks was given. -if test "${enable_perl_cc_checks+set}" = set; then : +if test ${enable_perl_cc_checks+y} +then : enableval=$enable_perl_cc_checks; fi # Check whether --with-perl-cc-checks was given. -if test "${with_perl_cc_checks+set}" = set; then : +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 @@ -6420,7 +7010,8 @@ fi # Check whether --with-python-modules was given. -if test "${with_python_modules+set}" = set; then : +if test ${with_python_modules+y} +then : withval=$with_python_modules; install_python="yes" if test "$withval" = "yes"; then @@ -6432,8 +7023,9 @@ if test "${with_python_modules+set}" = set; then : PYTHONARGS="$withval" fi -else - install_python="no" +else case e in #( + e) install_python="no" ;; +esac fi @@ -6444,88 +7036,92 @@ fi # Check whether --with-server-send-buf was given. -if test "${with_server_send_buf+set}" = set; then : +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 - cat >>confdefs.h <<_ACEOF -#define NETSNMP_DEFAULT_SERVER_SEND_BUF $withval -_ACEOF + printf "%s\n" "#define NETSNMP_DEFAULT_SERVER_SEND_BUF $withval" >>confdefs.h -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; } +else case e in #( + e) { 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; } ;; +esac fi # Check whether --enable-server-send-buf was given. -if test "${enable_server_send_buf+set}" = set; then : +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 # Check whether --with-server-recv-buf was given. -if test "${with_server_recv_buf+set}" = set; then : +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 - cat >>confdefs.h <<_ACEOF -#define NETSNMP_DEFAULT_SERVER_RECV_BUF $withval -_ACEOF + printf "%s\n" "#define NETSNMP_DEFAULT_SERVER_RECV_BUF $withval" >>confdefs.h -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; } +else case e in #( + e) { 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; } ;; +esac fi # Check whether --enable-server-recv-buf was given. -if test "${enable_server_recv_buf+set}" = set; then : +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 # Check whether --with-client-send-buf was given. -if test "${with_client_send_buf+set}" = set; then : +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 - cat >>confdefs.h <<_ACEOF -#define NETSNMP_DEFAULT_CLIENT_SEND_BUF $withval -_ACEOF + printf "%s\n" "#define NETSNMP_DEFAULT_CLIENT_SEND_BUF $withval" >>confdefs.h -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; } +else case e in #( + e) { 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; } ;; +esac fi # Check whether --enable-client-send-buf was given. -if test "${enable_client_send_buf+set}" = set; then : +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 # Check whether --with-client-recv-buf was given. -if test "${with_client_recv_buf+set}" = set; then : +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 - cat >>confdefs.h <<_ACEOF -#define NETSNMP_DEFAULT_CLIENT_RECV_BUF $withval -_ACEOF + printf "%s\n" "#define NETSNMP_DEFAULT_CLIENT_RECV_BUF $withval" >>confdefs.h -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; } +else case e in #( + e) { 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; } ;; +esac fi # Check whether --enable-client-recv-buf was given. -if test "${enable_client_recv_buf+set}" = set; then : +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 @@ -6536,73 +7132,87 @@ fi # Check whether --with-elf was given. -if test "${with_elf+set}" = set; then : +if test ${with_elf+y} +then : withval=$with_elf; fi # Check whether --enable-elf was given. -if test "${enable_elf+set}" = set; then : +if test ${enable_elf+y} +then : enableval=$enable_elf; as_fn_error $? "Invalid option. Use --with-elf/--without-elf instead" "$LINENO" 5 fi # Check whether --with-nl was given. -if test "${with_nl+set}" = set; then : +if test ${with_nl+y} +then : withval=$with_nl; fi # Check whether --enable-nl was given. -if test "${enable_nl+set}" = set; then : +if test ${enable_nl+y} +then : enableval=$enable_nl; as_fn_error $? "Invalid option. Use --with-nl/--without-nl instead" "$LINENO" 5 fi # Check whether --with-libwrap was given. -if test "${with_libwrap+set}" = set; then : +if test ${with_libwrap+y} +then : withval=$with_libwrap; -else - with_libwrap="no" +else case e in #( + e) with_libwrap="no" ;; +esac fi # Check whether --enable-libwrap was given. -if test "${enable_libwrap+set}" = set; then : +if test ${enable_libwrap+y} +then : enableval=$enable_libwrap; as_fn_error $? "Invalid option. Use --with-libwrap/--without-libwrap instead" "$LINENO" 5 fi # Check whether --with-zlib was given. -if test "${with_zlib+set}" = set; then : +if test ${with_zlib+y} +then : withval=$with_zlib; -else - with_zlib="no" +else case e in #( + e) with_zlib="no" ;; +esac fi # Check whether --enable-zlib was given. -if test "${enable_zlib+set}" = set; then : +if test ${enable_zlib+y} +then : enableval=$enable_zlib; as_fn_error $? "Invalid option. Use --with-zlib/--without-zlib instead" "$LINENO" 5 fi # Check whether --with-bzip2 was given. -if test "${with_bzip2+set}" = set; then : +if test ${with_bzip2+y} +then : withval=$with_bzip2; -else - with_bzip2="no" +else case e in #( + e) with_bzip2="no" ;; +esac fi # Check whether --with-mnttab was given. -if test "${with_mnttab+set}" = set; then : +if test ${with_mnttab+y} +then : withval=$with_mnttab; fi # Check whether --enable-mnttab was given. -if test "${enable_mnttab+set}" = set; then : +if test ${enable_mnttab+y} +then : enableval=$enable_mnttab; as_fn_error $? "Invalid option. Use --with-mnttab/--without-mnttab instead" "$LINENO" 5 fi @@ -6613,18 +7223,20 @@ fi # Check whether --with-mysql was given. -if test "${with_mysql+set}" = set; then : +if test ${with_mysql+y} +then : withval=$with_mysql; fi # Check whether --enable-mysql was given. -if test "${enable_mysql+set}" = set; then : +if test ${enable_mysql+y} +then : enableval=$enable_mysql; as_fn_error $? "Invalid option. Use --with-mysql/--without-mysql 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_USE_MYSQL 1" >>confdefs.h fi @@ -6642,14 +7254,15 @@ export CFLAGS # 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 - +{ 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 case e in #( + e) if test "x$defaults" = "xno"; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ************** Configuration Section ************** @@ -6664,7 +7277,7 @@ will be overwritten. -Press return to continue- " >&5 -$as_echo "$as_me: +printf "%s\n" "$as_me: ************** Configuration Section ************** @@ -6685,10 +7298,11 @@ ac_cv_have_warned="yes" else ac_cv_have_warned="no" fi - + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_warned" >&5 -$as_echo "$ac_cv_have_warned" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_warned" >&5 +printf "%s\n" "$ac_cv_have_warned" >&6; } else ac_cv_have_warned="yes" fi @@ -6703,12 +7317,13 @@ 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 +{ 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 case e in #( + e) echo "" >&6 if test "x$defaults" = "xno"; then echo $ECHO_N " @@ -6744,20 +7359,17 @@ fi eval ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION=\$NETSNMP_DEFAULT_SNMP_VERSION echo $ECHO_N "setting $MSG_CHECK to... $ECHO_C" >&6 - + ;; +esac 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; } +{ 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 - cat >>confdefs.h <<_ACEOF -#define NETSNMP_DEFAULT_SNMP_VERSION "$ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION" -_ACEOF + printf "%s\n" "#define NETSNMP_DEFAULT_SNMP_VERSION \"$ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION\"" >>confdefs.h else - cat >>confdefs.h <<_ACEOF -#define NETSNMP_DEFAULT_SNMP_VERSION $ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION -_ACEOF + printf "%s\n" "#define NETSNMP_DEFAULT_SNMP_VERSION $ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION" >>confdefs.h fi fi @@ -6774,12 +7386,13 @@ esac 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 +{ 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 case e in #( + e) echo "" >&6 if test "x$defaults" = "xno"; then echo $ECHO_N " @@ -6806,20 +7419,17 @@ fi eval ac_cv_user_prompt_NETSNMP_SYS_CONTACT=\$NETSNMP_SYS_CONTACT echo $ECHO_N "setting $MSG_CHECK to... $ECHO_C" >&6 - + ;; +esac 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; } +{ 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 - cat >>confdefs.h <<_ACEOF -#define NETSNMP_SYS_CONTACT "$ac_cv_user_prompt_NETSNMP_SYS_CONTACT" -_ACEOF + printf "%s\n" "#define NETSNMP_SYS_CONTACT \"$ac_cv_user_prompt_NETSNMP_SYS_CONTACT\"" >>confdefs.h else - cat >>confdefs.h <<_ACEOF -#define NETSNMP_SYS_CONTACT $ac_cv_user_prompt_NETSNMP_SYS_CONTACT -_ACEOF + printf "%s\n" "#define NETSNMP_SYS_CONTACT $ac_cv_user_prompt_NETSNMP_SYS_CONTACT" >>confdefs.h fi fi @@ -6827,12 +7437,13 @@ 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 +{ 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 case e in #( + e) echo "" >&6 if test "x$defaults" = "xno"; then echo $ECHO_N " @@ -6858,20 +7469,17 @@ fi eval ac_cv_user_prompt_NETSNMP_SYS_LOC=\$NETSNMP_SYS_LOC echo $ECHO_N "setting $MSG_CHECK to... $ECHO_C" >&6 - + ;; +esac 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; } +{ 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 - cat >>confdefs.h <<_ACEOF -#define NETSNMP_SYS_LOC "$ac_cv_user_prompt_NETSNMP_SYS_LOC" -_ACEOF + printf "%s\n" "#define NETSNMP_SYS_LOC \"$ac_cv_user_prompt_NETSNMP_SYS_LOC\"" >>confdefs.h else - cat >>confdefs.h <<_ACEOF -#define NETSNMP_SYS_LOC $ac_cv_user_prompt_NETSNMP_SYS_LOC -_ACEOF + printf "%s\n" "#define NETSNMP_SYS_LOC $ac_cv_user_prompt_NETSNMP_SYS_LOC" >>confdefs.h fi fi @@ -6885,12 +7493,13 @@ 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 +{ 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 case e in #( + e) echo "" >&6 if test "x$defaults" = "xno"; then echo $ECHO_N " @@ -6917,20 +7526,17 @@ fi eval ac_cv_user_prompt_NETSNMP_LOGFILE=\$NETSNMP_LOGFILE echo $ECHO_N "setting $MSG_CHECK to... $ECHO_C" >&6 - + ;; +esac 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; } +{ 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 - cat >>confdefs.h <<_ACEOF -#define NETSNMP_LOGFILE "$ac_cv_user_prompt_NETSNMP_LOGFILE" -_ACEOF + printf "%s\n" "#define NETSNMP_LOGFILE \"$ac_cv_user_prompt_NETSNMP_LOGFILE\"" >>confdefs.h else - cat >>confdefs.h <<_ACEOF -#define NETSNMP_LOGFILE $ac_cv_user_prompt_NETSNMP_LOGFILE -_ACEOF + printf "%s\n" "#define NETSNMP_LOGFILE $ac_cv_user_prompt_NETSNMP_LOGFILE" >>confdefs.h fi fi @@ -6946,12 +7552,13 @@ fi 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" "$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 case e in #( + e) echo "" >&6 if test "x$defaults" = "xno"; then echo $ECHO_N " @@ -6982,20 +7589,17 @@ fi eval ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY=\$NETSNMP_PERSISTENT_DIRECTORY echo $ECHO_N "setting $MSG_CHECK to... $ECHO_C" >&6 - + ;; +esac 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; } +{ 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 - cat >>confdefs.h <<_ACEOF -#define NETSNMP_PERSISTENT_DIRECTORY "$ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY" -_ACEOF + printf "%s\n" "#define NETSNMP_PERSISTENT_DIRECTORY \"$ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY\"" >>confdefs.h else - cat >>confdefs.h <<_ACEOF -#define NETSNMP_PERSISTENT_DIRECTORY $ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY -_ACEOF + printf "%s\n" "#define NETSNMP_PERSISTENT_DIRECTORY $ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY" >>confdefs.h fi fi @@ -7007,12 +7611,13 @@ UCDPERSISTENT_DIRECTORY=$ucddefaultstore 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 - +{ 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 case e in #( + e) if test "x$defaults" = "xno"; then echo $ECHO_N " @@ -7038,10 +7643,11 @@ tmpinput=""yes"" eval ac_cv_user_prompt_COPY_PERSISTENT_FILES=\"$tmpinput\" fi - + ;; +esac 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; } +{ 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 ac_cv_user_prompt_COPY_PERSISTENT_FILES="no" fi @@ -7062,15 +7668,15 @@ COPY_PERSISTENT_FILES="$ac_cv_user_prompt_COPY_PERSISTENT_FILES" # 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; } +{ 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 - { $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_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; } if test "x$1" = "x"; then exec /bin/ksh $0 else @@ -7078,8 +7684,8 @@ $as_echo "yes" >&6; } fi 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; } fi @@ -7087,12 +7693,84 @@ fi # Standard and path program checks: ## -{ $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 +{ 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 case e in #( + e) 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 - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + ac_cv_path_GREP=$GREP +fi + ;; +esac +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" + + +{ 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 case e in #( + e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then @@ -7102,25 +7780,31 @@ else 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 + 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" + 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 +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" + printf %s 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" + 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 @@ -7147,44 +7831,54 @@ else ac_cv_path_EGREP=$EGREP fi - fi + fi ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } +{ 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" + EGREP_TRADITIONAL=$EGREP + ac_cv_path_EGREP_TRADITIONAL=$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 +{ 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 case e in #( + e) 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 + 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" + 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 +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" + printf %s 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" + 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 @@ -7210,43 +7904,17 @@ IFS=$as_save_IFS else ac_cv_path_GREP=$GREP fi - + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } +{ 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" -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 -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. -# Find a good install program. We prefer a C program (faster), + # 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 @@ -7260,20 +7928,25 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # 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; } +{ 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 ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +if test ${ac_cv_path_install+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) 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]/* | \ + 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/* ) ;; @@ -7283,13 +7956,13 @@ case $as_dir/ in #(( # 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 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 + 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 + 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 @@ -7297,12 +7970,12 @@ case $as_dir/ in #(( 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" && + 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" + ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" break 3 fi fi @@ -7316,9 +7989,10 @@ esac IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir - + ;; +esac fi - if test "${ac_cv_path_install+set}" = set; then + 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 @@ -7328,8 +8002,8 @@ fi INSTALL=$ac_install_sh fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +printf "%s\n" "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -7339,25 +8013,26 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } +{ 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 - { $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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +printf "%s\n" "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; } +{ 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=`$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 +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 case e in #( + e) cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' @@ -7369,24 +8044,26 @@ case `${MAKE-make} -f conftest.make 2>/dev/null` in *) eval ac_cv_prog_make_${ac_make}_set=no;; esac -rm -f conftest.make +rm -f conftest.make ;; +esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } SET_MAKE= 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; } SET_MAKE="MAKE=${MAKE-make}" 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/ +{ 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 case e in #( + e) 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 @@ -7399,25 +8076,31 @@ else 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_prog in sed gsed + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + 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 +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" + printf %s 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" + 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 @@ -7443,10 +8126,11 @@ IFS=$as_save_IFS else ac_cv_path_SED=$SED fi - + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } +{ 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 @@ -7455,38 +8139,44 @@ 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 +{ 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 case e in #( + e) 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=. + 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 as_fn_executable_p "$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 + 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 ;; +esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5 +printf "%s\n" "$FILE" >&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 @@ -7506,38 +8196,44 @@ 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 +{ 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 case e in #( + e) 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=. + 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 as_fn_executable_p "$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 + 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 ;; +esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5 +printf "%s\n" "$FIND" >&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 @@ -7548,38 +8244,44 @@ 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 +{ 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 case e in #( + e) 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=. + 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 as_fn_executable_p "$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 + 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 ;; +esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WHOAMI" >&5 +printf "%s\n" "$WHOAMI" >&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 @@ -7590,12 +8292,13 @@ test -n "$WHOAMI" || WHOAMI="whoami" # 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 +{ 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 case e in #( + e) case $AUTOCONF in [\\/]* | ?:[\\/]*) ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a path. ;; @@ -7604,11 +8307,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 as_fn_executable_p "$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 + 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 @@ -7617,26 +8324,28 @@ IFS=$as_save_IFS test -z "$ac_cv_path_AUTOCONF" && ac_cv_path_AUTOCONF=":" ;; +esac ;; esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AUTOCONF" >&5 +printf "%s\n" "$AUTOCONF" >&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 # 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 +{ 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 case e in #( + e) case $AUTOHEADER in [\\/]* | ?:[\\/]*) ac_cv_path_AUTOHEADER="$AUTOHEADER" # Let the user override the test with a path. ;; @@ -7645,11 +8354,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 as_fn_executable_p "$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 + 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 @@ -7658,26 +8371,28 @@ IFS=$as_save_IFS test -z "$ac_cv_path_AUTOHEADER" && ac_cv_path_AUTOHEADER=":" ;; +esac ;; esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AUTOHEADER" >&5 +printf "%s\n" "$AUTOHEADER" >&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 # 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 +{ 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 case e in #( + e) case $PERLPROG in [\\/]* | ?:[\\/]*) ac_cv_path_PERLPROG="$PERLPROG" # Let the user override the test with a path. ;; @@ -7686,11 +8401,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 as_fn_executable_p "$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 + 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 @@ -7698,26 +8417,28 @@ done IFS=$as_save_IFS ;; +esac ;; esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PERLPROG" >&5 +printf "%s\n" "$PERLPROG" >&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 # 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 +{ 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 case e in #( + e) case $PSPROG in [\\/]* | ?:[\\/]*) ac_cv_path_PSPROG="$PSPROG" # Let the user override the test with a path. ;; @@ -7726,11 +8447,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 as_fn_executable_p "$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 + 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 @@ -7738,26 +8463,28 @@ done IFS=$as_save_IFS ;; +esac ;; esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PSPROG" >&5 +printf "%s\n" "$PSPROG" >&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 # Extract the first word of "python3", so it can be a program name with args. set dummy python3; 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 +{ 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 case e in #( + e) case $PYTHONPROG in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHONPROG="$PYTHONPROG" # Let the user override the test with a path. ;; @@ -7766,11 +8493,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 as_fn_executable_p "$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 + 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 @@ -7778,27 +8509,29 @@ done IFS=$as_save_IFS ;; +esac ;; 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHONPROG" >&5 +printf "%s\n" "$PYTHONPROG" >&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 # 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 +{ 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 case e in #( + e) case $UNAMEPROG in [\\/]* | ?:[\\/]*) ac_cv_path_UNAMEPROG="$UNAMEPROG" # Let the user override the test with a path. ;; @@ -7807,11 +8540,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 as_fn_executable_p "$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 + 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 @@ -7819,22 +8556,21 @@ done IFS=$as_save_IFS ;; +esac ;; 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $UNAMEPROG" >&5 +printf "%s\n" "$UNAMEPROG" >&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 -cat >>confdefs.h <<_ACEOF -#define UNAMEPROG "$UNAMEPROG" -_ACEOF +printf "%s\n" "#define UNAMEPROG \"$UNAMEPROG\"" >>confdefs.h MAKE=${MAKE-"make"} @@ -7850,15 +8586,15 @@ have_gnu_make=$? # which is not a POSIX shell. ## -{ $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; } +{ 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL_SYSTEM_INVOKES_POSIX_SHELL" >&5 -$as_echo "$PERL_SYSTEM_INVOKES_POSIX_SHELL" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PERL_SYSTEM_INVOKES_POSIX_SHELL" >&5 +printf "%s\n" "$PERL_SYSTEM_INVOKES_POSIX_SHELL" >&6; } @@ -7880,38 +8616,44 @@ 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 +{ 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 case e in #( + e) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { 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 @@ -7920,38 +8662,44 @@ 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 +{ 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 case e in #( + e) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { 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 if test "x$ac_ct_CC" = x; then @@ -7959,8 +8707,8 @@ fi 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 CC=$ac_ct_CC @@ -7973,38 +8721,44 @@ 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 -else - if test -n "$CC"; then +{ 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 case e in #( + e) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { 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 @@ -8013,12 +8767,13 @@ 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 +{ 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 case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no @@ -8026,15 +8781,19 @@ 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 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 + 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" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8050,18 +8809,19 @@ if test $ac_prog_rejected = yes; then # 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+' '}$@" + ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi -fi +fi ;; +esac 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; } + { 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 @@ -8072,38 +8832,44 @@ if test -z "$CC"; then 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 +{ 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 case e in #( + e) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { 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 @@ -8116,38 +8882,44 @@ if test -z "$CC"; 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_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then +{ 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 case e in #( + e) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { 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 @@ -8159,34 +8931,140 @@ done 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 + CC=$ac_ct_CC + fi +fi + +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 case e in #( + e) 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 + +fi ;; +esac +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 + + +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 case e in #( + e) 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 + +fi ;; +esac +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 + + 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 -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +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; } +See 'config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +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; do +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\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -8196,20 +9074,21 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $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; } done -{ $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 +{ 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 case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ choke me @@ -8219,30 +9098,36 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else - ac_compiler_gnu=no +else case e in #( + e) ac_compiler_gnu=no ;; +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 ac_cv_c_compiler_gnu=$ac_compiler_gnu - + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } +{ 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 $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+set} +ac_test_CFLAGS=${CFLAGS+y} 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 +{ 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 case e in #( + e) ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" @@ -8250,57 +9135,63 @@ else /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes -else - CFLAGS="" +else case e in #( + e) CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else - ac_c_werror_flag=$ac_save_c_werror_flag +else case e in #( + e) ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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 +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +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 ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag ;; +esac 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 +{ 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 @@ -8315,94 +9206,153 @@ else CFLAGS= fi 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_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 case e in #( + e) ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -struct stat; -/* 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]; +$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 ;; +esac +fi -/* 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]; +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 case e in #( + e) 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 case e in #( + e) { 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" ;; +esac +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 ;; +esac +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 case e in #( + e) 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 ;; +esac +fi -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; -} +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 case e in #( + e) 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 case e in #( + e) { 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" ;; +esac +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 ;; +esac +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 case e in #( + e) 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__" +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 : + if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext +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 +CC=$ac_save_CC ;; +esac +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 case e in #( + e) 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 case e in #( + e) { 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" ;; +esac 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; } ;; + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 ;; esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - +fi fi ac_ext=c @@ -8416,42 +9366,39 @@ 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; } +{ 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 ${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" + if test ${ac_cv_prog_CPP+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) # 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. - # 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 +#include Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : -else - # Broken: fails on valid input. -continue +else case e in #( + e) # Broken: fails on valid input. +continue ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext @@ -8461,56 +9408,56 @@ rm -f conftest.err conftest.i conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : # Broken: success on invalid input. continue -else - # Passes both tests. +else case e in #( + e) # Passes both tests. ac_preproc_ok=: -break +break ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +# 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 : +if $ac_preproc_ok +then : break fi done ac_cv_prog_CPP=$CPP - + ;; +esac fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } +{ 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. - # 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 +#include Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : -else - # Broken: fails on valid input. -continue +else case e in #( + e) # Broken: fails on valid input. +continue ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext @@ -8520,26 +9467,30 @@ rm -f conftest.err conftest.i conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : # Broken: success on invalid input. continue -else - # Passes both tests. +else case e in #( + e) # Passes both tests. ac_preproc_ok=: -break +break ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +# 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 : +if $ac_preproc_ok +then : -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) { { 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; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi ac_ext=c @@ -8551,16 +9502,17 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu LINKCC=${LINKCC-"$CC"} -{ $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 +{ 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 case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __cplusplus @@ -8573,7 +9525,7 @@ main () /* 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. + /* 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 */ @@ -8601,7 +9553,7 @@ main () iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying + { /* 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; @@ -8617,47 +9569,53 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_c_const=yes -else - ac_cv_c_const=no +else case e in #( + e) ac_cv_c_const=no ;; +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 ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } +{ 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 -$as_echo "#define const /**/" >>confdefs.h +printf "%s\n" "#define const /**/" >>confdefs.h fi -{ $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 -else - ac_cv_c_inline=no +{ 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 case e in #( + e) 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; } +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 : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_c_inline=$ac_kw 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 "$ac_cv_c_inline" != no && break done - + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } +{ 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) ;; @@ -8678,10 +9636,11 @@ esac # libtool stuff for shared/static libraries. # + 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;} ;; + { 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 @@ -8701,28 +9660,33 @@ macro_revision='2.4.6' + ltmain=$ac_aux_dir/ltmain.sh -# 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 -{ $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 -else - ac_build_alias=$build_alias + + # 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 + +{ 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 case e in #( + e) ac_build_alias=$build_alias test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` + 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 - +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 + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } +{ 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;; @@ -8741,21 +9705,23 @@ 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 +{ 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 case e in #( + e) 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 + 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 - + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } +{ 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;; @@ -8795,8 +9761,8 @@ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } +{ 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 @@ -8822,12 +9788,12 @@ func_echo_all () } 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; } ;; + 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 @@ -8843,12 +9809,13 @@ esac -{ $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/ +{ 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 case e in #( + e) 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 @@ -8861,25 +9828,31 @@ else 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_prog in sed gsed + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + 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 +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" + printf %s 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" + 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 @@ -8905,10 +9878,11 @@ IFS=$as_save_IFS else ac_cv_path_SED=$SED fi - + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } +{ 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 @@ -8925,12 +9899,13 @@ Xsed="$SED -e 1s/^X//" -{ $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 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 +{ 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 case e in #( + e) 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 @@ -8940,25 +9915,31 @@ else 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 fgrep; do + 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 - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + 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 +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" + printf %s 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" + 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 @@ -8985,10 +9966,11 @@ else ac_cv_path_FGREP=$FGREP fi - fi + fi ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } +{ 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" @@ -9013,17 +9995,19 @@ test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : +if test ${with_gnu_ld+y} +then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else - with_gnu_ld=no +else case e in #( + e) with_gnu_ld=no ;; +esac fi ac_prog=ld if test yes = "$GCC"; 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; } + { 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 @@ -9052,16 +10036,17 @@ $as_echo_n "checking for ld used by $CC... " >&6; } ;; esac elif test yes = "$with_gnu_ld"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +printf %s "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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +printf %s "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 +if test ${lt_cv_path_LD+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs @@ -9084,24 +10069,26 @@ else IFS=$lt_save_ifs else lt_cv_path_LD=$LD # Let the user override the test with a path. -fi +fi ;; +esac fi LD=$lt_cv_path_LD if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -$as_echo "$LD" >&6; } + { 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 -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. +{ 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 case e in #( + e) # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 +printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -9123,12 +10111,13 @@ 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 +{ 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 case e in #( + e) if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else @@ -9175,10 +10164,11 @@ else IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} +fi ;; +esac fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&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 @@ -9191,38 +10181,44 @@ else 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 +{ 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 case e in #( + e) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { 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 @@ -9235,38 +10231,44 @@ if test -z "$DUMPBIN"; 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_prog_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then +{ 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 case e in #( + e) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { 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 @@ -9278,8 +10280,8 @@ done 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 @@ -9307,12 +10309,13 @@ test -z "$NM" && NM=nm -{ $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 -else - lt_cv_nm_interface="BSD nm" +{ 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 case e in #( + e) 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) @@ -9325,18 +10328,20 @@ else if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi - rm -f conftest* + rm -f conftest* ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +printf "%s\n" "$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 -else - i=0 +{ 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 case e in #( + e) i=0 teststring=ABCD case $build_os in @@ -9458,15 +10463,16 @@ else fi ;; esac - + ;; +esac fi 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; } + { 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } + { 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 @@ -9510,12 +10516,13 @@ esac -{ $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 -else - case $host in +{ 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 case e in #( + e) case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys @@ -9546,23 +10553,25 @@ else lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac - + ;; +esac fi 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; } +{ 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; } -{ $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. +{ 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 case e in #( + e) #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) @@ -9573,26 +10582,29 @@ case $host in esac ;; esac - + ;; +esac fi 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; } +{ 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; } -{ $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' +{ 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 case e in #( + e) lt_cv_ld_reload_flag='-r' ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } +{ 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 "" | " "*) ;; @@ -9625,38 +10637,44 @@ esac 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 +{ 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 case e in #( + e) 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=. + 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 as_fn_executable_p "$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 + 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 ;; +esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +printf "%s\n" "$OBJDUMP" >&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 @@ -9665,38 +10683,44 @@ 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 +{ 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 case e in #( + e) 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=. + 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 as_fn_executable_p "$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 + 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 ;; +esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +printf "%s\n" "$ac_ct_OBJDUMP" >&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 @@ -9704,8 +10728,8 @@ fi 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 @@ -9721,12 +10745,13 @@ 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' +{ 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 case e in #( + e) 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 @@ -9919,10 +10944,11 @@ os2*) lt_cv_deplibs_check_method=pass_all ;; esac - + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +printf "%s\n" "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no @@ -9966,38 +10992,44 @@ 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 +{ 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 case e in #( + e) 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 - 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +printf "%s\n" "$DLLTOOL" >&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 @@ -10006,38 +11038,44 @@ 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 +{ 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 case e in #( + e) 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=. + 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 as_fn_executable_p "$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 + 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 ;; +esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +printf "%s\n" "$ac_ct_DLLTOOL" >&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 @@ -10045,8 +11083,8 @@ fi 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 @@ -10063,12 +11101,13 @@ test -z "$DLLTOOL" && DLLTOOL=dlltool -{ $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' +{ 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 case e in #( + e) lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) @@ -10088,10 +11127,11 @@ cygwin* | mingw* | pw32* | cegcc*) lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac - + ;; +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; } +{ 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 @@ -10106,38 +11146,44 @@ if test -n "$ac_tool_prefix"; then 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 +{ 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 case e in #( + e) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { 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 @@ -10150,38 +11196,44 @@ if test -z "$AR"; 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_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then +{ 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 case e in #( + e) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } + { 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 @@ -10193,8 +11245,8 @@ done 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 AR=$ac_ct_AR @@ -10214,30 +11266,32 @@ 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 -else - lt_cv_ar_at_file=no +{ 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 case e in #( + e) lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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 + 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. @@ -10245,7 +11299,7 @@ if ac_fn_c_try_compile "$LINENO"; then : { { 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 + 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=@ @@ -10254,11 +11308,12 @@ if ac_fn_c_try_compile "$LINENO"; then : rm -f conftest.* libconftest.a 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 + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } +{ 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= @@ -10275,38 +11330,44 @@ 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 -else - if test -n "$STRIP"; then +{ 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 case e in #( + e) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { 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 @@ -10315,38 +11376,44 @@ 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 +{ 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 case e in #( + e) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { 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_STRIP" = x; then @@ -10354,8 +11421,8 @@ fi 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 @@ -10374,38 +11441,44 @@ 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 -{ $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 +{ 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 case e in #( + e) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { 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 @@ -10414,38 +11487,44 @@ 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 +{ 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 case e in #( + e) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { 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_RANLIB" = x; then @@ -10453,8 +11532,8 @@ fi 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 RANLIB=$ac_ct_RANLIB @@ -10518,38 +11597,44 @@ 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 +{ 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 case e in #( + e) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { 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 @@ -10585,12 +11670,13 @@ compiler=$CC # 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 -else - +{ 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 case e in #( + e) # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] @@ -10741,14 +11827,14 @@ _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 + 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=$? - $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 -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then @@ -10817,7 +11903,7 @@ _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 + 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 @@ -10845,18 +11931,19 @@ _LT_EOF lt_cv_sys_global_symbol_pipe= fi done - + ;; +esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +printf "%s\n" "failed" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +printf "%s\n" "ok" >&6; } fi # Response file support. @@ -10902,14 +11989,16 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } +{ 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+set}" = set; then : +if test ${with_sysroot+y} +then : withval=$with_sysroot; -else - with_sysroot=no +else case e in #( + e) with_sysroot=no ;; +esac fi @@ -10926,25 +12015,26 @@ case $with_sysroot in #( no|'') ;; #( *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -$as_echo "$with_sysroot" >&6; } + { 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +printf "%s\n" "${lt_sysroot:-no}" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -$as_echo_n "checking for a working dd... " >&6; } -if ${ac_cv_path_lt_DD+:} false; then : - $as_echo_n "(cached) " >&6 -else - printf 0123456789abcdef0123456789abcdef >conftest.i +{ 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 case e in #( + e) printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then @@ -10954,10 +12044,15 @@ if test -z "$lt_DD"; then for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in dd; do + 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 - ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" + 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 \ @@ -10975,18 +12070,20 @@ else ac_cv_path_lt_DD=$lt_DD fi -rm -f conftest.i conftest2.i conftest.out +rm -f conftest.i conftest2.i conftest.out ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -$as_echo "$ac_cv_path_lt_DD" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 +printf "%s\n" "$ac_cv_path_lt_DD" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -$as_echo_n "checking how to truncate binary pipes... " >&6; } -if ${lt_cv_truncate_bin+:} false; then : - $as_echo_n "(cached) " >&6 -else - printf 0123456789abcdef0123456789abcdef >conftest.i +{ 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 case e in #( + e) 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 @@ -10994,10 +12091,11 @@ if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; the && 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" +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -$as_echo "$lt_cv_truncate_bin" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 +printf "%s\n" "$lt_cv_truncate_bin" >&6; } @@ -11020,7 +12118,8 @@ func_cc_basename () } # Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : +if test ${enable_libtool_lock+y} +then : enableval=$enable_libtool_lock; fi @@ -11036,7 +12135,7 @@ ia64-*-hpux*) 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 + 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*) @@ -11056,7 +12155,7 @@ ia64-*-hpux*) 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 + 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 @@ -11094,7 +12193,7 @@ mips64*-*linux*) 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 + 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 @@ -11135,7 +12234,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) 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 + 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*) @@ -11198,12 +12297,13 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # 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 + { 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 case e in #( + e) 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' @@ -11213,29 +12313,32 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no +else case e in #( + e) lt_cv_cc_needs_belf=no ;; +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 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 - + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } +{ 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 @@ -11248,7 +12351,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } 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 + 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*) @@ -11285,38 +12388,44 @@ 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 +{ 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 case e in #( + e) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { 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 @@ -11325,38 +12434,44 @@ 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 +{ 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 case e in #( + e) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { 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_MANIFEST_TOOL" = x; then @@ -11364,8 +12479,8 @@ fi 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 @@ -11375,22 +12490,24 @@ else 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 +{ 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 case e in #( + e) 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* + rm -f conftest* ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } +{ 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 @@ -11405,38 +12522,44 @@ fi 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 +{ 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 case e in #( + e) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { 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 @@ -11445,38 +12568,44 @@ 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 +{ 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 case e in #( + e) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { 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_DSYMUTIL" = x; then @@ -11484,8 +12613,8 @@ fi 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 @@ -11497,38 +12626,44 @@ 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 +{ 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 case e in #( + e) 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 - 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +printf "%s\n" "$NMEDIT" >&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 @@ -11537,38 +12672,44 @@ 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 +{ 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 case e in #( + e) 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 - 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +printf "%s\n" "$ac_ct_NMEDIT" >&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 @@ -11576,8 +12717,8 @@ fi 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 @@ -11589,38 +12730,44 @@ 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 +{ 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 case e in #( + e) 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=. + 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 as_fn_executable_p "$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 + 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 ;; +esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +printf "%s\n" "$LIPO" >&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 @@ -11629,38 +12776,44 @@ 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 +{ 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 case e in #( + e) 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 - 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +printf "%s\n" "$ac_ct_LIPO" >&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 @@ -11668,8 +12821,8 @@ fi 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 LIPO=$ac_ct_LIPO @@ -11681,38 +12834,44 @@ 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 +{ 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 case e in #( + e) 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=. + 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 as_fn_executable_p "$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 + 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 ;; +esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +printf "%s\n" "$OTOOL" >&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 @@ -11721,38 +12880,44 @@ 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 +{ 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 case e in #( + e) 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=. + 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 as_fn_executable_p "$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 + 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 ;; +esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +printf "%s\n" "$ac_ct_OTOOL" >&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_OTOOL" = x; then @@ -11760,8 +12925,8 @@ fi 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 OTOOL=$ac_ct_OTOOL @@ -11773,38 +12938,44 @@ 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 +{ 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 case e in #( + e) 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=. + 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 as_fn_executable_p "$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 + 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 ;; +esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +printf "%s\n" "$OTOOL64" >&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 @@ -11813,38 +12984,44 @@ 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 +{ 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 case e in #( + e) 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=. + 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 as_fn_executable_p "$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 + 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 ;; +esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +printf "%s\n" "$ac_ct_OTOOL64" >&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_OTOOL64" = x; then @@ -11852,8 +13029,8 @@ fi 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 OTOOL64=$ac_ct_OTOOL64 @@ -11888,12 +13065,13 @@ fi - { $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 + { 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 case e in #( + e) 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 @@ -11919,17 +13097,19 @@ else fi rm -rf libconftest.dylib* rm -f conftest.* - fi + fi ;; +esac 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; } +{ 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; } - { $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 + { 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 case e in #( + e) lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" @@ -11937,32 +13117,36 @@ else /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no +else case e in #( + e) lt_cv_ld_exported_symbols_list=no ;; +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 LDFLAGS=$save_LDFLAGS - + ;; +esac 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; } +{ 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; } - { $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 + { 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 case e in #( + e) lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF @@ -11987,10 +13171,11 @@ _LT_EOF fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM - + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } +{ 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' ;; @@ -12061,19 +13246,14 @@ func_munge_path_list () esac } -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +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 +if test "x$ac_cv_header_dlfcn_h" = xyes +then : + printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h fi -done - @@ -12086,38 +13266,44 @@ case $host in 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 +{ 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 case e in #( + e) 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=. + 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 as_fn_executable_p "$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 + 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 ;; +esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +printf "%s\n" "$AS" >&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 @@ -12126,38 +13312,44 @@ 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 +{ 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 case e in #( + e) 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 - 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 +printf "%s\n" "$ac_ct_AS" >&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_AS" = x; then @@ -12165,8 +13357,8 @@ fi 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 AS=$ac_ct_AS @@ -12178,38 +13370,44 @@ 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 -{ $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 +{ 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 case e in #( + e) 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 - 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$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 + 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 ;; +esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +printf "%s\n" "$DLLTOOL" >&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 @@ -12218,38 +13416,44 @@ 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 +{ 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 case e in #( + e) 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=. + 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 as_fn_executable_p "$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 + 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 ;; +esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +printf "%s\n" "$ac_ct_DLLTOOL" >&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 @@ -12257,8 +13461,8 @@ fi 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 @@ -12270,38 +13474,44 @@ 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 +{ 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 case e in #( + e) 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=. + 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 as_fn_executable_p "$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 + 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 ;; +esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +printf "%s\n" "$OBJDUMP" >&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 @@ -12310,38 +13520,44 @@ 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 +{ 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 case e in #( + e) 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=. + 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 as_fn_executable_p "$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 + 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 ;; +esac 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +printf "%s\n" "$ac_ct_OBJDUMP" >&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 @@ -12349,8 +13565,8 @@ fi 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 @@ -12387,7 +13603,8 @@ test -z "$OBJDUMP" && OBJDUMP=objdump # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : +if test ${enable_shared+y} +then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; @@ -12405,8 +13622,9 @@ if test "${enable_shared+set}" = set; then : IFS=$lt_save_ifs ;; esac -else - enable_shared=yes +else case e in #( + e) enable_shared=yes ;; +esac fi @@ -12418,7 +13636,8 @@ fi # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : +if test ${enable_static+y} +then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; @@ -12436,8 +13655,9 @@ if test "${enable_static+set}" = set; then : IFS=$lt_save_ifs ;; esac -else - enable_static=yes +else case e in #( + e) enable_static=yes ;; +esac fi @@ -12450,7 +13670,8 @@ fi # Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : +if test ${with_pic+y} +then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; @@ -12467,8 +13688,9 @@ if test "${with_pic+set}" = set; then : IFS=$lt_save_ifs ;; esac -else - pic_mode=default +else case e in #( + e) pic_mode=default ;; +esac fi @@ -12479,7 +13701,8 @@ fi # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : +if test ${enable_fast_install+y} +then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; @@ -12497,8 +13720,9 @@ if test "${enable_fast_install+set}" = set; then : IFS=$lt_save_ifs ;; esac -else - enable_fast_install=yes +else case e in #( + e) enable_fast_install=yes ;; +esac fi @@ -12511,11 +13735,12 @@ fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } + { 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; } # Check whether --with-aix-soname was given. -if test "${with_aix_soname+set}" = set; then : +if test ${with_aix_soname+y} +then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; @@ -12524,18 +13749,21 @@ if test "${with_aix_soname+set}" = set; then : ;; esac lt_cv_with_aix_soname=$with_aix_soname -else - if ${lt_cv_with_aix_soname+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_with_aix_soname=aix +else case e in #( + e) if test ${lt_cv_with_aix_soname+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_with_aix_soname=aix ;; +esac fi - with_aix_soname=$lt_cv_with_aix_soname + with_aix_soname=$lt_cv_with_aix_soname ;; +esac fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -$as_echo "$with_aix_soname" >&6; } + { 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', @@ -12617,12 +13845,13 @@ if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi -{ $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 -else - rm -f .libs 2>/dev/null +{ 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 case e in #( + e) rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs @@ -12630,19 +13859,18 @@ else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi -rmdir .libs 2>/dev/null +rmdir .libs 2>/dev/null ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +printf "%s\n" "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF +printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h @@ -12688,12 +13916,13 @@ 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 -else - case $MAGIC_CMD in + { 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 case e in #( + e) case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; @@ -12736,16 +13965,17 @@ _LT_EOF IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; +esac ;; 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +printf "%s\n" "$MAGIC_CMD" >&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 @@ -12754,12 +13984,13 @@ fi 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 + { 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 case e in #( + e) case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; @@ -12802,16 +14033,17 @@ _LT_EOF IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; +esac ;; 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +printf "%s\n" "$MAGIC_CMD" >&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 @@ -12896,12 +14128,13 @@ if test yes = "$GCC"; then 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 + { 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 case e in #( + e) 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 @@ -12929,10 +14162,11 @@ else fi fi $RM conftest* - + ;; +esac 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; } +{ 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" @@ -13289,27 +14523,30 @@ case $host_os in ;; 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 +{ 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 case e in #( + e) lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } +{ 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 # # 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 + { 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 case e in #( + e) 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 @@ -13337,10 +14574,11 @@ else fi fi $RM conftest* - + ;; +esac 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; } +{ 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 @@ -13368,12 +14606,13 @@ 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 +{ 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 case e in #( + e) 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 @@ -13394,10 +14633,11 @@ else fi $RM -r conftest* LDFLAGS=$save_LDFLAGS - + ;; +esac 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; } +{ 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 : @@ -13411,12 +14651,13 @@ fi - { $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 + { 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 case e in #( + e) lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest @@ -13456,22 +14697,24 @@ else cd .. $RM -r conftest $RM conftest* - + ;; +esac 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; } +{ 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; } - { $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 + { 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 case e in #( + e) lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest @@ -13511,10 +14754,11 @@ else cd .. $RM -r conftest $RM conftest* - + ;; +esac 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; } +{ 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; } @@ -13522,19 +14766,19 @@ $as_echo "$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 - { $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; } + { 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +printf "%s\n" "$hard_links" >&6; } if test no = "$hard_links"; 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;} + { 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 @@ -13546,8 +14790,8 @@ fi - { $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; } + { 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= @@ -14102,21 +15346,23 @@ _LT_EOF if test set = "${lt_cv_aix_libpath+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 + if test ${lt_cv_aix_libpath_+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -14131,12 +15377,13 @@ if ac_fn_c_try_link "$LINENO"; 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 \ +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 - + ;; +esac fi aix_libpath=$lt_cv_aix_libpath_ @@ -14155,21 +15402,23 @@ fi if test set = "${lt_cv_aix_libpath+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 + if test ${lt_cv_aix_libpath_+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -14184,12 +15433,13 @@ if ac_fn_c_try_link "$LINENO"; 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 \ +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 - + ;; +esac fi aix_libpath=$lt_cv_aix_libpath_ @@ -14435,12 +15685,13 @@ fi # 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 + { 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 case e in #( + e) lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext @@ -14461,10 +15712,11 @@ else fi $RM -r conftest* LDFLAGS=$save_LDFLAGS - + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } +{ 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 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' @@ -14504,28 +15756,32 @@ fi # 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 + { 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 case e in #( + e) 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 : +if ac_fn_c_try_link "$LINENO" +then : lt_cv_irix_exported_symbol=yes -else - lt_cv_irix_exported_symbol=no +else case e in #( + e) lt_cv_irix_exported_symbol=no ;; +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 - LDFLAGS=$save_LDFLAGS + LDFLAGS=$save_LDFLAGS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } +{ 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 @@ -14805,8 +16061,8 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } +{ 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 with_gnu_ld=$with_gnu_ld @@ -14842,18 +16098,19 @@ x|xyes) # 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* + { 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 case e in #( + e) $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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest @@ -14871,7 +16128,7 @@ else 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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no @@ -14883,10 +16140,11 @@ else cat conftest.err 1>&5 fi $RM conftest* - + ;; +esac 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; } +{ 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 @@ -15045,8 +16303,8 @@ esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +printf %s "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in @@ -15607,10 +16865,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 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 + if test ${lt_cv_shlibpath_overrides_runpath+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ @@ -15619,23 +16878,26 @@ else /* end confdefs.h. */ int -main () +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 : +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 \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir - + ;; +esac fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath @@ -15863,8 +17125,8 @@ uts4*) dynamic_linker=no ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } +{ 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" @@ -15985,8 +17247,8 @@ configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - { $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; } + { 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" || @@ -16010,8 +17272,8 @@ else # directories. hardcode_action=unsupported fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +printf "%s\n" "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then @@ -16055,50 +17317,59 @@ else 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 + { 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 case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char dlopen (); +char dlopen (void); 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 : ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no +else case e in #( + e) ac_cv_lib_dl_dlopen=no ;; +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 -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac 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 : +{ 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 - +else case e in #( + e) lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes - + ;; +esac fi ;; @@ -16113,183 +17384,222 @@ fi *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes; then : +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 +else case e in #( + e) { 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 case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char shl_load (); +char shl_load (void); int -main () +main (void) { return shl_load (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no +else case e in #( + e) ac_cv_lib_dld_shl_load=no ;; +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 -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac 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 : +{ 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 - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : +else case e in #( + e) 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 +else case e in #( + e) { 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 case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char dlopen (); +char dlopen (void); 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 : ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no +else case e in #( + e) ac_cv_lib_dl_dlopen=no ;; +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 -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac 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 : +{ 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_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 +else case e in #( + e) { 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 case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char dlopen (); +char dlopen (void); 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 : ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no +else case e in #( + e) ac_cv_lib_svld_dlopen=no ;; +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 -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac 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 : +{ 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_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 +else case e in #( + e) { 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 case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char dld_link (); +char dld_link (void); int -main () +main (void) { return dld_link (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no +else case e in #( + e) ac_cv_lib_dld_dld_link=no ;; +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 -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac 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 : +{ 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 - + ;; +esac fi + ;; +esac +fi + ;; +esac fi - -fi - - + ;; +esac fi - + ;; +esac fi ;; @@ -16312,12 +17622,13 @@ fi 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 yes = "$cross_compiling"; then : + { 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 case e in #( + e) if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -16395,7 +17706,7 @@ _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 + 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=$? @@ -16411,19 +17722,21 @@ _LT_EOF fi rm -fr conftest* - + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +printf "%s\n" "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; 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 yes = "$cross_compiling"; then : + { 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 case e in #( + e) if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -16501,7 +17814,7 @@ _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 + 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=$? @@ -16517,10 +17830,11 @@ _LT_EOF fi rm -fr conftest* - + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } +{ 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 CPPFLAGS=$save_CPPFLAGS @@ -16558,13 +17872,13 @@ 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; } +{ 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" - { $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 # FIXME - insert some real tests, host_os isn't really good enough case $host_os in @@ -16572,16 +17886,16 @@ else 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&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 ;; *) - { $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; } ;; esac fi @@ -16598,13 +17912,13 @@ fi # Report what 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; } + { 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; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&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 @@ -16628,15 +17942,15 @@ $as_echo_n "checking whether to build shared libraries... " >&6; } fi ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +printf "%s\n" "$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; } + { 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +printf "%s\n" "$enable_static" >&6; } @@ -16675,38 +17989,44 @@ CC=$lt_save_CC 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RC"; then +{ 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 case e in #( + e) 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 - 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_RC="${ac_tool_prefix}windres" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + 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 ;; +esac fi RC=$ac_cv_prog_RC if test -n "$RC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5 -$as_echo "$RC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RC" >&5 +printf "%s\n" "$RC" >&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 @@ -16715,38 +18035,44 @@ 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 -{ $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_RC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RC"; then +{ 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 case e in #( + e) 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 - 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RC="windres" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + 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 ;; +esac fi ac_ct_RC=$ac_cv_prog_ac_ct_RC if test -n "$ac_ct_RC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5 -$as_echo "$ac_ct_RC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5 +printf "%s\n" "$ac_ct_RC" >&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_RC" = x; then @@ -16754,8 +18080,8 @@ fi 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 RC=$ac_ct_RC @@ -16849,26 +18175,65 @@ CFLAGS=$lt_save_CFLAGS # Build environment: ## +for opt in -Werror=declaration-after-statement +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; } + netsnmp_save_CFLAGS="$CFLAGS" + 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; } + CFLAGS="$opt $netsnmp_save_CFLAGS" + +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + CFLAGS="$netsnmp_save_CFLAGS" + ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +done + # developer build # (enabled by default when building from SVN checkout) # if test "x$developer" != "xno" -a -f $srcdir/remove-files; then developer="yes" 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 - + { 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 \ + -Wimplicit-fallthrough=2 -Wlogical-op -Wundef \ -Wno-format-truncation -Wno-missing-field-initializers \ - -Wno-sign-compare -Wno-unused-parameter -Wno-type-limits + -Wno-sign-compare -Wno-unused-parameter -Wcast-function-type do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports $opt" >&5 -$as_echo_n "checking whether the compiler supports $opt... " >&6; } + { 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 @@ -16878,35 +18243,36 @@ $as_echo_n "checking whether the compiler supports $opt... " >&6; } /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +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; } DEVFLAGS="$DEVFLAGS $opt" -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +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 CFLAGS="$netsnmp_save_CFLAGS" done - + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEVFLAGS" >&5 +printf "%s\n" "$DEVFLAGS" >&6; } else DEVFLAGS="" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVFLAGS" >&5 -$as_echo "$DEVFLAGS" >&6; } @@ -16954,21 +18320,23 @@ fi # 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 +{ 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 case e in #( + e) 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 + 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 - + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 -$as_echo "$ac_cv_target" >&6; } +{ 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;; @@ -17011,37 +18379,48 @@ esac # -# Whether the linker supports the flag -Wl,-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. # -if ! echo "$CFLAGS" | grep -q -- -fsanitize=; then -saved_LDFLAGS=$LDFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker supports -Wl,-no-undefined" >&5 -$as_echo_n "checking whether the linker supports -Wl,-no-undefined... " >&6; } -LDFLAGS="$saved_LDFLAGS -Wl,-no-undefined" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +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 () +main (void) { ; 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=-Wl,-no-undefined -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; }; LD_NO_UNDEFINED=-Wl,-no-undefined +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +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 -LDFLAGS="$saved_LDFLAGS" + LDFLAGS="$saved_LDFLAGS" -fi + fi + ;; +esac # @@ -17060,11 +18439,146 @@ 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; } +{ 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" + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep -e" >&5 +printf %s "checking for egrep -e... " >&6; } +if test ${ac_cv_path_EGREP_TRADITIONAL+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -z "$EGREP_TRADITIONAL"; then + ac_path_EGREP_TRADITIONAL_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_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue +# Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found. + # Check for GNU $ac_path_EGREP_TRADITIONAL +case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #( +*GNU*) + ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_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_TRADITIONAL' >> "conftest.nl" + "$ac_path_EGREP_TRADITIONAL" -E 'EGR(EP|AC)_TRADITIONAL$' < "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_TRADITIONAL_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" + ac_path_EGREP_TRADITIONAL_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_TRADITIONAL_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then + : + fi +else + ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL +fi + + if test "$ac_cv_path_EGREP_TRADITIONAL" +then : + ac_cv_path_EGREP_TRADITIONAL="$ac_cv_path_EGREP_TRADITIONAL -E" +else case e in #( + e) if test -z "$EGREP_TRADITIONAL"; then + ac_path_EGREP_TRADITIONAL_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_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue +# Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found. + # Check for GNU $ac_path_EGREP_TRADITIONAL +case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #( +*GNU*) + ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_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_TRADITIONAL' >> "conftest.nl" + "$ac_path_EGREP_TRADITIONAL" 'EGR(EP|AC)_TRADITIONAL$' < "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_TRADITIONAL_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" + ac_path_EGREP_TRADITIONAL_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_TRADITIONAL_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP_TRADITIONAL"; 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_TRADITIONAL=$EGREP_TRADITIONAL +fi + ;; +esac +fi ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP_TRADITIONAL" >&5 +printf "%s\n" "$ac_cv_path_EGREP_TRADITIONAL" >&6; } + EGREP_TRADITIONAL=$ac_cv_path_EGREP_TRADITIONAL + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ [ @@ -17074,16 +18588,18 @@ yes ] _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : + $EGREP_TRADITIONAL "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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) PARTIALTARGETFLAGS="-D$PARTIALTARGETOS=$PARTIALTARGETOS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi -rm -f conftest* +rm -rf conftest* CFLAGS="$CFLAGS $PARTIALTARGETFLAGS" CPPFLAGS="$OLD_CPPFLAGS" @@ -17091,8 +18607,8 @@ 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; } +{ 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 @@ -17114,18 +18630,16 @@ if test "x$filebase" = "x$last"; then 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 +{ 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 # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for machine-type include file" >&5 -$as_echo_n "checking for machine-type include file... " >&6; } +{ 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 @@ -17139,11 +18653,9 @@ if test "x$filebase" = "x$last"; then 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 +{ 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 @@ -17162,8 +18674,8 @@ 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; } +{ 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 @@ -17179,8 +18691,8 @@ if test "x$GCC" != "xyes"; then fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRACPPFLAGS" >&5 -$as_echo "$EXTRACPPFLAGS" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EXTRACPPFLAGS" >&5 +printf "%s\n" "$EXTRACPPFLAGS" >&6; } # Compiler checks: @@ -17188,12 +18700,13 @@ $as_echo "$EXTRACPPFLAGS" >&6; } # 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 +{ 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 case e in #( + e) case $CCPATH in [\\/]* | ?:[\\/]*) ac_cv_path_CCPATH="$CCPATH" # Let the user override the test with a path. ;; @@ -17202,11 +18715,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 as_fn_executable_p "$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 + 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 @@ -17214,15 +18731,16 @@ done IFS=$as_save_IFS ;; +esac ;; 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CCPATH" >&5 +printf "%s\n" "$CCPATH" >&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 @@ -17260,32 +18778,34 @@ 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. -{ $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; } +{ 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 () +main (void) { ; 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; } +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } CFLAGS="$netsnmp_save_CFLAGS" - + ;; +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 @@ -17296,8 +18816,8 @@ 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; } + { 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 @@ -17311,19 +18831,19 @@ $as_echo_n "checking what linker flags to add to enable runtime linking on AIX.. 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_aix_ldflags" >&5 +printf "%s\n" "$netsnmp_aix_ldflags" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 +printf "%s\n" "none" >&6; } fi ;; darwin*) # 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; } + { 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" @@ -17331,25 +18851,27 @@ $as_echo_n "checking whether darwin ld might need -flat_namespace... " >&6; } /* end confdefs.h. */ int -main () +main (void) { ; 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 - LDFLAGS="$saved_LDFLAGS"; { $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; } +else case e in #( + e) LDFLAGS="$saved_LDFLAGS"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +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 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 ;; @@ -17363,12 +18885,13 @@ esac # # 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 +{ 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 case e in #( + e) case $DPKG_QUERY_PATH in [\\/]* | ?:[\\/]*) ac_cv_path_DPKG_QUERY_PATH="$DPKG_QUERY_PATH" # Let the user override the test with a path. ;; @@ -17377,11 +18900,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 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" - $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_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 @@ -17389,21 +18916,22 @@ done IFS=$as_save_IFS ;; +esac ;; 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DPKG_QUERY_PATH" >&5 +printf "%s\n" "$DPKG_QUERY_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$DPKG_QUERY_PATH != x; then -$as_echo "#define HAVE_DPKG_QUERY 1" >>confdefs.h +printf "%s\n" "#define HAVE_DPKG_QUERY 1" >>confdefs.h fi @@ -17486,14 +19014,10 @@ while test "x$tmpset" != "x$SNMPLIBPATH"; do SNMPLIBPATH="$tmpset" eval tmpset="$tmpset" done -cat >>confdefs.h <<_ACEOF -#define SNMPLIBPATH "$SNMPLIBPATH" -_ACEOF +printf "%s\n" "#define SNMPLIBPATH \"$SNMPLIBPATH\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define SNMPDLMODPATH "$SNMPLIBPATH/dlmod" -_ACEOF +printf "%s\n" "#define SNMPDLMODPATH \"$SNMPLIBPATH/dlmod\"" >>confdefs.h # SNMPSHAREPATH @@ -17504,9 +19028,7 @@ while test "x$tmpset" != "x$SNMPSHAREPATH"; do SNMPSHAREPATH="$tmpset" eval tmpset="$tmpset" done -cat >>confdefs.h <<_ACEOF -#define SNMPSHAREPATH "$SNMPSHAREPATH" -_ACEOF +printf "%s\n" "#define SNMPSHAREPATH \"$SNMPSHAREPATH\"" >>confdefs.h @@ -17514,14 +19036,12 @@ _ACEOF # 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'` fi - cat >>confdefs.h <<_ACEOF -#define NETSNMP_DEFAULT_MIBDIRS "$NETSNMP_DEFAULT_MIBDIRS" -_ACEOF + printf "%s\n" "#define NETSNMP_DEFAULT_MIBDIRS \"$NETSNMP_DEFAULT_MIBDIRS\"" >>confdefs.h fi @@ -17534,9 +19054,7 @@ while test "x$tmpset" != "x$SNMPCONFPATH"; do SNMPCONFPATH="$tmpset" eval tmpset="$tmpset" done -cat >>confdefs.h <<_ACEOF -#define SNMPCONFPATH "$SNMPCONFPATH" -_ACEOF +printf "%s\n" "#define SNMPCONFPATH \"$SNMPCONFPATH\"" >>confdefs.h @@ -17550,270 +19068,266 @@ _ACEOF # 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 +# 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 case e in #( + e) 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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_cv_path_EGREP=$EGREP +fi + + fi ;; +esac +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" + + EGREP_TRADITIONAL=$EGREP + ac_cv_path_EGREP_TRADITIONAL=$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" | sed "$as_sed_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 case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include -#include +#include +#include <$ac_hdr> int -main () +main (void) { - +if ((DIR *) 0) +return 0; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no +if ac_fn_c_try_compile "$LINENO" +then : + eval "$as_ac_Header=yes" +else case e in #( + e) eval "$as_ac_Header=no" ;; +esac 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 +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f conftest* +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" | sed "$as_sed_cpp"` 1 +_ACEOF +ac_header_dirent=$ac_hdr; break fi -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 : - -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 -/* 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; -} -_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 -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 - -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 -/* end confdefs.h. */ -#include -#include <$ac_hdr> - -int -main () -{ -if ((DIR *) 0) -return 0; - ; - 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 -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 -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 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +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 case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char opendir (); +char opendir (void); int -main () +main (void) { return opendir (); ; return 0; } _ACEOF -for ac_lib in '' dir; do +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 : + if ac_fn_c_try_link "$LINENO" +then : ac_cv_search_opendir=$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_opendir+:} false; then : + if test ${ac_cv_search_opendir+y} +then : break fi done -if ${ac_cv_search_opendir+:} false; then : +if test ${ac_cv_search_opendir+y} +then : -else - ac_cv_search_opendir=no +else case e in #( + e) ac_cv_search_opendir=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } +{ 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 : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $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}: 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 case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char opendir (); +char opendir (void); int -main () +main (void) { return opendir (); ; return 0; } _ACEOF -for ac_lib in '' x; do +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 : + if ac_fn_c_try_link "$LINENO" +then : ac_cv_search_opendir=$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_opendir+:} false; then : + if test ${ac_cv_search_opendir+y} +then : break fi done -if ${ac_cv_search_opendir+:} false; then : +if test ${ac_cv_search_opendir+y} +then : -else - ac_cv_search_opendir=no +else case e in #( + e) ac_cv_search_opendir=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } +{ 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 : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi @@ -17826,12 +19340,13 @@ case x$with_socklib in xwinsock2) ;; *) - { $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 + { 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 case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -17843,7 +19358,7 @@ else #endif int -main () +main (void) { int s; wait (&s); @@ -17852,18 +19367,21 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_header_sys_wait_h=yes -else - ac_cv_header_sys_wait_h=no +else case e in #( + e) ac_cv_header_sys_wait_h=no ;; +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 ;; +esac 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; } +{ 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 -$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h +printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi # @@ -17876,24 +19394,94 @@ 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 process.h sys/param.h sys/select.h sys/syslog.h sys/time.h sys/timeb.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" "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 -done +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: -for ac_header in nlist.h -do : - ac_fn_c_check_header_compile "$LINENO" "nlist.h" "ac_cv_header_nlist_h" " +ac_fn_c_check_header_compile "$LINENO" "nlist.h" "ac_cv_header_nlist_h" " $ac_includes_default #ifndef LIBBSD_DISABLE_DEPRECATED @@ -17901,1378 +19489,4574 @@ $ac_includes_default #endif " -if test "x$ac_cv_header_nlist_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NLIST_H 1 -_ACEOF +if test "x$ac_cv_header_nlist_h" = xyes +then : + printf "%s\n" "#define HAVE_NLIST_H 1" >>confdefs.h fi -done - # Library: -for ac_header in crt_externs.h fcntl.h io.h kstat.h limits.h locale.h mach-o/dyld.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 +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 -done - +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 -# 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 +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 -done +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 -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/sysmacros.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 +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 -done +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 -for ac_header in asm/page.h asm/types.h inet/mib2.h linux/hdreg.h linux/tasks.h machine/param.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 +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 -done +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 -# Apps: -for ac_header in fcntl.h grp.h pwd.h sys/cdefs.h sys/ioctl.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 +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 -done +fi -# 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 +# 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 -done +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 -# 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 +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 -done +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 -# 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 +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 -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 +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 -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 +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 -done +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 -# 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 +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 -done +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 -## -# Pre-requisite on other headers: -## +ac_fn_c_check_header_compile "$LINENO" "sys/callout.h" "ac_cv_header_sys_callout_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_callout_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_CALLOUT_H 1" >>confdefs.h -# 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 +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 -#if HAVE_SYS_PARAM_H -#include -#endif +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 -" -if test "x$ac_cv_header_sys_swap_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_SWAP_H 1 -_ACEOF +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 -done +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 -# requiring (FreeBSD) -# -for ac_header in malloc.h osreldate.h machine/types.h sys/dkstat.h sys/conf.h sys/mbuf.h sys/mount.h sys/proc.h sys/queue.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 -#include -#endif -#if HAVE_SYS_PARAM_H -#include -#endif +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 -" -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 +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 -done +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/osd.h" "ac_cv_header_sys_osd_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_osd_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_OSD_H 1" >>confdefs.h -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. - ;; - *) - for ac_header in sys/sysctl.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_sysctl_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_SYSCTL_H 1 -_ACEOF +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 -done +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 - ;; -esac +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 -# 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 +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 -done +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 -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 +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 -#if HAVE_SYS_SEMA_H -#include -#endif +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 -" -if test "x$ac_cv_header_sys_hashing_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_HASHING_H 1 -_ACEOF +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 -done +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 -# 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 -#include -#endif +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 -" -if test "x$ac_cv_header_sys_vnode_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_VNODE_H 1 -_ACEOF +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 -done +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 -# 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 -#include -#endif -#if HAVE_SYS_PARAM_H -#include -#endif -#if HAVE_MACHINE_TYPES_H -#include -#endif +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 -" -if test "x$ac_cv_header_sys_disklabel_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_DISKLABEL_H 1 -_ACEOF +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 -done +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 -# 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 +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 -done +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 -# 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 -#include -#endif -#if HAVE_UFS_UFS_DINODE_H -#include -#endif -#if HAVE_UFS_UFS_QUOTA_H -#include -#endif +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 -" -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 +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 -done +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 -# 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 -#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 +# 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 -done +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 -# 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 -#endif -#if HAVE_SYS_SOCKET_H -#include -#endif -#if HAVE_LINUX_NETLINK_H -#include -#endif +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 -" -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 +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 -done +# 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 -# -# 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. -# +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 -case x$with_socklib in - xwinsock2) - ;; - *) +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 -for ac_header in sys/socket.h sys/un.h netinet/tcp_fsm.h sys/sockio.h sys/socketvar.h net/if_dl.h net/if_types.h arpa/inet.h net/if.h netinet/in.h netdb.h 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 netinet/in_pcb.h 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 -#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_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_NETINET_IP_H -#include -#endif -#if HAVE_NET_IF_H -#include -#endif -#if HAVE_NET_IF_VAR_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 -#if HAVE_NETINET_IP6_H -#include -#endif -#if HAVE_NETINET_ICMP6_H -#include -#endif +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 -" -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 +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 -done +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 -esac +fi -## -# Pre-requisite on specific types -## -# Special hack to get around various problems on older Linux kernels -# (major ugh!) -# Agent: -# -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - for ac_header in linux/ethtool.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "linux/ethtool.h" "ac_cv_header_linux_ethtool_h" "$ac_includes_default" -if test "x$ac_cv_header_linux_ethtool_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LINUX_ETHTOOL_H 1 -_ACEOF +# 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 -done +fi -else - for ac_header in linux/ethtool.h -do : - 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 */ -typedef __u32 u32; /* ditto */ -typedef __u16 u16; /* ditto */ -typedef __u8 u8; /* ditto */ +# 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 -" -if test "x$ac_cv_header_linux_ethtool_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LINUX_ETHTOOL_H 1 -_ACEOF +fi +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 +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/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_err_h" = xyes +then : + printf "%s\n" "#define HAVE_OPENSSL_ERR_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" "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/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_ssl_h" = xyes +then : + printf "%s\n" "#define HAVE_OPENSSL_SSL_H 1" >>confdefs.h fi -done +# 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 -$as_echo "#define HAVE_LINUX_ETHTOOL_NEEDS_U64 1" >>confdefs.h +fi fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ## -# Headers requiring particular libraries +# Pre-requisite on other headers: ## -# for HostRes (Solaris 2.x) +# requiring (MAXPATHLEN) (OpenBSD 3.4) # Agent: # -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 - 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. */ +ac_fn_c_check_header_compile "$LINENO" "sys/swap.h" "ac_cv_header_sys_swap_h" "$ac_includes_default -/* 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" +#ifdef HAVE_SYS_PARAM_H +#include #endif -char pkginfo (); -int -main () -{ -return pkginfo (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - netsnmp_result="none required" -else - for netsnmp_cur_lib in adm ; 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" +" +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 -char pkginfo (); -int -main () -{ -return pkginfo (); - ; - 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_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 "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 +" +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 - fi +" +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 -done - +" +if test "x$ac_cv_header_machine_types_h" = xyes +then : + printf "%s\n" "#define HAVE_MACHINE_TYPES_H 1" >>confdefs.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 +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 - { $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 - netsnmp_func_search_save_LIBS="$LIBS" - netsnmp_target_val="$LIBS" - netsnmp_temp_LIBS=" ${LIBS}" - netsnmp_result=no - LIBS="${netsnmp_temp_LIBS}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +" +if test "x$ac_cv_header_sys_dkstat_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_DKSTAT_H 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" +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 -char pkg_init (); -int -main () -{ -return pkg_init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - netsnmp_result="none required" -else - 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" +" +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 -char pkg_init (); -int -main () -{ -return pkg_init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - netsnmp_result=-l${netsnmp_cur_lib} - break +#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 -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done +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 -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_pkg_init_LIBS="${netsnmp_result}" +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 -{ $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 "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 +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 -$as_echo "#define HAVE_LIBPKG 1" >>confdefs.h +" +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 - fi +" +if test "x$ac_cv_header_sys_user_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_USER_H 1" >>confdefs.h fi -done +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 -if test $ac_cv_header_pkg_h = no -then - unset ac_cv_header_pkg_h - netsnmp_save_CPPFLAGS="$CPPFLAGS" - netsnmp_save_LDFLAGS="$LDFLAGS" - CPPFLAGS="$CPPFLAGS -I/usr/local/include" - LDFLAGS="$LDFLAGS -L/usr/local/lib" - 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 +fi - { $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 - netsnmp_func_search_save_LIBS="$LIBS" - netsnmp_target_val="$LIBS" - netsnmp_temp_LIBS=" ${LIBS}" - netsnmp_result=no - LIBS="${netsnmp_temp_LIBS}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + ;; +esac -/* 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 () -{ -return pkg_init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - netsnmp_result="none required" -else - 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. */ +# 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 -/* 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 () -{ -return pkg_init (); - ; - 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_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 "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 +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 - fi +" +if test "x$ac_cv_header_sys_hashing_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_HASHING_H 1" >>confdefs.h fi -done - - if test $ac_cv_header_pkg_h = no - then - CPPFLAGS="$netsnmp_save_CPPFLAGS" - LDFLAGS="$netsnmp_save_LDFLAGS" - fi -fi -case $target_os in - aix*) - # for CPU/memory statistics (AIX) - # Agent: - # - 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 -#include +# 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_libperfstat_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPERFSTAT_H 1 -_ACEOF +if test "x$ac_cv_header_sys_vnode_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_VNODE_H 1" >>confdefs.h - { $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 - 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 perfstat_cpu_total (); -int -main () -{ -return perfstat_cpu_total (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - netsnmp_result="none required" -else - for netsnmp_cur_lib in perfstat ; 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 -char perfstat_cpu_total (); -int -main () -{ -return perfstat_cpu_total (); - ; - 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_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 "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 - else - as_fn_error $? " +# 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 -*** To monitor CPU/memory values in AIX you need to install -*** libperfstat which can be found in bos.perf -" "$LINENO" 5 - fi +" +if test "x$ac_cv_header_sys_disklabel_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_DISKLABEL_H 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 - 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 open_mib (); -int -main () -{ -return open_mib (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - netsnmp_result="none required" -else - for netsnmp_cur_lib in nm ; do - LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +# 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 -/* 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 () -{ -return open_mib (); - ; - 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_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 "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 - fi - - ;; - *) - ;; -esac - -# for MIB-2 info (Cygwin and MinGW) -# Core: +# UFS headers +# Agent: # -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" " -#ifdef HAVE_WINDOWS_H -#include +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 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_ufs_ufs_dinode_h" = xyes +then : + printf "%s\n" "#define HAVE_UFS_UFS_DINODE_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 +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_lm_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LM_H 1 -_ACEOF - LAGENTLIBS="$LAGENTLIBS -lnetapi32" -fi - -done +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 -# 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_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 +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 -done +" +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 -# -# 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 - -fi -done +# 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 -## This is here to avoid loads of redefinition warnings during -## module configuration +fi -## -# rtentry structure checks: -## -# Check struct rtentry for common fields -# Agent: +# netlink/rtnetlink (Linux) +# Agent: # -ac_fn_c_check_member "$LINENO" "struct rtentry" "rt_dst" "ac_cv_member_struct_rtentry_rt_dst" " -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#include -#ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES -#define _KERNEL_STRUCTURES 1 +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 -#ifdef NETSNMP_IFNET_NEEDS_KERNEL -#define KERNEL -#if !defined(__DragonFly__) -#define _KERNEL 1 -#endif -#endif #include -#undef KERNEL -#undef _KERNEL #endif -#ifdef HAVE_NET_ROUTE_H -#include +#ifdef HAVE_LINUX_NETLINK_H +#include #endif " -if test "x$ac_cv_member_struct_rtentry_rt_dst" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_RTENTRY_RT_DST 1 -_ACEOF - +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_member "$LINENO" "struct rtentry" "rt_hash" "ac_cv_member_struct_rtentry_rt_hash" " -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#include -#ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES -#define _KERNEL_STRUCTURES 1 +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 -#ifdef NETSNMP_IFNET_NEEDS_KERNEL -#define KERNEL -#if !defined(__DragonFly__) -#define _KERNEL 1 -#endif -#endif #include -#undef KERNEL -#undef _KERNEL #endif -#ifdef HAVE_NET_ROUTE_H -#include +#ifdef HAVE_LINUX_NETLINK_H +#include #endif " -if test "x$ac_cv_member_struct_rtentry_rt_hash" = xyes; then : +if test "x$ac_cv_header_linux_rtnetlink_h" = xyes +then : + printf "%s\n" "#define HAVE_LINUX_RTNETLINK_H 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_RTENTRY_RT_HASH 1 -_ACEOF +fi -fi -ac_fn_c_check_member "$LINENO" "struct rtentry" "rt_next" "ac_cv_member_struct_rtentry_rt_next" " +# +# 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 -#ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES -#define _KERNEL_STRUCTURES 1 +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include #endif #ifdef HAVE_SYS_SOCKET_H -#ifdef NETSNMP_IFNET_NEEDS_KERNEL -#define KERNEL -#if !defined(__DragonFly__) -#define _KERNEL 1 +#include #endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include #endif -#include -#undef KERNEL -#undef _KERNEL +#ifdef HAVE_ARPA_INET_H +#include #endif -#ifdef HAVE_NET_ROUTE_H -#include +#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_member_struct_rtentry_rt_next" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_RTENTRY_RT_NEXT 1 -_ACEOF - +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_member "$LINENO" "struct rtentry" "rt_refcnt" "ac_cv_member_struct_rtentry_rt_refcnt" " +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 -#ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES -#define _KERNEL_STRUCTURES 1 +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include #endif #ifdef HAVE_SYS_SOCKET_H -#ifdef NETSNMP_IFNET_NEEDS_KERNEL -#define KERNEL -#if !defined(__DragonFly__) -#define _KERNEL 1 +#include #endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include #endif -#include -#undef KERNEL -#undef _KERNEL +#ifdef HAVE_ARPA_INET_H +#include #endif -#ifdef HAVE_NET_ROUTE_H -#include +#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_member_struct_rtentry_rt_refcnt" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_RTENTRY_RT_REFCNT 1 -_ACEOF - +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_member "$LINENO" "struct rtentry" "rt_unit" "ac_cv_member_struct_rtentry_rt_unit" " +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 -#ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES -#define _KERNEL_STRUCTURES 1 +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include #endif #ifdef HAVE_SYS_SOCKET_H -#ifdef NETSNMP_IFNET_NEEDS_KERNEL -#define KERNEL -#if !defined(__DragonFly__) -#define _KERNEL 1 +#include #endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include #endif -#include -#undef KERNEL -#undef _KERNEL +#ifdef HAVE_ARPA_INET_H +#include #endif -#ifdef HAVE_NET_ROUTE_H -#include +#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_member_struct_rtentry_rt_unit" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_RTENTRY_RT_UNIT 1 -_ACEOF - +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_member "$LINENO" "struct rtentry" "rt_use" "ac_cv_member_struct_rtentry_rt_use" " +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 -#ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES -#define _KERNEL_STRUCTURES 1 +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include #endif #ifdef HAVE_SYS_SOCKET_H -#ifdef NETSNMP_IFNET_NEEDS_KERNEL -#define KERNEL -#if !defined(__DragonFly__) -#define _KERNEL 1 +#include #endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include #endif -#include -#undef KERNEL -#undef _KERNEL +#ifdef HAVE_ARPA_INET_H +#include #endif -#ifdef HAVE_NET_ROUTE_H -#include +#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_member_struct_rtentry_rt_use" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_RTENTRY_RT_USE 1 -_ACEOF - +if test "x$ac_cv_header_sys_sockio_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SOCKIO_H 1" >>confdefs.h fi - - -fi # NETSNMP_QUICK_CHECK - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - 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;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - +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" "netgroup.h" "ac_cv_header_netgroup_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_netgroup_h" = xyes +then : + printf "%s\n" "#define HAVE_NETGROUP_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 + +" +if test "x$ac_cv_header_netinet_tcpip_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_TCPIP_H 1" >>confdefs.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_netinet_udp_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_UDP_H 1" >>confdefs.h + +fi +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 +#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_udp_var_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_UDP_VAR_H 1" >>confdefs.h + +fi +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 +#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_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 + +" +if test "x$ac_cv_header_netinet_icmp6_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_ICMP6_H 1" >>confdefs.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 +#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_pcb_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_IN_PCB_H 1" >>confdefs.h + +fi +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_netinet_ip6_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_IP6_H 1" >>confdefs.h + +fi +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_netinet6_in6_var_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET6_IN6_VAR_H 1" >>confdefs.h + +fi +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 +#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_netinet6_in6_pcb_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET6_IN6_PCB_H 1" >>confdefs.h + +fi +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 +#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_netinet6_ip6_var_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET6_IP6_VAR_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "netinet6/nd6.h" "ac_cv_header_netinet6_nd6_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_netinet6_nd6_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET6_ND6_H 1" >>confdefs.h + +fi +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 +#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_netinet6_tcp6_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET6_TCP6_H 1" >>confdefs.h + +fi +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 +#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_netinet6_tcp6_fsm_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET6_TCP6_FSM_H 1" >>confdefs.h + +fi +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 +#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_netinet6_tcp6_timer_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET6_TCP6_TIMER_H 1" >>confdefs.h + +fi +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 +#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_netinet6_tcp6_var_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET6_TCP6_VAR_H 1" >>confdefs.h + +fi + + +esac + +## +# Pre-requisite on specific types +## + +# Special hack to get around various problems on older Linux kernels +# (major ugh!) +# Agent: +# +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 case e in #( + e) 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 */ +typedef __u32 u32; /* ditto */ +typedef __u16 u16; /* ditto */ +typedef __u8 u8; /* ditto */ + +" +if test "x$ac_cv_header_linux_ethtool_h" = xyes +then : + printf "%s\n" "#define HAVE_LINUX_ETHTOOL_H 1" >>confdefs.h + +fi + + +printf "%s\n" "#define HAVE_LINUX_ETHTOOL_NEEDS_U64 1" >>confdefs.h + ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +## +# Headers requiring particular libraries +## + +# for HostRes (Solaris 2.x) +# Agent: +# + for ac_header in pkginfo.h +do : + 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 case e in #( + e) 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char pkginfo (void); +int +main (void) +{ +return pkginfo (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" +else case e in #( + e) for netsnmp_cur_lib in adm ; 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char pkginfo (void); +int +main (void) +{ +return pkginfo (); + ; + 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 ;; +esac +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_pkginfo_LMIBLIBS="${netsnmp_result}" ;; +esac +fi +{ 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 + +printf "%s\n" "#define HAVE_PKGINFO 1" >>confdefs.h + + + fi + +fi + +done + + for ac_header in pkg.h +do : + 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 case e in #( + e) netsnmp_func_search_save_LIBS="$LIBS" + netsnmp_target_val="$LIBS" + netsnmp_temp_LIBS=" ${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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char pkg_init (void); +int +main (void) +{ +return pkg_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" +else case e in #( + e) 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char pkg_init (void); +int +main (void) +{ +return pkg_init (); + ; + 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 ;; +esac +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_pkg_init_LIBS="${netsnmp_result}" ;; +esac +fi +{ 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 + +printf "%s\n" "#define HAVE_LIBPKG 1" >>confdefs.h + + + fi + +fi + +done + +if test $ac_cv_header_pkg_h = no +then + unset ac_cv_header_pkg_h + netsnmp_save_CPPFLAGS="$CPPFLAGS" + netsnmp_save_LDFLAGS="$LDFLAGS" + CPPFLAGS="$CPPFLAGS -I/usr/local/include" + LDFLAGS="$LDFLAGS -L/usr/local/lib" + for ac_header in pkg.h +do : + 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 case e in #( + e) netsnmp_func_search_save_LIBS="$LIBS" + netsnmp_target_val="$LIBS" + netsnmp_temp_LIBS=" ${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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char pkg_init (void); +int +main (void) +{ +return pkg_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" +else case e in #( + e) 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char pkg_init (void); +int +main (void) +{ +return pkg_init (); + ; + 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 ;; +esac +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_pkg_init_LIBS="${netsnmp_result}" ;; +esac +fi +{ 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 + +printf "%s\n" "#define HAVE_LIBPKG 1" >>confdefs.h + + + fi + +fi + +done + if test $ac_cv_header_pkg_h = no + then + CPPFLAGS="$netsnmp_save_CPPFLAGS" + LDFLAGS="$netsnmp_save_LDFLAGS" + fi +fi + +case $target_os in + aix*) + # for CPU/memory statistics (AIX) + # Agent: + # + for ac_header in libperfstat.h +do : + ac_fn_c_check_header_compile "$LINENO" "libperfstat.h" "ac_cv_header_libperfstat_h" " +#ifdef HAVE_SYS_PROTOSW_H +#include +#endif + +" +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 case e in #( + e) 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char perfstat_cpu_total (void); +int +main (void) +{ +return perfstat_cpu_total (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" +else case e in #( + e) for netsnmp_cur_lib in perfstat ; 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char perfstat_cpu_total (void); +int +main (void) +{ +return perfstat_cpu_total (); + ; + 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 ;; +esac +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_perfstat_cpu_total_LMIBLIBS="${netsnmp_result}" ;; +esac +fi +{ 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 + +printf "%s\n" "#define HAVE_PERFSTAT 1" >>confdefs.h + + else + as_fn_error $? " + +*** To monitor CPU/memory values in AIX you need to install +*** libperfstat which can be found in bos.perf +" "$LINENO" 5 + fi + +fi + +done + ;; + hpux*) + # HP-UX agent needs open_mib (XXX - not a header check!) + # + + { 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 case e in #( + e) 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char open_mib (void); +int +main (void) +{ +return open_mib (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" +else case e in #( + e) for netsnmp_cur_lib in nm ; 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char open_mib (void); +int +main (void) +{ +return open_mib (); + ; + 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 ;; +esac +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_open_mib_LMIBLIBS="${netsnmp_result}" ;; +esac +fi +{ 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 + +printf "%s\n" "#define HAVE_LIBNM 1" >>confdefs.h + + + fi + + ;; + *) + ;; +esac + +# for MIB-2 info (Cygwin and MinGW) +# Core: +# +ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" " +#ifdef HAVE_WINDOWS_H +#include +#endif + +" +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 + + + 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 + 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 + +fi + +fi + +# +# for ucd-snmp/lmsensorsMib +# +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 + +fi + + +## This is here to avoid loads of redefinition warnings during +## module configuration + +## +# rtentry structure checks: +## + +# Check struct rtentry for common fields +# Agent: +# +ac_fn_c_check_member "$LINENO" "struct rtentry" "rt_dst" "ac_cv_member_struct_rtentry_rt_dst" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#include +#ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES +#define _KERNEL_STRUCTURES 1 +#endif +#ifdef HAVE_SYS_SOCKET_H +#ifdef NETSNMP_IFNET_NEEDS_KERNEL +#define KERNEL +#if !defined(__DragonFly__) +#define _KERNEL 1 +#endif +#endif +#include +#undef KERNEL +#undef _KERNEL +#endif +#ifdef HAVE_NET_ROUTE_H +#include +#endif + +" +if test "x$ac_cv_member_struct_rtentry_rt_dst" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_RTENTRY_RT_DST 1" >>confdefs.h + + +fi +ac_fn_c_check_member "$LINENO" "struct rtentry" "rt_hash" "ac_cv_member_struct_rtentry_rt_hash" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#include +#ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES +#define _KERNEL_STRUCTURES 1 +#endif +#ifdef HAVE_SYS_SOCKET_H +#ifdef NETSNMP_IFNET_NEEDS_KERNEL +#define KERNEL +#if !defined(__DragonFly__) +#define _KERNEL 1 +#endif +#endif +#include +#undef KERNEL +#undef _KERNEL +#endif +#ifdef HAVE_NET_ROUTE_H +#include +#endif + +" +if test "x$ac_cv_member_struct_rtentry_rt_hash" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_RTENTRY_RT_HASH 1" >>confdefs.h + + +fi +ac_fn_c_check_member "$LINENO" "struct rtentry" "rt_next" "ac_cv_member_struct_rtentry_rt_next" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#include +#ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES +#define _KERNEL_STRUCTURES 1 +#endif +#ifdef HAVE_SYS_SOCKET_H +#ifdef NETSNMP_IFNET_NEEDS_KERNEL +#define KERNEL +#if !defined(__DragonFly__) +#define _KERNEL 1 +#endif +#endif +#include +#undef KERNEL +#undef _KERNEL +#endif +#ifdef HAVE_NET_ROUTE_H +#include +#endif + +" +if test "x$ac_cv_member_struct_rtentry_rt_next" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_RTENTRY_RT_NEXT 1" >>confdefs.h + + +fi +ac_fn_c_check_member "$LINENO" "struct rtentry" "rt_refcnt" "ac_cv_member_struct_rtentry_rt_refcnt" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#include +#ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES +#define _KERNEL_STRUCTURES 1 +#endif +#ifdef HAVE_SYS_SOCKET_H +#ifdef NETSNMP_IFNET_NEEDS_KERNEL +#define KERNEL +#if !defined(__DragonFly__) +#define _KERNEL 1 +#endif +#endif +#include +#undef KERNEL +#undef _KERNEL +#endif +#ifdef HAVE_NET_ROUTE_H +#include +#endif + +" +if test "x$ac_cv_member_struct_rtentry_rt_refcnt" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_RTENTRY_RT_REFCNT 1" >>confdefs.h + + +fi +ac_fn_c_check_member "$LINENO" "struct rtentry" "rt_unit" "ac_cv_member_struct_rtentry_rt_unit" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#include +#ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES +#define _KERNEL_STRUCTURES 1 +#endif +#ifdef HAVE_SYS_SOCKET_H +#ifdef NETSNMP_IFNET_NEEDS_KERNEL +#define KERNEL +#if !defined(__DragonFly__) +#define _KERNEL 1 +#endif +#endif +#include +#undef KERNEL +#undef _KERNEL +#endif +#ifdef HAVE_NET_ROUTE_H +#include +#endif + +" +if test "x$ac_cv_member_struct_rtentry_rt_unit" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_RTENTRY_RT_UNIT 1" >>confdefs.h + + +fi +ac_fn_c_check_member "$LINENO" "struct rtentry" "rt_use" "ac_cv_member_struct_rtentry_rt_use" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#include +#ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES +#define _KERNEL_STRUCTURES 1 +#endif +#ifdef HAVE_SYS_SOCKET_H +#ifdef NETSNMP_IFNET_NEEDS_KERNEL +#define KERNEL +#if !defined(__DragonFly__) +#define _KERNEL 1 +#endif +#endif +#include +#undef KERNEL +#undef _KERNEL +#endif +#ifdef HAVE_NET_ROUTE_H +#include +#endif + +" +if test "x$ac_cv_member_struct_rtentry_rt_use" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_RTENTRY_RT_USE 1" >>confdefs.h + + +fi + + +fi # NETSNMP_QUICK_CHECK + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# 'ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* 'ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_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) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote + # 'set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) - # `set' quotes correctly as required by POSIX, so do not add quotes. + # 'set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | @@ -19282,15 +24066,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 @@ -19304,8 +24088,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 @@ -19316,1210 +24100,1944 @@ rm -f confcache ## ######################################### -## -# Standard checks: -## +## +# Standard checks: +## + +# 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. +{ 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 case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default" +then : + +else case e in #( + e) if test "$ac_cv_type_short" = yes; then + { { 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 + ac_cv_sizeof_short=0 + fi ;; +esac +fi + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 +printf "%s\n" "$ac_cv_sizeof_short" >&6; } + + + +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. +{ 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 case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" +then : + +else case e in #( + e) if test "$ac_cv_type_int" = yes; then + { { 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 + ac_cv_sizeof_int=0 + fi ;; +esac +fi + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 +printf "%s\n" "$ac_cv_sizeof_int" >&6; } + + + +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. +{ 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 case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default" +then : + +else case e in #( + e) if test "$ac_cv_type_long" = yes; then + { { 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 + ac_cv_sizeof_long=0 + fi ;; +esac +fi + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +printf "%s\n" "$ac_cv_sizeof_long" >&6; } + + + +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. +{ 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 case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default" +then : + +else case e in #( + e) if test "$ac_cv_type_long_long" = yes; then + { { 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 + ac_cv_sizeof_long_long=0 + fi ;; +esac +fi + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 +printf "%s\n" "$ac_cv_sizeof_long_long" >&6; } + + + +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. +{ 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 case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (intmax_t))" "ac_cv_sizeof_intmax_t" "$ac_includes_default" +then : + +else case e in #( + e) if test "$ac_cv_type_intmax_t" = yes; then + { { 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 + ac_cv_sizeof_intmax_t=0 + fi ;; +esac +fi + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_intmax_t" >&5 +printf "%s\n" "$ac_cv_sizeof_intmax_t" >&6; } + + + +printf "%s\n" "#define SIZEOF_INTMAX_T $ac_cv_sizeof_intmax_t" >>confdefs.h + + + +ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t" +case $ac_cv_c_int8_t in #( + no|yes) ;; #( + *) + +printf "%s\n" "#define int8_t $ac_cv_c_int8_t" >>confdefs.h +;; +esac + +ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t" +case $ac_cv_c_int16_t in #( + no|yes) ;; #( + *) + +printf "%s\n" "#define int16_t $ac_cv_c_int16_t" >>confdefs.h +;; +esac + +ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t" +case $ac_cv_c_int32_t in #( + no|yes) ;; #( + *) + +printf "%s\n" "#define int32_t $ac_cv_c_int32_t" >>confdefs.h +;; +esac + +ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t" +case $ac_cv_c_int64_t in #( + no|yes) ;; #( + *) + +printf "%s\n" "#define int64_t $ac_cv_c_int64_t" >>confdefs.h +;; +esac + + + { 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 case e in #( + e) 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 + 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 (void) +{ +/* 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 : + +else case e in #( + e) ac_cv_type_unsigned_long_long_int=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext;; + esac ;; +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 case e in #( + e) ac_cv_type_long_long_int=yes + 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 case e in #( + e) 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 +int +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; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + +else case e in #( + e) ac_cv_type_long_long_int=no ;; +esac +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac +fi + + fi;; + esac ;; +esac +fi +{ 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 + +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 : + +printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h + +else case e in #( + e) test $ac_cv_type_long_long_int = yes \ + && ac_type='long long int' \ + || ac_type='long int' + +printf "%s\n" "#define intmax_t $ac_type" >>confdefs.h + ;; +esac +fi + + +ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t" +case $ac_cv_c_uint8_t in #( + no|yes) ;; #( + *) + +printf "%s\n" "#define _UINT8_T 1" >>confdefs.h + + +printf "%s\n" "#define uint8_t $ac_cv_c_uint8_t" >>confdefs.h +;; + esac + +ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t" +case $ac_cv_c_uint16_t in #( + no|yes) ;; #( + *) + + +printf "%s\n" "#define uint16_t $ac_cv_c_uint16_t" >>confdefs.h +;; + esac + +ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" +case $ac_cv_c_uint32_t in #( + no|yes) ;; #( + *) + +printf "%s\n" "#define _UINT32_T 1" >>confdefs.h + + +printf "%s\n" "#define uint32_t $ac_cv_c_uint32_t" >>confdefs.h +;; + esac + +ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t" +case $ac_cv_c_uint64_t in #( + no|yes) ;; #( + *) + +printf "%s\n" "#define _UINT64_T 1" >>confdefs.h + + +printf "%s\n" "#define uint64_t $ac_cv_c_uint64_t" >>confdefs.h +;; + esac + + + + 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 : + +printf "%s\n" "#define HAVE_UINTMAX_T 1" >>confdefs.h + +else case e in #( + e) test $ac_cv_type_unsigned_long_long_int = yes \ + && ac_type='unsigned long long int' \ + || ac_type='unsigned long int' + +printf "%s\n" "#define uintmax_t $ac_type" >>confdefs.h + ;; +esac +fi + -# 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 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 - 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;} -as_fn_error 77 "cannot compute sizeof (short) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_short=0 - fi -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 : + +printf "%s\n" "#define HAVE_INTPTR_T 1" >>confdefs.h + +else case e in #( + e) 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 (void) +{ +static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; +test_array [0] = 0; +return test_array [0]; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +printf "%s\n" "#define intptr_t $ac_type" >>confdefs.h + + ac_type= +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + test -z "$ac_type" && break + done ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 -$as_echo "$ac_cv_sizeof_short" >&6; } -cat >>confdefs.h <<_ACEOF -#define SIZEOF_SHORT $ac_cv_sizeof_short -_ACEOF + 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 : +printf "%s\n" "#define HAVE_UINTPTR_T 1" >>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 case e in #( + e) 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 (void) +{ +static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; +test_array [0] = 0; +return test_array [0]; -else - 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;} -as_fn_error 77 "cannot compute sizeof (int) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_int=0 - fi -fi + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +printf "%s\n" "#define uintptr_t $ac_type" >>confdefs.h + ac_type= +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + test -z "$ac_type" && break + done ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 -$as_echo "$ac_cv_sizeof_int" >&6; } -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int -_ACEOF +## +# Other type checks: +## +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 : -# 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 : +printf "%s\n" "#define HAVE_OFF64_T 1" >>confdefs.h -else - 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;} -as_fn_error 77 "cannot compute sizeof (long) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long=0 - fi -fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } +ac_fn_c_check_type "$LINENO" "nfds_t" "ac_cv_type_nfds_t" "#include +" +if test "x$ac_cv_type_nfds_t" = xyes +then : +printf "%s\n" "#define HAVE_NFDS_T 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF +fi + + +# Solaris specific checks +# (taken from Perl's configure script) +# +ac_fn_c_check_type "$LINENO" "Counter64" "ac_cv_type_Counter64" "#include +" +if test "x$ac_cv_type_Counter64" = xyes +then : + +printf "%s\n" "#define HAVE_COUNTER64 1" >>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 - 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;} -as_fn_error 77 "cannot compute sizeof (long long) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long_long=0 - fi 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 : + +printf "%s\n" "#define HAVE_MIB2_IPIFSTATSENTRY_T 1" >>confdefs.h + + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 -$as_echo "$ac_cv_sizeof_long_long" >&6; } +# N.B: The above checks could safely be moved to +# the later 'config_types' sub-script +# -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long -_ACEOF +# 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 : -# 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 : +printf "%s\n" "#define HAVE_STRUCT_IN_IFADDR_IA_SUBNETMASK 1" >>confdefs.h -else - 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;} -as_fn_error 77 "cannot compute sizeof (intmax_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_intmax_t=0 - fi -fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_intmax_t" >&5 -$as_echo "$ac_cv_sizeof_intmax_t" >&6; } -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INTMAX_T $ac_cv_sizeof_intmax_t -_ACEOF +## +# Determine the IPv6 stack type +## +# These checks also set the LIBS/CFLAGS variables, +# which may be needed for subsequent function tests +# +if test "x$enable_ipv6" = "xyes"; then + v6lib=none + v6trylibc=no -ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t" -case $ac_cv_c_int8_t in #( - no|yes) ;; #( - *) + { 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. */ -cat >>confdefs.h <<_ACEOF -#define int8_t $ac_cv_c_int8_t +#include +#ifdef __V6D__ +yes +#endif _ACEOF -;; -esac +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP_TRADITIONAL "yes" >/dev/null 2>&1 +then : + v6lib=v6; + v6libdir=/usr/local/v6/lib; + CFLAGS="-I/usr/local/v6/include $CFLAGS" +fi +rm -rf conftest* -ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t" -case $ac_cv_c_int16_t in #( - no|yes) ;; #( - *) + ;; + toshiba) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -cat >>confdefs.h <<_ACEOF -#define int16_t $ac_cv_c_int16_t +#include +#ifdef _TOSHIBA_INET6 +yes +#endif _ACEOF -;; -esac +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP_TRADITIONAL "yes" >/dev/null 2>&1 +then : + v6lib=inet6; + v6libdir=/usr/local/v6/lib; + CFLAGS="-DNETSNMP_ENABLE_IPV6 $CFLAGS" +fi +rm -rf conftest* -ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t" -case $ac_cv_c_int32_t in #( - no|yes) ;; #( - *) + ;; + kame) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -cat >>confdefs.h <<_ACEOF -#define int32_t $ac_cv_c_int32_t +#include +#ifdef __KAME__ +yes +#endif _ACEOF -;; -esac +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP_TRADITIONAL "yes" >/dev/null 2>&1 +then : + v6lib=inet6; + v6libdir=/usr/local/v6/lib; + v6trylibc=yes; + CFLAGS="-DNETSNMP_ENABLE_IPV6 $CFLAGS" +fi +rm -rf conftest* -ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t" -case $ac_cv_c_int64_t in #( - no|yes) ;; #( - *) + ;; + zeta) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -cat >>confdefs.h <<_ACEOF -#define int64_t $ac_cv_c_int64_t +#include +#ifdef _ZETA_MINAMI_INET6 +yes +#endif _ACEOF -;; -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 - ac_cv_type_unsigned_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP_TRADITIONAL "yes" >/dev/null 2>&1 +then : + v6lib=inet6; + v6libdir=/usr/local/v6/lib; + CFLAGS="-DNETSNMP_ENABLE_IPV6 $CFLAGS" +fi +rm -rf conftest* - /* 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; -} + ;; + 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 +#endif +#endif +$ac_includes_default +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : +" +if test "x$ac_cv_member_struct_sockaddr_in6_sin6_addr" = xyes +then : -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 -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 + { 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 + v6lib=dummy + v6libdir=none + v6trylibc=yes + CFLAGS="-DNETSNMP_ENABLE_IPV6 $CFLAGS" + fi + ;; + esac + if test "$v6lib" != "none"; then + break + fi + done - fi + if test "$v6lib" != "none"; then + if test -d $v6libdir -a -f $v6libdir/lib$v6lib.a; then + LIBS="-L$v6libdir -l$v6lib $LIBS" + enable_ipv6="yes" + { 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" + { 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" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$v6type, $enable_ipv6\"" >&5 +printf "%s\n" "\"$v6type, $enable_ipv6\"" >&6; } + fi +fi +# -*- autoconf -*- +# +# Maybe add library extensions for thread mutex locking. +# +if test "x$with_res_locks" = "xyes"; then - { $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 - ac_cv_type_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - 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 - 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 -int -main () -{ -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; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : +printf "%s\n" "#define NETSNMP_REENTRANT 1" >>confdefs.h -else - 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 - fi - fi -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; } - if test $ac_cv_type_long_long_int = yes; then + case $target_os in -$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h + aix*) + CC_RUNTIME_ARG="$CC_RUNTIME_ARG -lpthreads" + ;; - fi + *) + ;; + esac +fi +# +# Add platform-specific source files. +# +{ 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="" +other_objs_list="" +other_agentobjs="" +other_lagentobjs="" +other_ftagentobjs="" +other_trapd_objects="" - 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 : +# Win32 service code +if test "x$PARTIALTARGETOS" = "xmingw32" -o "x$PARTIALTARGETOS" = "xmingw32msvc"; then + other_src_list="$other_src_list winservice.c winservicerc.rc" + other_objs_list="$other_objs_list winservice.o winservicerc.o" + other_lobjs_list="$other_lobjs_list winservice.lo winservicerc.lo" + other_ftobjs_list="$other_ftobjs_list winservice.ft winservicerc.ft" + other_agentobjs="../snmplib/winservicerc.o" + other_lagentobjs="../snmplib/winservicerc.lo" + other_ftagentobjs="../snmplib/winservicerc.lo" + other_trapd_objects="../snmplib/winservicerc.o" +fi -$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h +# Win32 pipes +if test "x$PARTIALTARGETOS" = "xmingw32" -o "x$PARTIALTARGETOS" = "xmingw32msvc"; then + other_src_list="$other_src_list winpipe.c" + other_objs_list="$other_objs_list winpipe.o" + other_lobjs_list="$other_lobjs_list winpipe.lo" + other_ftobjs_list="$other_ftobjs_list winpipe.ft" +fi -else - test $ac_cv_type_long_long_int = yes \ - && ac_type='long long int' \ - || ac_type='long int' +# 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 -cat >>confdefs.h <<_ACEOF -#define intmax_t $ac_type -_ACEOF -fi -ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t" -case $ac_cv_c_uint8_t in #( - no|yes) ;; #( - *) -$as_echo "#define _UINT8_T 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define uint8_t $ac_cv_c_uint8_t -_ACEOF -;; - esac -ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t" -case $ac_cv_c_uint16_t in #( - no|yes) ;; #( - *) -cat >>confdefs.h <<_ACEOF -#define uint16_t $ac_cv_c_uint16_t -_ACEOF -;; - esac +{ 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; } -ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" -case $ac_cv_c_uint32_t in #( - no|yes) ;; #( - *) +# +# Create directory structure for build +# +if test ! -d include; then + mkdir include +fi +if test ! -d include/net-snmp; then + mkdir include/net-snmp +fi +if test ! -d include/net-snmp/agent; then + mkdir include/net-snmp/agent +fi +if test ! -d include/net-snmp/library; then + mkdir include/net-snmp/library +fi +if test ! -d include/ucd-snmp; then + mkdir include/ucd-snmp +fi -$as_echo "#define _UINT32_T 1" >>confdefs.h +if test ! -d snmplib; then + mkdir snmplib +fi +if test ! -d snmplib/transports ; then + mkdir snmplib/transports +fi +# +# Do transport module processing. +# +{ 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; } -cat >>confdefs.h <<_ACEOF -#define uint32_t $ac_cv_c_uint32_t -_ACEOF -;; - esac +# include the actual code checking +# -*- sh -*- +transport_src_list="" +transport_hdr_list="" +transport_def_list="" +transport_result_list="" +transport_add_list="" +new_with_transport_list=`echo $with_transports | $SED 's/,/ /g;'` +new_with_out_transport_list=`echo $with_out_transports | $SED 's/,/ /g;'` -ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t" -case $ac_cv_c_uint64_t in #( - no|yes) ;; #( - *) +# set up the CPP command +MODULECPP="$CPP $CPPFLAGS $PARTIALTARGETFLAGS -I${srcdir} -I${srcdir}/include" -$as_echo "#define _UINT64_T 1" >>confdefs.h +# +# Add the default transports to the list +# +if test "x$PARTIALTARGETOS" = "xmingw32" -o "x$PARTIALTARGETOS" = "xmingw32msvc"; then + transport_default_list="UDP TCP Alias Callback" +else + transport_default_list="UDP TCP Alias Unix Callback" +fi +if test "x$enable_ipv6" = "xyes"; then + transport_default_list="UDPIPv6 TCPIPv6 $transport_default_list" +fi +for i in $transport_default_list; do + if echo " $new_with_transport_list " | $GREP " $i " >/dev/null; then + : + else + transport_add_list="$i $transport_add_list" + fi +done +new_transport_list="$transport_add_list $new_with_transport_list" +if test "x$ctor_header" = "x" ; then + ctor_header="snmplib/transports/snmp_transport_inits.h" +fi -cat >>confdefs.h <<_ACEOF -#define uint64_t $ac_cv_c_uint64_t -_ACEOF -;; - esac +echo "/* This file is automatically generated by configure. Do not modify by hand. */" > $ctor_header +while test "x$new_transport_list" != "x"; do + future_new_transport_list="" + for i in $new_transport_list; do + if echo " $new_with_out_transport_list " | $GREP " $i " >/dev/null; then + true + else + if test "x$enable_ipv6" != "xyes"; then + if test "x$i" = "xUDPIPv6" -o "x$i" = "xTCPIPv6"; then + as_fn_error $? "IPv6 transports not available if IPv6 support is not enabled" "$LINENO" 5 + fi + fi + transport_src="transports/snmp"$i"Domain.c" + transport_hdr="snmp"$i"Domain.h" + rel_transport_src="snmplib/"$transport_src + 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 + transport_result_list="$transport_result_list $i" + transport_src_list="$transport_src $transport_src_list" + if test -f "$srcdir/$rel_transport_hdr"; then + transport_hdr_list="$transport_hdr $transport_hdr_list" + fi + transport_def=`echo $i | $SED 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + transport_def_list="NETSNMP_TRANSPORT_"$transport_def"_DOMAIN $transport_def_list" + else + echo + as_fn_error $? "Cannot find file $srcdir/$rel_transport_src to support SNMP transport domain $i." "$LINENO" 5 + fi + #--------------------- + # build a pseudo include header that includes current config and + # system symbols: + rm -f conftest.$ac_ext module_tmp_header.h + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include NETSNMP_SYSTEM_INCLUDE_FILE +#undef NETSNMP_MINIMAL_CODE +#define NET_SNMP_CONFIG_H +#undef config_require +#define config_require(foo) config_checkit_require(foo) +#undef config_error +#define config_error(foo) config_checkit_error(foo) +#include "$rel_transport_hdr" +_ACEOF + mv conftest.$ac_ext module_tmp_header.h - 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 : + # + # check for dependencies using config_require() macro + # + sub_list=`$MODULECPP module_tmp_header.h | $GREP config_checkit_require | $SED 's/.*config_checkit_require *( *\(.*\) *).*/\1/'` + if test "x$sub_list" != "x" ; then + for j in $sub_list ; do + if echo " $future_new_transport_list $new_transport_list " | $GREP " $j " > /dev/null ; then + : + else + future_new_transport_list="$future_new_transport_list $j" + fi + done + fi -$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h + # + # check for errors using config_error() macro + # + error_list=`$MODULECPP module_tmp_header.h | $GREP config_checkit_error | $SED 's/.*config_checkit_error(\(.*\)).*/\1/g'` + if test "x$error_list" != "x" ; then + echo "" + as_fn_error $? "$error_list" "$LINENO" 5 + fi -else - test $ac_cv_type_unsigned_long_long_int = yes \ - && ac_type='unsigned long long int' \ - || ac_type='unsigned long int' + # + # Check for needed constructor initialization routines to call + # + found=`grep $ctor_fn $srcdir/$rel_transport_src` + if grep $ctor_fn $srcdir/$rel_transport_src > /dev/null ; then + # we add them down below instead of here to make sure + # config_require dependency constructors get called first. + tr_init_list="$ctor_fn $tr_init_list" + fi + fi + done # for each new transport + new_transport_list="$future_new_transport_list" +done # while new transports exist +transport_obj_list=`echo " $transport_src_list " | $SED 's/\.c/\.o/g'` +transport_lobj_list=`echo " $transport_src_list " | $SED 's/\.c/\.lo/g'` +transport_ftobj_list=`echo " $transport_src_list " | $SED 's/\.c/\.ft/g'` +for i in $tr_init_list ; do + echo "$i();" >> $ctor_header +done -cat >>confdefs.h <<_ACEOF -#define uintmax_t $ac_type -_ACEOF +## win32 platforms require inet_ntop etc. +if test "x$PARTIALTARGETOS" = "xmingw32" -o "x$PARTIALTARGETOS" = "xmingw32msvc" -o "x$PARTIALTARGETOS" = "xcygwin"; then + if echo "$transport_def_list" | $GREP "IPV6" >/dev/null; then + transport_obj_list="$transport_obj_list inet_ntop.o inet_pton.o" + transport_lobj_list="$transport_lobj_list inet_ntop.lo inet_pton.lo" + transport_ftobj_list="$transport_ftobj_list inet_ntop.ft inet_pton.ft" + fi +fi +if test "x$transport_result_list" = x ; then + as_fn_error $? "No transports configured, at least one must be provided" "$LINENO" 5 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 : -$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h -else - 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 () -{ -static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; -test_array [0] = 0; -return test_array [0]; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : -cat >>confdefs.h <<_ACEOF -#define intptr_t $ac_type -_ACEOF +for i in $transport_def_list; do + printf "%s\n" "#define $i 1" >>confdefs.h - ac_type= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test -z "$ac_type" && break - done -fi +done +{ 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 +EOF - 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 : +# cleanup +rm -f module_tmp_header.h -$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h +# +# Security modules to use +# -else - 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 () -{ -static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; -test_array [0] = 0; -return test_array [0]; +{ 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="" +security_obj_list="" +security_lobj_list="" +security_ftobj_list="" +security_mod_list=" " - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +new_with_security= +new_with_out_security=`echo $with_out_security_modules | tr , ' '` -cat >>confdefs.h <<_ACEOF -#define uintptr_t $ac_type -_ACEOF +# Assign additional security modules +for i in `echo $with_security_modules | tr , ' '`; do + if echo " $new_with_out_security " | $GREP " $i " > /dev/null; then + echo + as_fn_error $? "security module conflict - $i both included and excluded" "$LINENO" 5 + elif echo " $new_with_security " | $GREP " $i " > /dev/null ; then + : # Double define, ignore + else + new_with_security="$new_with_security $i" + fi +done - ac_type= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test -z "$ac_type" && break - done -fi +# Add default security modules +for i in $security_def_list; do + if echo " $new_with_out_security " | $GREP " $i " > /dev/null; then + : # Excluded, ignore + elif echo " $new_with_security " | $GREP " $i " > /dev/null ; then + : # Double define, ignore + else + new_with_security="$new_with_security $i" + fi +done +# Generate output files +: ${security_init_file:='snmplib/snmpsm_init.h'} +: ${security_shutdown_file:='snmplib/snmpsm_shutdown.h'} +: ${security_incl_file:='include/net-snmp/library/snmpv3-security-includes.h'} +echo "/* This file is automatically generated by configure. Do not modify by hand. */" > $security_init_file +echo "/* This file is automatically generated by configure. Do not modify by hand. */" > $security_shutdown_file +echo "/* This file is automatically generated by configure. Do not modify by hand. */" > $security_incl_file -## -# Other type checks: -## +for i in $new_with_security; do + cfile="snmp"$i".c" + hfile="snmp"$i".h" -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 : + # make sure support exists for it + if test -f $srcdir"/snmplib/"$cfile -a -f $srcdir"/include/net-snmp/library/"$hfile; then + : + else + echo + as_fn_error $? "No such security module: $i / $cfile / $hfile" "$LINENO" 5 + fi -cat >>confdefs.h <<_ACEOF -#define HAVE_OFF64_T 1 -_ACEOF + # define a bunch of stuff to enable it + security_mod_list="${security_mod_list} $i" + security_src_list="$security_src_list $cfile" + security_src_list="$security_src_list $cfile" + security_hdr_list="$security_hdr_list $hfile" + security_obj_list="$security_obj_list snmp"$i".o" + security_lobj_list="$security_lobj_list snmp"$i".lo" + security_ftobj_list="$security_ftobj_list snmp"$i".ft" + echo "init_"$i"();" >> $security_init_file + echo "shutdown_"$i"();" >> $security_shutdown_file + echo "#include " >> $security_incl_file + def_name="`printf "%s\n" "NETSNMP_SECMOD_$i" | sed "$as_sed_cpp"`" + printf "%s\n" "#define $def_name 1" >>confdefs.h +done -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 : -cat >>confdefs.h <<_ACEOF -#define HAVE_NFDS_T 1 -_ACEOF -fi -# Solaris specific checks -# (taken from Perl's configure script) -# -ac_fn_c_check_type "$LINENO" "Counter64" "ac_cv_type_Counter64" "#include -" -if test "x$ac_cv_type_Counter64" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $new_with_security" >&5 +printf "%s\n" "$new_with_security" >&6; } -cat >>confdefs.h <<_ACEOF -#define HAVE_COUNTER64 1 -_ACEOF + cat >> configure-summary << EOF + SNMPv3 Security Modules: $new_with_security +EOF -fi +# +# Handle the special case of KSM to see which crypto API we support +# -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 : +rebuilt_new_with_security= +already_checked_krb5=no -cat >>confdefs.h <<_ACEOF -#define HAVE_MIB2_IPIFSTATSENTRY_T 1 -_ACEOF +netsnmp_save_LIBS=$LIBS +CRYPTO_LIBS="" +for sec in $new_with_security +do + if test "x$sec" = "xksm"; then + if test "xyes" = "x$already_checked_krb5"; then + continue + else + already_checked_krb5=yes + fi + fi -fi + if test x$sec != xksm; then + rebuilt_new_with_security="$rebuilt_new_with_security $sec" + else + if test no = $trykrb5; then + { 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 +{ 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 case e in #( + e) case $krb5_config in + [\\/]* | ?:[\\/]*) + ac_cv_path_krb5_config="$krb5_config" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$krb5path/bin:$PATH" +for as_dir in $as_dummy +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_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 + done +IFS=$as_save_IFS -# N.B: The above checks could safely be moved to -# the later 'config_types' sub-script -# + test -z "$ac_cv_path_krb5_config" && ac_cv_path_krb5_config="no" + ;; +esac ;; +esac +fi +krb5_config=$ac_cv_path_krb5_config +if test -n "$krb5_config"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_config" >&5 +printf "%s\n" "$krb5_config" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -# 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 : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IN_IFADDR_IA_SUBNETMASK 1 -_ACEOF + if test no != $krb5_config; then + CPPFLAGS="$CPPFLAGS `$krb5_config --cflags`" + CRYPTO_LIBS="$CRYPTO_LIBS `$krb5_config --libs | + $SED 's/-flto=[^[:blank:]]*//g'`" -fi + elif test $krb5path != no; then + if test "x$krb5path" != x -a -d $krb5path; then + if test -d $krb5path/lib; then + LDFLAGS="-L$krb5path/lib $LDFLAGS" + fi + if test -d $krb5path/include; then + CPPFLAGS="-I$krb5path/include $CPPFLAGS" + fi + fi + else -## -# Determine the IPv6 stack type -## + if test "x/usr/kerberos" != x -a -d /usr/kerberos; then + if test -d /usr/kerberos/lib; then + LDFLAGS="-L/usr/kerberos/lib $LDFLAGS" + fi + if test -d /usr/kerberos/include; then + CPPFLAGS="-I/usr/kerberos/include $CPPFLAGS" + fi + fi -# These checks also set the LIBS/CFLAGS variables, -# which may be needed for subsequent function tests -# + fi -if test "x$enable_ipv6" = "xyes"; then - 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 v6type in v6d toshiba kame zeta generic; do - case $v6type in - v6d) - 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 case e in #( + e) 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. */ -#include -#ifdef __V6D__ -yes +/* 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" #endif +char krb5_init_context (void); +int +main (void) +{ +return krb5_init_context (); + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $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* - - ;; - toshiba) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" +else case e in #( + e) 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. */ -#include -#ifdef _TOSHIBA_INET6 -yes +/* 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" #endif +char krb5_init_context (void); +int +main (void) +{ +return krb5_init_context (); + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - v6lib=inet6; - v6libdir=/usr/local/v6/lib; - CFLAGS="-DNETSNMP_ENABLE_IPV6 $CFLAGS" +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result=-l${netsnmp_cur_lib} + break fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + done ;; +esac +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_init_context_CRYPTO_LIBS="${netsnmp_result}" ;; +esac +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 - ;; - kame) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + { 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 case e in #( + e) 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. */ -#include -#ifdef __KAME__ -yes +/* 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" #endif +char error_message (void); +int +main (void) +{ +return error_message (); + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $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* - - ;; - zeta) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" +else case e in #( + e) 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. */ -#include -#ifdef _ZETA_MINAMI_INET6 -yes +/* 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" #endif +char error_message (void); +int +main (void) +{ +return error_message (); + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - v6lib=inet6; - v6libdir=/usr/local/v6/lib; - 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" " -#ifdef HAVE_WINSOCK2_H -#include -#ifdef HAVE_WS2TCPIP_H -#include -#endif -#endif -$ac_includes_default -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif - -" -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; } - if test "x$ac_cv_member_struct_sockaddr_in6_sin6_addr" = "xyes"; then - v6lib=dummy - v6libdir=none - v6trylibc=yes - CFLAGS="-DNETSNMP_ENABLE_IPV6 $CFLAGS" - fi - ;; - esac - if test "$v6lib" != "none"; then - break - fi - done - - if test "$v6lib" != "none"; then - 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; } - 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; } - 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; } - fi -fi - -# -*- autoconf -*- -# -# Maybe add library extensions for thread mutex locking. -# - -if test "x$with_res_locks" = "xyes"; then - -$as_echo "#define NETSNMP_REENTRANT 1" >>confdefs.h - - - case $target_os in - - aix*) - CC_RUNTIME_ARG="$CC_RUNTIME_ARG -lpthreads" - ;; - - *) - ;; - - esac -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; } -other_src_list="" -other_ftobjs_list="" -other_lobjs_list="" -other_objs_list="" -other_agentobjs="" -other_lagentobjs="" -other_ftagentobjs="" -other_trapd_objects="" - -# Win32 service code -if test "x$PARTIALTARGETOS" = "xmingw32" -o "x$PARTIALTARGETOS" = "xmingw32msvc"; then - other_src_list="$other_src_list winservice.c winservicerc.rc" - other_objs_list="$other_objs_list winservice.o winservicerc.o" - other_lobjs_list="$other_lobjs_list winservice.lo winservicerc.lo" - other_ftobjs_list="$other_ftobjs_list winservice.ft winservicerc.ft" - other_agentobjs="../snmplib/winservicerc.o" - other_lagentobjs="../snmplib/winservicerc.lo" - other_ftagentobjs="../snmplib/winservicerc.lo" - other_trapd_objects="../snmplib/winservicerc.o" +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result=-l${netsnmp_cur_lib} + break fi - -# Win32 pipes -if test "x$PARTIALTARGETOS" = "xmingw32" -o "x$PARTIALTARGETOS" = "xmingw32msvc"; then - other_src_list="$other_src_list winpipe.c" - other_objs_list="$other_objs_list winpipe.o" - other_lobjs_list="$other_lobjs_list winpipe.lo" - other_ftobjs_list="$other_ftobjs_list winpipe.ft" +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + done ;; +esac 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" +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}" ;; +esac 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no. disabling ksm" >&5 +printf "%s\n" "no. disabling ksm" >&6; } + continue + fi + { 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}: 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; } - -# -# Create directory structure for build -# -if test ! -d include; then - mkdir include -fi -if test ! -d include/net-snmp; then - mkdir include/net-snmp -fi -if test ! -d include/net-snmp/agent; then - mkdir include/net-snmp/agent -fi -if test ! -d include/net-snmp/library; then - mkdir include/net-snmp/library + { 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 case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +const char *v = heimdal_version; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_heimdal=yes +else case e in #( + e) ac_cv_heimdal=no + ;; +esac fi -if test ! -d include/ucd-snmp; then - mkdir include/ucd-snmp +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -if test ! -d snmplib; then - mkdir snmplib -fi -if test ! -d snmplib/transports ; then - mkdir snmplib/transports -fi + { 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 -# -# 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" "#define NETSNMP_USE_KERBEROS_HEIMDAL 1" >>confdefs.h -# include the actual code checking -# -*- sh -*- -transport_src_list="" -transport_hdr_list="" -transport_def_list="" -transport_result_list="" -transport_add_list="" -new_with_transport_list=`echo $with_transports | $SED 's/,/ /g;'` -new_with_out_transport_list=`echo $with_out_transports | $SED 's/,/ /g;'` + if test no = $krb5_config; then + CRYPTO_LIBS="$CRYPTO_LIBS -lkrb5 -lasn1 -lcom_err -lroken" + fi + elif test no = $krb5_config; then + CRYPTO_LIBS="$CRYPTO_LIBS -lkrb5 -lcom_err" + fi -# set up the CPP command -MODULECPP="$CPP $CPPFLAGS $PARTIALTARGETFLAGS -I${srcdir} -I${srcdir}/include" + if test ${ac_cv_NETSNMP_USE_KERBEROS_MIT+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) + { 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 case e in #( + e) 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. */ -# -# Add the default transports to the list -# -if test "x$PARTIALTARGETOS" = "xmingw32" -o "x$PARTIALTARGETOS" = "xmingw32msvc"; then - transport_default_list="UDP TCP Alias Callback" -else - transport_default_list="UDP TCP Alias Unix Callback" +/* 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char krb5_init_context (void); +int +main (void) +{ +return krb5_init_context (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" +else case e in #( + e) 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char krb5_init_context (void); +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 -if test "x$enable_ipv6" = "xyes"; then - transport_default_list="UDPIPv6 TCPIPv6 $transport_default_list" +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + done ;; +esac fi -for i in $transport_default_list; do - if echo " $new_with_transport_list " | $GREP " $i " >/dev/null; then - : - else - transport_add_list="$i $transport_add_list" - fi -done -new_transport_list="$transport_add_list $new_with_transport_list" +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}" ;; +esac +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 -if test "x$ctor_header" = "x" ; then - ctor_header="snmplib/transports/snmp_transport_inits.h" + ;; +esac fi -echo "/* This file is automatically generated by configure. Do not modify by hand. */" > $ctor_header -while test "x$new_transport_list" != "x"; do - future_new_transport_list="" - for i in $new_transport_list; do - if echo " $new_with_out_transport_list " | $GREP " $i " >/dev/null; then - true - else - if test "x$enable_ipv6" != "xyes"; then - if test "x$i" = "xUDPIPv6" -o "x$i" = "xTCPIPv6"; then - as_fn_error $? "IPv6 transports not available if IPv6 support is not enabled" "$LINENO" 5 - fi - fi - 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 - lc_i=`echo $i | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - ctor_fn="netsnmp_"$lc_i"_ctor" - if test -f "$srcdir/$rel_transport_src"; then - transport_result_list="$transport_result_list $i" - transport_src_list="$transport_src $transport_src_list" - if test -f "$srcdir/$rel_transport_hdr"; then - transport_hdr_list="$transport_hdr $transport_hdr_list" - fi - transport_def=`echo $i | $SED 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - transport_def_list="NETSNMP_TRANSPORT_"$transport_def"_DOMAIN $transport_def_list" - else - echo - as_fn_error $? "Cannot find file $srcdir/$rel_transport_src to support SNMP transport domain $i." "$LINENO" 5 - fi - #--------------------- - # build a pseudo include header that includes current config and - # system symbols: - rm -f conftest.$ac_ext module_tmp_header.h - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { 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 case e in #( + e) 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. */ -#include NETSNMP_SYSTEM_INCLUDE_FILE -#undef NETSNMP_MINIMAL_CODE -#define NET_SNMP_CONFIG_H -#undef config_require -#define config_require(foo) config_checkit_require(foo) -#undef config_error -#define config_error(foo) config_checkit_error(foo) -#include "$rel_transport_hdr" -_ACEOF - mv conftest.$ac_ext module_tmp_header.h - - # - # check for dependencies using config_require() macro - # - sub_list=`$MODULECPP module_tmp_header.h | $GREP config_checkit_require | $SED 's/.*config_checkit_require *( *\(.*\) *).*/\1/'` - if test "x$sub_list" != "x" ; then - for j in $sub_list ; do - if echo " $future_new_transport_list $new_transport_list " | $GREP " $j " > /dev/null ; then - : - else - future_new_transport_list="$future_new_transport_list $j" - fi - done - fi - - # - # check for errors using config_error() macro - # - error_list=`$MODULECPP module_tmp_header.h | $GREP config_checkit_error | $SED 's/.*config_checkit_error(\(.*\)).*/\1/g'` - if test "x$error_list" != "x" ; then - echo "" - as_fn_error $? "$error_list" "$LINENO" 5 - fi - - # - # Check for needed constructor initialization routines to call - # - found=`grep $ctor_fn $srcdir/$rel_transport_src` - if grep $ctor_fn $srcdir/$rel_transport_src > /dev/null ; then - # we add them down below instead of here to make sure - # config_require dependency constructors get called first. - tr_init_list="$ctor_fn $tr_init_list" - fi - fi - done # for each new transport - new_transport_list="$future_new_transport_list" -done # while new transports exist -transport_obj_list=`echo " $transport_src_list " | $SED 's/\.c/\.o/g'` -transport_lobj_list=`echo " $transport_src_list " | $SED 's/\.c/\.lo/g'` -transport_ftobj_list=`echo " $transport_src_list " | $SED 's/\.c/\.ft/g'` -for i in $tr_init_list ; do - echo "$i();" >> $ctor_header -done +/* 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char krb5_c_keyed_checksum_types (void); +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 case e in #( + e) 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. */ -## win32 platforms require inet_ntop etc. -if test "x$PARTIALTARGETOS" = "xmingw32" -o "x$PARTIALTARGETOS" = "xmingw32msvc" -o "x$PARTIALTARGETOS" = "xcygwin"; then - if echo "$transport_def_list" | $GREP "IPV6" >/dev/null; then - transport_obj_list="$transport_obj_list inet_ntop.o inet_pton.o" - transport_lobj_list="$transport_lobj_list inet_ntop.lo inet_pton.lo" - transport_ftobj_list="$transport_ftobj_list inet_ntop.ft inet_pton.ft" - fi +/* 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char krb5_c_keyed_checksum_types (void); +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 - -if test "x$transport_result_list" = x ; then - as_fn_error $? "No transports configured, at least one must be provided" "$LINENO" 5 +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + done ;; +esac 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}" ;; +esac +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 -for i in $transport_def_list; do - cat >>confdefs.h <<_ACEOF -#define $i 1 -_ACEOF - -done -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $transport_result_list." >&5 -$as_echo "$transport_result_list." >&6; } - - cat >> configure-summary << EOF - Network transport support: $transport_result_list -EOF +else case e in #( + e) ac_cv_NETSNMP_USE_KERBEROS_MIT=no ;; +esac +fi -# cleanup -rm -f module_tmp_header.h + { 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: new MIT crypto API" >&5 +printf "%s\n" "new MIT crypto API" >&6; } -# -# Security modules to use -# +printf "%s\n" "#define NETSNMP_USE_KERBEROS_MIT 1" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for security modules to use" >&5 -$as_echo_n "checking for security modules to use... " >&6; } -# -*- sh -*- -security_def_list="usm" -security_src_list="" -security_obj_list="" -security_lobj_list="" -security_ftobj_list="" -security_mod_list=" " + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: old MIT crypto API" >&5 +printf "%s\n" "old MIT crypto API" >&6; } + fi + 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 -new_with_security= -new_with_out_security=`echo $with_out_security_modules | tr , ' '` +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 -# Assign additional security modules -for i in `echo $with_security_modules | tr , ' '`; do - if echo " $new_with_out_security " | $GREP " $i " > /dev/null; then - echo - as_fn_error $? "security module conflict - $i both included and excluded" "$LINENO" 5 - elif echo " $new_with_security " | $GREP " $i " > /dev/null ; then - : # Double define, ignore - else - new_with_security="$new_with_security $i" - fi -done +fi -# Add default security modules -for i in $security_def_list; do - if echo " $new_with_out_security " | $GREP " $i " > /dev/null; then - : # Excluded, ignore - elif echo " $new_with_security " | $GREP " $i " > /dev/null ; then - : # Double define, ignore - else - new_with_security="$new_with_security $i" fi done -# Generate output files -: ${security_init_file:='snmplib/snmpsm_init.h'} -: ${security_shutdown_file:='snmplib/snmpsm_shutdown.h'} -: ${security_incl_file:='include/net-snmp/library/snmpv3-security-includes.h'} - -echo "/* This file is automatically generated by configure. Do not modify by hand. */" > $security_init_file -echo "/* This file is automatically generated by configure. Do not modify by hand. */" > $security_shutdown_file -echo "/* This file is automatically generated by configure. Do not modify by hand. */" > $security_incl_file +LNETSNMPLIBS="$LNETSNMPLIBS $CRYPTO_LIBS" +LIBS=$netsnmp_save_LIBS -for i in $new_with_security; do - cfile="snmp"$i".c" - hfile="snmp"$i".h" +new_with_security=$rebuilt_new_with_security - # make sure support exists for it - if test -f $srcdir"/snmplib/"$cfile -a -f $srcdir"/include/net-snmp/library/"$hfile; then - : - else - echo - as_fn_error $? "No such security module: $i / $cfile / $hfile" "$LINENO" 5 - fi +# +# Detect lm_sensors version +# +if test "x$ac_cv_header_sensors_sensors_h" = "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 case e in #( + e) 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. */ - # define a bunch of stuff to enable it - security_mod_list="${security_mod_list} $i" - security_src_list="$security_src_list $cfile" - security_src_list="$security_src_list $cfile" - security_hdr_list="$security_hdr_list $hfile" - security_obj_list="$security_obj_list snmp"$i".o" - security_lobj_list="$security_lobj_list snmp"$i".lo" - security_ftobj_list="$security_ftobj_list snmp"$i".ft" - 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 +int +main (void) +{ +(void) strchr; + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO" +then : -done - - - +else case e in #( + e) # 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 case e in #( + e) ac_cv_c_undeclared_builtin_options=$ac_arg ;; +esac +fi + break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + done + CFLAGS=$ac_save_CFLAGS + ;; +esac +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 case e in #( + e) ac_have_decl=0 ;; +esac +fi +printf "%s\n" "#define HAVE_DECL_SENSORS_GET_ALL_SUBFEATURES $ac_have_decl" >>confdefs.h +if test $ac_have_decl = 1 +then : -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $new_with_security" >&5 -$as_echo "$new_with_security" >&6; } +printf "%s\n" "#define NETSNMP_USE_SENSORS_V3 1" >>confdefs.h - cat >> configure-summary << EOF - SNMPv3 Security Modules: $new_with_security -EOF +fi +fi +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. # -# Handle the special case of KSM to see which crypto API we support +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. # +# 'ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* 'ac_cv_foo' will be assigned the +# following values. -rebuilt_new_with_security= -already_checked_krb5=no - -netsnmp_save_LIBS=$LIBS -CRYPTO_LIBS="" +_ACEOF -for sec in $new_with_security -do - if test "x$sec" = "xksm"; then - if test "xyes" = "x$already_checked_krb5"; then - continue - else - already_checked_krb5=yes - fi - fi +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_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) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done - if test x$sec != xksm; then - 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;} - continue + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # 'set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # 'set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + 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 + { 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 + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi 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 - case $krb5_config in - [\\/]* | ?:[\\/]*) - ac_cv_path_krb5_config="$krb5_config" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_dummy="$krb5path/bin:$PATH" -for as_dir in $as_dummy -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - 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_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 - break 2 + else + { 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 -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_krb5_config" && ac_cv_path_krb5_config="no" - ;; -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; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } fi +rm -f confcache +# -*- autoconf -*- +######################################### +## +# Checks for libraries that are run +# before the agent module tests. +## +######################################### +## +# RPM checks +# +## +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 - if test no != $krb5_config; then +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 - CPPFLAGS="$CPPFLAGS `$krb5_config --cflags`" - CRYPTO_LIBS="$CRYPTO_LIBS `$krb5_config --libs | - $SED 's/-flto=[^[:blank:]]*//g'`" +fi - elif test $krb5path != no; then - if test "x$krb5path" != x -a -d $krb5path; then - if test -d $krb5path/lib; then - LDFLAGS="-L$krb5path/lib $LDFLAGS" - fi - if test -d $krb5path/include; then - CPPFLAGS="-I$krb5path/include $CPPFLAGS" - fi - fi +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 case e in #( + e) rpmlib_h=no ;; +esac +fi - else +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 case e in #( + e) rpmheader_h=no ;; +esac +fi - if test "x/usr/kerberos" != x -a -d /usr/kerberos; then - if test -d /usr/kerberos/lib; then - LDFLAGS="-L/usr/kerberos/lib $LDFLAGS" - fi - if test -d /usr/kerberos/include; then - CPPFLAGS="-I/usr/kerberos/include $CPPFLAGS" - 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 + else + with_rpm=no fi +fi - fi +# +# rpm libraries only needed for the host resources mib software +# installed tables (on linux in particular) +# +if test "x$with_rpm" != "xno"; then + # ARG. RPM is a real pain. + # FWIW librpm.la, librpmio.la, and libpopt.la have correct dependencies. + _rpmlibs="" + # rpm-4.0.x needs rpmio. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing krb5_init_context" >&5 -$as_echo_n "checking for library containing krb5_init_context... " >&6; } -if ${netsnmp_cv_func_krb5_init_context_CRYPTO_LIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else - netsnmp_func_search_save_LIBS="$LIBS" - netsnmp_target_val="$CRYPTO_LIBS" - netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" + { 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 case e in #( + e) netsnmp_func_search_save_LIBS="$LIBS" + netsnmp_target_val="$_rpmlibs" + netsnmp_temp_LIBS="${netsnmp_target_val} $LMIBLIBS ${LIBS}" netsnmp_result=no LIBS="${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -20527,75 +26045,87 @@ 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char krb5_init_context (); +char rpmGetPath (void); int -main () +main (void) { -return krb5_init_context (); +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 - for netsnmp_cur_lib in krb5 ; do +else case e in #( + e) for netsnmp_cur_lib in rpmio ; 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char krb5_init_context (); +char rpmGetPath (void); int -main () +main (void) { -return krb5_init_context (); +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 + done ;; +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 LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_krb5_init_context_CRYPTO_LIBS="${netsnmp_result}" + netsnmp_cv_func_rpmGetPath__rpmlibs="${netsnmp_result}" ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_krb5_init_context_CRYPTO_LIBS" >&5 -$as_echo "$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}" +{ 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 - ac_cv_have_krb5=yes - else - ac_cv_have_krb5=no + + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing error_message" >&5 -$as_echo_n "checking for library containing error_message... " >&6; } -if ${netsnmp_cv_func_error_message_CRYPTO_LIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else - netsnmp_func_search_save_LIBS="$LIBS" - netsnmp_target_val="$CRYPTO_LIBS" - netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" + # now check for rpm using the appropriate libraries. + + { 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 case e in #( + e) netsnmp_func_search_save_LIBS="$LIBS" + netsnmp_target_val="$_rpmlibs" + netsnmp_temp_LIBS="${netsnmp_target_val} $LMIBLIBS ${LIBS}" netsnmp_result=no LIBS="${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -20603,503 +26133,392 @@ 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char error_message (); +char rpmReadConfigFiles (void); int -main () +main (void) { -return error_message (); +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 - for netsnmp_cur_lib in com_err ; do +else case e in #( + e) for netsnmp_cur_lib in rpm ; 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char error_message (); +char rpmReadConfigFiles (void); int -main () +main (void) { -return error_message (); +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 + done ;; +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 LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_error_message_CRYPTO_LIBS="${netsnmp_result}" + netsnmp_cv_func_rpmReadConfigFiles__rpmlibs="${netsnmp_result}" ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_error_message_CRYPTO_LIBS" >&5 -$as_echo "$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 - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5" >&5 -$as_echo_n "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; } - continue +{ 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 "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -const char *v = heimdal_version; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_heimdal=yes -else - ac_cv_heimdal=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_heimdal" >&5 -$as_echo "$ac_cv_heimdal" >&6; } - if test $ac_cv_heimdal = yes; then - -$as_echo "#define NETSNMP_USE_KERBEROS_HEIMDAL 1" >>confdefs.h - - if test no = $krb5_config; then - CRYPTO_LIBS="$CRYPTO_LIBS -lkrb5 -lasn1 -lcom_err -lroken" - fi - elif test no = $krb5_config; then - CRYPTO_LIBS="$CRYPTO_LIBS -lkrb5 -lcom_err" - fi - if ${ac_cv_NETSNMP_USE_KERBEROS_MIT+:} false; then : - $as_echo_n "(cached) " >&6 -else +printf "%s\n" "#define HAVE_LIBRPM 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing krb5_init_context" >&5 -$as_echo_n "checking for library containing krb5_init_context... " >&6; } -if ${netsnmp_cv_func_krb5_init_context_CRYPTO_LIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else - 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. */ + LMIBLIBS="$_rpmlibs $LMIBLIBS" -/* 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 () -{ -return krb5_init_context (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - netsnmp_result="none required" -else - 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. */ -#ifdef __cplusplus -extern "C" -#endif -char krb5_init_context (); -int -main () -{ -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 \ - 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_krb5_init_context_CRYPTO_LIBS="${netsnmp_result}" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_krb5_init_context_CRYPTO_LIBS" >&5 -$as_echo "$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 - + # rpm 4.6 has incompatible API, turn on the legacy one - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing krb5_c_keyed_checksum_types" >&5 -$as_echo_n "checking for library containing krb5_c_keyed_checksum_types... " >&6; } -if ${netsnmp_cv_func_krb5_c_keyed_checksum_types_CRYPTO_LIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else - netsnmp_func_search_save_LIBS="$LIBS" - netsnmp_target_val="$CRYPTO_LIBS" - netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" + { 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 case e in #( + e) 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. */ -#ifdef __cplusplus -extern "C" -#endif -char krb5_c_keyed_checksum_types (); -int -main () -{ -return krb5_c_keyed_checksum_types (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - netsnmp_result="none required" -else - for netsnmp_cur_lib in k5crypto ; do - LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char krb5_c_keyed_checksum_types (); +char headerGet (void); int -main () +main (void) { -return krb5_c_keyed_checksum_types (); +return headerGet (); ; 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 +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" 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_krb5_c_keyed_checksum_types_CRYPTO_LIBS="${netsnmp_result}" + netsnmp_cv_func_headerGet_LIBS="${netsnmp_result}" ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_krb5_c_keyed_checksum_types_CRYPTO_LIBS" >&5 -$as_echo "$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}" +{ 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 - 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 : +# +# getfsstat/getvfsstat +# +{ 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 case e in #( + e) ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -cat >>confdefs.h <<_ACEOF -#define HAVE_KRB5_KEYBLOCK_ENCTYPE 1 +/* 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char getfsstat (void); +int +main (void) +{ +return getfsstat (); + ; + return 0; +} _ACEOF +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 : + ac_cv_search_getfsstat=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext + if test ${ac_cv_search_getfsstat+y} +then : + break +fi +done +if test ${ac_cv_search_getfsstat+y} +then : - -else - ac_cv_NETSNMP_USE_KERBEROS_MIT=no +else case e in #( + e) ac_cv_search_getfsstat=no ;; +esac +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS ;; +esac fi +{ 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 : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +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 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; } +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 -$as_echo "#define NETSNMP_USE_KERBEROS_MIT 1" >>confdefs.h +fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: old MIT crypto API" >&5 -$as_echo "old MIT crypto API" >&6; } - fi - LIBS="$CRYPTO_LIBS $netsnmp_save_LIBS" - for ac_func in krb5_auth_con_getsendsubkey krb5_auth_con_getrecvsubkey -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" "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. +{ 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 case e in #( + e) 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char getmntent (void); +int +main (void) +{ +return getmntent (); + ; + return 0; +} +_ACEOF +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 : + ac_cv_search_getmntent=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext + if test ${ac_cv_search_getmntent+y} +then : + break +fi done +if test ${ac_cv_search_getmntent+y} +then : -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 : - ac_have_decl=1 -else - ac_have_decl=0 +else case e in #( + e) ac_cv_search_getmntent=no ;; +esac fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS ;; +esac +fi +{ 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 : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + ac_cv_func_getmntent=yes -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 HAVE_GETMNTENT 1" >>confdefs.h +else case e in #( + e) ac_cv_func_getmntent=no ;; +esac fi -fi -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. + # -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. +# kinfo_get_cpus # -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. +{ 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 case e in #( + e) 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char kinfo_get_cpus (void); +int +main (void) +{ +return kinfo_get_cpus (); + ; + return 0; +} _ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - 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;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - 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;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi +for ac_lib in '' kinfo +do + if test -z "$ac_lib"; then + ac_res="none required" 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;} + 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_kinfo_get_cpus=$ac_res fi -rm -f confcache -# -*- autoconf -*- -######################################### -## -# Checks for libraries that are run -# before the agent module tests. -## -######################################### - - -## -# 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 - +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext + if test ${ac_cv_search_kinfo_get_cpus+y} +then : + break fi - done +if test ${ac_cv_search_kinfo_get_cpus+y} +then : - -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 : - rpmlib_h=yes -else - rpmlib_h=no +else case e in #( + e) ac_cv_search_kinfo_get_cpus=no ;; +esac 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 : - rpmheader_h=yes -else - rpmheader_h=no +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS ;; +esac fi +{ 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 : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +fi +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 -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 - else - with_rpm=no - fi fi -# -# rpm libraries only needed for the host resources mib software -# installed tables (on linux in particular) -# -if test "x$with_rpm" != "xno"; then - # ARG. RPM is a real pain. - # FWIW librpm.la, librpmio.la, and libpopt.la have correct dependencies. - _rpmlibs="" - - # 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 - netsnmp_func_search_save_LIBS="$LIBS" - netsnmp_target_val="$_rpmlibs" - netsnmp_temp_LIBS="${netsnmp_target_val} $LMIBLIBS ${LIBS}" +# +# diskIOLAx requires exp which may require -lm +# + + { 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 case e in #( + e) 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 @@ -21107,76 +26526,89 @@ 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char rpmGetPath (); +char exp (void); int -main () +main (void) { -return rpmGetPath (); +return exp (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else - for netsnmp_cur_lib in rpmio ; do +else case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char rpmGetPath (); +char exp (void); int -main () +main (void) { -return rpmGetPath (); +return exp (); ; 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 + done ;; +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 LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_rpmGetPath__rpmlibs="${netsnmp_result}" + netsnmp_cv_func_exp_LMIBLIBS="${netsnmp_result}" ;; +esac 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 "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}" +{ 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 - # rpm-4.0.3 librpmdb actually contains what we need. +# +# libkvm +# - { $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 - netsnmp_func_search_save_LIBS="$LIBS" - netsnmp_target_val="$_rpmlibs" - netsnmp_temp_LIBS="${netsnmp_target_val} $LMIBLIBS ${LIBS}" + { 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 case e in #( + e) 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 @@ -21184,75 +26616,85 @@ 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char rpmdbOpen (); +char kvm_read (void); int -main () +main (void) { -return rpmdbOpen (); +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 - for netsnmp_cur_lib in rpmdb ; do +else case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char rpmdbOpen (); +char kvm_read (void); int -main () +main (void) { -return rpmdbOpen (); +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 + done ;; +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 LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_rpmdbOpen__rpmlibs="${netsnmp_result}" + netsnmp_cv_func_kvm_read_LAGENTLIBS="${netsnmp_result}" ;; +esac 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 "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}" +{ 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 fi - # 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 - netsnmp_func_search_save_LIBS="$LIBS" - netsnmp_target_val="$_rpmlibs" - netsnmp_temp_LIBS="${netsnmp_target_val} $LMIBLIBS ${LIBS}" + { 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 case e in #( + e) 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 @@ -21260,81 +26702,85 @@ 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char rpmReadConfigFiles (); +char kvm_openfiles (void); int -main () +main (void) { -return rpmReadConfigFiles (); +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 - for netsnmp_cur_lib in rpm ; do +else case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char rpmReadConfigFiles (); +char kvm_openfiles (void); int -main () +main (void) { -return rpmReadConfigFiles (); +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 + done ;; +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 LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_rpmReadConfigFiles__rpmlibs="${netsnmp_result}" + netsnmp_cv_func_kvm_openfiles_LAGENTLIBS="${netsnmp_result}" ;; +esac 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 "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}" +{ 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 -$as_echo "#define HAVE_LIBRPM 1" >>confdefs.h - - LMIBLIBS="$_rpmlibs $LMIBLIBS" - - fi - # rpm 4.6 has incompatible API, turn on the legacy one - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing headerGet" >&5 -$as_echo_n "checking for library containing headerGet... " >&6; } -if ${netsnmp_cv_func_headerGet_LIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else - netsnmp_func_search_save_LIBS="$LIBS" - netsnmp_target_val="$LIBS" - netsnmp_temp_LIBS="$LMIBLIBS ${LIBS}" + { 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 case e in #( + e) 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 @@ -21342,269 +26788,169 @@ 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char headerGet (); +char kvm_getprocs (void); int -main () +main (void) { -return headerGet (); +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" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_headerGet_LIBS="${netsnmp_result}" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_headerGet_LIBS" >&5 -$as_echo "$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 - - -$as_echo "#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 - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char getfsstat (); +char kvm_getprocs (void); int -main () +main (void) { -return getfsstat (); +return kvm_getprocs (); ; return 0; } _ACEOF -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 : - ac_cv_search_getfsstat=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_getfsstat+:} false; then : - break -fi -done -if ${ac_cv_search_getfsstat+:} false; then : - -else - ac_cv_search_getfsstat=no +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 ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getfsstat" >&5 -$as_echo "$ac_cv_search_getfsstat" >&6; } -ac_res=$ac_cv_search_getfsstat -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_kvm_getprocs_LMIBLIBS="${netsnmp_result}" ;; +esac fi +{ 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 -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 - -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 + fi -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 - 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 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 case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char getmntent (); +char kvm_getproc2 (void); int -main () +main (void) { -return getmntent (); +return kvm_getproc2 (); ; return 0; } _ACEOF -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 : - ac_cv_search_getmntent=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_getmntent+:} false; then : - break -fi -done -if ${ac_cv_search_getmntent+:} false; then : - -else - 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; } -ac_res=$ac_cv_search_getmntent -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 - -else - ac_cv_func_getmntent=no -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 - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" +else case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char kinfo_get_cpus (); +char kvm_getproc2 (void); int -main () +main (void) { -return kinfo_get_cpus (); +return kvm_getproc2 (); ; return 0; } _ACEOF -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 : - ac_cv_search_kinfo_get_cpus=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_kinfo_get_cpus+:} false; then : - break -fi -done -if ${ac_cv_search_kinfo_get_cpus+:} false; then : - -else - ac_cv_search_kinfo_get_cpus=no +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 ;; +esac 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; } -ac_res=$ac_cv_search_kinfo_get_cpus -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_kvm_getproc2_LMIBLIBS="${netsnmp_result}" ;; +esac 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 -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 - -fi -done + fi -# -# 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 ${netsnmp_cv_func_exp_LMIBLIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else - netsnmp_func_search_save_LIBS="$LIBS" + { 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 case e in #( + e) netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$LMIBLIBS" netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" netsnmp_result=no @@ -21614,59 +26960,69 @@ 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char exp (); +char kvm_getfiles (void); int -main () +main (void) { -return exp (); +return kvm_getfiles (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else - for netsnmp_cur_lib in m ; do +else case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char exp (); +char kvm_getfiles (void); int -main () +main (void) { -return exp (); +return kvm_getfiles (); ; 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 + done ;; +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 LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_exp_LMIBLIBS="${netsnmp_result}" + netsnmp_cv_func_kvm_getfiles_LMIBLIBS="${netsnmp_result}" ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_exp_LMIBLIBS" >&5 -$as_echo "$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 +{ 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 @@ -21674,17 +27030,14 @@ $as_echo "$netsnmp_cv_func_exp_LMIBLIBS" >&6; } 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 - netsnmp_func_search_save_LIBS="$LIBS" - netsnmp_target_val="$LAGENTLIBS" + { 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 case e in #( + e) netsnmp_func_search_save_LIBS="$LIBS" + netsnmp_target_val="$LMIBLIBS" netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" netsnmp_result=no LIBS="${netsnmp_temp_LIBS}" @@ -21693,73 +27046,84 @@ 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char kvm_read (); +char kvm_getfile2 (void); int -main () +main (void) { -return kvm_read (); +return kvm_getfile2 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else - for netsnmp_cur_lib in kvm ; do +else case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char kvm_read (); +char kvm_getfile2 (void); int -main () +main (void) { -return kvm_read (); +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 + done ;; +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 LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_kvm_read_LAGENTLIBS="${netsnmp_result}" + netsnmp_cv_func_kvm_getfile2_LMIBLIBS="${netsnmp_result}" ;; +esac 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 "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}" +{ 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 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 - netsnmp_func_search_save_LIBS="$LIBS" - netsnmp_target_val="$LAGENTLIBS" + { 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 case e in #( + e) netsnmp_func_search_save_LIBS="$LIBS" + netsnmp_target_val="$LMIBLIBS" netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" netsnmp_result=no LIBS="${netsnmp_temp_LIBS}" @@ -21768,74 +27132,129 @@ 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char kvm_openfiles (); +char kvm_getswapinfo (void); int -main () +main (void) { -return kvm_openfiles (); +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 - for netsnmp_cur_lib in kvm ; do +else case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char kvm_openfiles (); +char kvm_getswapinfo (void); int -main () +main (void) { -return kvm_openfiles (); +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 + done ;; +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 LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_kvm_openfiles_LAGENTLIBS="${netsnmp_result}" + netsnmp_cv_func_kvm_getswapinfo_LMIBLIBS="${netsnmp_result}" ;; +esac 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 "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}" +{ 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 fi +netsnmp_save_LIBS="$LIBS" +LIBS="$LAGENTLIBS $LMIBLIBS $LIBS" +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 - { $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 - netsnmp_func_search_save_LIBS="$LIBS" +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 + +LIBS="$netsnmp_save_LIBS" + +# +# dynamic module support +# + + { 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 case e in #( + e) netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$LMIBLIBS" - netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" + netsnmp_temp_LIBS="${netsnmp_target_val} $LAGENTLIBS $LSNMPLIBS ${LIBS}" netsnmp_result=no LIBS="${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21843,73 +27262,127 @@ 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char kvm_getprocs (); +char dlopen (void); int -main () +main (void) { -return kvm_getprocs (); +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 - for netsnmp_cur_lib in kvm ; do +else case e in #( + e) for netsnmp_cur_lib in dl ; 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char kvm_getprocs (); +char dlopen (void); int -main () +main (void) { -return kvm_getprocs (); +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 + done ;; +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 LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_kvm_getprocs_LMIBLIBS="${netsnmp_result}" + netsnmp_cv_func_dlopen_LMIBLIBS="${netsnmp_result}" ;; +esac 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 "x${netsnmp_cv_func_kvm_getprocs_LMIBLIBS}" != "xno" ; then - if test "x${netsnmp_cv_func_kvm_getprocs_LMIBLIBS}" != "xnone 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 fi +netsnmp_save_LIBS="$LIBS" +LIBS="$LMIBLIBS $LAGENTLIBS $LSNMPLIBS $LIBS" +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 - { $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 - netsnmp_func_search_save_LIBS="$LIBS" - netsnmp_target_val="$LMIBLIBS" +fi + +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 case e in #( + e) pcre_h=no + ;; +esac +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 case e in #( + e) netsnmp_func_search_save_LIBS="$LIBS" + netsnmp_target_val="$LAGENTLIBS" netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" netsnmp_result=no LIBS="${netsnmp_temp_LIBS}" @@ -21918,222 +27391,447 @@ 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char kvm_getproc2 (); +char pcre_exec (void); int -main () +main (void) { -return kvm_getproc2 (); +return pcre_exec (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else - for netsnmp_cur_lib in kvm ; do +else case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char kvm_getproc2 (); +char pcre_exec (void); int -main () +main (void) { -return kvm_getproc2 (); +return pcre_exec (); ; 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 + done ;; +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 LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_kvm_getproc2_LMIBLIBS="${netsnmp_result}" + netsnmp_cv_func_pcre_exec_LAGENTLIBS="${netsnmp_result}" ;; +esac +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 + +# +# libnl (netlink) +# + +# The test below verifies whether the libnl-3 package been installed. +# This test works as follows: +# - If pkg-config is not installed at the time autoreconf is run, +# autoreconf will fail. +# - If pkg-config is installed at the time autoreconf is 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$with_nl" != "xno"; then + + + + + + + + +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 case e in #( + e) 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 ;; +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 case e in #( + e) 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 ;; +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 -{ $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 "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 +if test $pkg_failed = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kvm_getfiles" >&5 -$as_echo_n "checking for library containing kvm_getfiles... " >&6; } -if ${netsnmp_cv_func_kvm_getfiles_LMIBLIBS+:} false; then : - $as_echo_n "(cached) " >&6 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes 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. */ + _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 -/* 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_getfiles (); -int -main () -{ -return kvm_getfiles (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - netsnmp_result="none required" + as_fn_error $? "Package requirements (libnl-3.0) were not met: + +$LIBNL3_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 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. + +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. + +To get pkg-config, see . +See 'config.log' for more details" "$LINENO" 5; } else - 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. */ + 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; } -/* 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_getfiles (); -int -main () -{ -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$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_kvm_getfiles_LMIBLIBS="${netsnmp_result}" + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-route-3.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libnl-route-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 LIBNLROUTE3" >&5 +printf %s "checking for LIBNLROUTE3... " >&6; } + +if test -n "$LIBNLROUTE3_CFLAGS"; then + pkg_cv_LIBNLROUTE3_CFLAGS="$LIBNLROUTE3_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-route-3.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libnl-route-3.0") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBNLROUTE3_CFLAGS=`$PKG_CONFIG --cflags "libnl-route-3.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LIBNLROUTE3_LIBS"; then + pkg_cv_LIBNLROUTE3_LIBS="$LIBNLROUTE3_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-route-3.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libnl-route-3.0") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBNLROUTE3_LIBS=`$PKG_CONFIG --libs "libnl-route-3.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_kvm_getfiles_LMIBLIBS" >&5 -$as_echo "$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 +if test $pkg_failed = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kvm_getfile2" >&5 -$as_echo_n "checking for library containing kvm_getfile2... " >&6; } -if ${netsnmp_cv_func_kvm_getfile2_LMIBLIBS+:} false; then : - $as_echo_n "(cached) " >&6 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes 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. */ + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBNLROUTE3_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libnl-route-3.0" 2>&1` + else + LIBNLROUTE3_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libnl-route-3.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBNLROUTE3_PKG_ERRORS" >&5 -/* 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_getfile2 (); -int -main () -{ -return kvm_getfile2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - netsnmp_result="none required" -else - 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. */ + as_fn_error $? "Package requirements (libnl-route-3.0) were not met: -/* 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_getfile2 (); -int -main () -{ -return kvm_getfile2 (); - ; - 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_kvm_getfile2_LMIBLIBS="${netsnmp_result}" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_kvm_getfile2_LMIBLIBS" >&5 -$as_echo "$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 +$LIBNLROUTE3_PKG_ERRORS +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - fi +Alternatively, you may set the environment variables LIBNLROUTE3_CFLAGS +and LIBNLROUTE3_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 LIBNLROUTE3_CFLAGS +and LIBNLROUTE3_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. - { $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 +To get pkg-config, see . +See 'config.log' for more details" "$LINENO" 5; } else - netsnmp_func_search_save_LIBS="$LIBS" + LIBNLROUTE3_CFLAGS=$pkg_cv_LIBNLROUTE3_CFLAGS + LIBNLROUTE3_LIBS=$pkg_cv_LIBNLROUTE3_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +fi +fi + + + case $target_os in + linux*) # Check for libnl (linux) + netsnmp_save_CPPFLAGS="$CPPFLAGS" + 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 case e in #( + e) netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$LMIBLIBS" netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" netsnmp_result=no @@ -22143,93 +27841,111 @@ 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char kvm_getswapinfo (); +char nl_connect (void); int -main () +main (void) { -return kvm_getswapinfo (); +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 - for netsnmp_cur_lib in kvm ; do +else case e in #( + e) for netsnmp_cur_lib in nl-3 ; 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char kvm_getswapinfo (); +char nl_connect (void); int -main () +main (void) { -return kvm_getswapinfo (); +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 + done ;; +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 LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_kvm_getswapinfo_LMIBLIBS="${netsnmp_result}" + netsnmp_cv_func_nl_connect_LMIBLIBS="${netsnmp_result}" ;; +esac 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 "x${netsnmp_cv_func_kvm_getswapinfo_LMIBLIBS}" != "xno" ; then - if test "x${netsnmp_cv_func_kvm_getswapinfo_LMIBLIBS}" != "xnone 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 + ac_fn_c_check_header_compile "$LINENO" "netlink/cache.h" "ac_cv_header_netlink_cache_h" "$ac_includes_default" +if test "x$ac_cv_header_netlink_cache_h" = xyes +then : + printf "%s\n" "#define HAVE_NETLINK_CACHE_H 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "netlink/msg.h" "ac_cv_header_netlink_msg_h" "$ac_includes_default" +if test "x$ac_cv_header_netlink_msg_h" = xyes +then : + printf "%s\n" "#define HAVE_NETLINK_MSG_H 1" >>confdefs.h - fi +fi +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 -netsnmp_save_LIBS="$LIBS" -LIBS="$LAGENTLIBS $LMIBLIBS $LIBS" -for ac_func in kvm_openfiles kvm_getprocs kvm_getproc2 kvm_getswapinfo kvm_getfiles kvm_getfile2 -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_header_compile "$LINENO" "netlink/socket.h" "ac_cv_header_netlink_socket_h" "$ac_includes_default" +if test "x$ac_cv_header_netlink_socket_h" = xyes +then : + printf "%s\n" "#define HAVE_NETLINK_SOCKET_H 1" >>confdefs.h fi -done -LIBS="$netsnmp_save_LIBS" + EXTERNAL_MIBGROUP_INCLUDES="$EXTERNAL_MIBGROUP_INCLUDES ${LIBNL3_CFLAGS}" + else + CPPFLAGS="$netsnmp_save_CPPFLAGS" + fi -# -# 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 - netsnmp_func_search_save_LIBS="$LIBS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing rtnl_link_alloc_cache" >&5 +printf %s "checking for library containing rtnl_link_alloc_cache... " >&6; } +if test ${netsnmp_cv_func_rtnl_link_alloc_cache_LMIBLIBS+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$LMIBLIBS" - netsnmp_temp_LIBS="${netsnmp_target_val} $LAGENTLIBS $LSNMPLIBS ${LIBS}" + netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" netsnmp_result=no LIBS="${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22237,118 +27953,99 @@ 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char dlopen (); +char rtnl_link_alloc_cache (void); int -main () +main (void) { -return dlopen (); +return rtnl_link_alloc_cache (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else - for netsnmp_cur_lib in dl ; do +else case e in #( + e) for netsnmp_cur_lib in nl-route-3 ; 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char dlopen (); +char rtnl_link_alloc_cache (void); int -main () +main (void) { -return dlopen (); +return rtnl_link_alloc_cache (); ; 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 + done ;; +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 LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_dlopen_LMIBLIBS="${netsnmp_result}" + netsnmp_cv_func_rtnl_link_alloc_cache_LMIBLIBS="${netsnmp_result}" ;; +esac 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 "x${netsnmp_cv_func_dlopen_LMIBLIBS}" != "xno" ; then - if test "x${netsnmp_cv_func_dlopen_LMIBLIBS}" != "xnone required" ; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_rtnl_link_alloc_cache_LMIBLIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_rtnl_link_alloc_cache_LMIBLIBS" >&6; } + if test "x${netsnmp_cv_func_rtnl_link_alloc_cache_LMIBLIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_rtnl_link_alloc_cache_LMIBLIBS}" != "xnone required" ; then LMIBLIBS="${netsnmp_result} ${netsnmp_target_val}" - fi - - - fi - -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 - -fi -done - -LIBS="$netsnmp_save_LIBS" - -# -# regex in process table -# -if test "x$with_pcre" != "xno"; then - ac_fn_c_check_header_mongrel "$LINENO" "pcre.h" "ac_cv_header_pcre_h" "$ac_includes_default" -if test "x$ac_cv_header_pcre_h" = xyes; then : - - -$as_echo "#define HAVE_PCRE_H 1" >>confdefs.h - - pcre_h=yes - -else - pcre_h=no + fi + ac_fn_c_check_header_compile "$LINENO" "netlink/route/addr.h" "ac_cv_header_netlink_route_addr_h" "$ac_includes_default" +if test "x$ac_cv_header_netlink_route_addr_h" = xyes +then : + printf "%s\n" "#define HAVE_NETLINK_ROUTE_ADDR_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "netlink/route/link.h" "ac_cv_header_netlink_route_link_h" "$ac_includes_default" +if test "x$ac_cv_header_netlink_route_link_h" = xyes +then : + printf "%s\n" "#define HAVE_NETLINK_ROUTE_LINK_H 1" >>confdefs.h - -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 -# + EXTERNAL_MIBGROUP_INCLUDES="$EXTERNAL_MIBGROUP_INCLUDES ${LIBNLROUTE3_CFLAGS}" + else + CPPFLAGS="$netsnmp_save_CPPFLAGS" + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pcre_exec" >&5 -$as_echo_n "checking for library containing pcre_exec... " >&6; } -if ${netsnmp_cv_func_pcre_exec_LAGENTLIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else - netsnmp_func_search_save_LIBS="$LIBS" - netsnmp_target_val="$LAGENTLIBS" + if test "x$ac_cv_header_netlink_netlink_h" != xyes; then + + { 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 case e in #( + e) netsnmp_func_search_save_LIBS="$LIBS" + netsnmp_target_val="$LMIBLIBS" netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" netsnmp_result=no LIBS="${netsnmp_temp_LIBS}" @@ -22357,69 +28054,120 @@ 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char pcre_exec (); +char nl_connect (void); int -main () +main (void) { -return pcre_exec (); +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 - for netsnmp_cur_lib in pcre ; do +else case e in #( + e) for netsnmp_cur_lib in nl ; 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char pcre_exec (); +char nl_connect (void); int -main () +main (void) { -return pcre_exec (); +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 + done ;; +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 LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_pcre_exec_LAGENTLIBS="${netsnmp_result}" + netsnmp_cv_func_nl_connect_LMIBLIBS="${netsnmp_result}" ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_pcre_exec_LAGENTLIBS" >&5 -$as_echo "$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}" +{ 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 - LMIBLIBS="$LMIBLIBS -lpcre" + ac_fn_c_check_header_compile "$LINENO" "netlink/cache.h" "ac_cv_header_netlink_cache_h" "$ac_includes_default" +if test "x$ac_cv_header_netlink_cache_h" = xyes +then : + printf "%s\n" "#define HAVE_NETLINK_CACHE_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "netlink/msg.h" "ac_cv_header_netlink_msg_h" "$ac_includes_default" +if test "x$ac_cv_header_netlink_msg_h" = xyes +then : + printf "%s\n" "#define HAVE_NETLINK_MSG_H 1" >>confdefs.h + +fi +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 +ac_fn_c_check_header_compile "$LINENO" "netlink/socket.h" "ac_cv_header_netlink_socket_h" "$ac_includes_default" +if test "x$ac_cv_header_netlink_socket_h" = xyes +then : + printf "%s\n" "#define HAVE_NETLINK_SOCKET_H 1" >>confdefs.h + +fi fi + fi + if test "x$ac_cv_header_netlink_netlink_h" = xyes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP_TRADITIONAL "nl_socket_free" >/dev/null 2>&1 +then : + +printf "%s\n" "#define HAVE_LIBNL3 1" >>confdefs.h +fi +rm -rf conftest* + fi + ;; + esac +fi # -*- autoconf -*- # @@ -22448,8 +28196,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" @@ -22490,21 +28240,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. @@ -22518,8 +28268,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 @@ -22769,13 +28519,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 @@ -22898,19 +28648,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 @@ -22982,10 +28732,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 #------------------- @@ -23051,8 +28801,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 @@ -23078,8 +28828,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` @@ -23275,1563 +29025,1130 @@ $SED 's/^mib_module_list_o/mibgroup_list_o/;s@\([^ ]*\)\.o@mibgroup/\1.o@g' < $ $SED 's/^mib_module_list_lo/mibgroup_list_lo/;s@\([^ ]*\)\.lo@mibgroup/\1.lo@g' < $mib_module_list_lo > $mibgroup_list_lo $SED 's/^mib_module_list_ft/mibgroup_list_ft/;s@\([^ ]*\)\.ft@mibgroup/\1.ft@g' < $mib_module_list_ft > $mibgroup_list_ft -$SED 's/^agent_module_list_code/agent_module_list_o/;s/\([^=]\) *\\/\1.o \\/g' < $agent_module_list_code > $agent_module_list_o -$SED 's/^agent_module_list_code/agent_module_list_c/;s/\([^=]\) *\\/\1.c \\/g' < $agent_module_list_code > $agent_module_list_c -$SED 's/^agent_module_list_code/agent_module_list_lo/;s/\([^=]\) *\\/\1.lo \\/g' < $agent_module_list_code > $agent_module_list_lo -$SED 's/^agent_module_list_code/agent_module_list_ft/;s/\([^=]\) *\\/\1.ft \\/g' < $agent_module_list_code > $agent_module_list_ft - -$SED 's/^agent_module_list_o/agentgroup_list_o/;s@\([^ ]*\)\.o@mibgroup/\1.o@g' < $agent_module_list_o > $agentgroup_list_o -$SED 's/^agent_module_list_lo/agentgroup_list_lo/;s@\([^ ]*\)\.lo@mibgroup/\1.lo@g' < $agent_module_list_lo > $agentgroup_list_lo -$SED 's/^agent_module_list_ft/agentgroup_list_ft/;s@\([^ ]*\)\.ft@mibgroup/\1.ft@g' < $agent_module_list_ft > $agentgroup_list_ft - -for i in module_list_o module_list_c module_list_lo module_list_ft mib_module_list_o mib_module_list_c mib_module_list_lo mib_module_list_ft mibgroup_list_o mibgroup_list_lo mibgroup_list_ft agent_module_list_o agent_module_list_c agent_module_list_lo agent_module_list_ft agentgroup_list_o agentgroup_list_lo agentgroup_list_ft ; do - # hpux make (at least) doesn't like a trailing \ on the last - # line even when the next line contains nothing but - # whitespace. - lasttoken=`awk '{lasttoken=$1}END{print lasttoken}' mk/$i.mk` - $SED "s#$lasttoken \\\\#$lasttoken#" < mk/$i.mk > mk/$i.mk.tmp - mv mk/$i.mk.tmp mk/$i.mk - - # add a closing comment - echo "" >> mk/$i.mk - echo "# end configure generated code" >> mk/$i.mk -done - - - -if test $module_debug -eq 1; then - echo -e "\nFinal module list: $module_list_code" - exit -fi -if test "x$with_mib_cfg_checks" = "xyes"; then - - cat >> configure-summary << EOF - Agent Module list: $module_list_code -EOF - -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ." >&5 -$as_echo "." >&6; } - -if test $module_debug -eq 1; then - - cat >> configure-summary << EOF - Agent MIB code: $module_list -EOF - -fi - - cat >> configure-summary << EOF - Agent MIB code: $top_level_modules -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; } -for i in $module_directories; do - $srcdir/mkinstalldirs $i -done -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ." >&5 -$as_echo "." >&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; } -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 - ENV_SEPARATOR=";" - NETSNMP_DEFAULT_MIBS=`echo "$NETSNMP_DEFAULT_MIBS" | $SED 's/:/;/g'` - default_mibs=`echo "$default_mibs" | $SED 's/:/;/g'` -else - ENV_SEPARATOR=":" -fi - - -cat >>confdefs.h <<_ACEOF -#define ENV_SEPARATOR "$ENV_SEPARATOR" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define ENV_SEPARATOR_CHAR '$ENV_SEPARATOR' -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define NETSNMP_DEFAULT_MIBS "$NETSNMP_DEFAULT_MIBS" -_ACEOF - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $NETSNMP_DEFAULT_MIBS" >&5 -$as_echo "$NETSNMP_DEFAULT_MIBS" >&6; } - -#------------------- -# Define symbols for conditional compilation in makefiles -# - -if echo " $agent_module_list " | \ - fgrep ' agentx/agentx_config ' | \ - fgrep ' agentx/protocol ' > /dev/null ; then - NETSNMP_HAVE_AGENTX_LIBS_TRUE='' - NETSNMP_HAVE_AGENTX_LIBS_FALSE='#' -else - NETSNMP_HAVE_AGENTX_LIBS_TRUE='#' - NETSNMP_HAVE_AGENTX_LIBS_FALSE='' -fi - - - -# -*- autoconf -*- -######################################### -## -# Miscellaneous checks -## -######################################### - -## -# Compilation-related -## - -# 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; } -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; } -else - DLLIBS="" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# -*- autoconf -*- -######################################### -## -# Checks for libraries that are run -# after the agent module tests. -## -######################################### - -# HAVE_LIB Definitions used in the Net-SNMP code base: -# -# HAVE_LIBCRYPTO: apps -# HAVE_LIBRPM: agent -# - -## -# Simple checks: -## - -# ELF libraries -# Typically used for 'nlist' (needed for uptime) -# -if test "x$with_elf" != "xno"; then -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 - ac_check_lib_save_LIBS=$LIBS -LIBS="-lelf $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 nlist (); -int -main () -{ -return nlist (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_elf_nlist=yes -else - ac_cv_lib_elf_nlist=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_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 - - LIBS="-lelf $LIBS" - -fi +$SED 's/^agent_module_list_code/agent_module_list_o/;s/\([^=]\) *\\/\1.o \\/g' < $agent_module_list_code > $agent_module_list_o +$SED 's/^agent_module_list_code/agent_module_list_c/;s/\([^=]\) *\\/\1.c \\/g' < $agent_module_list_code > $agent_module_list_c +$SED 's/^agent_module_list_code/agent_module_list_lo/;s/\([^=]\) *\\/\1.lo \\/g' < $agent_module_list_code > $agent_module_list_lo +$SED 's/^agent_module_list_code/agent_module_list_ft/;s/\([^=]\) *\\/\1.ft \\/g' < $agent_module_list_code > $agent_module_list_ft - { $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 - ac_check_lib_save_LIBS=$LIBS -LIBS="-lelf $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +$SED 's/^agent_module_list_o/agentgroup_list_o/;s@\([^ ]*\)\.o@mibgroup/\1.o@g' < $agent_module_list_o > $agentgroup_list_o +$SED 's/^agent_module_list_lo/agentgroup_list_lo/;s@\([^ ]*\)\.lo@mibgroup/\1.lo@g' < $agent_module_list_lo > $agentgroup_list_lo +$SED 's/^agent_module_list_ft/agentgroup_list_ft/;s@\([^ ]*\)\.ft@mibgroup/\1.ft@g' < $agent_module_list_ft > $agentgroup_list_ft -/* 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 () -{ -return nlist64 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_elf_nlist64=yes -else - ac_cv_lib_elf_nlist64=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_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 +for i in module_list_o module_list_c module_list_lo module_list_ft mib_module_list_o mib_module_list_c mib_module_list_lo mib_module_list_ft mibgroup_list_o mibgroup_list_lo mibgroup_list_ft agent_module_list_o agent_module_list_c agent_module_list_lo agent_module_list_ft agentgroup_list_o agentgroup_list_lo agentgroup_list_ft ; do + # hpux make (at least) doesn't like a trailing \ on the last + # line even when the next line contains nothing but + # whitespace. + lasttoken=`awk '{lasttoken=$1}END{print lasttoken}' mk/$i.mk` + $SED "s#$lasttoken \\\\#$lasttoken#" < mk/$i.mk > mk/$i.mk.tmp + mv mk/$i.mk.tmp mk/$i.mk - LIBS="-lelf $LIBS" + # add a closing comment + echo "" >> mk/$i.mk + echo "# end configure generated code" >> mk/$i.mk +done -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 - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmld $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 nlist (); -int -main () -{ -return nlist (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_mld_nlist=yes -else - ac_cv_lib_mld_nlist=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +if test $module_debug -eq 1; then + echo -e "\nFinal module list: $module_list_code" + exit 1 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 +if test "x$with_mib_cfg_checks" = "xyes"; then - LIBS="-lmld $LIBS" + cat >> configure-summary << EOF + Agent Module list: $module_list_code +EOF 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 - ac_check_lib_save_LIBS=$LIBS -LIBS="-lelf $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 nlist (); -int -main () -{ -return nlist (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_elf_nlist=yes -else - ac_cv_lib_elf_nlist=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_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 - LIBS="-lelf $LIBS" -fi - ;; -esac -fi -# libsocket -# Needed for 'socket(2)' (Solaris) -# Possibly also for 'gethostname(3)' (non-Solaris) -# (alternatively in libnsl (Solaris) -# or in libws2_32) (MinGW) -# -case x$with_socklib in -xwinsock2) - # libws2_w32 (MinGW) - # - netsnmp_save_LIBS="$LIBS" - LIBS="$LIBS -lws2_32" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - #include -int -main () -{ - socket(0, 0, 0); - gethostbyname(0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - # Keep LIBS. - true -else - # 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 \ - 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 - 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 socket (); -int -main () -{ -return socket (); - ; - return 0; -} -_ACEOF -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 : - ac_cv_search_socket=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_socket+:} false; then : - break -fi -done -if ${ac_cv_search_socket+:} false; then : -else - 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; } -ac_res=$ac_cv_search_socket -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -else - 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 - 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 gethostbyname (); -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -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 : - ac_cv_search_gethostbyname=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_gethostbyname+:} false; then : - break -fi -done -if ${ac_cv_search_gethostbyname+:} false; then : -else - 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; } -ac_res=$ac_cv_search_gethostbyname -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 -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 - 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 gethostbyaddr (); -int -main () -{ -return gethostbyaddr (); - ; - return 0; -} -_ACEOF -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 : - ac_cv_search_gethostbyaddr=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_gethostbyaddr+:} false; then : - break -fi -done -if ${ac_cv_search_gethostbyaddr+:} false; then : -else - 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; } -ac_res=$ac_cv_search_gethostbyaddr -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ." >&5 +printf "%s\n" "." >&6; } -fi +if test $module_debug -eq 1; then - 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 + cat >> configure-summary << EOF + Agent MIB code: $module_list +EOF fi -done - ;; -esac + cat >> configure-summary << EOF + Agent MIB code: $top_level_modules +EOF -# libiphlpapi (Cygwin and MinGW) -# -netsnmp_save_LIBS="$LIBS" -LIBS="$LIBS -liphlpapi" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +# end hairy agent module processing - #include - #include +{ 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ." >&5 +printf "%s\n" "." >&6; } -int -main () -{ +#------------------- +# Define default mibs +# +{ 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"; 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'` +else + ENV_SEPARATOR=":" +fi - IpRenewAddress(0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : +printf "%s\n" "#define ENV_SEPARATOR \"$ENV_SEPARATOR\"" >>confdefs.h - # Keep LIBS. - true -else +printf "%s\n" "#define ENV_SEPARATOR_CHAR '$ENV_SEPARATOR'" >>confdefs.h - # Restore LIBS and complain. - LIBS="$netsnmp_save_LIBS" - case x$with_socklib in - xwinsock2) - as_fn_error $? "libiphlpapi not found." "$LINENO" 5 - ;; - esac +printf "%s\n" "#define NETSNMP_DEFAULT_MIBS \"$NETSNMP_DEFAULT_MIBS\"" >>confdefs.h -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MIB_IF_TABLE2" >&5 -$as_echo_n "checking for MIB_IF_TABLE2... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NETSNMP_DEFAULT_MIBS" >&5 +printf "%s\n" "$NETSNMP_DEFAULT_MIBS" >&6; } - #define _WIN32_WINNT 0xffff - #include - #include - #include +#------------------- +# Define symbols for conditional compilation in makefiles +# -int -main () -{ +if echo " $agent_module_list " | \ + $FGREP ' agentx/agentx_config ' | \ + $FGREP ' agentx/protocol ' > /dev/null ; then + NETSNMP_HAVE_AGENTX_LIBS_TRUE='' + NETSNMP_HAVE_AGENTX_LIBS_FALSE='#' +else + NETSNMP_HAVE_AGENTX_LIBS_TRUE='#' + NETSNMP_HAVE_AGENTX_LIBS_FALSE='' +fi - return sizeof(MIB_IF_TABLE2) - ; - 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; } +# -*- autoconf -*- +######################################### +## +# Miscellaneous checks +## +######################################### -$as_echo "#define HAVE_MIB_IF_TABLE2 1" >>confdefs.h +## +# Compilation-related +## +# Dynamic modules require Position-Independent Code +# LIB_CFLAGS/DLLIBS: used in agent Makefile only +# +{ 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" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + DLLIBS="" + { 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 -# libregex (MinGW) +# -*- autoconf -*- +######################################### +## +# Checks for libraries that are run +# after the agent module tests. +## +######################################### + +# HAVE_LIB Definitions used in the Net-SNMP code base: # -netsnmp_save_LIBS="$LIBS" -LIBS="$LIBS -lregex" +# HAVE_LIBCRYPTO: apps +# HAVE_LIBRPM: agent +# + +## +# Simple checks: +## + +# ELF libraries +# Typically used for 'nlist' (needed for uptime) +# +if test "x$with_elf" != "xno"; then +case $target_os in + linux*) # add hosts which don't use nlist here + ;; + irix*) # Check for nlist in mld (irix) + { 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 case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-lelf $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char nlist (void); int -main () +main (void) { - - regcomp(0, 0, 0); - +return nlist (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - # Keep LIBS. - true - -else - - # Restore LIBS. - LIBS="$netsnmp_save_LIBS" - +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_elf_nlist=yes +else case e in #( + e) ac_cv_lib_elf_nlist=no ;; +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 +LIBS=$ac_check_lib_save_LIBS ;; +esac +fi +{ 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" -# libsnmpapi (MinGW) -# -netsnmp_save_LIBS="$LIBS" -LIBS="$LIBS -lsnmpapi" +fi + + { 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 case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-lelf $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char nlist64 (void); int -main () +main (void) { - - SnmpUtilMemAlloc(0); - +return nlist64 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - # Keep LIBS. - true - -else - - # Restore LIBS. - LIBS="$netsnmp_save_LIBS" - +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_elf_nlist64=yes +else case e in #( + e) ac_cv_lib_elf_nlist64=no ;; +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 +LIBS=$ac_check_lib_save_LIBS ;; +esac +fi +{ 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" -# kstat library (Solaris) -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_lookup in -lkstat" >&5 -$as_echo_n "checking for kstat_lookup in -lkstat... " >&6; } -if ${ac_cv_lib_kstat_kstat_lookup+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkstat $LIBS" +fi + + { 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 case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-lmld $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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char kstat_lookup (); +char nlist (void); int -main () +main (void) { -return kstat_lookup (); +return nlist (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_kstat_kstat_lookup=yes -else - ac_cv_lib_kstat_kstat_lookup=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_mld_nlist=yes +else case e in #( + e) ac_cv_lib_mld_nlist=no ;; +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 -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_lookup" >&5 -$as_echo "$ac_cv_lib_kstat_kstat_lookup" >&6; } -if test "x$ac_cv_lib_kstat_kstat_lookup" = xyes; then : - LNETSNMPLIBS="$LNETSNMPLIBS -lkstat" +LIBS=$ac_check_lib_save_LIBS ;; +esac fi +{ 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" +fi -# socket library (Solaris) -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6addr_any in -lsocket" >&5 -$as_echo_n "checking for in6addr_any in -lsocket... " >&6; } -if ${ac_cv_lib_socket_in6addr_any+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $LIBS" + ;; + *) # default + { 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 case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-lelf $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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char in6addr_any (); +char nlist (void); int -main () +main (void) { -return in6addr_any (); +return nlist (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_socket_in6addr_any=yes -else - ac_cv_lib_socket_in6addr_any=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_elf_nlist=yes +else case e in #( + e) ac_cv_lib_elf_nlist=no ;; +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 -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_in6addr_any" >&5 -$as_echo "$ac_cv_lib_socket_in6addr_any" >&6; } -if test "x$ac_cv_lib_socket_in6addr_any" = xyes; then : - LNETSNMPLIBS="$LNETSNMPLIBS -lsocket" +LIBS=$ac_check_lib_save_LIBS ;; +esac fi +{ 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 -# -# librt -# + ;; +esac +fi - { $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 - 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 +# libsocket +# Needed for 'socket(2)' (Solaris) +# Possibly also for 'gethostname(3)' (non-Solaris) +# (alternatively in libnsl (Solaris) +# or in libws2_32) (MinGW) +# +case x$with_socklib in +xwinsock2) + # libws2_w32 (MinGW) + # + netsnmp_save_LIBS="$LIBS" + LIBS="$LIBS -lws2_32" + 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 clock_gettime (); + #include + int -main () +main (void) { -return clock_gettime (); + + socket(0, 0, 0); + gethostbyname(0); + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - netsnmp_result="none required" -else - for netsnmp_cur_lib in rt ; do - LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if ac_fn_c_try_link "$LINENO" +then : + + # Keep LIBS. + true + +else case e in #( + e) + # Restore LIBS and complain. + LIBS="$netsnmp_save_LIBS" + as_fn_error $? "libws2_32 not found." "$LINENO" 5 + ;; +esac +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 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 case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char clock_gettime (); +char socket (void); int -main () +main (void) { -return clock_gettime (); +return socket (); ; 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 +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 : + ac_cv_search_socket=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_clock_gettime_LNETSNMPLIBS="${netsnmp_result}" +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext + if test ${ac_cv_search_socket+y} +then : + break 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 "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 - - - fi - - +done +if test ${ac_cv_search_socket+y} +then : -## -# MIB-module-specific checks -## +else case e in #( + e) ac_cv_search_socket=no ;; +esac +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS ;; +esac +fi +{ 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 : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -# libdevstat -# (for diskIO MIB) -# -# Not-Used: HAVE_GETDEVS/HAVE_DEVSTAT_GETDEVS -# -echo " $module_list " | $GREP " ucd-snmp/diskio " >/dev/null -if test $? -eq 0 ; then +else case e in #( + e) as_fn_error $? "socket(2) not found." "$LINENO" 5 ;; +esac +fi - { $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 - 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 + { 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 case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char getdevs (); +char gethostbyname (void); int -main () +main (void) { -return getdevs (); +return gethostbyname (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - netsnmp_result="none required" -else - for netsnmp_cur_lib in devstat ; do - LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +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 : + ac_cv_search_gethostbyname=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext + if test ${ac_cv_search_gethostbyname+y} +then : + break +fi +done +if test ${ac_cv_search_gethostbyname+y} +then : + +else case e in #( + e) ac_cv_search_gethostbyname=no ;; +esac +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS ;; +esac +fi +{ 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 : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +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 + + { 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 case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char getdevs (); +char gethostbyaddr (void); int -main () +main (void) { -return getdevs (); +return gethostbyaddr (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - netsnmp_result=-l${netsnmp_cur_lib} - break +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 : + ac_cv_search_gethostbyaddr=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext + if test ${ac_cv_search_gethostbyaddr+y} +then : + break fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_getdevs_LMIBLIBS="${netsnmp_result}" +done +if test ${ac_cv_search_gethostbyaddr+y} +then : + +else case e in #( + e) ac_cv_search_gethostbyaddr=no ;; +esac 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 "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 +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS ;; +esac +fi +{ 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 : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -$as_echo "#define HAVE_GETDEVS 1" >>confdefs.h +fi + 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 +fi + ;; +esac - { $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 - 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 + +# libiphlpapi (Cygwin and MinGW) +# +netsnmp_save_LIBS="$LIBS" +LIBS="$LIBS -liphlpapi" +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 devstat_getdevs (); + #include + #include + int -main () +main (void) { -return devstat_getdevs (); + + IpRenewAddress(0); + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - netsnmp_result="none required" -else - for netsnmp_cur_lib in devstat ; do - LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if ac_fn_c_try_link "$LINENO" +then : + + # Keep LIBS. + true + +else case e in #( + e) + # Restore LIBS and complain. + LIBS="$netsnmp_save_LIBS" + case x$with_socklib in + xwinsock2) + as_fn_error $? "libiphlpapi not found." "$LINENO" 5 + ;; + esac + ;; +esac +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 MIB_IF_TABLE2" >&5 +printf %s "checking for MIB_IF_TABLE2... " >&6; } +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 devstat_getdevs (); + #define _WIN32_WINNT 0xffff + #include + #include + #include + int -main () +main (void) { -return devstat_getdevs (); + + return sizeof(MIB_IF_TABLE2) + ; 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_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 "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 +if ac_fn_c_try_link "$LINENO" +then : -$as_echo "#define HAVE_DEVSTAT_GETDEVS 1" >>confdefs.h + { 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 - fi - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext -# libpci -# (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 - 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 pci_lookup_name (); -int -main () -{ -return pci_lookup_name (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - netsnmp_result="none required" -else - for netsnmp_cur_lib in pci ; do - LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +# libregex (MinGW) +# +netsnmp_save_LIBS="$LIBS" +LIBS="$LIBS -lregex" +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 pci_lookup_name (); + #include + #include + int -main () +main (void) { -return pci_lookup_name (); + + regcomp(0, 0, 0); + ; 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_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 "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 +if ac_fn_c_try_link "$LINENO" +then : + # Keep LIBS. + true - fi +else case e in #( + e) + # Restore LIBS. + LIBS="$netsnmp_save_LIBS" + ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext -# LM-SENSORS-MIB support +# libsnmpapi (MinGW) # -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; } - 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 : - LMIBLIBS="${LMIBLIBS} -lpicl" -fi +netsnmp_save_LIBS="$LIBS" +LIBS="$LIBS -lsnmpapi" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + #include - 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 -_ACEOF +int +main (void) +{ -fi + SnmpUtilMemAlloc(0); -done + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : - ;; - *) - # 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 : + # Keep LIBS. + true -else - as_fn_error $? "asked to use lm_sensors but I couldn't find sensors/sensors.h" "$LINENO" 5 +else case e in #( + e) + # Restore LIBS. + LIBS="$netsnmp_save_LIBS" + ;; +esac fi +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 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 +# kstat library (Solaris) +# +{ 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 case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char sensors_get_detected_chips (); +char kstat_lookup (void); int -main () +main (void) { -return sensors_get_detected_chips (); +return kstat_lookup (); ; 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 +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_kstat_kstat_lookup=yes +else case e in #( + e) ac_cv_lib_kstat_kstat_lookup=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; +esac +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 case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char sensors_get_detected_chips (); +char in6addr_any (void); int -main () +main (void) { -return sensors_get_detected_chips (); +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 case e in #( + e) ac_cv_lib_socket_in6addr_any=no ;; +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 - done +LIBS=$ac_check_lib_save_LIBS ;; +esac 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}" +{ 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_sensors_get_detected_chips_LMIBLIBS" >&5 -$as_echo "$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) +# librt # -if test "x$with_nl" != "xno"; then - case $target_os in - linux*) # Check for libnl (linux) - # 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. - - - - - - - -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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - 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 - test -z "$as_dir" && as_dir=. - 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" - $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 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - 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 - test -z "$as_dir" && as_dir=. - 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" - $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 -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - 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 - 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; 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; } - PKG_CONFIG="" - fi -fi -if test -n "$PKG_CONFIG" && \ - { { $as_echo "$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=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBNL3" >&5 -$as_echo_n "checking for LIBNL3... " >&6; } + { 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 case e in #( + e) 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. */ -if test -n "$LIBNL3_CFLAGS"; then - pkg_cv_LIBNL3_CFLAGS="$LIBNL3_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$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=$? - $as_echo "$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 +/* 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char clock_gettime (void); +int +main (void) +{ +return clock_gettime (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" +else case e in #( + e) for netsnmp_cur_lib in rt ; 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char clock_gettime (void); +int +main (void) +{ +return clock_gettime (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result=-l${netsnmp_cur_lib} + break fi -if test -n "$LIBNL3_LIBS"; then - pkg_cv_LIBNL3_LIBS="$LIBNL3_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$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=$? - $as_echo "$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 +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + done ;; +esac fi - else - pkg_failed=untried +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}" ;; +esac fi +{ 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 +printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "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 - 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 + fi - as_fn_error $? "Package requirements (libnl-3.0) were not met: -$LIBNL3_PKG_ERRORS -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. +## +# MIB-module-specific checks +## -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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$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. +# libdevstat +# (for diskIO MIB) +# +# Not-Used: HAVE_GETDEVS/HAVE_DEVSTAT_GETDEVS +# +echo " $module_list " | $GREP " ucd-snmp/diskio " >/dev/null +if test $? -eq 0 ; then -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. + { 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 case e in #( + e) 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. */ -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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +/* 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char getdevs (void); +int +main (void) +{ +return getdevs (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" +else case e in #( + e) for netsnmp_cur_lib in devstat ; 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char getdevs (void); +int +main (void) +{ +return getdevs (); + ; + 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 ;; +esac 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_getdevs_LMIBLIBS="${netsnmp_result}" ;; +esac fi +{ 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 +printf "%s\n" "#define HAVE_GETDEVS 1" >>confdefs.h - netsnmp_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${LIBNL3_CFLAGS} $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_LMIBLIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else - netsnmp_func_search_save_LIBS="$LIBS" + fi + + + { 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 case e in #( + e) netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$LMIBLIBS" netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" netsnmp_result=no @@ -24841,86 +30158,90 @@ 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char nl_connect (); +char devstat_getdevs (void); int -main () +main (void) { -return nl_connect (); +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 - for netsnmp_cur_lib in nl-3 ; do +else case e in #( + e) for netsnmp_cur_lib in devstat ; 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char nl_connect (); +char devstat_getdevs (void); int -main () +main (void) { -return nl_connect (); +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 + done ;; +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 LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_nl_connect_LMIBLIBS="${netsnmp_result}" + netsnmp_cv_func_devstat_getdevs_LMIBLIBS="${netsnmp_result}" ;; +esac 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 "x${netsnmp_cv_func_nl_connect_LMIBLIBS}" != "xno" ; then - if test "x${netsnmp_cv_func_nl_connect_LMIBLIBS}" != "xnone 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 - 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 -fi +printf "%s\n" "#define HAVE_DEVSTAT_GETDEVS 1" >>confdefs.h -done - 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 +fi - { $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 - netsnmp_func_search_save_LIBS="$LIBS" +# libpci +# (for if-mib description) +# + + { 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 case e in #( + e) netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$LMIBLIBS" netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" netsnmp_result=no @@ -24930,98 +30251,204 @@ 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char nl_connect (); +char pci_lookup_name (void); int -main () +main (void) { -return nl_connect (); +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 - for netsnmp_cur_lib in nl ; do +else case e in #( + e) for netsnmp_cur_lib in pci ; 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char nl_connect (); +char pci_lookup_name (void); int -main () +main (void) { -return nl_connect (); +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 + done ;; +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 LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_nl_connect_LMIBLIBS="${netsnmp_result}" + netsnmp_cv_func_pci_lookup_name_LMIBLIBS="${netsnmp_result}" ;; +esac 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 "x${netsnmp_cv_func_nl_connect_LMIBLIBS}" != "xno" ; then - if test "x${netsnmp_cv_func_nl_connect_LMIBLIBS}" != "xnone 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 - 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 +printf "%s\n" "#define HAVE_PCI_LOOKUP_NAME 1" >>confdefs.h + + + fi + + +# LM-SENSORS-MIB support +# +echo " $module_list " | $GREP -i "ucd-snmp/lmsensor" > /dev/null +if test $? -eq 0 ; then + { 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_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 fi -done + ;; + *) + # 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 case e in #( + e) as_fn_error $? "asked to use lm_sensors but I couldn't find sensors/sensors.h" "$LINENO" 5 ;; +esac +fi - fi - fi - if test "x$ac_cv_header_netlink_netlink_h" = xyes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { 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 case e in #( + e) 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. */ -#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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char sensors_get_detected_chips (void); +int +main (void) +{ +return sensors_get_detected_chips (); + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "nl_socket_free" >/dev/null 2>&1; then : - -$as_echo "#define HAVE_LIBNL3 1" >>confdefs.h +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" +else case e in #( + e) 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char sensors_get_detected_chips (void); +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 conftest* - - fi - ;; - esac +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + done ;; +esac +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}" ;; +esac 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 ## # More complex checks: @@ -25035,136 +30462,156 @@ 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 - ac_check_lib_save_LIBS=$LIBS + { 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 case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lpkcs11 $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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char C_Initialize (); +char C_Initialize (void); 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 - ac_cv_lib_pkcs11_C_Initialize=no +else case e in #( + e) ac_cv_lib_pkcs11_C_Initialize=no ;; +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 -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac 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 - ac_check_lib_save_LIBS=$LIBS + { 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 case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lrsaref $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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char RSAPrivateDecrypt (); +char RSAPrivateDecrypt (void); 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 - ac_cv_lib_rsaref_RSAPrivateDecrypt=no +else case e in #( + e) ac_cv_lib_rsaref_RSAPrivateDecrypt=no ;; +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 -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac 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 - ac_check_lib_save_LIBS=$LIBS + { 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 case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lRSAglue $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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char RSA_PKCS1_RSAref (); +char RSA_PKCS1_RSAref (void); 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 - ac_cv_lib_RSAglue_RSA_PKCS1_RSAref=no +else case e in #( + e) ac_cv_lib_RSAglue_RSA_PKCS1_RSAref=no ;; +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 -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac 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" @@ -25172,267 +30619,745 @@ 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 "x${with_wolfssl}" != x; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wolfSSL_EVP_md5 in -lwolfssl" >&5 +printf %s "checking for wolfSSL_EVP_md5 in -lwolfssl... " >&6; } +if test ${ac_cv_lib_wolfssl_wolfSSL_EVP_md5+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-lwolfssl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char wolfSSL_EVP_md5 (void); int -main () +main (void) { -return EVP_md5(); +return wolfSSL_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" +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_wolfssl_wolfSSL_EVP_md5=yes +else case e in #( + e) ac_cv_lib_wolfssl_wolfSSL_EVP_md5=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wolfssl_wolfSSL_EVP_md5" >&5 +printf "%s\n" "$ac_cv_lib_wolfssl_wolfSSL_EVP_md5" >&6; } +if test "x$ac_cv_lib_wolfssl_wolfSSL_EVP_md5" = xyes +then : + + ac_cv_lib_EVP_md5=yes + CRYPTO="wolfssl" + LIBCRYPTO="-lwolfssl" + +fi + + ac_fn_c_check_header_compile "$LINENO" "wolfssl/wolfcrypt/asn.h" "ac_cv_header_wolfssl_wolfcrypt_asn_h" "$ac_includes_default" +if test "x$ac_cv_header_wolfssl_wolfcrypt_asn_h" = xyes +then : + printf "%s\n" "#define HAVE_WOLFSSL_WOLFCRYPT_ASN_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "wolfssl/wolfcrypt/logging.h" "ac_cv_header_wolfssl_wolfcrypt_logging_h" "$ac_includes_default" +if test "x$ac_cv_header_wolfssl_wolfcrypt_logging_h" = xyes +then : + printf "%s\n" "#define HAVE_WOLFSSL_WOLFCRYPT_LOGGING_H 1" >>confdefs.h + +fi + + +printf "%s\n" "#define HAVE_VOID_EVP_MD_CTX_INIT 1" >>confdefs.h + + else + + 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + 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 -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$netsnmp_save_LIBS" + 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. - 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 +To get pkg-config, see . +See 'config.log' for more details" "$LINENO" 5; } else - ac_check_lib_save_LIBS=$LIBS + 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 +int +main (void) +{ +return EVP_md5(); + ; + 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; } + ac_cv_lib_EVP_md5=yes + CRYPTO="eay32" + LIBCRYPTO="-leay32" + +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi +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 + { 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 case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char EVP_md5 (); +char EVP_md5 (void); 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 - ac_cv_lib_crypto_EVP_md5=no +else case e in #( + e) ac_cv_lib_crypto_EVP_md5=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; +esac +fi +{ 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 : + ac_cv_lib_EVP_md5=yes + CRYPTO="crypto" + LIBCRYPTO="-lcrypto" +else case e in #( + e) + 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 case e in #( + e) ac_check_lib_save_LIBS=$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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char EVP_md5 (void); +int +main (void) +{ +return EVP_md5 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EVP_md5=yes +else case e in #( + e) ac_cv_lib_crypto_EVP_md5=no ;; +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 -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac 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" +{ 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 : + ac_cv_lib_EVP_md5=yes + CRYPTO="crypto" + LIBCRYPTO="-lcrypto -lz" fi - fi + ;; +esac +fi + + fi + fi + fi if test x$CRYPTO != x; then -$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBCRYPTO 1" >>confdefs.h - LIBCRYPTO="-l${CRYPTO}" - netsnmp_save_LIBS="$LIBS" - LIBS="$LIBCRYPTO" - for ac_func in AES_cfb128_encrypt EVP_sha224 EVP_sha384 EVP_MD_CTX_create EVP_MD_CTX_destroy EVP_MD_CTX_new EVP_MD_CTX_free DH_set0_pqg DH_get0_pqg DH_get0_key ASN1_STRING_get0_data X509_NAME_ENTRY_get_object X509_NAME_ENTRY_get_data X509_get_signature_nid -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 + fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + for symbol in \ + AES_cfb128_encrypt \ + ASN1_STRING_get0_data \ + DH_get0_key \ + DH_get0_pqg \ + DH_set0_pqg \ + DTLS_method \ + DTLSv1_method \ + ERR_get_error_all \ + ERR_get_error_func \ + EVP_MD_CTX_create \ + EVP_MD_CTX_destroy \ + EVP_MD_CTX_free \ + EVP_MD_CTX_new \ + EVP_aes_128_cfb \ + EVP_sha224 \ + EVP_sha384 \ + OPENSSL_sk_num \ + OPENSSL_sk_value \ + OpenSSL_add_all_algorithms \ + SSL_CTX_set_cookie_generate_cb \ + SSL_get1_peer_certificate \ + SSL_library_init \ + SSL_load_error_strings \ + TLS_method \ + TLSv1_method \ + X509_NAME_ENTRY_get_data \ + X509_NAME_ENTRY_get_object \ + X509_get_signature_nid \ + ; do + have_symbol=$(echo "HAVE_${symbol}" | tr '[:lower:]' '[:upper:]') + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${symbol}" >&5 +printf %s "checking for ${symbol}... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #ifdef HAVE_OPENSSL_AES_H + #include + #endif + #ifdef HAVE_OPENSSL_ERR_H + #include + #endif + #ifdef HAVE_OPENSSL_EVP_H + #include + #endif + #ifdef HAVE_OPENSSL_SSL_H + #include + #endif + #ifdef HAVE_OPENSSL_STACK_H + #include + #endif + #ifdef HAVE_OPENSSL_X509_H + #include + #endif + #ifdef HAVE_OPENSSL_X509V3_H + #include + #endif + +int +main (void) +{ + + #ifndef ${symbol} + return !${symbol} + #endif + + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + eval "ac_cv_func_${symbol}=yes" + printf "%s\n" "#define ${have_symbol} 1" >>confdefs.h +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi -done - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 2nd app_verify_cookie_cb() arg is const" >&5 -$as_echo_n "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 +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + done + { 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. */ - #include + #include int -main () +main (void) { - 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); + 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_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; }; ac_cv_saccaq=const -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +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 case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +printf "%s\n" "#define SECOND_APPVERIFY_COOKIE_CB_ARG_QUALIFIER $ac_cv_saccaq" >>confdefs.h + + CFLAGS="$netsnmp_save_CFLAGS" + + 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 + + if test "x$with_wolfssl" = x; then + LIBCRYPTO=" -lssl $LIBCRYPTO" + 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 + + if test "x$with_wolfssl" = x; then + LIBCRYPTO=" -lssl $LIBCRYPTO" + fi + 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing libssh2_session_handshake" >&5 +printf %s "checking for library containing libssh2_session_handshake... " >&6; } +if test ${ac_cv_search_libssh2_session_handshake+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) 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. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char libssh2_session_handshake (void); +int +main (void) +{ +return libssh2_session_handshake (); + ; + return 0; +} +_ACEOF +for ac_lib in '' ssh2 +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_libssh2_session_handshake=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -cat >>confdefs.h <<_ACEOF -#define SECOND_APPVERIFY_COOKIE_CB_ARG_QUALIFIER $ac_cv_saccaq -_ACEOF - - CFLAGS="$netsnmp_save_CFLAGS" - LIBS="$netsnmp_save_LIBS" - fi - netsnmp_save_LIBS="$LIBS" - LIBS="-lssl" - for ac_func in TLS_method TLSv1_method DTLS_method DTLSv1_method SSL_library_init SSL_load_error_strings ERR_get_error_all -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 - +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext + if test ${ac_cv_search_libssh2_session_handshake+y} +then : + break fi done +if test ${ac_cv_search_libssh2_session_handshake+y} +then : - 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 +else case e in #( + e) ac_cv_search_libssh2_session_handshake=no ;; +esac +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_libssh2_session_handshake" >&5 +printf "%s\n" "$ac_cv_search_libssh2_session_handshake" >&6; } +ac_res=$ac_cv_search_libssh2_session_handshake +if test "$ac_res" != no +then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -$as_echo "#define HAVE_LIBSSL_DTLS 1" >>confdefs.h +fi - 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 - 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 + ac_fn_c_check_func "$LINENO" "libssh2_session_handshake" "ac_cv_func_libssh2_session_handshake" +if test "x$ac_cv_func_libssh2_session_handshake" = xyes +then : + printf "%s\n" "#define HAVE_LIBSSH2_SESSION_HANDSHAKE 1" >>confdefs.h -$as_echo "#define HAVE_LIBSSL 1" >>confdefs.h +fi - 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 - ac_check_lib_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libssh2_session_init_ex in -lssh2" >&5 +printf %s "checking for libssh2_session_init_ex in -lssh2... " >&6; } +if test ${ac_cv_lib_ssh2_libssh2_session_init_ex+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lssh2 $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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char libssh2_session_startup (); +char libssh2_session_init_ex (void); int -main () +main (void) { -return libssh2_session_startup (); +return libssh2_session_init_ex (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ssh2_libssh2_session_startup=yes -else - ac_cv_lib_ssh2_libssh2_session_startup=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_ssh2_libssh2_session_init_ex=yes +else case e in #( + e) ac_cv_lib_ssh2_libssh2_session_init_ex=no ;; +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 -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac 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_init_ex" >&5 +printf "%s\n" "$ac_cv_lib_ssh2_libssh2_session_init_ex" >&6; } +if test "x$ac_cv_lib_ssh2_libssh2_session_init_ex" = xyes +then : -$as_echo "#define HAVE_LIBSSH2 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBSSH2 1" >>confdefs.h LIBCRYPTO=" -lssh2 $LIBCRYPTO" -else - as_fn_error $? "The SSH transport requires the libssh2 library to be available" "$LINENO" 5 +else case e in #( + e) as_fn_error $? "The SSH transport requires the libssh2 library to be available" "$LINENO" 5 ;; +esac fi SSHPROG=yes 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 - ac_check_lib_save_LIBS=$LIBS + { 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 case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lpkcs11 $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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char C_Initialize (); +char C_Initialize (void); 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 - ac_cv_lib_pkcs11_C_Initialize=no +else case e in #( + e) ac_cv_lib_pkcs11_C_Initialize=no ;; +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 -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac 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 + + + + + +for symbol in ASN_BOOLEAN ASN_INTEGER ASN_OBJECT_ID ASN_SEQUENCE ASN_SET; do + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${symbol}" >&5 +printf %s "checking for ${symbol}... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ + + #ifndef ${symbol} + return !${symbol} + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + printf "%s\n" "#define HAVE_${symbol} 1" >>confdefs.h + +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +done + LIBS=$NONAGENTLIBS # restore old libraries if test "x$SSHPROG" = "xyes"; then NETSNMP_BUILD_SSH_PROG_TRUE='' @@ -25448,7 +31373,7 @@ else NETSNMP_BUILD_TLS_PROG_TRUE='#' NETSNMP_BUILD_TLS_PROG_FALSE='' fi -if echo " ${security_mod_list} " | grep ' usm ' ; then +if echo " ${security_mod_list} " | grep -q ' usm ' ; then if test "x$enable_read_only" != "xyes" ; then NETSNMP_BUILD_USM_PROG_TRUE='' NETSNMP_BUILD_USM_PROG_FALSE='#' @@ -25492,7 +31417,8 @@ 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 @@ -25504,7 +31430,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 @@ -25519,18 +31445,19 @@ 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 - as_fn_error $? "Asked to use libwrap but I couldn't find tcpd.h." "$LINENO" 5 +else case e in #( + e) as_fn_error $? "Asked to use libwrap but I couldn't find tcpd.h." "$LINENO" 5 ;; +esac 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. */ @@ -25539,77 +31466,86 @@ $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 case e in #( + e) { 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 - ac_check_lib_save_LIBS=$LIBS +if test "x$ac_cv_func_yp_get_default_domain" = xyes +then : + +else case e in #( + e) { 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 case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char yp_get_default_domain (); +char yp_get_default_domain (void); 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 - ac_cv_lib_nsl_yp_get_default_domain=no +else case e in #( + e) ac_cv_lib_nsl_yp_get_default_domain=no ;; +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 -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac 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" fi - + ;; +esac 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 @@ -25617,29 +31553,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; } - as_fn_error $? "Asked to use libwrap but I couldn't find it." "$LINENO" 5 +else case e in #( + e) { 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 ;; +esac 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_exeext conftest.$ac_ext ;; +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 LAGENTLIBS="$LAGENTLIBS $_wraplibs" CPPFLAGS=${_cppflags} @@ -25656,12 +31595,13 @@ 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 - case $MYSQLCONFIG in +{ 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 case e in #( + e) case $MYSQLCONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_MYSQLCONFIG="$MYSQLCONFIG" # Let the user override the test with a path. ;; @@ -25670,11 +31610,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 as_fn_executable_p "$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 @@ -25682,15 +31626,16 @@ done IFS=$as_save_IFS ;; +esac ;; 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 @@ -25705,29 +31650,30 @@ 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 - as_fn_error $? "Could not find mysql.h and was specifically asked to use MySQL support" "$LINENO" 5 +else case e in #( + e) as_fn_error $? "Could not find mysql.h and was specifically asked to use MySQL support" "$LINENO" 5 ;; +esac fi - - for ac_header in my_global.h my_sys.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" "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 -done +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. */ @@ -25739,27 +31685,29 @@ $as_echo_n "checking whether MY_INIT() works... " >&6; } #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; } +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_MY_INIT 1" >>confdefs.h +printf "%s\n" "#define HAVE_MY_INIT 1" >>confdefs.h -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether my_load_defaults() exists" >&5 -$as_echo_n "checking whether my_load_defaults() exists... " >&6; } + { 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. */ @@ -25771,36 +31719,45 @@ $as_echo_n "checking whether my_load_defaults() exists... " >&6; } #endif #include int -main () +main (void) { my_load_defaults("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; } +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_MY_LOAD_DEFAULTS 1" >>confdefs.h +printf "%s\n" "#define HAVE_MY_LOAD_DEFAULTS 1" >>confdefs.h -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +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 - for ac_func in load_defaults mysql_init mysql_options -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" "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 -done CPPFLAGS="${_cppflags}" LIBS="${_libs}" @@ -25824,51 +31781,58 @@ fi ## NETSNMP_BUILD_PCAP_PROG_TRUE='#' NETSNMP_BUILD_PCAP_PROG_FALSE='' -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_create in -lpcap" >&5 -$as_echo_n "checking for pcap_create in -lpcap... " >&6; } -if ${ac_cv_lib_pcap_pcap_create+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS +{ 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 case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char pcap_create (); +char pcap_create (void); int -main () +main (void) { return pcap_create (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pcap_pcap_create=yes -else - ac_cv_lib_pcap_pcap_create=no +else case e in #( + e) ac_cv_lib_pcap_pcap_create=no ;; +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 -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcap_pcap_create" >&5 -$as_echo "$ac_cv_lib_pcap_pcap_create" >&6; } -if test "x$ac_cv_lib_pcap_pcap_create" = xyes; then : +{ 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 + for ac_header in pcap/pcap.h do : - ac_fn_c_check_header_mongrel "$LINENO" "pcap/pcap.h" "ac_cv_header_pcap_pcap_h" "$ac_includes_default" -if test "x$ac_cv_header_pcap_pcap_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PCAP_PCAP_H 1 -_ACEOF + 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='#' @@ -25877,7 +31841,6 @@ fi done - fi @@ -25888,26 +31851,34 @@ fi ## # 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 -_ACEOF +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 -done +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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing endwin" >&5 -$as_echo_n "checking for library containing endwin... " >&6; } -if ${netsnmp_cv_func_endwin_LIBCURSES+:} false; then : - $as_echo_n "(cached) " >&6 -else - netsnmp_func_search_save_LIBS="$LIBS" + + { 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 case e in #( + e) netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$LIBCURSES" netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" netsnmp_result=no @@ -25917,86 +31888,86 @@ 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char endwin (); +char endwin (void); int -main () +main (void) { return endwin (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else - for netsnmp_cur_lib in curses ncurses ; do +else case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char endwin (); +char endwin (void); int -main () +main (void) { return endwin (); ; 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 + done ;; +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 LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_endwin_LIBCURSES="${netsnmp_result}" + netsnmp_cv_func_endwin_LIBCURSES="${netsnmp_result}" ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_endwin_LIBCURSES" >&5 -$as_echo "$netsnmp_cv_func_endwin_LIBCURSES" >&6; } +{ 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 - for ac_header in curses.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "curses.h" "ac_cv_header_curses_h" "$ac_includes_default" -if test "x$ac_cv_header_curses_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_CURSES_H 1 -_ACEOF + 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 -done - - for ac_header in ncurses/curses.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "ncurses/curses.h" "ac_cv_header_ncurses_curses_h" "$ac_includes_default" -if test "x$ac_cv_header_ncurses_curses_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NCURSES_CURSES_H 1 -_ACEOF + 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 -done - HAVE_LIBCURSES=TRUE else HAVE_LIBCURSES=FALSE @@ -26008,12 +31979,13 @@ done # libm for ceil # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ceil" >&5 -$as_echo_n "checking for library containing ceil... " >&6; } -if ${netsnmp_cv_func_ceil_LNETSNMPLIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else - netsnmp_func_search_save_LIBS="$LIBS" + { 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 case e in #( + e) netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$LNETSNMPLIBS" netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" netsnmp_result=no @@ -26023,57 +31995,67 @@ 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char ceil (); +char ceil (void); int -main () +main (void) { return ceil (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else - for netsnmp_cur_lib in m ; do +else case e in #( + e) 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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char ceil (); +char ceil (void); int -main () +main (void) { return ceil (); ; 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 + done ;; +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 LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_ceil_LNETSNMPLIBS="${netsnmp_result}" + netsnmp_cv_func_ceil_LNETSNMPLIBS="${netsnmp_result}" ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_ceil_LNETSNMPLIBS" >&5 -$as_echo "$netsnmp_cv_func_ceil_LNETSNMPLIBS" >&6; } +{ 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}" @@ -26093,8 +32075,8 @@ cat >confcache <<\_ACEOF # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the +# 'ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* 'ac_cv_foo' will be assigned the # following values. _ACEOF @@ -26110,8 +32092,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) ;; #( @@ -26124,14 +32106,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote + # 'set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) - # `set' quotes correctly as required by POSIX, so do not add quotes. + # 'set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | @@ -26141,15 +32123,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 @@ -26163,8 +32145,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 @@ -26228,16 +32210,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 @@ -26258,14 +32240,14 @@ if test "x$install_perl" != "xno" ; then # What compiler was used to build the perl binary? # if test "x$enable_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; } + { 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" @@ -26273,21 +32255,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__ @@ -26298,37 +32279,40 @@ 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 - perlcc_is_gnu=no +else case e in #( + e) perlcc_is_gnu=no ;; +esac 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? @@ -26354,8 +32338,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" @@ -26363,8 +32347,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 ;; @@ -26374,8 +32358,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 ;; @@ -26387,12 +32371,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 @@ -26406,12 +32390,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" @@ -26426,13 +32410,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 @@ -26453,28 +32437,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 @@ -26493,7 +32475,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" @@ -26522,24 +32504,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 @@ -26548,8 +32530,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" @@ -26561,20 +32543,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 @@ -26604,8 +32586,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" @@ -26617,16 +32599,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 @@ -26651,8 +32633,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 @@ -26667,7 +32649,9 @@ 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_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 @@ -26691,10 +32675,10 @@ 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 @@ -26712,11 +32696,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 @@ -26725,18 +32709,18 @@ 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 *//;'` @@ -26780,212 +32764,237 @@ 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 - if test "x$ac_cv_lib_crypto_EVP_md5" != "xyes" -a \ - "x$ac_cv_lib_eay32_EVP_md5" != "xyes" -o \ + if test "x$ac_cv_lib_EVP_md5" != "xyes" -o \ "x$ac_cv_header_openssl_hmac_h" != "xyes"; then 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 - ac_check_lib_save_LIBS=$LIBS + { 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 case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsres $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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char query_send (); +char query_send (void); 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 - ac_cv_lib_sres_query_send=no +else case e in #( + e) ac_cv_lib_sres_query_send=no ;; +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 -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac 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 - as_fn_error $? "Can't find libsres" "$LINENO" 5 +else case e in #( + e) as_fn_error $? "Can't find libsres" "$LINENO" 5 ;; +esac 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 - ac_check_lib_save_LIBS=$LIBS + { 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 case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lval $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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char p_val_status (); +char p_val_status (void); 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 - ac_cv_lib_val_p_val_status=no +else case e in #( + e) ac_cv_lib_val_p_val_status=no ;; +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 -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac 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 - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) { 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 case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char pthread_rwlock_init (); +char pthread_rwlock_init (void); 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 - ac_cv_lib_pthread_pthread_rwlock_init=no +else case e in #( + e) ac_cv_lib_pthread_pthread_rwlock_init=no ;; +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 -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac 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 - ac_check_lib_save_LIBS=$LIBS + { 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 case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lval-threads $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. */ + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif -char p_val_status (); +char p_val_status (void); 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 - ac_cv_lib_val_threads_p_val_status=no +else case e in #( + e) ac_cv_lib_val_threads_p_val_status=no ;; +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 -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac 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 - as_fn_error $? "Can't find libval or libval-threads" "$LINENO" 5 +else case e in #( + e) as_fn_error $? "Can't find libval or libval-threads" "$LINENO" 5 ;; +esac fi - + ;; +esac fi -$as_echo "#define DNSSEC_LOCAL_VALIDATION 1" >>confdefs.h +printf "%s\n" "#define DNSSEC_LOCAL_VALIDATION 1" >>confdefs.h DNSSEC="enabled" else @@ -27016,106 +33025,109 @@ 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 : - -else - -cat >>confdefs.h <<_ACEOF -#define off_t long int -_ACEOF +if test "x$ac_cv_type_off_t" = xyes +then : +else case e in #( + e) +printf "%s\n" "#define off_t long int" >>confdefs.h + ;; +esac 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 - -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF -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 : -{ $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 +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include + + #if defined _WIN64 && !defined __CYGWIN__ + LLP64 + #endif int -main () +main (void) { -if ((struct tm *) 0) -return 0; + ; return 0; } + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_time=yes -else - ac_cv_header_time=no +if ac_fn_c_try_compile "$LINENO" +then : + ac_pid_type='int' +else case e in #( + e) ac_pid_type='__int64' ;; +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 + +printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h + + ;; +esac 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 -$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h + + + +# 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. */ int -main () +main (void) { int x __attribute__((deprecated)) ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : attr="__attribute__((deprecated))" -else - attr="/**/" +else case e in #( + e) attr="/**/" ;; +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 -cat >>confdefs.h <<_ACEOF -#define NETSNMP_ATTRIBUTE_DEPRECATED ${attr} -_ACEOF +printf "%s\n" "#define NETSNMP_ATTRIBUTE_DEPRECATED ${attr}" >>confdefs.h cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { int x __attribute__((unused)) ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : attr="__attribute__((unused))" -else - attr="/**/" +else case e in #( + e) attr="/**/" ;; +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 -cat >>confdefs.h <<_ACEOF -#define NETSNMP_ATTRIBUTE_UNUSED ${attr} -_ACEOF +printf "%s\n" "#define NETSNMP_ATTRIBUTE_UNUSED ${attr}" >>confdefs.h @@ -27142,11 +33154,10 @@ ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " #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 @@ -27167,11 +33178,10 @@ ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" " #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 @@ -27192,21 +33202,66 @@ ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" " #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 + + +if test "x$ac_cv_type_in_addr_t" != xyes; then + +printf "%s\n" "#define in_addr_t unsigned long" >>confdefs.h + +fi + +# +# Determine the type of fd_set::fds_bits on Unix systems. +# +netsnmp_save_CFLAGS=$CFLAGS +CFLAGS="$CFLAGS -Werror" -fi +{ 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 long 'unsigned long' unknown; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include -if test "x$ac_cv_type_in_addr_t" != xyes; then +int +main (void) +{ -$as_echo "#define in_addr_t unsigned long" >>confdefs.h + 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 : + break fi +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() @@ -27215,9 +33270,24 @@ fi netsnmp_save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -Werror" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the type of the fifth argument of select()" >&5 -$as_echo_n "checking for the type of the fifth argument of select()... " >&6; } -arg_type=void +{ 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. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +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. */ @@ -27229,33 +33299,58 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef HAVE_SYS_SELECT_H #include #endif +#ifdef HAVE_SYS_TIME_H +#include +#endif #endif #include int -main () +main (void) { return select(0, NULL, NULL, NULL, ($t *)NULL) ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${arg_type}" >&5 -$as_echo "${arg_type}" >&6; } -cat >>confdefs.h <<_ACEOF -#define NETSNMP_SELECT_TIMEVAL ${arg_type} -_ACEOF +else case e in #( + e) +: # The compiler does not support -Werror. + ;; +esac +fi +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. */ + +int +main (void) +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the type of the third argument of ioctlsocket()" >&5 -$as_echo_n "checking for the type of the third argument of ioctlsocket()... " >&6; } -arg_type=void +# The compiler supports -Werror. for t in "unsigned int" "unsigned long"; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -27271,24 +33366,31 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #include int -main () +main (void) { return ioctlsocket(0, 0, ($t *)NULL) ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${arg_type}" >&5 -$as_echo "${arg_type}" >&6; } -cat >>confdefs.h <<_ACEOF -#define NETSNMP_IOCTLSOCKET_ARG ${arg_type} -_ACEOF +else case e in #( + e) +: # The compiler does not support -Werror. + ;; +esac +fi +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_IOCTLSOCKET_ARG ${arg_type}" >>confdefs.h CFLAGS=$netsnmp_save_CFLAGS @@ -27315,8 +33417,8 @@ cat >confcache <<\_ACEOF # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the +# 'ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* 'ac_cv_foo' will be assigned the # following values. _ACEOF @@ -27332,8 +33434,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) ;; #( @@ -27346,14 +33448,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote + # 'set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) - # `set' quotes correctly as required by POSIX, so do not add quotes. + # 'set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | @@ -27363,15 +33465,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 @@ -27385,8 +33487,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 @@ -27406,28 +33508,29 @@ rm -f confcache # 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 : - -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF +if test "x$ac_cv_type_size_t" = xyes +then : +else case e in #( + e) +printf "%s\n" "#define size_t unsigned int" >>confdefs.h + ;; +esac 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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ 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 case e in #( + e) 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; @@ -27435,52 +33538,54 @@ 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 - ac_cv_working_alloca_h=no +else case e in #( + e) ac_cv_working_alloca_h=no ;; +esac 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_exeext conftest.$ac_ext ;; +esac 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 -else +{ 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 case e in #( + e) ac_cv_func_alloca_works=$ac_cv_working_alloca_h +if test "$ac_cv_func_alloca_works" != yes +then : 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; @@ -27488,20 +33593,21 @@ 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 - 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 ;; +esac 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; } 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 @@ -27511,59 +33617,20 @@ 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 case e in #( + e) if test "$cross_compiling" = yes +then : ac_cv_c_stack_direction=0 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -27583,99 +33650,62 @@ main (int argc, char **argv) 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 - ac_cv_c_stack_direction=-1 +else case e in #( + e) ac_cv_c_stack_direction=-1 ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac 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 - ac_pattern="Autoconf.*'x'" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -Autoconf TIOCGETP -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1; then : - ac_cv_prog_gcc_traditional=yes -else - ac_cv_prog_gcc_traditional=no -fi -rm -f 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 -f conftest* - 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 - -{ $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 +{ 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 case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int -main () +main (void) { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_type_signal=int -else - ac_cv_type_signal=void +else case e in #( + e) ac_cv_type_signal=void ;; +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 ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 -$as_echo "$ac_cv_type_signal" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 +printf "%s\n" "$ac_cv_type_signal" >&6; } -cat >>confdefs.h <<_ACEOF -#define RETSIGTYPE $ac_cv_type_signal -_ACEOF +printf "%s\n" "#define RETSIGTYPE $ac_cv_type_signal" >>confdefs.h @@ -27683,87 +33713,267 @@ _ACEOF # Stand-alone function checks: ## # Core: -for ac_func in rand random srand srandom lrand48 srand48 -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" "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 -done # Library: -for ac_func in asprintf closedir fgetc_unlocked flockfile funlockfile getipnodebyname gettimeofday getlogin 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 +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" "getnetgrent" "ac_cv_func_getnetgrent" +if test "x$ac_cv_func_getnetgrent" = xyes +then : + printf "%s\n" "#define HAVE_GETNETGRENT 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" "malloc_trim" "ac_cv_func_malloc_trim" +if test "x$ac_cv_func_malloc_trim" = xyes +then : + printf "%s\n" "#define HAVE_MALLOC_TRIM 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 -done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _NSGetArgv()" >&5 -$as_echo_n "checking for _NSGetArgv()... " >&6; } +{ 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 () +main (void) { return _NSGetArgv ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -$as_echo "#define HAVE__NSGETARGV 1" >>confdefs.h +if ac_fn_c_try_link "$LINENO" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +printf "%s\n" "#define HAVE__NSGETARGV 1" >>confdefs.h -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _NSGetExecutablePath()" >&5 -$as_echo_n "checking for _NSGetExecutablePath()... " >&6; } +{ 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 () +main (void) { return _NSGetExecutablePath ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -$as_echo "#define HAVE__NSGETEXECUTABLEPATH 1" >>confdefs.h +if ac_fn_c_try_link "$LINENO" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +printf "%s\n" "#define HAVE__NSGETEXECUTABLEPATH 1" >>confdefs.h -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +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 # IPv4/IPv6 function checks. AC_CHECK_FUNC() can't find these on MinGW @@ -27774,138 +33984,229 @@ case x$with_socklib in /* end confdefs.h. */ #include int -main () +main (void) { closesocket(0); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_func_closesocket=yes - $as_echo "#define HAVE_CLOSESOCKET 1" >>confdefs.h + printf "%s\n" "#define HAVE_CLOSESOCKET 1" >>confdefs.h 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 /* end confdefs.h. */ #include int -main () +main (void) { gai_strerror(0); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_func_gai_strerror=yes - $as_echo "#define HAVE_GAI_STRERROR 1" >>confdefs.h + printf "%s\n" "#define HAVE_GAI_STRERROR 1" >>confdefs.h 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 /* end confdefs.h. */ #include int -main () +main (void) { getaddrinfo(NULL, NULL, NULL, NULL); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_func_getaddrinfo=yes - $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h + printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h 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 /* end confdefs.h. */ #include int -main () +main (void) { gethostbyname(NULL); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_func_gethostbyname=yes - $as_echo "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h + printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h 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 /* end confdefs.h. */ #include int -main () +main (void) { gethostbyaddr(NULL); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_func_gethostbyaddr=yes - $as_echo "#define HAVE_GETHOSTBYADDR 1" >>confdefs.h + printf "%s\n" "#define HAVE_GETHOSTBYADDR 1" >>confdefs.h 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 /* end confdefs.h. */ #include int -main () +main (void) { gethostname(NULL, 0); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_func_gethostname=yes - $as_echo "#define HAVE_GETHOSTNAME 1" >>confdefs.h + printf "%s\n" "#define HAVE_GETHOSTNAME 1" >>confdefs.h 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 ;; *) # Do not use fork() nor any related function when using Windows sockets # because Windows sockets are not compatible with fork(). - for ac_func in execv fork signal sigset uname closesocket gai_strerror getaddrinfo gethostbyname gethostbyname2 gethostname gethostbyaddr inet_ntop inet_pton -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" "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 +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 + +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 + +fi +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 +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" "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 + +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" "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 + +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 # Check for MSVC functions. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _beginthreadex()" >&5 -$as_echo_n "checking for _beginthreadex()... " >&6; } +{ 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. */ @@ -27913,106 +34214,114 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #include int -main () +main (void) { _beginthreadex(NULL, 0, NULL, NULL, 0, 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; } +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__BEGINTHREADEX 1" >>confdefs.h +printf "%s\n" "#define HAVE__BEGINTHREADEX 1" >>confdefs.h -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _cputs()" >&5 -$as_echo_n "checking for _cputs()... " >&6; } +{ 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 int -main () +main (void) { _cputs(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; } +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__CPUTS 1" >>confdefs.h +printf "%s\n" "#define HAVE__CPUTS 1" >>confdefs.h -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _get_osfhandle()" >&5 -$as_echo_n "checking for _get_osfhandle()... " >&6; } +{ 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 int -main () +main (void) { _get_osfhandle(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; } +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__GET_OSFHANDLE 1" >>confdefs.h +printf "%s\n" "#define HAVE__GET_OSFHANDLE 1" >>confdefs.h -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _getch()" >&5 -$as_echo_n "checking for _getch()... " >&6; } +{ 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 int -main () +main (void) { return _getch(); ; 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; } +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__GETCH 1" >>confdefs.h +printf "%s\n" "#define HAVE__GETCH 1" >>confdefs.h -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _open_osfhandle()" >&5 -$as_echo_n "checking for _open_osfhandle()... " >&6; } +{ 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. */ @@ -28020,162 +34329,471 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #include int -main () +main (void) { _open_osfhandle(NULL, 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; } +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__OPEN_OSFHANDLE 1" >>confdefs.h +printf "%s\n" "#define HAVE__OPEN_OSFHANDLE 1" >>confdefs.h -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +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 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 +if test "x$ac_cv_func_getopt" = xyes +then : + printf "%s\n" "#define HAVE_GETOPT 1" >>confdefs.h -else - case " $LIBOBJS " in +else case e in #( + e) case " $LIBOBJS " in *" getopt.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS getopt.$ac_objext" ;; esac - + ;; +esac fi - 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 +if test "x$ac_cv_func_strlcat" = xyes +then : + printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h -else - case " $LIBOBJS " in +else case e in #( + e) case " $LIBOBJS " in *" strlcat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strlcat.$ac_objext" ;; esac - + ;; +esac fi - 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 +if test "x$ac_cv_func_strlcpy" = xyes +then : + printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h -else - case " $LIBOBJS " in +else case e in #( + e) case " $LIBOBJS " in *" strlcpy.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext" ;; esac - + ;; +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 : - $as_echo "#define HAVE_STRTOK_R 1" >>confdefs.h +if test "x$ac_cv_func_strtok_r" = xyes +then : + printf "%s\n" "#define HAVE_STRTOK_R 1" >>confdefs.h -else - case " $LIBOBJS " in +else case e in #( + e) case " $LIBOBJS " in *" strtok_r.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strtok_r.$ac_objext" ;; esac - + ;; +esac fi - 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 +if test "x$ac_cv_func_strtol" = xyes +then : + printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h -else - case " $LIBOBJS " in +else case e in #( + e) case " $LIBOBJS " in *" strtol.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strtol.$ac_objext" ;; esac - + ;; +esac fi - 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 +if test "x$ac_cv_func_strtoul" = xyes +then : + printf "%s\n" "#define HAVE_STRTOUL 1" >>confdefs.h -else - case " $LIBOBJS " in +else case e in #( + e) case " $LIBOBJS " in *" strtoul.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;; esac - + ;; +esac fi - 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 +if test "x$ac_cv_func_strtoull" = xyes +then : + printf "%s\n" "#define HAVE_STRTOULL 1" >>confdefs.h -else - case " $LIBOBJS " in +else case e in #( + e) case " $LIBOBJS " in *" strtoull.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strtoull.$ac_objext" ;; esac + ;; +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 -# Agent: -for ac_func in cgetnext chown forkall fsync 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 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 +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 +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 + +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 + +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" "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 + +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 + +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 + +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 + +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 + +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 + +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 + +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" "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 + +fi + + +# 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 fi -done # 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 +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 + +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" "setgid" "ac_cv_func_setgid" +if test "x$ac_cv_func_setgid" = xyes +then : + printf "%s\n" "#define HAVE_SETGID 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 + +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 -done # 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 +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 +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 + +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 +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 + +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 @@ -28189,31 +34807,29 @@ 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 case e in #( + e) if test "$cross_compiling" = yes +then : fu_cv_sys_stat_fs_data=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_SYS_PARAM_H @@ -28226,30 +34842,41 @@ 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 - fu_cv_sys_stat_fs_data=no +else case e in #( + e) fu_cv_sys_stat_fs_data=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac 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 @@ -28261,65 +34888,68 @@ 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 case e in #( + e) 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 - fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + fi ;; +esac 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_broken_inline+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ 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 case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ static inline int nested_inline_function(void) { @@ -28330,7 +34960,8 @@ inline int main_inline_function( void ) { } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : # Yes - static inline functions are broken (Solaris 2.x) # @@ -28342,19 +34973,21 @@ case "$target_os" in netsnmp_cv_broken_inline=no ;; esac -else - +else case e in #( + e) netsnmp_cv_broken_inline=yes - + ;; +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 ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_broken_inline" >&5 -$as_echo "$netsnmp_cv_broken_inline" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_broken_inline" >&5 +printf "%s\n" "$netsnmp_cv_broken_inline" >&6; } if test "$netsnmp_cv_broken_inline" = yes ; then -$as_echo "#define NETSNMP_BROKEN_INLINE 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_BROKEN_INLINE 1" >>confdefs.h fi @@ -28363,12 +34996,13 @@ 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 +{ 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 case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_SYS_IOCTL_H @@ -28379,25 +35013,28 @@ No SIOCGIFADDR found here. #endif int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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 +else case e in #( + e) netsnmp_cv_sys_ioctl_h_has_SIOCGIFADDR=no ;; +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 ;; +esac 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; } +{ 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 -$as_echo "#define SYS_IOCTL_H_HAS_SIOCGIFADDR 1" >>confdefs.h +printf "%s\n" "#define SYS_IOCTL_H_HAS_SIOCGIFADDR 1" >>confdefs.h fi @@ -28408,12 +35045,13 @@ fi case x${host_cpu}-${host_vendor}-${host_os} in x*mingw*) # MinGW or MinGW-w64. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking the underlying type of size_t" >&5 -$as_echo_n "checking the underlying type of size_t... " >&6; } -if ${netsnmp_cv_size_t_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - for TYPE in int long "long long" short char; do + { 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 case e in #( + e) for TYPE in int long "long long" short char; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -28422,25 +35060,27 @@ else extern size_t variable; int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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 +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 + done ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_size_t_type" >&5 -$as_echo "$netsnmp_cv_size_t_type" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_size_t_type" >&5 +printf "%s\n" "$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; } + { 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="";; @@ -28451,26 +35091,25 @@ $as_echo_n "checking how to printf a size_t... " >&6; } *) 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; };; + { 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 -cat >>confdefs.h <<_ACEOF -#define NETSNMP_PRIz "$netsnmp_PRIz" -_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 case e in #( + e) { 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" @@ -28478,26 +35117,29 @@ $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 - as_fn_error $? "DTLS support requires a newer version of OpenSSL" "$LINENO" 5 +else case e in #( + e) as_fn_error $? "DTLS support requires a newer version of OpenSSL" "$LINENO" 5 ;; +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 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; } + ;; +esac fi fi @@ -28530,19 +35172,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 @@ -28559,11 +35200,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 @@ -28577,16 +35217,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 @@ -28603,11 +35242,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 @@ -28620,190 +35258,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 @@ -28814,19 +35442,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 @@ -28837,38 +35464,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 @@ -28880,57 +35505,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 @@ -28945,11 +35567,10 @@ ac_fn_c_check_member "$LINENO" "struct uvmexp" "pgswapin" "ac_cv_member_struct_u #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 @@ -28960,32 +35581,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 @@ -28997,19 +35616,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 @@ -29034,11 +35647,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 @@ -29058,11 +35670,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 @@ -29082,11 +35693,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 @@ -29106,11 +35716,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 @@ -29139,11 +35748,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 @@ -29154,43 +35762,45 @@ fi # # 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]];'. +# 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 - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (sockaddr_un.sun_path))" "ac_cv_sizeof_sockaddr_un_sun_path" " +{ 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 case e in #( + e) 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 - 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;} +else case e in #( + e) if test "$ac_cv_type_sockaddr_un_sun_path" = yes; then + { { 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; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_sockaddr_un_sun_path=0 - fi + fi ;; +esac fi - + ;; +esac 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 @@ -29200,7 +35810,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 @@ -29214,18 +35824,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 @@ -29239,18 +35848,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 @@ -29264,18 +35872,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 @@ -29289,18 +35896,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 @@ -29314,11 +35920,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 @@ -29330,57 +35935,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 @@ -29395,16 +35997,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 @@ -29433,11 +36034,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 @@ -29449,11 +36049,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 @@ -29461,22 +36061,21 @@ 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 -#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 @@ -29484,72 +36083,69 @@ ac_fn_c_check_member "$LINENO" "struct tm" "tm_isdst" "ac_cv_member_struct_tm_tm #endif " -if test "x$ac_cv_member_struct_tm_tm_isdst" = xyes; then : +if test "x$ac_cv_member_struct_tm_tm_isdst" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_TM_TM_ISDST 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_TM_TM_ISDST 1" >>confdefs.h fi -ac_fn_c_check_decl "$LINENO" "daylight" "ac_cv_have_decl_daylight" " -#if TIME_WITH_SYS_TIME +ac_fn_check_decl "$LINENO" "daylight" "ac_cv_have_decl_daylight" " +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -" -if test "x$ac_cv_have_decl_daylight" = xyes; then : +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_daylight" = xyes +then : ac_have_decl=1 -else - ac_have_decl=0 +else case e in #( + e) ac_have_decl=0 ;; +esac fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_DAYLIGHT $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "timezone" "ac_cv_have_decl_timezone" " -#if TIME_WITH_SYS_TIME +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 -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -" -if test "x$ac_cv_have_decl_timezone" = xyes; then : +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_timezone" = xyes +then : ac_have_decl=1 -else - ac_have_decl=0 +else case e in #( + e) ac_have_decl=0 ;; +esac fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TIMEZONE $ac_have_decl -_ACEOF +printf "%s\n" "#define HAVE_DECL_TIMEZONE $ac_have_decl" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether timezone is a scalar" >&5 -$as_echo_n "checking whether timezone is a scalar... " >&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 @@ -29557,7 +36153,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #endif int -main () +main (void) { int a[2]; @@ -29567,17 +36163,19 @@ return &a[timezone] != NULL; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 "#define HAVE_SCALAR_TIMEZONE 1" >>confdefs.h +printf "%s\n" "#define HAVE_SCALAR_TIMEZONE 1" >>confdefs.h -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +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 # struct timezone # Library: @@ -29588,7 +36186,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 @@ -29600,11 +36198,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 @@ -29616,150 +36213,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 @@ -29773,12 +36364,13 @@ 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 - ac_cv_IFNET_NEEDS_KERNEL=unknown +{ 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 case e in #( + e) ac_cv_IFNET_NEEDS_KERNEL=unknown cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -29797,17 +36389,18 @@ else #endif int -main () +main (void) { -struct ifnet test; test.if_mtu = 0; +struct ifnet test; test.if_mtu = 0; return sizeof(struct in_ifaddr); ; 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. */ @@ -29828,36 +36421,39 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext #endif int -main () +main (void) { -struct ifnet test; test.if_mtu = 0; +struct ifnet test; test.if_mtu = 0; return sizeof(struct in_ifaddr); ; 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 - fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + fi ;; +esac 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 - ac_cv_IFNET_NEEDS_KERNEL_STRUCTURES=unknown +{ 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 case e in #( + e) ac_cv_IFNET_NEEDS_KERNEL_STRUCTURES=unknown cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -29876,17 +36472,18 @@ else #endif int -main () +main (void) { -struct ifnet test; test.if_mtu = 0; +struct ifnet test; test.if_mtu = 0; return sizeof(struct in_ifaddr); ; 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. */ @@ -29907,25 +36504,27 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext #endif int -main () +main (void) { -struct ifnet test; test.if_mtu = 0; +struct ifnet test; test.if_mtu = 0; return sizeof(struct in_ifaddr); ; 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 - fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + fi ;; +esac 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 @@ -29964,11 +36563,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 @@ -30040,11 +36638,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 @@ -30110,11 +36707,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 @@ -30180,11 +36776,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 @@ -30250,11 +36845,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 @@ -30320,11 +36914,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 @@ -30390,11 +36983,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 @@ -30460,11 +37052,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 @@ -30530,11 +37121,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 @@ -30600,11 +37190,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 @@ -30670,11 +37259,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 @@ -30740,11 +37328,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 @@ -30810,11 +37397,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 @@ -30880,11 +37466,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 @@ -30950,11 +37535,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 @@ -31020,11 +37604,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 @@ -31090,11 +37673,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 @@ -31103,12 +37685,13 @@ 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 case e in #( + e) # BSD 4.4 compatible structure # ('rt_nodes' array) # @@ -31134,7 +37717,7 @@ else #include int -main () +main (void) { @@ -31150,10 +37733,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 @@ -31181,7 +37765,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext #include int -main () +main (void) { @@ -31192,10 +37776,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 @@ -31203,26 +37788,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # ac_cv_RTENTRY_TYPE="unknown" fi - + ;; +esac 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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { 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 case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define KERNEL @@ -31230,22 +37817,25 @@ else _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "ortentry" >/dev/null 2>&1; then : + $EGREP_TRADITIONAL "ortentry" >/dev/null 2>&1 +then : ac_cv_struct_rtentry=ortentry -else - ac_cv_struct_rtentry=rtentry +else case e in #( + e) ac_cv_struct_rtentry=rtentry ;; +esac fi -rm -f conftest* +rm -rf conftest* if test "x$ac_cv_struct_rtentry" = "xrtentry" ; then ac_cv_struct_rtentry="rtentry" else ac_cv_struct_rtentry="ortentry" fi - + ;; +esac 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" @@ -31255,25 +37845,23 @@ 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} -_ACEOF +printf "%s\n" "#define RTENTRY struct ${ac_cv_struct_rtentry}" >>confdefs.h # prioritynames -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking syslog prioritynames" >&5 -$as_echo_n "checking syslog prioritynames... " >&6; } +{ 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 -#if HAVE_SYSLOG_H +#ifdef HAVE_SYSLOG_H #define SYSLOG_NAMES #include #endif int -main () +main (void) { char *test = prioritynames[0].c_name; @@ -31283,21 +37871,23 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +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; } -$as_echo "#define HAVE_PRIORITYNAMES 1" >>confdefs.h +printf "%s\n" "#define HAVE_PRIORITYNAMES 1" >>confdefs.h -else - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - +else case e in #( + e) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +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 # -*- autoconf -*- @@ -31316,8 +37906,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 @@ -31325,12 +37915,13 @@ 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 - ac_cv_KERNEL_LOC="unknown" +{ 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 case e in #( + e) 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 if test $CDEV_TEST_FLAG $i; then @@ -31349,17 +37940,16 @@ 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;} + { 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 - + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_KERNEL_LOC" >&5 -$as_echo "$ac_cv_KERNEL_LOC" >&6; } +{ 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 KERNEL_LOC "$ac_cv_KERNEL_LOC" -_ACEOF +printf "%s\n" "#define KERNEL_LOC \"$ac_cv_KERNEL_LOC\"" >>confdefs.h @@ -31367,30 +37957,30 @@ _ACEOF # (/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 - if test $CDEV_TEST_FLAG /dev/dmem; then +{ 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 case e in #( + e) if test $CDEV_TEST_FLAG /dev/dmem; then ac_cv_DMEM_LOC="/dev/dmem" elif test $CDEV_TEST_FLAG /dev/drum; then ac_cv_DMEM_LOC="/dev/drum" else ac_cv_DMEM_LOC="none" fi - + ;; +esac 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 @@ -31398,12 +37988,13 @@ 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 - ac_cv_ETC_MNTTAB="${with_mnttab:-unknown}" +{ 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 case e in #( + e) 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 do @@ -31413,14 +38004,13 @@ else fi done fi - + ;; +esac 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 @@ -31429,12 +38019,13 @@ _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 - case $LPSTAT_PATH in +{ 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 case e in #( + e) case $LPSTAT_PATH in [\\/]* | ?:[\\/]*) ac_cv_path_LPSTAT_PATH="$LPSTAT_PATH" # Let the user override the test with a path. ;; @@ -31443,11 +38034,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 as_fn_executable_p "$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 @@ -31455,31 +38050,30 @@ done IFS=$as_save_IFS ;; +esac ;; 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 @@ -31487,44 +38081,43 @@ 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 - -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 - +{ 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 case e in #( + e) +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 + ;; +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 @@ -31535,31 +38128,33 @@ _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 - netsnmp_have_sighup=no - +else case e in #( + e) netsnmp_have_sighup=no + ;; +esac 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 @@ -31568,37 +38163,41 @@ fi # 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 : + { 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 case e in #( + e) if test "$cross_compiling" = yes +then : ac_cv_NETSNMP_CAN_USE_SYSCTL=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) 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 int main(int argc, char **argv) { @@ -31614,63 +38213,70 @@ int main(int argc, char **argv) } _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 - ac_cv_NETSNMP_CAN_USE_SYSCTL=no +else case e in #( + e) ac_cv_NETSNMP_CAN_USE_SYSCTL=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac 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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ 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 case e in #( + e) 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_TRADITIONAL "hz" >/dev/null 2>&1 +then : ac_cv_TCPTV_NEEDS_HZ=yes -else - ac_cv_TCPTV_NEEDS_HZ=no +else case e in #( + e) ac_cv_TCPTV_NEEDS_HZ=no ;; +esac fi -rm -f conftest* - +rm -rf conftest* + ;; +esac 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 @@ -31682,56 +38288,51 @@ 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 - ac_inet_ip_h=no +else case e in #( + e) ac_inet_ip_h=no ;; +esac 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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { 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 case e in #( + e) 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; @@ -31742,31 +38343,35 @@ 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 - ac_cv_mib2_ipRouteEntry_t=no +else case e in #( + e) ac_cv_mib2_ipRouteEntry_t=no ;; +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 ;; +esac 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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { 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 case e in #( + e) 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; @@ -31777,28 +38382,31 @@ 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 - ac_cv_ire_cache=no +else case e in #( + e) ac_cv_ire_cache=no ;; +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 ;; +esac 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 @@ -31809,8 +38417,8 @@ esac # Check whether SO_BINDTODEVICE is available. # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SO_BINDTODEVICE" >&5 -$as_echo_n "checking for SO_BINDTODEVICE... " >&6; } +{ 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. */ @@ -31818,7 +38426,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #include int -main () +main (void) { return SO_BINDTODEVICE @@ -31827,17 +38435,19 @@ return SO_BINDTODEVICE return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : -$as_echo "#define HAVE_SO_BINDTODEVICE 1" >>confdefs.h +printf "%s\n" "#define HAVE_SO_BINDTODEVICE 1" >>confdefs.h - { $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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +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 # Check whether struct in_pktinfo.ipi_spec_dst is available. @@ -31849,11 +38459,10 @@ ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_ #include " -if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes; then : +if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1" >>confdefs.h fi @@ -31862,12 +38471,13 @@ 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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ 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 case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* printf() */ @@ -31876,9 +38486,10 @@ else #include #include #include +#include /* inet_ntoa() */ int -main () +main (void) { void *buf; @@ -31914,32 +38525,80 @@ 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 - ac_cv_have_ip_pktinfo=no - +else case e in #( + e) ac_cv_have_ip_pktinfo=no + ;; +esac 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_exeext conftest.$ac_ext ;; +esac 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 IPV6_RECVPKTINFO is usable. +# + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPV6_RECVPKTINFO " >&5 +printf %s "checking for IPV6_RECVPKTINFO ... " >&6; } +if test ${ac_cv_have_ipv6_recvpktinfo+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + +int +main (void) +{ + +return IPV6_RECVPKTINFO + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_have_ipv6_recvpktinfo=yes +else case e in #( + e) ac_cv_have_ipv6_recvpktinfo=no + ;; +esac +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_have_ipv6_recvpktinfo" >&5 +printf "%s\n" "$ac_cv_have_ipv6_recvpktinfo" >&6; } +if test x$ac_cv_have_ipv6_recvpktinfo = xyes; then + +printf "%s\n" "#define HAVE_IPV6_RECVPKTINFO 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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ 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 case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* printf() */ @@ -31948,9 +38607,10 @@ else #include #include #include +#include /* inet_ntoa() */ int -main () +main (void) { void *buf; @@ -31985,20 +38645,23 @@ 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 - ac_cv_have_ip_recvdstaddr=no - +else case e in #( + e) ac_cv_have_ip_recvdstaddr=no + ;; +esac 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_exeext conftest.$ac_ext ;; +esac 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 @@ -32012,8 +38675,8 @@ cat >confcache <<\_ACEOF # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the +# 'ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* 'ac_cv_foo' will be assigned the # following values. _ACEOF @@ -32029,8 +38692,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) ;; #( @@ -32043,14 +38706,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote + # 'set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) - # `set' quotes correctly as required by POSIX, so do not add quotes. + # 'set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | @@ -32060,15 +38723,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 @@ -32082,8 +38745,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 @@ -32162,8 +38825,8 @@ cat >confcache <<\_ACEOF # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the +# 'ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* 'ac_cv_foo' will be assigned the # following values. _ACEOF @@ -32179,8 +38842,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) ;; #( @@ -32193,14 +38856,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote + # 'set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) - # `set' quotes correctly as required by POSIX, so do not add quotes. + # 'set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | @@ -32210,15 +38873,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 @@ -32232,8 +38895,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 @@ -32250,7 +38913,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" @@ -32266,8 +38929,8 @@ LTLIBOBJS=$ac_ltlibobjs 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 @@ -32290,63 +38953,65 @@ 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 : +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 - case `(set -o) 2>/dev/null` in #( +else case e in #( + e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; 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 || @@ -32355,13 +39020,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 #(( @@ -32370,43 +39028,27 @@ 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 ;; esac -# We did not find ourselves, most probably we were run as `sh COMMAND' +# We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. 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] @@ -32419,9 +39061,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 @@ -32452,22 +39094,25 @@ 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 - as_fn_append () +else case e in #( + e) as_fn_append () { eval $1=\$$1\$2 - } + } ;; +esac fi # as_fn_append # as_fn_arith ARG... @@ -32475,16 +39120,18 @@ 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 - as_fn_arith () +else case e in #( + e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } + } ;; +esac fi # as_fn_arith @@ -32511,7 +39158,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 @@ -32533,6 +39180,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*) @@ -32546,6 +39197,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 @@ -32557,9 +39214,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... 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 -pR'. + # 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 -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -32587,7 +39244,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" @@ -32596,7 +39253,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 @@ -32640,10 +39297,12 @@ 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'" +as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed '$as_sed_sh'" # deprecated exec 6>&1 @@ -32658,8 +39317,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.9, which was -generated by GNU Autoconf 2.69. Invocation command line was +This file was extended by Net-SNMP $as_me 5.9.5.2, which was +generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -32691,7 +39350,7 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions +'$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. @@ -32721,14 +39380,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.9 -configured by $0, generated by GNU Autoconf 2.69, +Net-SNMP config.status 5.9.5.2 +configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2023 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -32767,15 +39428,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'" @@ -32783,23 +39444,23 @@ 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;; --he | --h) # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; + 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=: ;; # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; + -*) as_fn_error $? "unrecognized option: '$1' +Try '$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; @@ -32820,7 +39481,7 @@ 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 shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -32834,7 +39495,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 @@ -33231,7 +39892,7 @@ do "local/snmpconf") CONFIG_FILES="$CONFIG_FILES local/snmpconf" ;; "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;; esac done @@ -33241,9 +39902,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 @@ -33251,7 +39912,7 @@ fi # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# after its creation but before its name has been assigned to '$tmp'. $debug || { tmp= ac_tmp= @@ -33275,7 +39936,7 @@ ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. +# This happens for instance with './config.status config.h'. if test -n "$CONFIG_FILES"; then if $AWK 'BEGIN { getline <"/dev/null" }' /dev/null; then @@ -33293,7 +39954,7 @@ else print "|#_!!_#|" print "cat " F[key] " &&" '$ac_cs_awk_pipe_init - # The final `:' finishes the AND list. + # The final ':' finishes the AND list. ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' fi ac_cr=`echo X | tr X '\015'` @@ -33467,13 +40128,13 @@ fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. +# This happens for instance with './config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF -# Transform confdefs.h into an awk script `defines.awk', embedded as +# Transform confdefs.h into an awk script 'defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. @@ -33583,7 +40244,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -33605,33 +40266,33 @@ do -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. + # because $ac_f cannot contain ':'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + 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 - # Let's still pretend it is `configure' which instantiates (i.e., don't + # Let's still pretend it is 'configure' which instantiates (i.e., don't # 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 @@ -33648,7 +40309,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 @@ -33672,9 +40333,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/ ;; @@ -33731,8 +40392,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=' @@ -33745,7 +40406,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 esac _ACEOF -# Neutralize VPATH when `$srcdir' = `.'. +# Neutralize VPATH when '$srcdir' = '.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -33780,9 +40441,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" @@ -33798,27 +40459,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 @@ -34355,6 +41016,7 @@ _LT_EOF esac + ltmain=$ac_aux_dir/ltmain.sh @@ -34546,8 +41208,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 @@ -34566,3 +41228,4 @@ fi # mode: Autoconf # comment-start: "#" # End: + diff --git a/vendor/configure.ac b/vendor/configure.ac index a9c49fd..d262a2f 100644 --- a/vendor/configure.ac +++ b/vendor/configure.ac @@ -15,13 +15,13 @@ # # Process this file with autoconf to produce a configure script. # -AC_INIT([Net-SNMP], [5.9], [net-snmp-coders@lists.sourceforge.net]) -AC_PREREQ([2.63]) +AC_INIT([Net-SNMP],[5.9.5.2],[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() diff --git a/vendor/configure.d/config_modules_agent b/vendor/configure.d/config_modules_agent index 8731a1b..317fab6 100644 --- a/vendor/configure.d/config_modules_agent +++ b/vendor/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 struct netsnmp_unused_struct]) + # 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 @@ -192,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(, ) @@ -277,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 @@ -306,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'` @@ -328,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 { @@ -370,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") @@ -407,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 @@ -454,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 @@ -466,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 @@ -479,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 @@ -736,7 +738,7 @@ changequote([, ]) if test $module_debug -eq 1; then echo -e "\nFinal module list: $module_list_code" - exit + exit 1 fi if test "x$with_mib_cfg_checks" = "xyes"; then AC_MSG_CACHE_ADD([Agent Module list: $module_list_code]) @@ -792,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'` @@ -814,8 +816,8 @@ AC_MSG_RESULT($NETSNMP_DEFAULT_MIBS) # if echo " $agent_module_list " | \ - fgrep ' agentx/agentx_config ' | \ - 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/vendor/configure.d/config_modules_lib b/vendor/configure.d/config_modules_lib index c13d234..6026cd8 100644 --- a/vendor/configure.d/config_modules_lib +++ b/vendor/configure.d/config_modules_lib @@ -197,12 +197,8 @@ 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, diff --git a/vendor/configure.d/config_modules_transports b/vendor/configure.d/config_modules_transports index 14fcf0d..d570a6e 100644 --- a/vendor/configure.d/config_modules_transports +++ b/vendor/configure.d/config_modules_transports @@ -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/vendor/configure.d/config_net_snmp_config_h b/vendor/configure.d/config_net_snmp_config_h index b495bb7..fcc76f6 100644 --- a/vendor/configure.d/config_net_snmp_config_h +++ b/vendor/configure.d/config_net_snmp_config_h @@ -38,7 +38,11 @@ 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 -#if (defined(NETSNMP_USE_OPENSSL) && defined(HAVE_OPENSSL_AES_H) && defined(HAVE_AES_CFB128_ENCRYPT)) || defined(NETSNMP_USE_INTERNAL_CRYPTO) +#if (defined(NETSNMP_USE_OPENSSL) && \ + defined(HAVE_OPENSSL_AES_H) && \ + defined(HAVE_AES_CFB128_ENCRYPT) && \ + defined(HAVE_EVP_AES_128_CFB)) || \ + defined(NETSNMP_USE_INTERNAL_CRYPTO) #define HAVE_AES 1 #endif @@ -56,35 +60,6 @@ AH_BOTTOM([/* end of definitions added by configure on-the-fly */ #endif /* NETSNMP_NO_AUTOCONF_DEFINITIONS */ -/* - * 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 using - * an expression that can be evaluated at compile time. To do: add support for - * other compilers than gcc that do not support statement expressions. - */ -#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 -# define NETSNMP_BIGENDIAN \ - (__extension__ \ - ({ \ - union { unsigned long l; unsigned char c; } u; \ - \ - u.l = 1; \ - u.c == 0; \ - }) \ - ) -#endif - - - /* ********* NETSNMP_MARK_BEGIN_CLEAN_NAMESPACE ********* */ /* @@ -510,6 +485,32 @@ AH_BOTTOM([/* end of definitions added by configure on-the-fly */ #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 *********/ /* @@ -665,6 +666,7 @@ AH_BOTTOM([/* end of definitions added by configure on-the-fly */ #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/vendor/configure.d/config_os_functions b/vendor/configure.d/config_os_functions index 889e2c4..9ec2eaa 100644 --- a/vendor/configure.d/config_os_functions +++ b/vendor/configure.d/config_os_functions @@ -27,8 +27,8 @@ AC_CHECK_FUNCS([rand random srand srandom lrand48 srand48]) # Library: AC_CHECK_FUNCS([asprintf closedir fgetc_unlocked ] dnl [flockfile funlockfile getipnodebyname ] dnl - [gettimeofday getlogin ] dnl - [if_nametoindex mkstemp ] dnl + [gettimeofday getlogin getnetgrent ] dnl + [if_nametoindex malloc_trim mkstemp ] dnl [opendir readdir regcomp ] dnl [setenv setitimer setlocale ] dnl [setsid snprintf strcasestr ] dnl @@ -99,7 +99,7 @@ case x$with_socklib in *) # 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]dnl + 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]) @@ -156,21 +156,24 @@ AC_REPLACE_FUNCS([getopt ] dnl [strtol strtoul strtoull ] ) # Agent: -AC_CHECK_FUNCS([cgetnext chown forkall ] dnl - [fsync 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 usleep ] ) +# Agent, Darwin (Apple): +AC_CHECK_FUNCS([vm_region vm_region_64]) + # Apps: AC_CHECK_FUNCS([getdtablesize ] dnl [getgrnam getpid getpwnam ] dnl @@ -213,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], diff --git a/vendor/configure.d/config_os_headers b/vendor/configure.d/config_os_headers index 76ef58a..137ab67 100644 --- a/vendor/configure.d/config_os_headers +++ b/vendor/configure.d/config_os_headers @@ -62,14 +62,15 @@ 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 +AC_CHECK_HEADERS([sys/callout.h 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/mnttab.h sys/osd.h ] dnl + [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 @@ -100,11 +101,8 @@ AC_CHECK_HEADERS([search.h sgtty.h xti.h ] dnl # Valgrind AC_CHECK_HEADERS([valgrind/valgrind.h valgrind/memcheck.h]) # OpenSSL -AC_CHECK_HEADERS([openssl/aes.h ]) # (Core) -AC_CHECK_HEADERS([openssl/dh.h ]) # (Apps) -# Not-Used: -AC_CHECK_HEADERS([openssl/des.h openssl/hmac.h ] dnl - [openssl/evp.h security/cryptoki.h]) +AC_CHECK_HEADERS([openssl/aes.h openssl/dh.h openssl/des.h openssl/err.h]dnl + [openssl/evp.h openssl/hmac.h openssl/ssl.h]) # RPM subdirectory path (Agent) if test "x$with_rpm" != "xno"; then @@ -123,7 +121,7 @@ fi AC_CHECK_HEADERS(sys/swap.h,,, AC_INCLUDES_DEFAULT([]) [ -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif ]) @@ -136,10 +134,10 @@ AC_CHECK_HEADERS([malloc.h osreldate.h ] dnl [sys/mount.h sys/proc.h sys/queue.h ] dnl [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 ]]) @@ -162,7 +160,7 @@ 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 ]) @@ -173,7 +171,7 @@ AC_CHECK_HEADERS(sys/hashing.h,,, AC_CHECK_HEADERS(sys/vnode.h,,, [ #define _KMEMUSER 1 -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H #include #endif ]) @@ -183,13 +181,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 ]]) @@ -202,13 +200,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 ]]) @@ -218,7 +216,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 ]]) @@ -228,13 +226,13 @@ 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 ]]) @@ -261,6 +259,7 @@ AC_CHECK_HEADERS([sys/socket.h]dnl [net/if.h]dnl [netinet/in.h]dnl [netdb.h]dnl + [netgroup.h]dnl [net/if_arp.h]dnl [net/if_mib.h]dnl [net/if_var.h]dnl @@ -291,61 +290,61 @@ AC_CHECK_HEADERS([sys/socket.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_NETINET_IP_H +#ifdef HAVE_NETINET_IP_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 -#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_IP6_H +#ifdef HAVE_NETINET_IP6_H #include #endif -#if HAVE_NETINET_ICMP6_H +#ifdef HAVE_NETINET_ICMP6_H #include #endif ]]) @@ -420,7 +419,7 @@ case $target_os in ]),, LMIBLIBS),, [[ -#if HAVE_SYS_PROTOSW_H +#ifdef HAVE_SYS_PROTOSW_H #include #endif ]]) diff --git a/vendor/configure.d/config_os_libs1 b/vendor/configure.d/config_os_libs1 index f6ab6f2..c3e95f0 100644 --- a/vendor/configure.d/config_os_libs1 +++ b/vendor/configure.d/config_os_libs1 @@ -36,8 +36,6 @@ if test "x$with_rpm" != "xno"; then # rpm-4.0.x needs rpmio. NETSNMP_SEARCH_LIBS(rpmGetPath, rpmio,,, $LMIBLIBS, _rpmlibs) - # rpm-4.0.3 librpmdb actually contains what we need. - NETSNMP_SEARCH_LIBS(rpmdbOpen, rpmdb,,, $LMIBLIBS, _rpmlibs) # now check for rpm using the appropriate libraries. NETSNMP_SEARCH_LIBS(rpmReadConfigFiles, rpm, [ AC_DEFINE(HAVE_LIBRPM, 1, @@ -116,8 +114,75 @@ fi # # pcre libraries only needed for the ucd process agent mib software # -NETSNMP_SEARCH_LIBS([pcre_exec], [pcre], [ - LMIBLIBS="$LMIBLIBS -lpcre" - ],,, LAGENTLIBS) -AC_SUBST(LAGENTLIBS) -AC_SUBST(LMIBLIBS) +if test "x$with_pcre" != "xno"; then + NETSNMP_SEARCH_LIBS([pcre_exec], [pcre], [ + LMIBLIBS="$LMIBLIBS -lpcre" + ],,, LAGENTLIBS) + AC_SUBST(LAGENTLIBS) + AC_SUBST(LMIBLIBS) +fi + +# +# libnl (netlink) +# + +# The test below verifies whether the libnl-3 package been installed. +# This test works as follows: +# - If pkg-config is not installed at the time autoreconf is run, +# autoreconf will fail. +# - If pkg-config is installed at the time autoreconf is 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$with_nl" != "xno"; then + ifdef( + [PKG_CHECK_EXISTS], + [ + PKG_CHECK_EXISTS([libnl-3.0], + [PKG_CHECK_MODULES([LIBNL3], [libnl-3.0])]) + PKG_CHECK_EXISTS([libnl-route-3.0], + [PKG_CHECK_MODULES([LIBNLROUTE3], [libnl-route-3.0])]) + ], + [ + AC_MSG_ERROR([pkg-config must be installed before autoconf is run.]) + ] + ) + + case $target_os in + linux*) # Check for libnl (linux) + netsnmp_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="${LIBNL3_CFLAGS} ${LIBNLROUTE3_CFLAGS} $CPPFLAGS" + NETSNMP_SEARCH_LIBS(nl_connect, nl-3, + [AC_CHECK_HEADERS([netlink/cache.h netlink/msg.h ]dnl + [netlink/netlink.h netlink/socket.h]) + EXTERNAL_MIBGROUP_INCLUDES="$EXTERNAL_MIBGROUP_INCLUDES ${LIBNL3_CFLAGS}"], + [CPPFLAGS="$netsnmp_save_CPPFLAGS"], [], [LMIBLIBS]) + NETSNMP_SEARCH_LIBS(rtnl_link_alloc_cache, nl-route-3, + [AC_CHECK_HEADERS([netlink/route/addr.h netlink/route/link.h]) + EXTERNAL_MIBGROUP_INCLUDES="$EXTERNAL_MIBGROUP_INCLUDES ${LIBNLROUTE3_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/cache.h netlink/msg.h ]dnl + [netlink/netlink.h netlink/socket.h])], + [], [], LMIBLIBS) + fi + if test "x$ac_cv_header_netlink_netlink_h" = xyes; then + AC_EGREP_HEADER([nl_socket_free], [netlink/socket.h], + [AC_DEFINE([HAVE_LIBNL3], [1], + [Define to 1 if provides the + libnl3 API])]) + fi + ;; + esac +fi diff --git a/vendor/configure.d/config_os_libs2 b/vendor/configure.d/config_os_libs2 index 9fd51f7..5787e58 100644 --- a/vendor/configure.d/config_os_libs2 +++ b/vendor/configure.d/config_os_libs2 @@ -213,61 +213,6 @@ if test $? -eq 0 ; then esac fi -# -# libnl (netlink) -# - -if test "x$with_nl" != "xno"; then - case $target_os in - linux*) # Check for libnl (linux) - # 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. - ifdef( - [PKG_CHECK_EXISTS], - [PKG_CHECK_EXISTS([libnl-3.0], - [PKG_CHECK_MODULES([LIBNL3], [libnl-3.0])]) - ], - AC_MSG_WARN([pkg-config has not been installed or is too old.]) - AC_MSG_WARN([Detection of libnl-3.0 will be skipped.]) - ) - - netsnmp_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${LIBNL3_CFLAGS} $CPPFLAGS" - NETSNMP_SEARCH_LIBS(nl_connect, nl-3, - [AC_CHECK_HEADERS(netlink/netlink.h) - 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) - fi - if test "x$ac_cv_header_netlink_netlink_h" = xyes; then - AC_EGREP_HEADER([nl_socket_free], [netlink/socket.h], - [AC_DEFINE([HAVE_LIBNL3], [1], - [Define to 1 if provides the - libnl3 API])]) - fi - ;; - esac -fi - - - ## # More complex checks: ## @@ -290,65 +235,221 @@ 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 + if test "x${with_wolfssl}" != x; then + AC_CHECK_LIB([wolfssl], [wolfSSL_EVP_md5], [ + ac_cv_lib_EVP_md5=yes + CRYPTO="wolfssl" + LIBCRYPTO="-lwolfssl" + ]) + AC_CHECK_HEADERS([wolfssl/wolfcrypt/asn.h \ + wolfssl/wolfcrypt/logging.h]) + AC_DEFINE([HAVE_VOID_EVP_MD_CTX_INIT], [1], + [Define this macro if EVP_MD_CTX_init() returns void]) + else + 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_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], + [ac_cv_lib_EVP_md5=yes + CRYPTO="crypto" + LIBCRYPTO="-lcrypto"], [ + unset ac_cv_lib_crypto_EVP_md5 + AC_CHECK_LIB([crypto], [EVP_md5], + [ac_cv_lib_EVP_md5=yes + CRYPTO="crypto" + LIBCRYPTO="-lcrypto -lz"], + [], [-lz]) + ]) + fi + 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}" - 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" - AC_CHECK_FUNCS([TLS_method TLSv1_method DTLS_method DTLSv1_method]dnl - [SSL_library_init SSL_load_error_strings]dnl - [ERR_get_error_all]) - LIBS="$netsnmp_save_LIBS" + fi + AH_TEMPLATE([HAVE_AES_CFB128_ENCRYPT], + [Define to 1 if you have the `AES_cfb128_encrypt' function.]) + AH_TEMPLATE([HAVE_ASN1_STRING_GET0_DATA], + [Define to 1 if you have the `ASN1_STRING_get0_data' function.]) + AH_TEMPLATE([HAVE_DH_GET0_KEY], + [Define to 1 if you have the `DH_get0_key' function.]) + AH_TEMPLATE([HAVE_DH_GET0_PQG], + [Define to 1 if you have the `DH_get0_pqg' function.]) + AH_TEMPLATE([HAVE_DH_SET0_PQG], + [Define to 1 if you have the `DH_set0_pqg' function.]) + AH_TEMPLATE([HAVE_DTLS_METHOD], + [Define to 1 if you have the `DTLS_method' function.]) + AH_TEMPLATE([HAVE_DTLSV1_METHOD], + [Define to 1 if you have the `DTLSv1_method' function.]) + AH_TEMPLATE([HAVE_ERR_GET_ERROR_ALL], + [Define to 1 if you have the `ERR_get_error_all' function.]) + AH_TEMPLATE([HAVE_ERR_GET_ERROR_FUNC], + [Define to 1 if you have the `ERR_get_error_func' function.]) + AH_TEMPLATE([HAVE_EVP_MD_CTX_CREATE], + [Define to 1 if you have the `EVP_MD_CTX_create' function.]) + AH_TEMPLATE([HAVE_EVP_MD_CTX_DESTROY], + [Define to 1 if you have the `EVP_MD_CTX_destroy' function.]) + AH_TEMPLATE([HAVE_EVP_MD_CTX_FREE], + [Define to 1 if you have the `EVP_MD_CTX_free' function.]) + AH_TEMPLATE([HAVE_EVP_MD_CTX_NEW], + [Define to 1 if you have the `EVP_MD_CTX_new' function.]) + AH_TEMPLATE([HAVE_EVP_AES_128_CFB], + [Define to 1 if you have the `EVP_aes_128_cfb' function.]) + AH_TEMPLATE([HAVE_EVP_SHA224], + [Define to 1 if you have the `EVP_sha224' function.]) + AH_TEMPLATE([HAVE_EVP_SHA384], + [Define to 1 if you have the `EVP_sha384' function.]) + AH_TEMPLATE([HAVE_OPENSSL_SK_NUM], + [Define to 1 if you have the `OPENSSL_sk_num' function.]) + AH_TEMPLATE([HAVE_OPENSSL_SK_VALUE], + [Define to 1 if you have the `OPENSSL_sk_value' function.]) + AH_TEMPLATE([HAVE_OPENSSL_ADD_ALL_ALGORITHMS], + [Define to 1 if you have the `OpenSSL_add_all_algorithms' function.]) + AH_TEMPLATE([HAVE_SSL_CTX_SET_COOKIE_GENERATE_CB], + [Define to 1 if you have the `SSL_CTX_set_cookie_generate_cb' function.]) + AH_TEMPLATE([HAVE_SSL_GET1_PEER_CERTIFICATE], + [Define to 1 if you have the `SSL_get1_peer_certificate' function.]) + AH_TEMPLATE([HAVE_SSL_LIBRARY_INIT], + [Define to 1 if you have the `SSL_library_init' function.]) + AH_TEMPLATE([HAVE_SSL_LOAD_ERROR_STRINGS], + [Define to 1 if you have the `SSL_load_error_strings' function.]) + AH_TEMPLATE([HAVE_TLS_METHOD], + [Define to 1 if you have the `TLS_method' function.]) + AH_TEMPLATE([HAVE_TLSV1_METHOD], + [Define to 1 if you have the `TLSv1_method' function.]) + AH_TEMPLATE([HAVE_X509_NAME_ENTRY_GET_DATA], + [Define to 1 if you have the `X509_NAME_ENTRY_get_data' function.]) + AH_TEMPLATE([HAVE_X509_NAME_ENTRY_GET_OBJECT], + [Define to 1 if you have the `X509_NAME_ENTRY_get_object' function.]) + AH_TEMPLATE([HAVE_X509_GET_SIGNATURE_NID], + [Define to 1 if you have the `X509_get_signature_nid' function.]) + for symbol in \ + AES_cfb128_encrypt \ + ASN1_STRING_get0_data \ + DH_get0_key \ + DH_get0_pqg \ + DH_set0_pqg \ + DTLS_method \ + DTLSv1_method \ + ERR_get_error_all \ + ERR_get_error_func \ + EVP_MD_CTX_create \ + EVP_MD_CTX_destroy \ + EVP_MD_CTX_free \ + EVP_MD_CTX_new \ + EVP_aes_128_cfb \ + EVP_sha224 \ + EVP_sha384 \ + OPENSSL_sk_num \ + OPENSSL_sk_value \ + OpenSSL_add_all_algorithms \ + SSL_CTX_set_cookie_generate_cb \ + SSL_get1_peer_certificate \ + SSL_library_init \ + SSL_load_error_strings \ + TLS_method \ + TLSv1_method \ + X509_NAME_ENTRY_get_data \ + X509_NAME_ENTRY_get_object \ + X509_get_signature_nid \ + ; do + [have_symbol=$(echo "HAVE_${symbol}" | tr '[:lower:]' '[:upper:]')] + AC_MSG_CHECKING([for ${symbol}]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #ifdef HAVE_OPENSSL_AES_H + #include + #endif + #ifdef HAVE_OPENSSL_ERR_H + #include + #endif + #ifdef HAVE_OPENSSL_EVP_H + #include + #endif + #ifdef HAVE_OPENSSL_SSL_H + #include + #endif + #ifdef HAVE_OPENSSL_STACK_H + #include + #endif + #ifdef HAVE_OPENSSL_X509_H + #include + #endif + #ifdef HAVE_OPENSSL_X509V3_H + #include + #endif + ]], [[ + #ifndef ${symbol} + return !${symbol} + #endif + ]])], + [AC_MSG_RESULT([yes]) + eval "ac_cv_func_${symbol}=yes" + AC_DEFINE_UNQUOTED([${have_symbol}])], + [AC_MSG_RESULT([no])]) + done + 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" + 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 AC_DEFINE(HAVE_LIBSSL_DTLS, 1, - [Define to 1 if your `ssl' library supports DTLS (-lssl).]) - LIBCRYPTO=" -lssl $LIBCRYPTO" + [Define to 1 if your `ssl' library supports DTLS.]) + if test "x$with_wolfssl" = x; then + LIBCRYPTO=" -lssl $LIBCRYPTO" + fi else AC_MSG_ERROR([The DTLS based transports require the libssl library from OpenSSL to be available and support DTLS]) fi @@ -358,15 +459,19 @@ if test "x$tryopenssl" != "xno" -a "x$tryopenssl" != "xinternal"; then 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" + [Define to 1 if you have the `ssl' library.]) + if test "x$with_wolfssl" = x; then + LIBCRYPTO=" -lssl $LIBCRYPTO" + fi 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 - AC_CHECK_LIB(ssh2, libssh2_session_startup, + AC_SEARCH_LIBS(libssh2_session_handshake, [ssh2]) + AC_CHECK_FUNCS(libssh2_session_handshake) + AC_CHECK_LIB(ssh2, libssh2_session_init_ex, AC_DEFINE(HAVE_LIBSSH2, 1, [Define to 1 if you have the `ssh2' library (-lssh2).]) LIBCRYPTO=" -lssh2 $LIBCRYPTO", @@ -380,6 +485,28 @@ elif test "x$askedpkcs" = "xyes"; then LIBPKCS11="-lpkcs11") fi +AH_TEMPLATE([HAVE_ASN_BOOLEAN], + [Define to 1 if the `ASN_BOOLEAN' constant is defined in an SSL header file.]) +AH_TEMPLATE([HAVE_ASN_INTEGER], + [Define to 1 if the `ASN_INTEGER' constant is defined in an SSL header file.]) +AH_TEMPLATE([HAVE_ASN_OBJECT_ID], + [Define to 1 if the `ASN_OBJECT_ID' constant is defined in an SSL header file.]) +AH_TEMPLATE([HAVE_ASN_SEQUENCE], + [Define to 1 if the `ASN_SEQUENCE' constant is defined in an SSL header file.]) +AH_TEMPLATE([HAVE_ASN_SET], + [Define to 1 if the `ASN_SET' constant is defined in an SSL header file.]) +for symbol in ASN_BOOLEAN ASN_INTEGER ASN_OBJECT_ID ASN_SEQUENCE ASN_SET; do + AC_MSG_CHECKING([for ${symbol}]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ + #ifndef ${symbol} + return !${symbol} + #endif + ]])], + [AC_MSG_RESULT([yes]) + AC_DEFINE_UNQUOTED([HAVE_${symbol}])], + [AC_MSG_RESULT([no])]) +done + LIBS=$NONAGENTLIBS # restore old libraries if test "x$SSHPROG" = "xyes"; then NETSNMP_BUILD_SSH_PROG_TRUE='' @@ -395,7 +522,7 @@ else NETSNMP_BUILD_TLS_PROG_TRUE='#' NETSNMP_BUILD_TLS_PROG_FALSE='' fi -if echo " ${security_mod_list} " | grep ' usm ' ; then +if echo " ${security_mod_list} " | grep -q ' usm ' ; then if test "x$enable_read_only" != "xyes" ; then NETSNMP_BUILD_USM_PROG_TRUE='' NETSNMP_BUILD_USM_PROG_FALSE='#' @@ -439,7 +566,8 @@ 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" - AC_DEFINE(HAVE_AES_CFB128_ENCRYPT) + AC_DEFINE([HAVE_AES_CFB128_ENCRYPT], [1], + [Define to 1 if you have the `AES_cfb128_encrypt' function.]) fi AC_SUBST(crypto_files_c) AC_SUBST(crypto_files_o) diff --git a/vendor/configure.d/config_os_misc2 b/vendor/configure.d/config_os_misc2 index be0bcce..ec2877b 100644 --- a/vendor/configure.d/config_os_misc2 +++ b/vendor/configure.d/config_os_misc2 @@ -27,7 +27,9 @@ 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_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 @@ -119,8 +121,7 @@ if ! test "x-$want_dnssec" = "x-no" ; then if test "$ac_cv_header_validator_validator_config_h" != yes; then AC_MSG_ERROR(Can't find validator.h) fi - if test "x$ac_cv_lib_crypto_EVP_md5" != "xyes" -a \ - "x$ac_cv_lib_eay32_EVP_md5" != "xyes" -o \ + if test "x$ac_cv_lib_EVP_md5" != "xyes" -o \ "x$ac_cv_header_openssl_hmac_h" != "xyes"; then AC_MSG_ERROR(Couldn't find OpenSSL for local DNSSEC validation support.) fi diff --git a/vendor/configure.d/config_os_misc4 b/vendor/configure.d/config_os_misc4 index 6f23c8e..462f55a 100644 --- a/vendor/configure.d/config_os_misc4 +++ b/vendor/configure.d/config_os_misc4 @@ -110,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" @@ -167,24 +166,26 @@ 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 int main(int argc, char **argv) { @@ -198,10 +199,7 @@ int main(int argc, char **argv) len = sizeof(boottime); 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 @@ -210,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)]) @@ -231,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 @@ -246,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 @@ -334,6 +327,7 @@ AC_CACHE_CHECK([for IP_PKTINFO ], #include #include #include +#include /* inet_ntoa() */ ], [ void *buf; int len; @@ -371,6 +365,23 @@ if test x$ac_cv_have_ip_pktinfo = xyes; then AC_DEFINE(HAVE_IP_PKTINFO, 1, [Set if IP_PKTINFO is usable]) fi +# Check whether IPV6_RECVPKTINFO is usable. +# + +AC_CACHE_CHECK([for IPV6_RECVPKTINFO ], + [ac_cv_have_ipv6_recvpktinfo], +[AC_LINK_IFELSE([AC_LANG_PROGRAM([ +#include +], [ +return IPV6_RECVPKTINFO +])], +[ac_cv_have_ipv6_recvpktinfo=yes], +[ac_cv_have_ipv6_recvpktinfo=no] +)]) +if test x$ac_cv_have_ipv6_recvpktinfo = xyes; then + AC_DEFINE(HAVE_IPV6_RECVPKTINFO, 1, [Set if IPV6_RECVPKTINFO is usable]) +fi + # Check whether IP_RECVDSTADDR is usable. # @@ -383,6 +394,7 @@ AC_CACHE_CHECK([for IP_RECVDSTADDR ], #include #include #include +#include /* inet_ntoa() */ ], [ void *buf; int len; diff --git a/vendor/configure.d/config_os_progs b/vendor/configure.d/config_os_progs index 21f837c..b3ecf55 100644 --- a/vendor/configure.d/config_os_progs +++ b/vendor/configure.d/config_os_progs @@ -110,22 +110,39 @@ AC_SUBST(LIBTOOL_DEPS) # Build environment: ## +for opt in -Werror=declaration-after-statement +do + AC_MSG_CHECKING([whether the compiler supports $opt]) + netsnmp_save_CFLAGS="$CFLAGS" + 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]) + CFLAGS="$opt $netsnmp_save_CFLAGS" + ], [ + AC_MSG_RESULT([no]) + CFLAGS="$netsnmp_save_CFLAGS" + ]) +done + # developer build # (enabled by default when building from SVN checkout) # 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 # netsnmp_save_CFLAGS="$CFLAGS" for opt in -Wall -Wextra -Wstrict-prototypes -Wwrite-strings -Wcast-qual \ - -Wimplicit-fallthrough=2 -Wlogical-op \ + -Wimplicit-fallthrough=2 -Wlogical-op -Wundef \ -Wno-format-truncation -Wno-missing-field-initializers \ - -Wno-sign-compare -Wno-unused-parameter -Wno-type-limits + -Wno-sign-compare -Wno-unused-parameter -Wcast-function-type do AC_MSG_CHECKING([whether the compiler supports $opt]) if test x$opt != x-Wstrict-prototypes; then @@ -141,11 +158,10 @@ if test "x$developer" = "xyes" -a "x$GCC" = "xyes"; then ]) CFLAGS="$netsnmp_save_CFLAGS" done - + AC_MSG_RESULT($DEVFLAGS) else DEVFLAGS="" fi -AC_MSG_RESULT($DEVFLAGS) AC_SUBST(DEVFLAGS) @@ -208,20 +224,29 @@ esac # -# Whether the linker supports the flag -Wl,-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. # -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 +case x$target_os in + 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 # diff --git a/vendor/configure.d/config_os_struct_members b/vendor/configure.d/config_os_struct_members index 3f52c10..d6e50df 100644 --- a/vendor/configure.d/config_os_struct_members +++ b/vendor/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 ]]) @@ -150,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 ]]) @@ -161,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 @@ -220,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; @@ -236,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 @@ -258,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 ]]) @@ -275,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 ]]) @@ -309,11 +304,11 @@ AC_CHECK_MEMBERS([struct tcpstat.tcp_rcvmemdrop],,,[ 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 @@ -322,11 +317,11 @@ AC_CHECK_MEMBERS([struct tm.tm_gmtoff, struct tm.tm_isdst],,,[ ]]) AC_CHECK_DECLS([daylight,timezone],,,[ -#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 @@ -336,11 +331,11 @@ AC_CHECK_DECLS([daylight,timezone],,,[ AC_MSG_CHECKING([whether timezone is a scalar]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#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 @@ -363,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 @@ -386,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 ]]) @@ -426,7 +421,7 @@ AC_CACHE_CHECK([if _KERNEL needs to be defined for if_mtu], #ifdef HAVE_NET_IF_VAR_H #include #endif - ], [[struct ifnet test; test.if_mtu = 0;]])], + ], [[struct ifnet test; test.if_mtu = 0; return sizeof(struct in_ifaddr);]])], [ac_cv_IFNET_NEEDS_KERNEL=no]) if test "$ac_cv_IFNET_NEEDS_KERNEL" = unknown ; then AC_COMPILE_IFELSE( @@ -445,7 +440,7 @@ AC_CACHE_CHECK([if _KERNEL needs to be defined for if_mtu], #ifdef HAVE_NET_IF_VAR_H #include #endif - ], [[struct ifnet test; test.if_mtu = 0;]])], + ], [[struct ifnet test; test.if_mtu = 0; return sizeof(struct in_ifaddr);]])], [ac_cv_IFNET_NEEDS_KERNEL=yes]) fi]) @@ -474,7 +469,7 @@ AC_CACHE_CHECK([if _KERNEL_STRUCTURES needs to be defined for if_mtu], #ifdef HAVE_NET_IF_VAR_H #include #endif - ], [[struct ifnet test; test.if_mtu = 0;]])], + ], [[struct ifnet test; test.if_mtu = 0; return sizeof(struct in_ifaddr);]])], [ac_cv_IFNET_NEEDS_KERNEL_STRUCTURES=no]) if test "$ac_cv_IFNET_NEEDS_KERNEL_STRUCTURES" = unknown ; then AC_COMPILE_IFELSE( @@ -493,7 +488,7 @@ AC_CACHE_CHECK([if _KERNEL_STRUCTURES needs to be defined for if_mtu], #ifdef HAVE_NET_IF_VAR_H #include #endif - ], [[struct ifnet test; test.if_mtu = 0;]])], + ], [[struct ifnet test; test.if_mtu = 0; return sizeof(struct in_ifaddr);]])], [ac_cv_IFNET_NEEDS_KERNEL_STRUCTURES=yes]) fi]) @@ -627,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 @@ -645,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 @@ -654,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 @@ -678,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 @@ -729,7 +724,7 @@ AC_DEFINE_UNQUOTED(RTENTRY,struct ${ac_cv_struct_rtentry}, AC_MSG_CHECKING([syslog prioritynames]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include -#if HAVE_SYSLOG_H +#ifdef HAVE_SYSLOG_H #define SYSLOG_NAMES #include #endif diff --git a/vendor/configure.d/config_project_paths b/vendor/configure.d/config_project_paths index 9690c84..da480a7 100644 --- a/vendor/configure.d/config_project_paths +++ b/vendor/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/vendor/configure.d/config_project_perl_python b/vendor/configure.d/config_project_perl_python index 475c843..e5c8531 100644 --- a/vendor/configure.d/config_project_perl_python +++ b/vendor/configure.d/config_project_perl_python @@ -87,7 +87,7 @@ if test "x$install_perl" != "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/vendor/configure.d/config_project_types b/vendor/configure.d/config_project_types index 76ba376..ac958d6 100644 --- a/vendor/configure.d/config_project_types +++ b/vendor/configure.d/config_project_types @@ -58,6 +58,34 @@ 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 +# +# 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 long 'unsigned long' unknown; do + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ +#include +#include +#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 the type of the fifth argument of select() # @@ -66,7 +94,9 @@ netsnmp_save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -Werror" AC_MSG_CHECKING([for the type of the fifth argument of select()]) -arg_type=void +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([ @@ -77,17 +107,25 @@ AC_COMPILE_IFELSE( #ifdef HAVE_SYS_SELECT_H #include #endif +#ifdef HAVE_SYS_TIME_H +#include +#endif #endif #include ], [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=void +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([ @@ -103,6 +141,9 @@ AC_COMPILE_IFELSE( ], [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()]) diff --git a/vendor/configure.d/config_project_with_enable b/vendor/configure.d/config_project_with_enable index cdf56de..e923191 100644 --- a/vendor/configure.d/config_project_with_enable +++ b/vendor/configure.d/config_project_with_enable @@ -72,7 +72,7 @@ NETSNMP_ARG_WITH(rsaref, fi, ) -tryopenssl=defaultyes +tryopenssl=yes askedopenssl=no aes_capable=no NETSNMP_ARG_WITH(openssl, @@ -98,10 +98,21 @@ NETSNMP_ARG_WITH(openssl, askedopenssl=yes fi, ) -if test "x$tryopenssl" = "xdefaultyes"; then - AC_ADD_SEARCH_PATH(/usr/local/ssl) - tryopenssl=yes -fi +NETSNMP_ARG_WITH(wolfssl, +[ --with-wolfssl=PATH Look for wolfssl in PATH/lib.], + if test "x$withval" = xyes; then + tryopenssl=yes + askedopenssl=yes + CPPFLAGS="-I/usr/include/wolfssl -DWC_NO_HARDEN -DNO_OLD_TIMEVAL_NAME -DOPENSSL_EXTRA -DEXTERNAL_OPTS_OPENVPN $CPPFLAGS" + elif test -d "$withval" && test -d "$withval/include/wolfssl"; then + tryopenssl=yes + askedopenssl=yes + LDFLAGS="-L$withval/lib $LDFLAGS" + CPPFLAGS="-I$withval/include -I$withval/include/wolfssl -DWC_NO_HARDEN -DNO_OLD_TIMEVAL_NAME -DOPENSSL_EXTRA -DEXTERNAL_OPTS_OPENVPN $CPPFLAGS" + else + AC_MSG_ERROR([Cannot find wolfSSL in ${withval}.]) + fi +) if test "x$tryopenssl" = "xyes"; then AC_CHECK_HEADERS( [openssl/aes.h openssl/evp.h], diff --git a/vendor/dist/autoconf-version b/vendor/dist/autoconf-version index 5e1b8b0..80bf4d0 100644 --- a/vendor/dist/autoconf-version +++ b/vendor/dist/autoconf-version @@ -1 +1 @@ -2.69 +2.72 diff --git a/vendor/dist/makerelease.xml b/vendor/dist/makerelease.xml index 262ddd0..81d163a 100644 --- a/vendor/dist/makerelease.xml +++ b/vendor/dist/makerelease.xml @@ -507,10 +507,10 @@ This will actually copy the current checked out branch to the new tag name. Specifically: - git tag -u ACB19FD6 -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 ACB19FD6 -s {VERSIONTAGNAME} -m "Tagging of version {VERSION} as {VERSIONTAGNAME}" + git tag -u 6E6718AEF1EB5C65C32D1B2A356BC0B552D53CAB -s {VERSIONTAGNAME} -m "Tagging of version {VERSION} as {VERSIONTAGNAME}" @@ -545,12 +545,12 @@ - gpg --use-agent -u ACB19FD6 -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 ACB19FD6 -a --detach-sign net-snmp-{VERSION}.zip + gpg --use-agent -u 6E6718AEF1EB5C65C32D1B2A356BC0B552D53CAB -a --detach-sign net-snmp-{VERSION}.zip --> - @@ -641,9 +641,11 @@ Any official patches for the previous release should be re-prioritised to level 5. Any official patches for the earlier releases should be re-prioritised to level 1 and closed. + diff --git a/vendor/dist/net-snmp.spec b/vendor/dist/net-snmp.spec index 71759ba..8425780 100644 --- a/vendor/dist/net-snmp.spec +++ b/vendor/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.9 +Version: 5.9.5.2 # 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/vendor/dist/snmpd.service b/vendor/dist/snmpd.service index 31391e5..84128ca 100644 --- a/vendor/dist/snmpd.service +++ b/vendor/dist/snmpd.service @@ -7,7 +7,7 @@ [Unit] Description=Simple Network Management Protocol (SNMP) daemon. -After=syslog.target network.target +After=network.target [Service] # Type=notify is also supported. It should be set when snmpd.socket is not used. diff --git a/vendor/dist/snmptrapd.service b/vendor/dist/snmptrapd.service index e88a5b4..a70a397 100644 --- a/vendor/dist/snmptrapd.service +++ b/vendor/dist/snmptrapd.service @@ -4,7 +4,7 @@ [Unit] Description=Simple Network Management Protocol (SNMP) Trap daemon. -After=syslog.target network.target +After=network.target [Service] # Type=notify is also supported. It should be set when snmptrapd.socket is not diff --git a/vendor/dist/svnup b/vendor/dist/svnup deleted file mode 100644 index 40353f0..0000000 --- a/vendor/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/vendor/doxygen.conf b/vendor/doxygen.conf index 635e59a..373d556 100644 --- a/vendor/doxygen.conf +++ b/vendor/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 = $(srcdir)/agent/mibgroup +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/vendor/include/net-snmp/agent/agent_handler.h b/vendor/include/net-snmp/agent/agent_handler.h index ec930fe..d08eac3 100644 --- a/vendor/include/net-snmp/agent/agent_handler.h +++ b/vendor/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); @@ -246,10 +251,6 @@ typedef int (Netsnmp_Node_Handler) (netsnmp_mib_handler *handler, int netsnmp_request_remove_list_data(netsnmp_request_info *request, const char *name); - int - netsnmp_request_remove_list_data(netsnmp_request_info *request, - const char *name); - void *netsnmp_request_get_list_data(netsnmp_request_info *request, const char *name); diff --git a/vendor/include/net-snmp/agent/agent_trap.h b/vendor/include/net-snmp/agent/agent_trap.h index c74fd9c..1e11b1c 100644 --- a/vendor/include/net-snmp/agent/agent_trap.h +++ b/vendor/include/net-snmp/agent/agent_trap.h @@ -13,6 +13,7 @@ extern "C" { struct agent_add_trap_args { netsnmp_session *ss; + int close_sess; int confirm; const char *nameData; /* notification target addr name */ int nameLen; @@ -77,9 +78,15 @@ netsnmp_session *netsnmp_create_v3user_notification_session(const char *dst, const char *name, const char *tag, const char *prof); +/* This is a wrapper to netsnmp_add_closable_notification_session + for backward compatibility + */ int netsnmp_add_notification_session(netsnmp_session *, int, int, int, const char*, const char*, const char*); +int netsnmp_add_closable_notification_session(netsnmp_session *, int, 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 *); diff --git a/vendor/include/net-snmp/agent/hardware/fsys.h b/vendor/include/net-snmp/agent/hardware/fsys.h index 54ab9d8..9800c72 100644 --- a/vendor/include/net-snmp/agent/hardware/fsys.h +++ b/vendor/include/net-snmp/agent/hardware/fsys.h @@ -88,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 ); @@ -99,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/vendor/include/net-snmp/agent/hardware/memory.h b/vendor/include/net-snmp/agent/hardware/memory.h index 54265cf..aca3a4d 100644 --- a/vendor/include/net-snmp/agent/hardware/memory.h +++ b/vendor/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 diff --git a/vendor/include/net-snmp/agent/snmp_agent.h b/vendor/include/net-snmp/agent/snmp_agent.h index 34eb0a4..56ca306 100644 --- a/vendor/include/net-snmp/agent/snmp_agent.h +++ b/vendor/include/net-snmp/agent/snmp_agent.h @@ -13,7 +13,7 @@ * Use is subject to license terms specified in the COPYING file * distributed with the Net-SNMP package. */ -/* +/** * @file snmp_agent.h * * @addtogroup agent diff --git a/vendor/include/net-snmp/agent/snmp_vars.h b/vendor/include/net-snmp/agent/snmp_vars.h index 77dbd70..776da03 100644 --- a/vendor/include/net-snmp/agent/snmp_vars.h +++ b/vendor/include/net-snmp/agent/snmp_vars.h @@ -113,9 +113,6 @@ PERFORMANCE OF THIS SOFTWARE. int init_agent(const char *); void shutdown_agent(void); - int should_init(const char *module_name); - void add_to_init_list(char *module_list); - #ifdef USING_AGENTX_SUBAGENT_MODULE void netsnmp_enable_subagent(void); #endif diff --git a/vendor/include/net-snmp/agent/table.h b/vendor/include/net-snmp/agent/table.h index 79e588c..68440ef 100644 --- a/vendor/include/net-snmp/agent/table.h +++ b/vendor/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/vendor/include/net-snmp/agent/watcher.h b/vendor/include/net-snmp/agent/watcher.h index 67104ee..14c2e6b 100644 --- a/vendor/include/net-snmp/agent/watcher.h +++ b/vendor/include/net-snmp/agent/watcher.h @@ -128,8 +128,8 @@ netsnmp_create_watcher_info(void *, size_t, u_char, int); netsnmp_watcher_info * netsnmp_create_watcher_info6(void *, size_t, u_char, int, size_t, size_t*); -netsnmp_watcher_info * -netsnmp_clone_watcher_info(netsnmp_watcher_info *winfo); +void * +netsnmp_clone_watcher_info(void *winfo); void netsnmp_owns_watcher_info(netsnmp_mib_handler *handler); diff --git a/vendor/include/net-snmp/config_api.h b/vendor/include/net-snmp/config_api.h index 048eed9..c78ad26 100644 --- a/vendor/include/net-snmp/config_api.h +++ b/vendor/include/net-snmp/config_api.h @@ -35,7 +35,6 @@ extern "C" { void unregister_config_handler(const char *filePrefix, const char *token); /* Defined in mib.c, rather than read_config.c */ - void register_mib_handlers(void); void unregister_all_config_handlers(void); /* Application Handlers */ @@ -46,6 +45,13 @@ extern "C" { void (*releaser) (void), const char *usageLine); + NETSNMP_IMPORT + struct config_line *register_const_app_config_handler( + const char *token, + void (*parser) (const char *, const char *), + void (*releaser) (void), + const char *usageLine); + NETSNMP_IMPORT struct config_line *register_app_prenetsnmp_mib_handler( const char *token, diff --git a/vendor/include/net-snmp/data_access/interface.h b/vendor/include/net-snmp/data_access/interface.h index 233d0d8..36c3247 100644 --- a/vendor/include/net-snmp/data_access/interface.h +++ b/vendor/include/net-snmp/data_access/interface.h @@ -10,9 +10,9 @@ extern "C" { #endif -#if HAVE_PCRE_H +#if defined(HAVE_PCRE_H) #include -#elif HAVE_REGEX_H +#elif defined(HAVE_REGEX_H) #include #endif @@ -211,9 +211,9 @@ typedef struct _conf_if_list { typedef netsnmp_conf_if_list conf_if_list; /* backwards compat */ typedef struct _include_if_list { -#if HAVE_PCRE_H +#if defined(HAVE_PCRE_H) pcre *regex_ptr; -#elif HAVE_REGEX_H +#elif defined(HAVE_REGEX_H) regex_t *regex_ptr; #endif char *name; diff --git a/vendor/include/net-snmp/data_access/ip_scalars.h b/vendor/include/net-snmp/data_access/ip_scalars.h index 03601a0..7c035a6 100644 --- a/vendor/include/net-snmp/data_access/ip_scalars.h +++ b/vendor/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/vendor/include/net-snmp/library/asn1.h b/vendor/include/net-snmp/library/asn1.h index 227ee78..f775d98 100644 --- a/vendor/include/net-snmp/library/asn1.h +++ b/vendor/include/net-snmp/library/asn1.h @@ -2,6 +2,13 @@ #define ASN1_H #include +#ifdef HAVE_SYS_TYPES_H +#include +#endif + +#ifdef HAVE_ASN_BOOLEAN +#include /* ASN_BOOLEAN etc. */ +#endif #ifdef __cplusplus extern "C" { @@ -52,14 +59,24 @@ SOFTWARE. #define OID_LENGTH(x) (sizeof(x)/sizeof(oid)) +#ifndef HAVE_ASN_BOOLEAN #define ASN_BOOLEAN 0x01U +#endif +#ifndef HAVE_ASN_INTEGER #define ASN_INTEGER 0x02U +#endif #define ASN_BIT_STR 0x03U #define ASN_OCTET_STR 0x04U #define ASN_NULL 0x05U +#ifndef HAVE_ASN_OBJECT_ID #define ASN_OBJECT_ID 0x06U +#endif +#ifndef HAVE_ASN_SEQUENCE #define ASN_SEQUENCE 0x10U +#endif +#ifndef HAVE_ASN_SET #define ASN_SET 0x11U +#endif #define ASN_UNIVERSAL 0x00U #define ASN_APPLICATION 0x40U diff --git a/vendor/include/net-snmp/library/cert_util.h b/vendor/include/net-snmp/library/cert_util.h index 80e2a19..305e367 100644 --- a/vendor/include/net-snmp/library/cert_util.h +++ b/vendor/include/net-snmp/library/cert_util.h @@ -2,13 +2,6 @@ #if defined(NETSNMP_USE_OPENSSL) && defined(HAVE_LIBSSL) -#ifndef HEADER_SSL_H -#error "must include before cert_util.h" -#endif -#ifndef HEADER_X509_H -#error "must include before cert_util.h" -#endif - #ifdef __cplusplus extern "C" { #endif diff --git a/vendor/include/net-snmp/library/container.h b/vendor/include/net-snmp/library/container.h index e2db051..311453a 100644 --- a/vendor/include/net-snmp/library/container.h +++ b/vendor/include/net-snmp/library/container.h @@ -31,7 +31,6 @@ #include /* free() */ #include -#include #include #include @@ -44,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 @@ -309,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 @@ -329,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 @@ -361,6 +361,9 @@ extern "C" { NETSNMP_IMPORT void netsnmp_container_simple_free(void *data, void *context); + NETSNMP_IMPORT + int netsnmp_str_compare(const void *lhs, const void *rhs); + /* * container optionflags */ @@ -402,11 +405,6 @@ 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 */ diff --git a/vendor/include/net-snmp/library/container_binary_array.h b/vendor/include/net-snmp/library/container_binary_array.h index 336a8e9..7db3269 100644 --- a/vendor/include/net-snmp/library/container_binary_array.h +++ b/vendor/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, @@ -35,8 +34,6 @@ extern "C" { void netsnmp_binary_array_release(netsnmp_container *c); - void netsnmp_container_binary_array_init(void); - int netsnmp_binary_array_options_set(netsnmp_container *c, int set, u_int flags); diff --git a/vendor/include/net-snmp/library/data_list.h b/vendor/include/net-snmp/library/data_list.h index 294a6bb..e31250e 100644 --- a/vendor/include/net-snmp/library/data_list.h +++ b/vendor/include/net-snmp/library/data_list.h @@ -13,13 +13,11 @@ * 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. * diff --git a/vendor/include/net-snmp/library/default_store.h b/vendor/include/net-snmp/library/default_store.h index 1a88253..1b1978e 100644 --- a/vendor/include/net-snmp/library/default_store.h +++ b/vendor/include/net-snmp/library/default_store.h @@ -19,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 diff --git a/vendor/include/net-snmp/library/factory.h b/vendor/include/net-snmp/library/factory.h deleted file mode 100644 index faf82a2..0000000 --- a/vendor/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/vendor/include/net-snmp/library/file_utils.h b/vendor/include/net-snmp/library/file_utils.h index 9f5cdce..788459c 100644 --- a/vendor/include/net-snmp/library/file_utils.h +++ b/vendor/include/net-snmp/library/file_utils.h @@ -57,8 +57,8 @@ extern "C" { int netsnmp_file_close(netsnmp_file * filei); /** support netsnmp_file containers */ - int netsnmp_file_compare_name(netsnmp_file *lhs, netsnmp_file *rhs); - void netsnmp_file_container_free(netsnmp_file *file, void *context); + int netsnmp_file_compare_name(const void *lhs, const void *rhs); + void netsnmp_file_container_free(void *file, void *context); diff --git a/vendor/include/net-snmp/library/int64.h b/vendor/include/net-snmp/library/int64.h index 7a0d0d3..69e5b5d 100644 --- a/vendor/include/net-snmp/library/int64.h +++ b/vendor/include/net-snmp/library/int64.h @@ -40,13 +40,13 @@ extern "C" { void u64Copy(struct counter64 *pu64one, const struct counter64 *pu64two); - int netsnmp_c64_check_for_32bit_wrap(struct counter64 *old_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/vendor/include/net-snmp/library/libsnmp.h b/vendor/include/net-snmp/library/libsnmp.h index 6a07300..6e2d2c7 100644 --- a/vendor/include/net-snmp/library/libsnmp.h +++ b/vendor/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/vendor/include/net-snmp/library/mib.h b/vendor/include/net-snmp/library/mib.h index a90cb18..4ac2559 100644 --- a/vendor/include/net-snmp/library/mib.h +++ b/vendor/include/net-snmp/library/mib.h @@ -490,9 +490,9 @@ SOFTWARE. NETSNMP_IMPORT void snmp_out_toggle_options_usage(const char *, FILE *); NETSNMP_IMPORT - char *snmp_in_toggle_options(char *); + const char *snmp_in_toggle_options(char *); NETSNMP_IMPORT - char *snmp_in_options(char *, int, char * const *); + const char *snmp_in_options(char *, int, char * const *); NETSNMP_IMPORT void snmp_in_toggle_options_usage(const char *, FILE *); NETSNMP_IMPORT diff --git a/vendor/include/net-snmp/library/mt_support.h b/vendor/include/net-snmp/library/mt_support.h index 4e35d33..fd8e57c 100644 --- a/vendor/include/net-snmp/library/mt_support.h +++ b/vendor/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/vendor/include/net-snmp/library/openssl_aes.h b/vendor/include/net-snmp/library/openssl_aes.h index bddf083..66d8ca9 100644 --- a/vendor/include/net-snmp/library/openssl_aes.h +++ b/vendor/include/net-snmp/library/openssl_aes.h @@ -88,8 +88,7 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits, int AES_set_decrypt_key(const unsigned char *userKey, const int bits, AES_KEY *key); -void AES_encrypt(const unsigned char *in, unsigned char *out, - const AES_KEY *key); +void AES_encrypt(const unsigned char *in, unsigned char *out, const void *key); void AES_decrypt(const unsigned char *in, unsigned char *out, const AES_KEY *key); diff --git a/vendor/include/net-snmp/library/openssl_config.h b/vendor/include/net-snmp/library/openssl_config.h new file mode 100644 index 0000000..ea044e1 --- /dev/null +++ b/vendor/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/vendor/include/net-snmp/library/parse.h b/vendor/include/net-snmp/library/parse.h index 7c33d3f..48b7207 100644 --- a/vendor/include/net-snmp/library/parse.h +++ b/vendor/include/net-snmp/library/parse.h @@ -54,6 +54,7 @@ SOFTWARE. struct enum_list *next; int value; char *label; + int lineno; }; /* @@ -239,10 +240,6 @@ SOFTWARE. int get_mib_parse_error_count(void); NETSNMP_IMPORT int snmp_get_token(FILE * fp, char *token, int maxtlen); - NETSNMP_IMPORT - struct tree *find_best_tree_node(const char *name, - struct tree *tree_top, - u_int * match); #ifdef __cplusplus } diff --git a/vendor/include/net-snmp/library/read_config.h b/vendor/include/net-snmp/library/read_config.h index f036c30..b0b60e9 100644 --- a/vendor/include/net-snmp/library/read_config.h +++ b/vendor/include/net-snmp/library/read_config.h @@ -37,7 +37,8 @@ extern "C" { struct config_line { char *config_token; /* Label for each line parser * in the given file. */ - void (*parse_line) (const char *, char *); + void (*parse_line1) (const char *, char *); + void (*parse_line2) (const char *, const char *); void (*free_func) (void); struct config_line *next; char config_time; /* {NORMAL,PREMIB,EITHER}_CONFIG */ @@ -105,7 +106,7 @@ extern "C" { oid ** objid, size_t * len); NETSNMP_IMPORT - char *read_config_save_objid(char *saveto, oid * objid, + char *read_config_save_objid(char *saveto, const oid * objid, size_t len); NETSNMP_IMPORT char *read_config_read_data(int type, char *readfrom, diff --git a/vendor/include/net-snmp/library/scapi.h b/vendor/include/net-snmp/library/scapi.h index 7233730..6166560 100644 --- a/vendor/include/net-snmp/library/scapi.h +++ b/vendor/include/net-snmp/library/scapi.h @@ -87,11 +87,13 @@ typedef struct netsnmp_priv_alg_info_s { NETSNMP_IMPORT oid * sc_get_auth_oid(int auth_type, size_t *oid_len); NETSNMP_IMPORT - netsnmp_auth_alg_info * sc_get_auth_alg_byoid(const oid *oid, u_int len); + const netsnmp_auth_alg_info * + sc_find_auth_alg_byoid(const oid *oid, u_int len); NETSNMP_IMPORT - netsnmp_auth_alg_info * sc_get_auth_alg_bytype(u_int type); + const netsnmp_auth_alg_info * + sc_find_auth_alg_bytype(u_int type); NETSNMP_IMPORT - netsnmp_auth_alg_info * sc_get_auth_alg_byindex(u_int index); + const netsnmp_auth_alg_info * sc_get_auth_alg_byindex(u_int index); /** deprectated, use * sc_get_authtype() + sc_get_proper_auth_length_bytype() */ @@ -116,11 +118,12 @@ typedef struct netsnmp_priv_alg_info_s { NETSNMP_IMPORT int sc_get_proper_priv_length_bytype(int privtype); NETSNMP_IMPORT - netsnmp_priv_alg_info * sc_get_priv_alg_byoid(const oid *oid, u_int len); + const netsnmp_priv_alg_info * + sc_get_priv_alg_byoid(const oid *oid, u_int len); NETSNMP_IMPORT - netsnmp_priv_alg_info * sc_get_priv_alg_bytype(u_int type); + const netsnmp_priv_alg_info * sc_get_priv_alg_bytype(u_int type); NETSNMP_IMPORT - netsnmp_priv_alg_info * sc_get_priv_alg_byindex(u_int index); + const netsnmp_priv_alg_info * sc_get_priv_alg_byindex(u_int index); NETSNMP_IMPORT int sc_init(void); diff --git a/vendor/include/net-snmp/library/snmpAAL5PVCDomain.h b/vendor/include/net-snmp/library/snmpAAL5PVCDomain.h index 24bdd76..e75f6fe 100644 --- a/vendor/include/net-snmp/library/snmpAAL5PVCDomain.h +++ b/vendor/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 diff --git a/vendor/include/net-snmp/library/snmpDTLSUDPDomain.h b/vendor/include/net-snmp/library/snmpDTLSUDPDomain.h index 5a60eee..57c9bff 100644 --- a/vendor/include/net-snmp/library/snmpDTLSUDPDomain.h +++ b/vendor/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 diff --git a/vendor/include/net-snmp/library/snmpIPXDomain.h b/vendor/include/net-snmp/library/snmpIPXDomain.h index 67a2a45..b51e298 100644 --- a/vendor/include/net-snmp/library/snmpIPXDomain.h +++ b/vendor/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 diff --git a/vendor/include/net-snmp/library/snmpIPv4BaseDomain.h b/vendor/include/net-snmp/library/snmpIPv4BaseDomain.h index 536bf5b..41eac0b 100644 --- a/vendor/include/net-snmp/library/snmpIPv4BaseDomain.h +++ b/vendor/include/net-snmp/library/snmpIPv4BaseDomain.h @@ -3,13 +3,13 @@ #ifndef SNMPIPV4BASE_H #define SNMPIPV4BASE_H -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif #include -config_require(IPBase) +config_require(IPBase); #ifdef __cplusplus extern "C" { diff --git a/vendor/include/net-snmp/library/snmpIPv6BaseDomain.h b/vendor/include/net-snmp/library/snmpIPv6BaseDomain.h index ac4c84e..69eae1c 100644 --- a/vendor/include/net-snmp/library/snmpIPv6BaseDomain.h +++ b/vendor/include/net-snmp/library/snmpIPv6BaseDomain.h @@ -3,11 +3,11 @@ #ifndef SNMPIPV6BASE_H #define SNMPIPV6BASE_H -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -config_require(IPBase) +config_require(IPBase); #include diff --git a/vendor/include/net-snmp/library/snmpSSHDomain.h b/vendor/include/net-snmp/library/snmpSSHDomain.h index 202c623..9a6da52 100644 --- a/vendor/include/net-snmp/library/snmpSSHDomain.h +++ b/vendor/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 diff --git a/vendor/include/net-snmp/library/snmpSocketBaseDomain.h b/vendor/include/net-snmp/library/snmpSocketBaseDomain.h index 71d86c8..0600172 100644 --- a/vendor/include/net-snmp/library/snmpSocketBaseDomain.h +++ b/vendor/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/vendor/include/net-snmp/library/snmpTCPDomain.h b/vendor/include/net-snmp/library/snmpTCPDomain.h index a7bf42e..c662b48 100644 --- a/vendor/include/net-snmp/library/snmpTCPDomain.h +++ b/vendor/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 diff --git a/vendor/include/net-snmp/library/snmpTCPIPv6Domain.h b/vendor/include/net-snmp/library/snmpTCPIPv6Domain.h index afab8e0..bf8f4e8 100644 --- a/vendor/include/net-snmp/library/snmpTCPIPv6Domain.h +++ b/vendor/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 diff --git a/vendor/include/net-snmp/library/snmpTLSTCPDomain.h b/vendor/include/net-snmp/library/snmpTLSTCPDomain.h index 4f27662..1373533 100644 --- a/vendor/include/net-snmp/library/snmpTLSTCPDomain.h +++ b/vendor/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/vendor/include/net-snmp/library/snmpUDPBaseDomain.h b/vendor/include/net-snmp/library/snmpUDPBaseDomain.h index e4c496c..93b8745 100644 --- a/vendor/include/net-snmp/library/snmpUDPBaseDomain.h +++ b/vendor/include/net-snmp/library/snmpUDPBaseDomain.h @@ -1,7 +1,7 @@ #ifndef SNMPUDPBASEDOMAIN_H #define SNMPUDPBASEDOMAIN_H -config_require(SocketBase) +config_require(SocketBase); #include diff --git a/vendor/include/net-snmp/library/snmpUDPDomain.h b/vendor/include/net-snmp/library/snmpUDPDomain.h index 5cc8b68..a518941 100644 --- a/vendor/include/net-snmp/library/snmpUDPDomain.h +++ b/vendor/include/net-snmp/library/snmpUDPDomain.h @@ -14,14 +14,14 @@ 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 * diff --git a/vendor/include/net-snmp/library/snmpUDPIPv4BaseDomain.h b/vendor/include/net-snmp/library/snmpUDPIPv4BaseDomain.h index ff6e163..cf9ea5a 100644 --- a/vendor/include/net-snmp/library/snmpUDPIPv4BaseDomain.h +++ b/vendor/include/net-snmp/library/snmpUDPIPv4BaseDomain.h @@ -8,15 +8,15 @@ #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 diff --git a/vendor/include/net-snmp/library/snmpUDPIPv6Domain.h b/vendor/include/net-snmp/library/snmpUDPIPv6Domain.h index 883bfdb..c255197 100644 --- a/vendor/include/net-snmp/library/snmpUDPIPv6Domain.h +++ b/vendor/include/net-snmp/library/snmpUDPIPv6Domain.h @@ -16,8 +16,8 @@ extern "C" { #include -config_require(IPv6Base) -config_require(UDPBase) +config_require(IPv6Base); +config_require(UDPBase); #include @@ -52,17 +52,6 @@ netsnmp_udp6_transport_with_source(const struct netsnmp_ep *ep, int local, void netsnmp_udp6_transport_get_bound_addr(netsnmp_transport *t); - -/* - * Convert a "traditional" peername into a sockaddr_in6 structure which is - * written to *addr. Returns 1 if the conversion was successful, or 0 if it - * failed. - */ - -int netsnmp_sockaddr_in6(struct sockaddr_in6 *addr, - const char *peername, - int remote_port); - NETSNMP_IMPORT void netsnmp_udp6_agent_config_tokens_register(void); NETSNMP_IMPORT diff --git a/vendor/include/net-snmp/library/snmpUDPsharedDomain.h b/vendor/include/net-snmp/library/snmpUDPsharedDomain.h index 3df9c9a..b1117ee 100644 --- a/vendor/include/net-snmp/library/snmpUDPsharedDomain.h +++ b/vendor/include/net-snmp/library/snmpUDPsharedDomain.h @@ -8,14 +8,14 @@ #ifndef SNMPUDPsharedBASE_H #define SNMPUDPsharedBASE_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(UDP) +config_require(UDP); #include #include diff --git a/vendor/include/net-snmp/library/snmpUnixDomain.h b/vendor/include/net-snmp/library/snmpUnixDomain.h index 333305f..ac879c3 100644 --- a/vendor/include/net-snmp/library/snmpUnixDomain.h +++ b/vendor/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" { diff --git a/vendor/include/net-snmp/library/snmp_alarm.h b/vendor/include/net-snmp/library/snmp_alarm.h index 0635375..9e3b7d6 100644 --- a/vendor/include/net-snmp/library/snmp_alarm.h +++ b/vendor/include/net-snmp/library/snmp_alarm.h @@ -4,11 +4,11 @@ /* * For 'timeval' */ -#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/vendor/include/net-snmp/library/snmp_api.h b/vendor/include/net-snmp/library/snmp_api.h index 6b4fad6..7bf3269 100644 --- a/vendor/include/net-snmp/library/snmp_api.h +++ b/vendor/include/net-snmp/library/snmp_api.h @@ -166,6 +166,7 @@ typedef struct request_list { #define SNMP_DETAIL_SIZE 512 +#define SNMP_FLAGS_SESSION_USER 0x1000 #define SNMP_FLAGS_UDP_BROADCAST 0x800 #define SNMP_FLAGS_RESP_CALLBACK 0x400 /* Additional callback on response */ #define SNMP_FLAGS_USER_CREATED 0x200 /* USM user has been created */ @@ -507,17 +508,6 @@ struct netsnmp_transport_s; size_t *, size_t *), int (*fcheck) (u_char *, size_t)); - /* - * provided for backwards compatability. Don't use these functions. - * See snmp_debug.h and snmp_debug.c instead. - */ - - NETSNMP_IMPORT - void snmp_set_do_debugging(int); - NETSNMP_IMPORT - int snmp_get_do_debugging(void); - - NETSNMP_IMPORT void netsnmp_sess_log_error(int priority, const char *prog_string, @@ -558,6 +548,9 @@ 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 *, diff --git a/vendor/include/net-snmp/library/snmp_debug.h b/vendor/include/net-snmp/library/snmp_debug.h index 7c2ed65..b7007bc 100644 --- a/vendor/include/net-snmp/library/snmp_debug.h +++ b/vendor/include/net-snmp/library/snmp_debug.h @@ -64,8 +64,6 @@ 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); diff --git a/vendor/include/net-snmp/library/snmp_enum.h b/vendor/include/net-snmp/library/snmp_enum.h index 0dab3a5..7e95f3f 100644 --- a/vendor/include/net-snmp/library/snmp_enum.h +++ b/vendor/include/net-snmp/library/snmp_enum.h @@ -48,8 +48,6 @@ extern "C" { struct snmp_enum_list *se_find_list(unsigned int major, unsigned int minor); struct snmp_enum_list *se_find_slist(const char *listname); - int se_store_in_list(struct snmp_enum_list *, - unsigned int major, unsigned int minor); int se_find_value(unsigned int major, unsigned int minor, const char *label); int se_find_free_value(unsigned int major, unsigned int minor); diff --git a/vendor/include/net-snmp/library/snmp_logging.h b/vendor/include/net-snmp/library/snmp_logging.h index c1b60aa..9f2db11 100644 --- a/vendor/include/net-snmp/library/snmp_logging.h +++ b/vendor/include/net-snmp/library/snmp_logging.h @@ -4,7 +4,7 @@ #include #include -#if HAVE_SYSLOG_H +#ifdef HAVE_SYSLOG_H #include #endif #include @@ -83,8 +83,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; @@ -122,15 +123,6 @@ 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/vendor/include/net-snmp/library/snmp_parse_args.h b/vendor/include/net-snmp/library/snmp_parse_args.h index 1ad63e0..6f6f966 100644 --- a/vendor/include/net-snmp/library/snmp_parse_args.h +++ b/vendor/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/vendor/include/net-snmp/library/snmp_transport.h b/vendor/include/net-snmp/library/snmp_transport.h index 76e75e0..89f598c 100644 --- a/vendor/include/net-snmp/library/snmp_transport.h +++ b/vendor/include/net-snmp/library/snmp_transport.h @@ -9,7 +9,7 @@ */ #include -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #ifdef solaris2 #define _XPG4_2 #endif @@ -114,6 +114,7 @@ typedef struct netsnmp_tmStateReference_s { } 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 { @@ -253,6 +254,7 @@ void shutdown_snmp_transport(void); /* Some utility functions. */ +NETSNMP_IMPORT char *netsnmp_transport_peer_string(netsnmp_transport *t, const void *data, int len); @@ -265,6 +267,7 @@ 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); +NETSNMP_IMPORT int netsnmp_sockaddr_size(const struct sockaddr *sa); @@ -359,8 +362,7 @@ typedef struct netsnmp_transport_config_s { } netsnmp_transport_config; NETSNMP_IMPORT -int netsnmp_transport_config_compare(netsnmp_transport_config *left, - netsnmp_transport_config *right); +int netsnmp_transport_config_compare(const void *left, const void *right); NETSNMP_IMPORT netsnmp_transport_config *netsnmp_transport_create_config(const char *key, const char *value); diff --git a/vendor/include/net-snmp/library/snmpusm.h b/vendor/include/net-snmp/library/snmpusm.h index a97aeb2..73b10b1 100644 --- a/vendor/include/net-snmp/library/snmpusm.h +++ b/vendor/include/net-snmp/library/snmpusm.h @@ -98,6 +98,8 @@ extern "C" { NETSNMP_IMPORT struct usmUser *usm_get_user(const u_char *engineID, size_t engineIDLen, const char *name); + struct usmUser *usm_get_user2(const u_char *engineID, size_t engineIDLen, + const void *name, size_t nameLen); NETSNMP_IMPORT struct usmUser *usm_add_user(struct usmUser *user); NETSNMP_IMPORT diff --git a/vendor/include/net-snmp/library/system.h b/vendor/include/net-snmp/library/system.h index b24fcfc..52bafe3 100644 --- a/vendor/include/net-snmp/library/system.h +++ b/vendor/include/net-snmp/library/system.h @@ -120,7 +120,7 @@ SOFTWARE. #endif /* WIN32 */ #include /* For definition of in_addr_t */ -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif diff --git a/vendor/include/net-snmp/library/tools.h b/vendor/include/net-snmp/library/tools.h index e26d09a..cb73d37 100644 --- a/vendor/include/net-snmp/library/tools.h +++ b/vendor/include/net-snmp/library/tools.h @@ -55,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. @@ -283,8 +279,11 @@ extern "C" { NETSNMP_IMPORT int netsnmp_string_time_to_secs(const char *time_string); + NETSNMP_IMPORT + const char *netsnmp_gethomedir(void); + #ifdef __cplusplus } #endif #endif /* _TOOLS_H */ -/* @} */ +/** @} */ diff --git a/vendor/include/net-snmp/mib_api.h b/vendor/include/net-snmp/mib_api.h index 3b54e83..57b1c13 100644 --- a/vendor/include/net-snmp/mib_api.h +++ b/vendor/include/net-snmp/mib_api.h @@ -43,15 +43,6 @@ extern "C" { void add_module_replacement(const char *, const char *, const char *, int); - /* from ucd-compat.h */ - NETSNMP_IMPORT - void snmp_set_mib_warnings(int); - NETSNMP_IMPORT - void snmp_set_mib_errors(int); - NETSNMP_IMPORT - void snmp_set_save_descriptions(int); - - /* Searching the MIB Tree */ NETSNMP_IMPORT int read_objid(const char *, oid *, size_t *); @@ -61,9 +52,6 @@ extern "C" { int get_module_node(const char *, const char *, oid *, size_t *); /* Output */ - NETSNMP_IMPORT - void print_mib(FILE * fp); - NETSNMP_IMPORT void print_objid(const oid * objid, size_t objidlen); NETSNMP_IMPORT diff --git a/vendor/include/net-snmp/net-snmp-config.h.in b/vendor/include/net-snmp/net-snmp-config.h.in index b401a2c..13d942a 100644 --- a/vendor/include/net-snmp/net-snmp-config.h.in +++ b/vendor/include/net-snmp/net-snmp-config.h.in @@ -36,30 +36,27 @@ /* definitions added by configure on-the-fly */ -#define config_error(x) +#define config_parse_dot_conf(w,x,y,z) NETSNMP_REQUIRE_SEMICOLON -#define config_warning(x) +#define config_error(x) NETSNMP_REQUIRE_SEMICOLON -#define config_belongs_in(x) +#define config_warning(x) NETSNMP_REQUIRE_SEMICOLON -#define config_exclude(x) +#define NETSNMP_REQUIRE_SEMICOLON struct netsnmp_unused_struct -#define config_arch_require(x,y) +#define config_belongs_in(x) NETSNMP_REQUIRE_SEMICOLON -#define config_version_require(x) +#define config_exclude(x) NETSNMP_REQUIRE_SEMICOLON -#define config_require(x) +#define config_arch_require(x,y) NETSNMP_REQUIRE_SEMICOLON -#define config_add_mib(x) +#define config_version_require(x) NETSNMP_REQUIRE_SEMICOLON -#define config_parse_dot_conf(w,x,y,z) +#define config_require(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 config_add_mib(x) NETSNMP_REQUIRE_SEMICOLON -/* Define to 1 if using `alloca.c'. */ +/* Define to 1 if using 'alloca.c'. */ #undef C_ALLOCA /* location of swap device */ @@ -80,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. */ @@ -99,28 +95,47 @@ /* 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. */ +/* Define to 1 if the `ASN_BOOLEAN' constant is defined in an SSL header file. + */ +#undef HAVE_ASN_BOOLEAN + +/* Define to 1 if the `ASN_INTEGER' constant is defined in an SSL header file. + */ +#undef HAVE_ASN_INTEGER + +/* Define to 1 if the `ASN_OBJECT_ID' constant is defined in an SSL header + file. */ +#undef HAVE_ASN_OBJECT_ID + +/* Define to 1 if the `ASN_SEQUENCE' constant is defined in an SSL header + file. */ +#undef HAVE_ASN_SEQUENCE + +/* Define to 1 if the `ASN_SET' constant is defined in an SSL header file. */ +#undef HAVE_ASN_SET + +/* Define to 1 if you have the 'asprintf' function. */ #undef HAVE_ASPRINTF -/* Define to 1 if you have the `cgetnext' function. */ +/* Define to 1 if you have the 'cgetnext' function. */ #undef HAVE_CGETNEXT -/* Define to 1 if you have the `chown' function. */ +/* Define to 1 if you have the 'chown' function. */ #undef HAVE_CHOWN /* Define to 1 if you have the `clock_gettime' library */ #undef HAVE_CLOCK_GETTIME -/* Define to 1 if you have the `closedir' function. */ +/* Define to 1 if you have the 'closedir' function. */ #undef HAVE_CLOSEDIR -/* Define to 1 if you have the `closesocket' function. */ +/* 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'. */ +/* Define to 1 if the system has the type 'Counter64'. */ #undef HAVE_COUNTER64 /* Define to 1 if you have the header file. */ @@ -129,15 +144,15 @@ /* 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 +/* 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', +/* 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 +/* Define to 1 if you have the declaration of 'timezone', and to 0 if you don't. */ #undef HAVE_DECL_TIMEZONE @@ -156,14 +171,14 @@ /* 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'. +/* 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. */ +/* Define to 1 if you have the 'dlopen' function. */ #undef HAVE_DLOPEN /* Set if the dpkg-query command is available */ @@ -175,18 +190,27 @@ /* 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 `ERR_get_error_func' function. */ +#undef HAVE_ERR_GET_ERROR_FUNC + /* Define to 1 if you have the header file. */ #undef HAVE_ERR_H /* Define to 1 if you have the header file. */ #undef HAVE_ET_COM_ERR_H -/* Define to 1 if you have the `eval_pv' function. */ +/* Define to 1 if you have the 'eval_pv' function. */ #undef HAVE_EVAL_PV +/* Define to 1 if you have the `EVP_aes_128_cfb' function. */ +#undef HAVE_EVP_AES_128_CFB + /* Define to 1 if you have the `EVP_MD_CTX_create' function. */ #undef HAVE_EVP_MD_CTX_CREATE @@ -205,115 +229,124 @@ /* Define to 1 if you have the `EVP_sha384' function. */ #undef HAVE_EVP_SHA384 -/* Define to 1 if you have the `execv' function. */ +/* Define to 1 if you have the 'execv' function. */ #undef HAVE_EXECV /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H -/* Define to 1 if you have the `fgetc_unlocked' function. */ +/* Define to 1 if you have the 'fgetc_unlocked' function. */ #undef HAVE_FGETC_UNLOCKED -/* Define to 1 if you have the `flockfile' function. */ +/* Define to 1 if you have the 'flockfile' function. */ #undef HAVE_FLOCKFILE -/* Define to 1 if you have the `fork' function. */ +/* Define to 1 if you have the 'fork' function. */ #undef HAVE_FORK -/* Define to 1 if you have the `forkall' function. */ +/* 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. */ +/* Define to 1 if you have the 'fsync' function. */ #undef HAVE_FSYNC -/* Define to 1 if you have the `funlockfile' function. */ +/* Define to 1 if you have the 'funlockfile' function. */ #undef HAVE_FUNLOCKFILE -/* Define to 1 if you have the `gai_strerror' function. */ +/* Define to 1 if you have the 'gai_strerror' function. */ #undef HAVE_GAI_STRERROR -/* Define to 1 if you have the `getaddrinfo' function. */ +/* Define to 1 if you have the 'getaddrinfo' function. */ #undef HAVE_GETADDRINFO /* define if you have getdevs() */ #undef HAVE_GETDEVS -/* Define to 1 if you have the `getdtablesize' function. */ +/* Define to 1 if you have the 'getdtablesize' function. */ #undef HAVE_GETDTABLESIZE -/* Define to 1 if you have the `getfsstat' function. */ +/* Define to 1 if you have the 'getfsent' function. */ +#undef HAVE_GETFSENT + +/* Define to 1 if you have the 'getfsstat' function. */ #undef HAVE_GETFSSTAT -/* Define to 1 if you have the `getgrnam' function. */ +/* Define to 1 if you have the 'getgrnam' function. */ #undef HAVE_GETGRNAM -/* Define to 1 if you have the `gethostbyaddr' function. */ +/* Define to 1 if you have the 'gethostbyaddr' function. */ #undef HAVE_GETHOSTBYADDR -/* Define to 1 if you have the `gethostbyname' function. */ +/* Define to 1 if you have the 'gethostbyname' function. */ #undef HAVE_GETHOSTBYNAME -/* Define to 1 if you have the `gethostbyname2' function. */ +/* Define to 1 if you have the 'gethostbyname2' function. */ #undef HAVE_GETHOSTBYNAME2 -/* Define to 1 if you have the `gethostname' function. */ +/* Define to 1 if you have the 'gethostname' function. */ #undef HAVE_GETHOSTNAME -/* Define to 1 if you have the `getipnodebyname' function. */ +/* Define to 1 if you have the 'getipnodebyname' function. */ #undef HAVE_GETIPNODEBYNAME -/* Define to 1 if you have the `getloadavg' function. */ +/* Define to 1 if you have the 'getloadavg' function. */ #undef HAVE_GETLOADAVG -/* Define to 1 if you have the `getlogin' function. */ +/* Define to 1 if you have the 'getlogin' function. */ #undef HAVE_GETLOGIN -/* Define to 1 if you have the `getmntent' function. */ +/* Define to 1 if you have the 'getmntent' function. */ #undef HAVE_GETMNTENT -/* Define to 1 if you have the `getopt' function. */ +/* Define to 1 if you have the 'getmntinfo' function. */ +#undef HAVE_GETMNTINFO + +/* Define to 1 if you have the 'getnetgrent' function. */ +#undef HAVE_GETNETGRENT + +/* Define to 1 if you have the 'getopt' function. */ #undef HAVE_GETOPT /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H -/* Define to 1 if you have the `getpagesize' function. */ +/* Define to 1 if you have the 'getpagesize' function. */ #undef HAVE_GETPAGESIZE -/* Define to 1 if you have the `getpid' function. */ +/* Define to 1 if you have the 'getpid' function. */ #undef HAVE_GETPID -/* Define to 1 if you have the `getpwnam' function. */ +/* Define to 1 if you have the 'getpwnam' function. */ #undef HAVE_GETPWNAM -/* Define to 1 if you have the `gettimeofday' function. */ +/* Define to 1 if you have the 'gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY -/* Define to 1 if you have the `getvfsstat' function. */ +/* Define to 1 if you have the 'getvfsstat' function. */ #undef HAVE_GETVFSSTAT /* Define to 1 if you have the header file. */ #undef HAVE_GRP_H -/* Define to 1 if you have the `hasmntopt' function. */ +/* 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. */ +/* Define to 1 if you have the 'if_freenameindex' function. */ #undef HAVE_IF_FREENAMEINDEX -/* Define to 1 if you have the `if_indextoname' function. */ +/* Define to 1 if you have the 'if_indextoname' function. */ #undef HAVE_IF_INDEXTONAME -/* Define to 1 if you have the `if_nameindex' function. */ +/* Define to 1 if you have the 'if_nameindex' function. */ #undef HAVE_IF_NAMEINDEX -/* Define to 1 if you have the `if_nametoindex' function. */ +/* Define to 1 if you have the 'if_nametoindex' function. */ #undef HAVE_IF_NAMETOINDEX /* Define to 1 if you have the header file. */ @@ -325,25 +358,25 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INET_MIB2_H -/* Define to 1 if you have the `inet_ntop' function. */ +/* Define to 1 if you have the 'inet_ntop' function. */ #undef HAVE_INET_NTOP -/* Define to 1 if you have the `inet_pton' function. */ +/* Define to 1 if you have the 'inet_pton' function. */ #undef HAVE_INET_PTON -/* Define to 1 if you have the `initgroups' function. */ +/* Define to 1 if you have the 'initgroups' function. */ #undef HAVE_INITGROUPS -/* Define to 1 if the system has the type `intmax_t'. */ +/* Define to 1 if the system has the type 'intmax_t'. */ #undef HAVE_INTMAX_T -/* Define to 1 if the system has the type `intptr_t'. */ +/* Define to 1 if the system has the type 'intptr_t'. */ #undef HAVE_INTPTR_T /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if the system has the type `in_addr_t'. */ +/* Define to 1 if the system has the type 'in_addr_t'. */ #undef HAVE_IN_ADDR_T /* Define to 1 if you have the header file. */ @@ -355,58 +388,61 @@ /* Define to 1 if you have the header file. */ #undef HAVE_IPHLPAPI_H +/* Set if IPV6_RECVPKTINFO is usable */ +#undef HAVE_IPV6_RECVPKTINFO + /* Set if IP_PKTINFO is usable */ #undef HAVE_IP_PKTINFO /* Set if IP_RECVDSTADDR is usable */ #undef HAVE_IP_RECVDSTADDR -/* Define to 1 if you have the `kinfo_get_cpus' function. */ +/* Define to 1 if you have the 'kinfo_get_cpus' function. */ #undef HAVE_KINFO_GET_CPUS -/* Define to 1 if you have the `knlist' function. */ +/* Define to 1 if you have the 'knlist' function. */ #undef HAVE_KNLIST -/* Define to 1 if you have the `krb5_auth_con_getrecvsubkey' function. */ +/* 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. */ +/* 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'. */ +/* 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. */ +/* Define to 1 if you have the 'kvm_getfile2' function. */ #undef HAVE_KVM_GETFILE2 -/* Define to 1 if you have the `kvm_getfiles' function. */ +/* Define to 1 if you have the 'kvm_getfiles' function. */ #undef HAVE_KVM_GETFILES -/* Define to 1 if you have the `kvm_getproc2' function. */ +/* Define to 1 if you have the 'kvm_getproc2' function. */ #undef HAVE_KVM_GETPROC2 -/* Define to 1 if you have the `kvm_getprocs' function. */ +/* Define to 1 if you have the 'kvm_getprocs' function. */ #undef HAVE_KVM_GETPROCS -/* Define to 1 if you have the `kvm_getswapinfo' function. */ +/* Define to 1 if you have the 'kvm_getswapinfo' function. */ #undef HAVE_KVM_GETSWAPINFO /* Define to 1 if you have the header file. */ #undef HAVE_KVM_H -/* Define to 1 if you have the `kvm_openfiles' function. */ +/* Define to 1 if you have the 'kvm_openfiles' function. */ #undef HAVE_KVM_OPENFILES /* Define to 1 if you have the OpenSSL library (-lcrypto or -leay32). */ #undef HAVE_LIBCRYPTO -/* Define to 1 if you have the `elf' library (-lelf). */ +/* Define to 1 if you have the 'elf' library (-lelf). */ #undef HAVE_LIBELF -/* Define to 1 if you have the `mld' library (-lmld). */ +/* Define to 1 if you have the 'mld' library (-lmld). */ #undef HAVE_LIBMLD /* Define to 1 if provides the libnl3 API */ @@ -415,7 +451,7 @@ /* define if you have libnm */ #undef HAVE_LIBNM -/* Define to 1 if you have the `nsl' library (-lnsl). */ +/* Define to 1 if you have the 'nsl' library (-lnsl). */ #undef HAVE_LIBNSL /* Define to 1 if you have the header file. */ @@ -427,28 +463,31 @@ /* define if you have BSD pkg-ng */ #undef HAVE_LIBPKG -/* Define to 1 if you have the `pthread' library (-lpthread). */ +/* Define to 1 if you have the 'pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD /* Define to 1 if you have the `rpm' library (-lrpm). */ #undef HAVE_LIBRPM -/* Define to 1 if you have the `RSAglue' library (-lRSAglue). */ +/* Define to 1 if you have the 'RSAglue' library (-lRSAglue). */ #undef HAVE_LIBRSAGLUE -/* Define to 1 if you have the `rsaref' library (-lrsaref). */ +/* Define to 1 if you have the 'rsaref' library (-lrsaref). */ #undef HAVE_LIBRSAREF -/* Define to 1 if you have the `sres' library (-lsres). */ +/* Define to 1 if you have the 'sres' library (-lsres). */ #undef HAVE_LIBSRES /* Define to 1 if you have the `ssh2' library (-lssh2). */ #undef HAVE_LIBSSH2 -/* Define to 1 if you have the `ssl' library (-lssl). */ +/* Define to 1 if you have the 'libssh2_session_handshake' function. */ +#undef HAVE_LIBSSH2_SESSION_HANDSHAKE + +/* Define to 1 if you have the `ssl' library. */ #undef HAVE_LIBSSL -/* Define to 1 if your `ssl' library supports DTLS (-lssl). */ +/* Define to 1 if your `ssl' library supports DTLS. */ #undef HAVE_LIBSSL_DTLS /* Define to 1 if you have the header file. */ @@ -476,25 +515,25 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LM_H -/* Define to 1 if you have the `load_defaults' function. */ +/* 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 -/* Define to 1 if you have the `localtime_r' function. */ +/* Define to 1 if you have the 'localtime_r' function. */ #undef HAVE_LOCALTIME_R -/* Define to 1 if the system has the type `long long int'. */ +/* Define to 1 if the system has the type 'long long int'. */ #undef HAVE_LONG_LONG_INT /* Set if the lpstat command is available */ #undef HAVE_LPSTAT -/* Define to 1 if you have the `lrand48' function. */ +/* Define to 1 if you have the 'lrand48' function. */ #undef HAVE_LRAND48 -/* Define to 1 if you have the `lseek64' function. */ +/* Define to 1 if you have the 'lseek64' function. */ #undef HAVE_LSEEK64 /* Define to 1 if you have the header file. */ @@ -512,19 +551,22 @@ /* 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 you have the 'malloc_trim' function. */ +#undef HAVE_MALLOC_TRIM -/* Define to 1 if the system has the type `mib2_ipIfStatsEntry_t'. */ +/* 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 `mkstemp' function. */ +/* 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 -/* Define to 1 if you have the `mktime' function. */ +/* Define to 1 if you have the 'mktime' function. */ #undef HAVE_MKTIME /* Define to 1 if you have the header file. */ @@ -533,10 +575,10 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MTAB_H -/* Define to 1 if you have the `mysql_init' function. */ +/* Define to 1 if you have the 'mysql_init' function. */ #undef HAVE_MYSQL_INIT -/* Define to 1 if you have the `mysql_options' function. */ +/* Define to 1 if you have the 'mysql_options' function. */ #undef HAVE_MYSQL_OPTIONS /* Define to 1 if you have the header file. */ @@ -557,12 +599,15 @@ /* 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'. */ +/* 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_NETGROUP_H + /* Define to 1 if you have the header file. */ #undef HAVE_NETINET6_IN6_PCB_H @@ -644,9 +689,24 @@ /* 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_NETLINK_CACHE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETLINK_MSG_H + /* Define to 1 if you have the header file. */ #undef HAVE_NETLINK_NETLINK_H +/* Define to 1 if you have the header file. */ +#undef HAVE_NETLINK_ROUTE_ADDR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETLINK_ROUTE_LINK_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETLINK_SOCKET_H + /* Define to 1 if you have the header file. */ #undef HAVE_NET_IF_ARP_H @@ -668,24 +728,27 @@ /* Define to 1 if you have the header file. */ #undef HAVE_NET_ROUTE_H -/* Define to 1 if the system has the type `nfds_t'. */ +/* Define to 1 if the system has the type 'nfds_t'. */ #undef HAVE_NFDS_T -/* Define to 1 if you have the `nlist' function. */ +/* Define to 1 if you have the 'nlist' function. */ #undef HAVE_NLIST -/* Define to 1 if you have the `nlist64' function. */ +/* Define to 1 if you have the 'nlist64' function. */ #undef HAVE_NLIST64 /* Define to 1 if you have the header file. */ #undef HAVE_NLIST_H -/* Define to 1 if the system has the type `off64_t'. */ +/* Define to 1 if the system has the type 'off64_t'. */ #undef HAVE_OFF64_T -/* Define to 1 if you have the `opendir' function. */ +/* 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 @@ -695,12 +758,24 @@ /* 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_ERR_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 `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_OPENSSL_SSL_H + /* Define to 1 if you have the header file. */ #undef HAVE_OSRELDATE_H @@ -740,10 +815,13 @@ /* Define to 1 if you have the header file. */ #undef HAVE_PKG_H -/* Define to 1 if you have the `poll' function. */ +/* Define to 1 if you have the 'poll' function. */ #undef HAVE_POLL -/* Define to 1 if you have the `pread64' function. */ +/* 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 */ @@ -761,22 +839,22 @@ /* Define to 1 if you have the header file. */ #undef HAVE_PWD_H -/* Define to 1 if you have the `rand' function. */ +/* Define to 1 if you have the 'rand' function. */ #undef HAVE_RAND -/* Define to 1 if you have the `random' function. */ +/* Define to 1 if you have the 'random' function. */ #undef HAVE_RANDOM -/* Define to 1 if you have the `readdir' function. */ +/* Define to 1 if you have the 'readdir' function. */ #undef HAVE_READDIR -/* Define to 1 if you have the `regcomp' function. */ +/* 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. */ +/* Define to 1 if you have the 'rpmGetPath' function. */ #undef HAVE_RPMGETPATH /* Define to 1 if you have the header file. */ @@ -797,118 +875,127 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SEARCH_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SECURITY_CRYPTOKI_H - -/* Define to 1 if you have the `select' function. */ +/* Define to 1 if you have the 'select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the header file. */ #undef HAVE_SENSORS_SENSORS_H -/* Define to 1 if you have the `setenv' function. */ +/* Define to 1 if you have the 'setenv' function. */ #undef HAVE_SETENV -/* Define to 1 if you have the `setgid' function. */ +/* Define to 1 if you have the 'setfsent' function. */ +#undef HAVE_SETFSENT + +/* Define to 1 if you have the 'setgid' function. */ #undef HAVE_SETGID -/* Define to 1 if you have the `setgroups' function. */ +/* Define to 1 if you have the 'setgroups' function. */ #undef HAVE_SETGROUPS -/* Define to 1 if you have the `setitimer' function. */ +/* Define to 1 if you have the 'setitimer' function. */ #undef HAVE_SETITIMER -/* Define to 1 if you have the `setlocale' function. */ +/* Define to 1 if you have the 'setlocale' function. */ #undef HAVE_SETLOCALE -/* Define to 1 if you have the `setmntent' function. */ +/* Define to 1 if you have the 'setmntent' function. */ #undef HAVE_SETMNTENT -/* Define to 1 if you have the `setsid' function. */ +/* Define to 1 if you have the 'setsid' function. */ #undef HAVE_SETSID -/* Define to 1 if you have the `setuid' function. */ +/* 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. */ +/* Define to 1 if you have the 'sigaction' function. */ #undef HAVE_SIGACTION -/* Define to 1 if you have the `sigalrm' function. */ +/* Define to 1 if you have the 'sigalrm' function. */ #undef HAVE_SIGALRM -/* Define to 1 if you have the `sigblock' function. */ +/* 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 -/* Define to 1 if you have the `signal' function. */ +/* Define to 1 if you have the 'signal' function. */ #undef HAVE_SIGNAL -/* Define to 1 if you have the `sigprocmask' function. */ +/* Define to 1 if you have the 'sigprocmask' function. */ #undef HAVE_SIGPROCMASK -/* Define to 1 if you have the `sigset' function. */ +/* Define to 1 if you have the 'sigset' function. */ #undef HAVE_SIGSET -/* Define to 1 if you have the `snprintf' function. */ +/* Define to 1 if you have the 'snprintf' function. */ #undef HAVE_SNPRINTF -/* Define to 1 if you have the `socket' function. */ +/* Define to 1 if you have the 'socket' function. */ #undef HAVE_SOCKET -/* Define to 1 if the system has the type `socklen_t'. */ +/* 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 `srand' function. */ +/* 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. */ +/* Define to 1 if you have the 'srand48' function. */ #undef HAVE_SRAND48 -/* Define to 1 if you have the `srandom' function. */ +/* Define to 1 if you have the 'srandom' function. */ #undef HAVE_SRANDOM -/* Define to 1 if the system has the type `ssize_t'. */ +/* Define to 1 if the system has the type 'ssize_t'. */ #undef HAVE_SSIZE_T +/* Define to 1 if you have the `SSL_CTX_set_cookie_generate_cb' function. */ +#undef HAVE_SSL_CTX_SET_COOKIE_GENERATE_CB + +/* 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. */ +/* Define to 1 if you have the 'statfs' function. */ #undef HAVE_STATFS -/* Define to 1 if you have the `statvfs' function. */ +/* Define to 1 if you have the 'statvfs' function. */ #undef HAVE_STATVFS /* 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 -/* Define to 1 if you have the `stime' function. */ +/* Define to 1 if you have the 'stime' function. */ #undef HAVE_STIME -/* Define to 1 if you have the `strcasestr' function. */ +/* Define to 1 if you have the 'strcasestr' function. */ #undef HAVE_STRCASESTR -/* Define to 1 if you have the `strdup' function. */ +/* Define to 1 if you have the 'strdup' function. */ #undef HAVE_STRDUP -/* Define to 1 if you have the `strerror' function. */ +/* Define to 1 if you have the 'strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the header file. */ @@ -917,263 +1004,266 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H -/* Define to 1 if you have the `strlcat' function. */ +/* Define to 1 if you have the 'strlcat' function. */ #undef HAVE_STRLCAT -/* Define to 1 if you have the `strlcpy' function. */ +/* Define to 1 if you have the 'strlcpy' function. */ #undef HAVE_STRLCPY -/* Define to 1 if you have the `strncasecmp' function. */ +/* Define to 1 if you have the 'strncasecmp' function. */ #undef HAVE_STRNCASECMP -/* Define to 1 if you have the `strtok_r' function. */ +/* Define to 1 if you have the 'strtok_r' function. */ #undef HAVE_STRTOK_R -/* Define to 1 if you have the `strtol' function. */ +/* Define to 1 if you have the 'strtol' function. */ #undef HAVE_STRTOL -/* Define to 1 if you have the `strtoul' function. */ +/* Define to 1 if you have the 'strtoul' function. */ #undef HAVE_STRTOUL -/* Define to 1 if you have the `strtoull' function. */ +/* Define to 1 if you have the 'strtoull' function. */ #undef HAVE_STRTOULL -/* Define to 1 if `at_next' is a member of `struct arphd'. */ +/* Define to 1 if 'at_next' is a member of 'struct arphd'. */ #undef HAVE_STRUCT_ARPHD_AT_NEXT -/* Define to 1 if `weak_key' is a member of `struct des_ks_struct'. */ +/* Define to 1 if 'weak_key' is a member of 'struct des_ks_struct'. */ #undef HAVE_STRUCT_DES_KS_STRUCT_WEAK_KEY -/* Define to 1 if `d_type' is a member of `struct dirent'. */ +/* Define to 1 if 'd_type' is a member of 'struct dirent'. */ #undef HAVE_STRUCT_DIRENT_D_TYPE -/* Define to 1 if `speed_hi' is a member of `struct ethtool_cmd'. */ +/* Define to 1 if 'speed_hi' is a member of 'struct ethtool_cmd'. */ #undef HAVE_STRUCT_ETHTOOL_CMD_SPEED_HI -/* Define to 1 if `ifa_next' is a member of `struct ifaddr'. */ +/* Define to 1 if 'ifa_next' is a member of 'struct ifaddr'. */ #undef HAVE_STRUCT_IFADDR_IFA_NEXT -/* Define to 1 if `if_addrhead.tqh_first' is a member of `struct ifnet'. */ +/* Define to 1 if 'if_addrhead.tqh_first' is a member of 'struct ifnet'. */ #undef HAVE_STRUCT_IFNET_IF_ADDRHEAD_TQH_FIRST -/* Define to 1 if `if_addrlist' is a member of `struct ifnet'. */ +/* Define to 1 if 'if_addrlist' is a member of 'struct ifnet'. */ #undef HAVE_STRUCT_IFNET_IF_ADDRLIST -/* Define to 1 if `if_baudrate' is a member of `struct ifnet'. */ +/* Define to 1 if 'if_baudrate' is a member of 'struct ifnet'. */ #undef HAVE_STRUCT_IFNET_IF_BAUDRATE -/* Define to 1 if `if_baudrate.ifs_value' is a member of `struct ifnet'. */ +/* Define to 1 if 'if_baudrate.ifs_value' is a member of 'struct ifnet'. */ #undef HAVE_STRUCT_IFNET_IF_BAUDRATE_IFS_VALUE -/* Define to 1 if `if_ibytes' is a member of `struct ifnet'. */ +/* Define to 1 if 'if_ibytes' is a member of 'struct ifnet'. */ #undef HAVE_STRUCT_IFNET_IF_IBYTES -/* Define to 1 if `if_imcasts' is a member of `struct ifnet'. */ +/* Define to 1 if 'if_imcasts' is a member of 'struct ifnet'. */ #undef HAVE_STRUCT_IFNET_IF_IMCASTS -/* Define to 1 if `if_iqdrops' is a member of `struct ifnet'. */ +/* Define to 1 if 'if_iqdrops' is a member of 'struct ifnet'. */ #undef HAVE_STRUCT_IFNET_IF_IQDROPS -/* Define to 1 if `if_lastchange.tv_nsec' is a member of `struct ifnet'. */ +/* Define to 1 if 'if_lastchange.tv_nsec' is a member of 'struct ifnet'. */ #undef HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_NSEC -/* Define to 1 if `if_lastchange.tv_sec' is a member of `struct ifnet'. */ +/* Define to 1 if 'if_lastchange.tv_sec' is a member of 'struct ifnet'. */ #undef HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_SEC -/* Define to 1 if `if_mtu' is a member of `struct ifnet'. */ +/* Define to 1 if 'if_mtu' is a member of 'struct ifnet'. */ #undef HAVE_STRUCT_IFNET_IF_MTU -/* Define to 1 if `if_noproto' is a member of `struct ifnet'. */ +/* Define to 1 if 'if_noproto' is a member of 'struct ifnet'. */ #undef HAVE_STRUCT_IFNET_IF_NOPROTO -/* Define to 1 if `if_obytes' is a member of `struct ifnet'. */ +/* Define to 1 if 'if_obytes' is a member of 'struct ifnet'. */ #undef HAVE_STRUCT_IFNET_IF_OBYTES -/* Define to 1 if `if_omcasts' is a member of `struct ifnet'. */ +/* Define to 1 if 'if_omcasts' is a member of 'struct ifnet'. */ #undef HAVE_STRUCT_IFNET_IF_OMCASTS -/* Define to 1 if `if_speed' is a member of `struct ifnet'. */ +/* Define to 1 if 'if_speed' is a member of 'struct ifnet'. */ #undef HAVE_STRUCT_IFNET_IF_SPEED -/* Define to 1 if `if_type' is a member of `struct ifnet'. */ +/* Define to 1 if 'if_type' is a member of 'struct ifnet'. */ #undef HAVE_STRUCT_IFNET_IF_TYPE -/* Define to 1 if `if_xname' is a member of `struct ifnet'. */ +/* 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'. */ +/* 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'. */ +/* 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'. */ +/* Define to 1 if 'ip6s_exthdrtoolong ' is a member of 'struct ip6stat'. */ #undef HAVE_STRUCT_IP6STAT_IP6S_EXTHDRTOOLONG_ -/* Define to 1 if `ips_cantforward' is a member of `struct ipstat'. */ +/* Define to 1 if 'ips_cantforward' is a member of 'struct ipstat'. */ #undef HAVE_STRUCT_IPSTAT_IPS_CANTFORWARD -/* Define to 1 if `ips_cantfrag' is a member of `struct ipstat'. */ +/* Define to 1 if 'ips_cantfrag' is a member of 'struct ipstat'. */ #undef HAVE_STRUCT_IPSTAT_IPS_CANTFRAG -/* Define to 1 if `ips_delivered' is a member of `struct ipstat'. */ +/* Define to 1 if 'ips_delivered' is a member of 'struct ipstat'. */ #undef HAVE_STRUCT_IPSTAT_IPS_DELIVERED -/* Define to 1 if `ips_fragdropped' is a member of `struct ipstat'. */ +/* Define to 1 if 'ips_fragdropped' is a member of 'struct ipstat'. */ #undef HAVE_STRUCT_IPSTAT_IPS_FRAGDROPPED -/* Define to 1 if `ips_fragmented' is a member of `struct ipstat'. */ +/* Define to 1 if 'ips_fragmented' is a member of 'struct ipstat'. */ #undef HAVE_STRUCT_IPSTAT_IPS_FRAGMENTED -/* Define to 1 if `ips_fragtimeout' is a member of `struct ipstat'. */ +/* Define to 1 if 'ips_fragtimeout' is a member of 'struct ipstat'. */ #undef HAVE_STRUCT_IPSTAT_IPS_FRAGTIMEOUT -/* Define to 1 if `ips_localout' is a member of `struct ipstat'. */ +/* Define to 1 if 'ips_localout' is a member of 'struct ipstat'. */ #undef HAVE_STRUCT_IPSTAT_IPS_LOCALOUT -/* Define to 1 if `ips_noproto' is a member of `struct ipstat'. */ +/* Define to 1 if 'ips_noproto' is a member of 'struct ipstat'. */ #undef HAVE_STRUCT_IPSTAT_IPS_NOPROTO -/* Define to 1 if `ips_noroute' is a member of `struct ipstat'. */ +/* Define to 1 if 'ips_noroute' is a member of 'struct ipstat'. */ #undef HAVE_STRUCT_IPSTAT_IPS_NOROUTE -/* Define to 1 if `ips_odropped' is a member of `struct ipstat'. */ +/* Define to 1 if 'ips_odropped' is a member of 'struct ipstat'. */ #undef HAVE_STRUCT_IPSTAT_IPS_ODROPPED -/* Define to 1 if `ips_ofragments' is a member of `struct ipstat'. */ +/* Define to 1 if 'ips_ofragments' is a member of 'struct ipstat'. */ #undef HAVE_STRUCT_IPSTAT_IPS_OFRAGMENTS -/* Define to 1 if `ips_reassembled' is a member of `struct ipstat'. */ +/* Define to 1 if 'ips_reassembled' is a member of 'struct ipstat'. */ #undef HAVE_STRUCT_IPSTAT_IPS_REASSEMBLED -/* Define to 1 if `m_clfree' is a member of `struct mbstat'. */ +/* Define to 1 if 'm_clfree' is a member of 'struct mbstat'. */ #undef HAVE_STRUCT_MBSTAT_M_CLFREE -/* Define to 1 if `m_clusters' is a member of `struct mbstat'. */ +/* Define to 1 if 'm_clusters' is a member of 'struct mbstat'. */ #undef HAVE_STRUCT_MBSTAT_M_CLUSTERS -/* Define to 1 if `m_mbufs' is a member of `struct mbstat'. */ +/* Define to 1 if 'm_mbufs' is a member of 'struct mbstat'. */ #undef HAVE_STRUCT_MBSTAT_M_MBUFS -/* Define to 1 if `n_value' is a member of `struct nlist64'. */ +/* Define to 1 if 'n_value' is a member of 'struct nlist64'. */ #undef HAVE_STRUCT_NLIST64_N_VALUE -/* Define to 1 if `n_value' is a member of `struct nlist'. */ +/* Define to 1 if 'n_value' is a member of 'struct nlist'. */ #undef HAVE_STRUCT_NLIST_N_VALUE -/* Define to 1 if `rt_dst' is a member of `struct rtentry'. */ +/* Define to 1 if 'rt_dst' is a member of 'struct rtentry'. */ #undef HAVE_STRUCT_RTENTRY_RT_DST -/* Define to 1 if `rt_hash' is a member of `struct rtentry'. */ +/* Define to 1 if 'rt_hash' is a member of 'struct rtentry'. */ #undef HAVE_STRUCT_RTENTRY_RT_HASH -/* Define to 1 if `rt_next' is a member of `struct rtentry'. */ +/* Define to 1 if 'rt_next' is a member of 'struct rtentry'. */ #undef HAVE_STRUCT_RTENTRY_RT_NEXT -/* Define to 1 if `rt_refcnt' is a member of `struct rtentry'. */ +/* Define to 1 if 'rt_refcnt' is a member of 'struct rtentry'. */ #undef HAVE_STRUCT_RTENTRY_RT_REFCNT -/* Define to 1 if `rt_unit' is a member of `struct rtentry'. */ +/* Define to 1 if 'rt_unit' is a member of 'struct rtentry'. */ #undef HAVE_STRUCT_RTENTRY_RT_UNIT -/* Define to 1 if `rt_use' is a member of `struct rtentry'. */ +/* Define to 1 if 'rt_use' is a member of 'struct rtentry'. */ #undef HAVE_STRUCT_RTENTRY_RT_USE -/* Define to 1 if `sa_sigaction' is a member of `struct sigaction'. */ +/* Define to 1 if 'sa_sigaction' is a member of 'struct sigaction'. */ #undef HAVE_STRUCT_SIGACTION_SA_SIGACTION -/* Define to 1 if `sin6_scope_id' is a member of `struct sockaddr_in6'. */ +/* Define to 1 if 'sin6_scope_id' is a member of 'struct sockaddr_in6'. */ #undef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID -/* Define to 1 if `sa_len' is a member of `struct sockaddr'. */ +/* Define to 1 if 'sa_len' is a member of 'struct sockaddr'. */ #undef HAVE_STRUCT_SOCKADDR_SA_LEN -/* Define to 1 if `sa_union.sa_generic.sa_family2' is a member of `struct +/* Define to 1 if 'sa_union.sa_generic.sa_family2' is a member of 'struct sockaddr'. */ #undef HAVE_STRUCT_SOCKADDR_SA_UNION_SA_GENERIC_SA_FAMILY2 -/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */ +/* Define to 1 if 'ss_family' is a member of 'struct sockaddr_storage'. */ #undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY -/* Define to 1 if `__ss_family' is a member of `struct sockaddr_storage'. */ +/* Define to 1 if '__ss_family' is a member of 'struct sockaddr_storage'. */ #undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY -/* Define to 1 if `f_favail' is a member of `struct statfs'. */ +/* Define to 1 if 'f_favail' is a member of 'struct statfs'. */ #undef HAVE_STRUCT_STATFS_F_FAVAIL -/* Define to 1 if `f_ffree' is a member of `struct statfs'. */ +/* Define to 1 if 'f_ffree' is a member of 'struct statfs'. */ #undef HAVE_STRUCT_STATFS_F_FFREE -/* Define to 1 if `f_files' is a member of `struct statfs'. */ +/* Define to 1 if 'f_files' is a member of 'struct statfs'. */ #undef HAVE_STRUCT_STATFS_F_FILES -/* Define to 1 if `f_flags' is a member of `struct statfs'. */ +/* Define to 1 if 'f_flags' is a member of 'struct statfs'. */ #undef HAVE_STRUCT_STATFS_F_FLAGS -/* Define to 1 if `f_frsize' is a member of `struct statfs'. */ +/* Define to 1 if 'f_frsize' is a member of 'struct statfs'. */ #undef HAVE_STRUCT_STATFS_F_FRSIZE -/* Define to 1 if `f_files' is a member of `struct statvfs'. */ +/* Define to 1 if 'f_files' is a member of 'struct statvfs'. */ #undef HAVE_STRUCT_STATVFS_F_FILES -/* Define to 1 if `f_frsize' is a member of `struct statvfs'. */ +/* Define to 1 if 'f_frsize' is a member of 'struct statvfs'. */ #undef HAVE_STRUCT_STATVFS_F_FRSIZE -/* Define to 1 if `mnt_dir' is a member of `struct statvfs'. */ +/* Define to 1 if 'mnt_dir' is a member of 'struct statvfs'. */ #undef HAVE_STRUCT_STATVFS_MNT_DIR -/* Define to 1 if `sw_nblksenabled' is a member of `struct swdevt'. */ +/* Define to 1 if 'sw_nblksenabled' is a member of 'struct swdevt'. */ #undef HAVE_STRUCT_SWDEVT_SW_NBLKSENABLED -/* Define to 1 if `tcp_rcvmemdrop' is a member of `struct tcpstat'. */ +/* Define to 1 if 'tcp_rcvmemdrop' is a member of 'struct tcpstat'. */ #undef HAVE_STRUCT_TCPSTAT_TCP_RCVMEMDROP -/* Define to 1 if `tz_dsttime' is a member of `struct timezone'. */ +/* Define to 1 if 'tz_dsttime' is a member of 'struct timezone'. */ #undef HAVE_STRUCT_TIMEZONE_TZ_DSTTIME -/* Define to 1 if `tm_gmtoff' is a member of `struct tm'. */ +/* 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'. */ +/* 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'. */ +/* Define to 1 if 'udps_discard' is a member of 'struct udpstat'. */ #undef HAVE_STRUCT_UDPSTAT_UDPS_DISCARD -/* Define to 1 if `udps_fullsock' is a member of `struct udpstat'. */ +/* Define to 1 if 'udps_fullsock' is a member of 'struct udpstat'. */ #undef HAVE_STRUCT_UDPSTAT_UDPS_FULLSOCK -/* Define to 1 if `udps_ipackets' is a member of `struct udpstat'. */ +/* Define to 1 if 'udps_ipackets' is a member of 'struct udpstat'. */ #undef HAVE_STRUCT_UDPSTAT_UDPS_IPACKETS -/* Define to 1 if `udps_noport' is a member of `struct udpstat'. */ +/* Define to 1 if 'udps_noport' is a member of 'struct udpstat'. */ #undef HAVE_STRUCT_UDPSTAT_UDPS_NOPORT -/* Define to 1 if `udps_noportbcast' is a member of `struct udpstat'. */ +/* Define to 1 if 'udps_noportbcast' is a member of 'struct udpstat'. */ #undef HAVE_STRUCT_UDPSTAT_UDPS_NOPORTBCAST -/* Define to 1 if `udps_opackets' is a member of `struct udpstat'. */ +/* Define to 1 if 'udps_opackets' is a member of 'struct udpstat'. */ #undef HAVE_STRUCT_UDPSTAT_UDPS_OPACKETS -/* Define to 1 if `pgswapin' is a member of `struct uvmexp'. */ +/* Define to 1 if 'pgswapin' is a member of 'struct uvmexp'. */ #undef HAVE_STRUCT_UVMEXP_PGSWAPIN -/* Define to 1 if you have the `sysconf' function. */ +/* Define to 1 if you have the 'sysconf' function. */ #undef HAVE_SYSCONF /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_H -/* Define to 1 if you have the `system' function. */ +/* Define to 1 if you have the 'system' function. */ #undef HAVE_SYSTEM +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_CALLOUT_H + /* 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'. +/* Define to 1 if you have the header file, and it defines 'DIR'. */ #undef HAVE_SYS_DIR_H @@ -1225,10 +1315,13 @@ /* 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'. +/* 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_OSD_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H @@ -1355,10 +1448,10 @@ /* 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. */ +/* Define to 1 if you have the 'tcgetattr' function. */ #undef HAVE_TCGETATTR -/* Define to 1 if you have the `times' function. */ +/* Define to 1 if you have the 'times' function. */ #undef HAVE_TIMES /* Define to 1 if you have the `TLSv1_method' function. */ @@ -1382,22 +1475,22 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UFS_UFS_QUOTA_H -/* Define to 1 if the system has the type `uintmax_t'. */ +/* Define to 1 if the system has the type 'uintmax_t'. */ #undef HAVE_UINTMAX_T -/* Define to 1 if the system has the type `uintptr_t'. */ +/* Define to 1 if the system has the type 'uintptr_t'. */ #undef HAVE_UINTPTR_T -/* Define to 1 if you have the `uname' function. */ +/* 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 the system has the type `unsigned long long int'. */ +/* Define to 1 if the system has the type 'unsigned long long int'. */ #undef HAVE_UNSIGNED_LONG_LONG_INT -/* Define to 1 if you have the `usleep' function. */ +/* Define to 1 if you have the 'usleep' function. */ #undef HAVE_USLEEP /* Define to 1 if you have the header file. */ @@ -1421,6 +1514,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 @@ -1433,9 +1532,18 @@ /* 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 this macro if EVP_MD_CTX_init() returns void */ +#undef HAVE_VOID_EVP_MD_CTX_INIT + +/* 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 @@ -1445,6 +1553,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_WINSOCK_H +/* Define to 1 if you have the header file. */ +#undef HAVE_WOLFSSL_WOLFCRYPT_ASN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_WOLFSSL_WOLFCRYPT_LOGGING_H + /* Define to 1 if you have the header file. */ #undef HAVE_WS2TCPIP_H @@ -1571,6 +1685,9 @@ /* 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 @@ -1690,7 +1807,7 @@ withOUT arguments */ #undef PSCMD -/* Define as the return type of signal handlers (`int' or `void'). */ +/* Define as the return type of signal handlers ('int' or 'void'). */ #undef RETSIGTYPE /* define rtentry to ortentry on SYSV machines (alphas) */ @@ -1703,22 +1820,22 @@ function */ #undef SECOND_APPVERIFY_COOKIE_CB_ARG_QUALIFIER -/* The size of `int', as computed by sizeof. */ +/* The size of 'int', as computed by sizeof. */ #undef SIZEOF_INT -/* The size of `intmax_t', as computed by sizeof. */ +/* The size of 'intmax_t', as computed by sizeof. */ #undef SIZEOF_INTMAX_T -/* The size of `long', as computed by sizeof. */ +/* The size of 'long', as computed by sizeof. */ #undef SIZEOF_LONG -/* The size of `long long', as computed by sizeof. */ +/* The size of 'long long', as computed by sizeof. */ #undef SIZEOF_LONG_LONG -/* The size of `short', as computed by sizeof. */ +/* The size of 'short', as computed by sizeof. */ #undef SIZEOF_SHORT -/* The size of `sockaddr_un.sun_path', as computed by sizeof. */ +/* The size of 'sockaddr_un.sun_path', as computed by sizeof. */ #undef SIZEOF_SOCKADDR_UN_SUN_PATH /* If using the C implementation of alloca, define if you know the @@ -1733,54 +1850,117 @@ 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 C89 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 */ #undef UNAMEPROG -/* Enable extensions on AIX 3, Interix. */ +/* Enable extensions on AIX, Interix, z/OS. */ #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 C23 Annex F. */ +#ifndef __STDC_WANT_IEC_60559_EXT__ +# undef __STDC_WANT_IEC_60559_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 C23 Annex H and 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 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 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. */ @@ -1796,14 +1976,14 @@ #define below would cause a syntax error. */ #undef _UINT8_T -/* Define to empty if `const' does not conform to ANSI C. */ +/* 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 +/* Define to '__inline__' or '__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline @@ -1833,13 +2013,13 @@ if such a type exists, and if the system does not define it. */ #undef intptr_t -/* Define to `long int' if does not define. */ +/* 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. */ +/* Define as 'unsigned int' if doesn't define. */ #undef size_t /* Define to the type of an unsigned integer type of width exactly 16 bits if @@ -1870,7 +2050,11 @@ /* If you have openssl 0.9.7 or above, you likely have AES support. */ #undef NETSNMP_USE_OPENSSL -#if (defined(NETSNMP_USE_OPENSSL) && defined(HAVE_OPENSSL_AES_H) && defined(HAVE_AES_CFB128_ENCRYPT)) || defined(NETSNMP_USE_INTERNAL_CRYPTO) +#if (defined(NETSNMP_USE_OPENSSL) && \ + defined(HAVE_OPENSSL_AES_H) && \ + defined(HAVE_AES_CFB128_ENCRYPT) && \ + defined(HAVE_EVP_AES_128_CFB)) || \ + defined(NETSNMP_USE_INTERNAL_CRYPTO) #define HAVE_AES 1 #endif @@ -1888,35 +2072,6 @@ #endif /* NETSNMP_NO_AUTOCONF_DEFINITIONS */ -/* - * 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 using - * an expression that can be evaluated at compile time. To do: add support for - * other compilers than gcc that do not support statement expressions. - */ -#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 -# define NETSNMP_BIGENDIAN \ - (__extension__ \ - ({ \ - union { unsigned long l; unsigned char c; } u; \ - \ - u.l = 1; \ - u.c == 0; \ - }) \ - ) -#endif - - - /* ********* NETSNMP_MARK_BEGIN_CLEAN_NAMESPACE ********* */ /* @@ -2342,6 +2497,32 @@ #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 *********/ /* @@ -2497,6 +2678,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/vendor/include/net-snmp/net-snmp-features.h b/vendor/include/net-snmp/net-snmp-features.h index 0d53d5b..91b45c1 100644 --- a/vendor/include/net-snmp/net-snmp-features.h +++ b/vendor/include/net-snmp/net-snmp-features.h @@ -21,12 +21,12 @@ /* prototypes always needed */ #ifndef NETSNMP_FEATURE_CHECKING -#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 +#define netsnmp_feature_provide(X) struct netsnmp_unused_struct +#define netsnmp_feature_require(X) struct netsnmp_unused_struct +#define netsnmp_feature_want(X) struct netsnmp_unused_struct +#define netsnmp_feature_child_of(X, Y) struct netsnmp_unused_struct #endif -#define netsnmp_feature_unused(X) extern char netsnmp_feature_unused_ ## X +#define netsnmp_feature_unused(X) struct netsnmp_unused_struct #endif /* NETSNMP_FEATURES_H */ diff --git a/vendor/include/net-snmp/net-snmp-includes.h b/vendor/include/net-snmp/net-snmp-includes.h index fdefc11..e0d47dc 100644 --- a/vendor/include/net-snmp/net-snmp-includes.h +++ b/vendor/include/net-snmp/net-snmp-includes.h @@ -12,7 +12,7 @@ #error "Please include before this file" #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include diff --git a/vendor/include/net-snmp/output_api.h b/vendor/include/net-snmp/output_api.h index 3b14285..3257811 100644 --- a/vendor/include/net-snmp/output_api.h +++ b/vendor/include/net-snmp/output_api.h @@ -47,8 +47,6 @@ extern "C" { NETSNMP_IMPORT int snmp_get_do_logging( void); NETSNMP_IMPORT - void netsnmp_logging_restart(void); - NETSNMP_IMPORT void snmp_disable_log( void); NETSNMP_IMPORT void shutdown_snmp_logging( void); diff --git a/vendor/include/net-snmp/system/dragonfly.h b/vendor/include/net-snmp/system/dragonfly.h index 35d016b..5edb209 100644 --- a/vendor/include/net-snmp/system/dragonfly.h +++ b/vendor/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/vendor/include/net-snmp/system/dynix.h b/vendor/include/net-snmp/system/dynix.h index 63e979b..db06dcc 100644 --- a/vendor/include/net-snmp/system/dynix.h +++ b/vendor/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/vendor/include/net-snmp/system/freebsd15.h b/vendor/include/net-snmp/system/freebsd15.h new file mode 100644 index 0000000..e94e47a --- /dev/null +++ b/vendor/include/net-snmp/system/freebsd15.h @@ -0,0 +1,3 @@ +/* freebsd15 is a superset of freebsd14 */ +#include "freebsd14.h" +#define freebsd14 freebsd14 diff --git a/vendor/include/net-snmp/system/freebsd16.h b/vendor/include/net-snmp/system/freebsd16.h new file mode 100644 index 0000000..74b38d4 --- /dev/null +++ b/vendor/include/net-snmp/system/freebsd16.h @@ -0,0 +1,3 @@ +/* freebsd16 is a superset of freebsd15 */ +#include "freebsd15.h" +#define freebsd15 freebsd15 diff --git a/vendor/include/net-snmp/system/netbsd.h b/vendor/include/net-snmp/system/netbsd.h index 4dffbbc..b2c8c51 100644 --- a/vendor/include/net-snmp/system/netbsd.h +++ b/vendor/include/net-snmp/system/netbsd.h @@ -62,6 +62,9 @@ #define netbsd3 #endif +#if defined(netbsd10) && !defined(netbsd9) +#define netbsd9 netbsd9 +#endif #if defined(netbsd9) && !defined(netbsd8) #define netbsd8 netbsd8 #endif diff --git a/vendor/include/net-snmp/system/openbsd.h b/vendor/include/net-snmp/system/openbsd.h index 530bf71..6d36bad 100644 --- a/vendor/include/net-snmp/system/openbsd.h +++ b/vendor/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 */ diff --git a/vendor/include/net-snmp/system/openbsd7.h b/vendor/include/net-snmp/system/openbsd7.h new file mode 100644 index 0000000..1244fe4 --- /dev/null +++ b/vendor/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/vendor/include/net-snmp/system/openbsd8.h b/vendor/include/net-snmp/system/openbsd8.h new file mode 100644 index 0000000..7e08042 --- /dev/null +++ b/vendor/include/net-snmp/system/openbsd8.h @@ -0,0 +1,3 @@ +/* openbsd8 is a superset of all since openbsd3 */ +#include "openbsd7.h" +#define openbsd7 openbsd7 diff --git a/vendor/include/net-snmp/types.h b/vendor/include/net-snmp/types.h index d489f37..76809cd 100644 --- a/vendor/include/net-snmp/types.h +++ b/vendor/include/net-snmp/types.h @@ -23,6 +23,9 @@ #endif #include +#if defined(HAVE_SYS_SELECT_H) +#include +#endif #if defined(WIN32) && !defined(cygwin) typedef HANDLE netsnmp_pid_t; @@ -295,7 +298,7 @@ struct snmp_session { long version; /** Number of retries before timeout. */ int retries; - /** Number of uS until first timeout, then exponential backoff */ + /** Message timeout in μs before first retry and between retries */ long timeout; u_long flags; struct snmp_session *subsession; @@ -417,6 +420,11 @@ struct snmp_session { * XXX: or should we add a new field into this structure? */ void *myvoid; + + /** + * session specific user + */ + struct usmUser *sessUser; }; diff --git a/vendor/include/net-snmp/utilities.h b/vendor/include/net-snmp/utilities.h index 84569eb..85a7c71 100644 --- a/vendor/include/net-snmp/utilities.h +++ b/vendor/include/net-snmp/utilities.h @@ -27,7 +27,7 @@ #include #include -#if HAVE_GETOPT_H +#ifdef HAVE_GETOPT_H #include #else #include diff --git a/vendor/install-sh b/vendor/install-sh index 3f83ce9..5c9fd2d 100644 --- a/vendor/install-sh +++ b/vendor/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-writable /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/vendor/local/Makefile.in b/vendor/local/Makefile.in index 4b8a133..db8cfda 100644 --- a/vendor/local/Makefile.in +++ b/vendor/local/Makefile.in @@ -149,9 +149,9 @@ snmp-bridge-mib.made: $(srcdir)/snmp-bridge-mib touch snmp-bridge-mib.made; \ fi -checkbandwidth.made: checkbandwidth +checkbandwidth.made: $(srcdir)/checkbandwidth if test "x$(PERL)" != "x" ; then \ - $(PERL) -p -e 's%^#!.*/perl.*%#!$(PERL)%' checkbandwidth > checkbandwidth.made ; \ + $(PERL) -p -e 's%^#!.*/perl.*%#!$(PERL)%' $(srcdir)/checkbandwidth > checkbandwidth.made ; \ else \ touch checkbandwidth.made ; \ fi diff --git a/vendor/local/gittools/shell-functions b/vendor/local/gittools/shell-functions index 638c84e..eafcbfd 100644 --- a/vendor/local/gittools/shell-functions +++ b/vendor/local/gittools/shell-functions @@ -4,7 +4,7 @@ nsbuildroot=${nsbuildroot:=$HOME/ns-build-root} nsecho=${nsecho:=} -nsbranches=${nsbranches:="V5-4-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: "} diff --git a/vendor/local/mib2c-conf.d/mfd-access-container-cached-defines.m2i b/vendor/local/mib2c-conf.d/mfd-access-container-cached-defines.m2i index c2f15fc..af2a247 100644 --- a/vendor/local/mib2c-conf.d/mfd-access-container-cached-defines.m2i +++ b/vendor/local/mib2c-conf.d/mfd-access-container-cached-defines.m2i @@ -171,8 +171,8 @@ ${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 - * some other existing data, or peforming calculations to derive the data), + * If, however, the accessing the data involves more work (e.g. parsing + * some other existing data, or performing 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 * ${context}_row_prep() for populating data. @@ -479,9 +479,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 */ /** diff --git a/vendor/local/mib2c-conf.d/mfd-access-unsorted-external-defines.m2i b/vendor/local/mib2c-conf.d/mfd-access-unsorted-external-defines.m2i index 65ccb9b..b1e6a8b 100644 --- a/vendor/local/mib2c-conf.d/mfd-access-unsorted-external-defines.m2i +++ b/vendor/local/mib2c-conf.d/mfd-access-unsorted-external-defines.m2i @@ -287,8 +287,8 @@ _${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 - * some other existing data, or peforming calculations to derive the data), + * If, however, the accessing the data involves more work (e.g. parsing + * some other existing data, or performing 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 * ${context}_loop_get_data(). @@ -1006,8 +1006,8 @@ $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 - some other existing data, or peforming calculations to derive the data), + If, however, the accessing the data involves more work (e.g. parsing + some other existing data, or performing 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 ${context}_loop_get_data(). diff --git a/vendor/local/mib2c-conf.d/mfd-interactive-setup.m2c b/vendor/local/mib2c-conf.d/mfd-interactive-setup.m2c index 772f168..a01e8a5 100644 --- a/vendor/local/mib2c-conf.d/mfd-interactive-setup.m2c +++ b/vendor/local/mib2c-conf.d/mfd-interactive-setup.m2c @@ -44,9 +44,9 @@ There are no defaults for ${context}. Would you like to ## --------------------------------------------------- @ if $m2c_temp_writable == 1@ This table has writable columns. Do you want to generate -code for writeable columns, or restrict the table to read-only? +code for writable columns, or restrict the table to read-only? - 1) generate code with writeable columns [DEFAULT] + 1) generate code with writable columns [DEFAULT] 2) generate code with read-only columns @ prompt $ans Select your choice : @ diff --git a/vendor/local/mib2c-conf.d/mfd-interface.m2c b/vendor/local/mib2c-conf.d/mfd-interface.m2c index f40d462..4d8c4bc 100644 --- a/vendor/local/mib2c-conf.d/mfd-interface.m2c +++ b/vendor/local/mib2c-conf.d/mfd-interface.m2c @@ -996,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) && @@ -1429,7 +1429,7 @@ _mfd_${context}_commit(netsnmp_mib_handler *handler, if (rowreq_ctx->rowreq_flags & MFD_ROW_DIRTY) { /* - * if we successfully commited this row, set the dirty flag. Use the + * if we successfully committed this row, set the dirty flag. Use the * current value + 1 (i.e. dirty = # rows changed). * this is checked in post_request... */ diff --git a/vendor/local/mib2c-conf.d/mfd-persistence.m2i b/vendor/local/mib2c-conf.d/mfd-persistence.m2i index caeb2c7..83919fa 100644 --- a/vendor/local/mib2c-conf.d/mfd-persistence.m2i +++ b/vendor/local/mib2c-conf.d/mfd-persistence.m2i @@ -60,9 +60,7 @@ ${context}_container_should_save(${context}_rowreq_ctx * rowreq_ctx) static int _${context}_container_save_rows(int majorID, int minorID, void *serverarg, void *clientarg); static void _${context}_container_row_restore(const char *token, char *buf); -static int _${context}_container_row_save( - ${context}_rowreq_ctx *rowreq_ctx, - void *type); +static int _${context}_container_row_save(void *p, void *type); static char * _${context}_container_col_restore( ${context}_rowreq_ctx *rowreq_ctx, u_int col, char* buf); @@ -117,8 +115,7 @@ _${context}_container_save_rows(int majorID, int minorID, void *serverarg, void * save all rows */ CONTAINER_FOR_EACH((netsnmp_container*)clientarg, - (netsnmp_container_obj_func*)_${context}_container_row_save, - type); + _${context}_container_row_save, type); read_config_store((char*)type, sep); read_config_store((char*)type, "\n"); @@ -135,10 +132,10 @@ _${context}_container_save_rows(int majorID, int minorID, void *serverarg, void * _${context}_container_row_save */ static int -_${context}_container_row_save( - ${context}_rowreq_ctx *rowreq_ctx, - void *type) +_${context}_container_row_save(void *p, void *type) { + ${context}_rowreq_ctx *rowreq_ctx = p; + /* * Allocate space for a line with all data for a row. An * attempt is made to come up with a default maximum size, but diff --git a/vendor/local/mib2c-conf.d/mfd-top.m2c b/vendor/local/mib2c-conf.d/mfd-top.m2c index af45116..f2398fa 100644 --- a/vendor/local/mib2c-conf.d/mfd-top.m2c +++ b/vendor/local/mib2c-conf.d/mfd-top.m2c @@ -90,12 +90,12 @@ /* 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 */ diff --git a/vendor/local/mib2c-conf.d/parent-set.m2i b/vendor/local/mib2c-conf.d/parent-set.m2i index fcf775d..a1163a6 100644 --- a/vendor/local/mib2c-conf.d/parent-set.m2i +++ b/vendor/local/mib2c-conf.d/parent-set.m2i @@ -312,7 +312,7 @@ ${context}_commit( ${context}_rowreq_ctx *rowreq_ctx) @ end@ # foreach $node /* - * if we successfully commited this row, set the dirty flag. + * if we successfully committed this row, set the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags |= MFD_ROW_DIRTY; @@ -371,7 +371,7 @@ ${context}_undo_commit( ${context}_rowreq_ctx *rowreq_ctx) /* - * if we successfully un-commited this row, clear the dirty flag. + * if we successfully un-committed this row, clear the dirty flag. */ if (MFD_SUCCESS == rc) { rowreq_ctx->rowreq_flags &= ~MFD_ROW_DIRTY; diff --git a/vendor/local/mib2c-update b/vendor/local/mib2c-update index 42017e5..4282f33 100644 --- a/vendor/local/mib2c-update +++ b/vendor/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/vendor/local/mib2c.check_values.conf b/vendor/local/mib2c.check_values.conf index 28bff88..58f3bc1 100644 --- a/vendor/local/mib2c.check_values.conf +++ b/vendor/local/mib2c.check_values.conf @@ -19,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 diff --git a/vendor/local/mib2c.container.conf b/vendor/local/mib2c.container.conf index ed15461..5bc6843 100644 --- a/vendor/local/mib2c.container.conf +++ b/vendor/local/mib2c.container.conf @@ -834,8 +834,8 @@ ${i}_cache_load(netsnmp_cache * cache, void *vmagic) */ /** remove a row from the table */ static void -${i}_freeEntry_cb(${i}_entry *entry, void *magic) { - +${i}_freeEntry_cb(void *entry, void *magic) +{ ${i}_freeEntry(entry); } @@ -858,9 +858,7 @@ ${i}_cache_free(netsnmp_cache * cache, void *magic) /* * empty (but don't free) cache here */ - CONTAINER_CLEAR(container, - (netsnmp_container_obj_func*)${i}_freeEntry_cb, - NULL); + CONTAINER_CLEAR(container, ${i}_freeEntry_cb, NULL); } /* _cache_free */ #endif /* $i.uc_USE_CACHE */ @end@ diff --git a/vendor/local/mib2c.iterate_access.conf b/vendor/local/mib2c.iterate_access.conf index 4152d10..76c5ad3 100644 --- a/vendor/local/mib2c.iterate_access.conf +++ b/vendor/local/mib2c.iterate_access.conf @@ -11,8 +11,8 @@ #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); diff --git a/vendor/local/mib2c.table_data.conf b/vendor/local/mib2c.table_data.conf index 47639c8..0b784ef 100644 --- a/vendor/local/mib2c.table_data.conf +++ b/vendor/local/mib2c.table_data.conf @@ -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/vendor/local/net-snmp-cert b/vendor/local/net-snmp-cert index a45dc57..a4217a8 100644 --- a/vendor/local/net-snmp-cert +++ b/vendor/local/net-snmp-cert @@ -868,7 +868,7 @@ sub find_cfgdir { return NetSNMP::Cert::fq_rel_path($dir); } else { my @path = cfg_path(); - # search first for writeable tls dir + # search first for writable tls dir # for root search top down, for user bottom up while (@path) { $dir = ($> ? pop(@path): shift(@path)); @@ -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/vendor/local/snmp-bridge-mib b/vendor/local/snmp-bridge-mib index 880ea6b..c6a7fae 100644 --- a/vendor/local/snmp-bridge-mib +++ b/vendor/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/vendor/man/agentxtrap.1.def b/vendor/man/agentxtrap.1.def index 331325f..3eefa08 100644 --- a/vendor/man/agentxtrap.1.def +++ b/vendor/man/agentxtrap.1.def @@ -70,14 +70,14 @@ Unsigned Counter32 .TP .B s -OCTET STRING of chaacters +OCTET STRING of characters .TP .B x OCTET STRING, entered as a sequence of optionally space separated hexadecimal digit pairs .TP .B d -OCTET STRING, entered as a sequence of space separated decimal digits in the +OCTET STRING, entered as a sequence of space-separated decimal digits in the range 0 - 255 .TP .B n diff --git a/vendor/man/encode_keychange.1.def b/vendor/man/encode_keychange.1.def index 20f5cc3..b11bb86 100644 --- a/vendor/man/encode_keychange.1.def +++ b/vendor/man/encode_keychange.1.def @@ -35,7 +35,7 @@ standard input \fB\-or\-\fR user input from the terminal. .SH OPTIONS .TP \fB\-E\fR [0x]<\fIengineID\fR> EngineID used for Kul generation. -<\fIengineID\fR> is intepreted as a hex string when preceded by 0x, +<\fIengineID\fR> is interpreted as a hex string when preceded by 0x, otherwise it is treated as a text string. If no <\fIengineID\fR> is specified, it is constructed from the first IP address for the local host. diff --git a/vendor/man/mib2c-update.1.def b/vendor/man/mib2c-update.1.def index 52ece8a..f27f664 100644 --- a/vendor/man/mib2c-update.1.def +++ b/vendor/man/mib2c-update.1.def @@ -8,7 +8,7 @@ mib2c-update - script to merge custom code into updated mib2c code .PP Use mib2c-update to generate your mib2c code templates, and it will track the original code and the changes you make to the code. If the mib2c -template changes (bug fixes, enhances in later releases), re-running +template changes (bug fixes, enhancements in later releases), re-running mib2c will update the template and then attempt to re-apply your changes. .PP @@ -25,4 +25,4 @@ Additional mib2c options can be specified in UPDATE_MIB2C_OPTS. .SH BUGS .PP mib2c-update has only been tested on individual tables. Specifying -a scalar or and entire MIB might not work. +a scalar or an entire MIB might not work. diff --git a/vendor/man/mib2c.1.def b/vendor/man/mib2c.1.def index b9c1134..cc7ee79 100644 --- a/vendor/man/mib2c.1.def +++ b/vendor/man/mib2c.1.def @@ -32,7 +32,7 @@ code files. Thus, mib2c generates a template that you can edit to add logic necessary to obtain information from the operating system or application to complete the module. .PP -MIBNODE is the top level mib node you want to generate code for. +MIBNODE is the top-level mib node you want to generate code for. You must give mib2c a mib node (e.g. ifTable) on the command line, not a mib file. This is the single most common mistake. .PP @@ -119,7 +119,7 @@ GENERATING CODE FOR TABLES: The recommended configuration file for tables is the MIBs for Dummies, or MFD, configuration file. It hides as much of the SNMP details as possible, generating small, easy to understand functions. -It is also the most flexible and well documented configuration file. +It is also the most flexible and well-documented configuration file. See the agent/mibgroup/if-mib/ifTable/ifTable*.c files for an example: mib2c -c mib2c.mfd.conf MIBNODE @@ -133,7 +133,7 @@ example: mib2c -c mib2c.iterate.conf MIBNODE If your table data is kept in the agent (i.e. it's not located in -an external source) and is purely data driven (i.e. you do not need +an external source) and is purely data-driven (i.e. you do not need to perform any work when a set occurs). See the agent/mibgroup/examples/data_set.c file for an example of such a table: @@ -204,7 +204,7 @@ running indent on ucdDemoPublic.h running indent on ucdDemoPublic.c .PP The resulting ucdDemoPublic.c and ucdDemoPublic.h files are -generated the current working directory. +generated in the current working directory. .PP The following generates C template code for the header and implementation files for the module to implement TCP-MIB::tcpConnTable. diff --git a/vendor/man/mib2c.conf.5.in b/vendor/man/mib2c.conf.5.in index 8c6e065..1afe2d5 100644 --- a/vendor/man/mib2c.conf.5.in +++ b/vendor/man/mib2c.conf.5.in @@ -32,7 +32,7 @@ in that they start with a "$". They can be used for anything you want, but most typically they'll hold mib node names being processed by @foreach ...@ clauses. .PP -They also have a special properties when they are a mib node, such that +They also have a special property when they are a mib node, such that adding special suffixes to them will allow them to be interpreted in some fashion. The easiest way to understand this is through an example. If the variable 'x' contained the word 'ifType' then some diff --git a/vendor/man/net-snmp-create-v3-user.1.def b/vendor/man/net-snmp-create-v3-user.1.def index da6944c..556492e 100644 --- a/vendor/man/net-snmp-create-v3-user.1.def +++ b/vendor/man/net-snmp-create-v3-user.1.def @@ -1,14 +1,14 @@ -.TH net-snmp-create-v3-user 1 "17 Sep 2008" VVERSIONINFO "Net-SNMP" +.TH net-snmp-create-v3-user 1 "09 Aug 2024" VVERSIONINFO "Net-SNMP" .SH NAME net-snmp-create-v3-user \- create a SNMPv3 user in net-snmp configuration file .SH SYNOPSIS .PP -.B net-snmp-create-v3-user [-ro] [-a authpass] [-x privpass] [-X DES|AES] +.B net-snmp-create-v3-user [-ro] [-A authpass] [-a MD5|SHA|SHA-512|SHA-384|SHA-256|SHA-224] [-X privpass] [-x DES|AES|AES128] .B [username] .SH DESCRIPTION .PP The \fInet-snmp-create-v3-user\fP shell script is designed to create a -new user in net-snmp configuration file (/var/net-snmp/snmpd.conf by default). +new user in the net-snmp configuration file (/var/net-snmp/snmpd.conf by default). .SH OPTIONS .TP @@ -16,13 +16,16 @@ new user in net-snmp configuration file (/var/net-snmp/snmpd.conf by default). displays the net-snmp version number .TP \fB\-ro\fR -create an user with read-only permissions +create a user with read-only permissions .TP -\fB\-a authpass\fR +\fB\-A authpass\fR specify authentication password .TP -\fB\-x privpass\fR +\fB\-a MD5|SHA|SHA-512|SHA-384|SHA-256|SHA-224\fR +specify authentication algorithm +.TP +\fB\-X privpass\fR specify encryption password .TP -\fB\-X DES|AES\fR +\fB\-x DES|AES|AES128\fR specify encryption algorithm diff --git a/vendor/man/netsnmp_agent_api.3.def b/vendor/man/netsnmp_agent_api.3.def index 19efd00..96989c5 100644 --- a/vendor/man/netsnmp_agent_api.3.def +++ b/vendor/man/netsnmp_agent_api.3.def @@ -1,6 +1,6 @@ .TH NETSNMP_AGENT_API 3 "13 Aug 2010" VVERSIONINFO "Net-SNMP" .SH NAME -netsnmp_agent_api - embedding an agent into a external application +netsnmp_agent_api - embedding an agent into an external application .SH SYNOPSIS .nf #include @@ -29,7 +29,7 @@ main (int argc, char *argv[]) /* `yourappname' will be used to read yourappname.conf files. */ init_snmp("yourappname"); - /* If we're going to be a SNMP master agent... */ + /* If we're going to be an SNMP master agent... */ if (!agentx_subagent) init_master_agent(); /* Listen on default port (161). */ @@ -50,10 +50,10 @@ $(CC) ... `net\-snmp\-config \-\-agent\-libs` .fi .SH DESCRIPTION .PP -Our goal is to create a easy to use interface to the Net-SNMP package +Our goal is to create an easy-to-use interface to the Net-SNMP package such that you can take code that you have written that has been designed to be a Net-SNMP MIB module and embed it into an external -application where you can either chose to be a SNMP master agent or an +application where you can either choose to be an SNMP master agent or an AgentX sub-agent using the same MIB module code. Our suggestion is that you use our (or another) SNMP agent as the AgentX master agent and chose to become an AgentX subagent which then attaches to the @@ -123,7 +123,7 @@ is non-zero, the function call will block until a packet arrives or an alarm must be run (see .IR snmp_alarm(3) ). The return value from this function is a positive integer if packets -were processed, zero if an alarm occurred and \-1 if an error occured. +were processed, zero if an alarm occurred and \-1 if an error occurred. .IP "snmp_shutdown(char *name);" This shuts down the agent, saving any needed persistent storage, etc. .SH "SEE ALSO" diff --git a/vendor/man/netsnmp_config_api.3.def b/vendor/man/netsnmp_config_api.3.def index 90b20d9..d4e0c1a 100644 --- a/vendor/man/netsnmp_config_api.3.def +++ b/vendor/man/netsnmp_config_api.3.def @@ -221,7 +221,7 @@ re-reading the configuration files. This function should free any resources allocated by the token handler function and reset its notion of the configuration to its default. The token handler function can then safely be called again. -No arguments are passed to the resource freeing handler. +No arguments are passed to the resource-freeing function. .br Note that this function is not called when the handler is unregistered individually (but \fIis\fP called as part of @@ -235,7 +235,7 @@ unregistered individually (but \fIis\fP called as part of .B register_app_prenetsnmp_mib_handler() .TP .B unregister_app_config_handler() -These functions are analagous to +These functions are analogous to .BR register_config_handler() ", " register_prenetsnmp_mib_handler() " and " .B unregister_config_handler() but do not require the file type argument (which is filled in by the @@ -283,7 +283,7 @@ In each such directory, the library will look for files named \fI app\fP\fC.conf\fP, \fI app\fP\fC.local.conf\fP, .br -(where \fIapp\fP is the appication-specific filePrefix used to +(where \fIapp\fP is the application-specific filePrefix used to register configuration handlers). It is not necessary for any or all of these files to be present in each directory. Missing files will be silently skipped. @@ -299,7 +299,7 @@ followed by \fC LIBDIR/snmp\fP, followed by \fC $HOME/.snmp\fP. This list can be changed by setting the environmental variable .I SNMPCONFPATH -to be a (colon separated) list of directories to search. +to be a (colon-separated) list of directories to search. .br .SS init_snmp() .PP @@ -311,7 +311,7 @@ configuration handlers, process any configuration tokens registered with .B register_prenetsnmp_mib_handler(), read in the textual MIB files using .B init_mib(), -and finally parse the configuration file tokens registered with +and finally, parse the configuration file tokens registered with .BR register_config_handler() . .PP If the @@ -324,7 +324,7 @@ The .I usageLine parameter passed to .B register_config_handler() -and similar calls, is used to display help information when the +and similar calls is used to display help information when the .B read_config_print_usage() function is called. This function is used by all of the applications when the @@ -358,12 +358,12 @@ both take an error string as an argument and print it to stderr along with the file and line number that caused the error. A call to the second function will also force .B read_configs() -to eventually return with an error code indicating to it's calling +to eventually return with an error code indicating to its calling function that it should abort the operation of the application. .SH "ENVIRONMENT VARIABLES" .TP 10 SNMPCONFPATH -A colon separated list of directories to search for configuration +A colon-separated list of directories to search for configuration files in. Default: .br diff --git a/vendor/man/netsnmp_mib_api.3.def b/vendor/man/netsnmp_mib_api.3.def index 4c297cd..153b531 100644 --- a/vendor/man/netsnmp_mib_api.3.def +++ b/vendor/man/netsnmp_mib_api.3.def @@ -152,7 +152,7 @@ search list (although any modules listed in the IMPORTS clause do). .B read_all_mibs will read in all the MIB modules found on the MIB directory search list. .PP -In general the parser is silent about what strangenesses it sees in +In general, the parser is silent about what strangenesses it sees in the MIB files. To get warnings reported, call .B snmp_set_mib_warnings with a @@ -248,9 +248,9 @@ take a similar object identifier and print out a version of the MIB definition for that object, together with the full OID. The .I width -argument controls how the OID is layed out. +argument controls how the OID is laid out. .PP -By default the parser does not save descriptions since they may be +By default, the parser does not save descriptions since they may be huge. In order to be able to print them, it is necessary to invoke .BI snmp_set_save_descriptions(1) before calling @@ -263,7 +263,7 @@ is to configure which MIB modules should be loaded, and where they are located. .TP 10 MIBDIRS -A colon separated list of directories to search for MIB modules. +A colon-separated list of directories to search for MIB modules. .br Default: DATADIR/snmp/mibs .br @@ -273,7 +273,7 @@ and (implicitly) by .BR read_mib . .TP 10 MIBS -A colon separated list of MIB modules to load. +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: @@ -299,7 +299,7 @@ Used by only. .TP 10 MIBFILES -A colon separated list of files to load. +A colon-separated list of files to load. .br Default: (none) .br diff --git a/vendor/man/snmpd.8.def b/vendor/man/snmpd.8.def index 5d47b6e..995c6e6 100644 --- a/vendor/man/snmpd.8.def +++ b/vendor/man/snmpd.8.def @@ -260,7 +260,7 @@ The SSH transport, on the server side, is actually just a unix named pipe that can be connected to via a ssh subsystem configured in the main ssh server. The pipe location (configurable with the sshtosnmpsocket token in snmp.conf) is -.I /var/net\-snmp/sshtosnmp. +.I PERSISTENT_DIRECTORY/sshdomainsocket. Packets should be submitted to it via the sshtosnmp application, which also sends the user ID as well when starting the connection. The TSM security model should be used when packets should process it. @@ -275,16 +275,16 @@ configuration file (which is normally using the following configuration line: .TP 8 .IP -Subsystem snmp /usr/local/bin/sshtosnmp +Subsystem snmp /usr/local/bin/sshtosnmp PERSISTENT_DIRECTORY/sshdomainsocket .IP The .I sshtosnmp command will need read/write access to the -.I /var/net\-snmp/sshtosnmp +.I PERSISTENT_DIRECTORY/sshdomainsocket pipe. Although it should be fairly safe to grant access to the average user since it still requires modifications to the ACM settings before the user can perform operations, paranoid administrators may -want to make the /var/net\-snmp directory accessible only by users in a +want to make the PERSISTENT_DIRECTORY directory accessible only by users in a particular group. Use the .I sshtosnmpsocketperms snmp.conf configure option to set the permissions, owner and group of diff --git a/vendor/man/snmpd.conf.5.def b/vendor/man/snmpd.conf.5.def index 7ce8a46..6acd8c7 100644 --- a/vendor/man/snmpd.conf.5.def +++ b/vendor/man/snmpd.conf.5.def @@ -89,9 +89,9 @@ population can not be trusted. In general, the total number of responses will not be allowed to 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. +the calculated number of repeats allowed to fit below this number. .IP -Also note that processing of maxGetbulkRepeats is handled first. +Also note that the 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) @@ -106,7 +106,7 @@ The default (without this configured) is to include all interfaces. 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 +(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 @@ -117,17 +117,17 @@ 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 -original defined with a "User-based Security Model" (USM) [RFC3414] -that required maintaining a SNMP-specific user database. This was +originally defined with a "User-based Security Model" (USM) [RFC3414] +that required maintaining an SNMP-specific user database. This was later determined to be troublesome to maintain and had some minor security issues. The IETF has since added additional security models to tunnel SNMP over SSH [RFC5592] and DTLS/TLS [RFC-to-be]. Net-SNMP contains robust support for SNMPv3/USM, SNMPv3/TLS, and SNMPv3/DTLS. It contains partial support for SNMPv3/SSH as well but has not been as extensively tested. It also contains code for support for an -experimental Kerberos based SNMPv3 that never got standardized. +experimental Kerberos-based SNMPv3 that never got standardized. .PP -Hopefully more SNMP software and devices will eventually support SNMP +Hopefully, more SNMP software and devices will eventually support SNMP over (D)TLS or SSH, but it is likely that devices with original support for SNMP will only contain support for USM users. If your network manager supports SNMP over (D)TLS or SNMP over SSH we suggest @@ -169,8 +169,8 @@ The default is to use eth0. SNMPv3 may be tunneled over TLS and DTLS. TLS runs over TCP and DTLS is the UDP equivalent. Wes Hardaker (the founder of Net-SNMP) performed a study and presented it at an IETF meeting that showed that -TCP based protocols are sufficient for stable networks but quickly -becomes a problem in unstable networks with even moderate levels of +TCP-based protocols are sufficient for stable networks but quickly +become a problem in unstable networks with even moderate levels of packet loss (~ 20-30%). If you are going to use TLS or DTLS, you should use the one appropriate for your networking environment. You should potentially turn them both on so your management system can @@ -191,7 +191,7 @@ certificate file. .IP "[snmp] tlsAlgorithms " This string will select the algorithms to use when negotiating security during (D)TLS session establishment. See the openssl manual -page ciphers(1) for details on the format. Examples strings include: +page ciphers(1) for details on the format. Example strings include: .RS .nf @@ -216,10 +216,10 @@ be noticed upon a restart of the snmpd agent. OPTIONS can be one of <\-\-sn SECNAME | \-\-rfc822 | \-\-dns | \-\-ip | \-\-cn | \-\-any>. .IP The certSecName token will specify how to map a certificate field from -the client's X.509 certificate to a SNMPv3 username. Use the \-\-sn +the client's X.509 certificate to an SNMPv3 username. Use the \-\-sn SECNAME flag to directly specify a securityName for a given certificate. The other flags extract a particular component of the -certificate for use as a snmpv3 securityName. These fields are one +certificate for use as an snmpv3 securityName. These fields are one of: A SubjectAltName containing an rfc822 value (eg hardaker@net\-snmp.org), A SubjectAltName containing a dns name value (eg foo.net\-snmp.org), an IP address (eg 192.0.2.1) or a common name "Wes Hardaker". The @@ -251,7 +251,7 @@ program as well as configure the access control settings to allow access through the tsm security model using the user name provided to snmpd by the ssh transport. .SS SNMPv3 with the Transport Security Model (TSM) -The Transport Security Model [RFC5591] defines a SNMPv3 security +The Transport Security Model [RFC5591] defines an SNMPv3 security system for use with "tunneled" security protocols like TLS, DTLS and SSH. It is a very simple security model that simply lets properly protected packets to pass through into the snmp application. The @@ -339,7 +339,7 @@ createUser myuser SHA \-m 0x0001020304050607080900010203040506070809 AES \-m 0x0 Due to the way localization happens, localized privacy keys are expected to be the length needed by the algorithm (128 bits for all supported algorithms). Master encryption keys, though, need to be the -length required by the authentication algorithm not the length +length required by the authentication algorithm, not the length required by the encrypting algorithm (MD5: 16 bytes, SHA: 20 bytes). .SH ACCESS CONTROL .B snmpd @@ -415,7 +415,7 @@ 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 +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 @@ -552,7 +552,7 @@ set the system location, system contact or system name (\fCsysLocation.0\fR, \fCsysContact.0\fR and \fCsysName.0\fR) for the agent respectively. Ordinarily these objects are writable via suitably authorized SNMP SET requests. However, specifying one of these directives makes the -corresponding object read-only, and attempts to SET it will result in +corresponding object read-only and attempts to SET it will result in a \fInotWritable\fR error response. .IP "sysServices NUMBER" sets the value of the \fCsysServices.0\fR object. @@ -580,7 +580,7 @@ can be used to remove already existing entries in \fCifTable\fR when an interface with the same name appears on the system. E.g. when ppp0 interface is removed, it is still listed in the table for \fIinterface_fadeout\fR seconds. This option ensures, that the old ppp0 interface is removed even -before the \fIinterface_fadeout\fR timeour when new ppp0 (with different +before the \fIinterface_fadeout\fR timeout when new ppp0 (with different \fCifIndex\fR) shows up. .SS Host Resources Group This requires that the agent was built with support for the @@ -608,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. @@ -622,7 +635,7 @@ as 'Fixed Disks', and this is still the default behaviour. Setting this directive to '1' reports such file systems as \'Network Disks', as required by the Host Resources MIB. .IP "realStorageUnits" -controlls how the agent reports hrStorageAllocationUnits, hrStorageSize and +controls how the agent reports hrStorageAllocationUnits, hrStorageSize and hrStorageUsed in hrStorageTable. For big storage drives with small allocation units the agent re-calculates these values so they all fit Integer32 and @@ -715,7 +728,7 @@ The threshold for individual disks can be adjusted using suitable \fIincludeAllDisks\fR directive). .RS .IP "Note:" -Whether \fIdisk\fR directives appears before or after \fIincludeAllDisks\fR +Whether \fIdisk\fR directives appear before or after \fIincludeAllDisks\fR may affect the indexing of the \fCdskTable\fR. .RE .IP @@ -750,12 +763,15 @@ e.g. "fd0" Excludes all Linux loopback block devices, whose names start with "loop", e.g. "loop0" .IP "diskio_exclude_ram yes" -Excludes all LInux ramdisk block devices, whose names start with "ram", e.g. -"ram0" +Excludes all Linux ramdisk block devices, whose names start with "ram", +e.g. "ram0" +.IP "diskio_exclude_md yes" +Excludes all Linux RAID block devices, whose names start with "md", +e.g. "md0" .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 +On Linux systems, it is also possible to report only explicitly whitelisted +devices. It may take a significant amount of time to process diskIOTable data +on systems with tens of thousands of block devices and whitelisting only the important ones avoids large CPU consumption. .IP "diskio " Enables acceptlist of devices and adds the device to the acceptlist. Only @@ -959,9 +975,9 @@ this directive makes this object read-only, and attempts to set the value via SET requests will result in a \fInotWritable\fR error response. .RE .IP "v1trapaddress HOST" -defines the agent address, which is inserted into SNMPv1 TRAPs. Arbitrary local -IPv4 address is chosen if this option is ommited. This option is useful mainly -when the agent is visible from outside world by specific address only (e.g. +defines the agent address, which is inserted into SNMPv1 TRAPs. An arbitrary local +IPv4 address is chosen if this option is omitted. This option is mainly useful +when the agent is visible from the outside world by a specific address only (e.g. because of network address translation or firewall). .SS "DisMan Event MIB" The previous directives can be used to configure where traps should @@ -1021,7 +1037,7 @@ defines an \fIexistence(0)\fR monitor test. A bare OID specifies a \fIpresent(0)\fR test, which will fire when (an instance of) the monitored OID is created. An expression of the form \fI! OID\fR specifies an \fIabsent(1)\fR test, -which will fire when the monitored OID is delected. +which will fire when the monitored OID is detected. An expression of the form \fI!= OID\fR specifies a \fIchanged(2)\fR test, which will fire whenever the monitored value(s) change. Note that there \fBmust\fP be whitespace before the OID token. @@ -1236,9 +1252,9 @@ backwards from the end of the month. configures a one-shot SET assignment, to be run at the first matching time as specified by the fields MINUTE to WEEKDAY. The interpretation of these fields is exactly the same as for the \fIcron\fR directive. -.SS "Data Delivery via Notfiications" -Note: this functionality is only available if the -\fIdeliver/deliverByNotify\fR mib module was complied in to the agent +.SS "Data Delivery via Notifications" +Note: This functionality is only available if the +\fIdeliver/deliverByNotify\fR mib module was compiled in to the agent .PP In some situations it may be advantageous to deliver SNMP data over SNMP Notifications (TRAPs and INFORMs) rather than the typical process @@ -1250,7 +1266,7 @@ incoming SNMP traffic. .PP It should be noted that although most management software is capable of logging notifications, very little (if any) management software -will updated their "knowledge database" based on the contents of SNMP +will update their "knowledge database" based on the contents of SNMP notifications. IE, it won't (for example) update the interface traffic counter history that is used to produce graphs. Most larger network management packages have a separate database for storing data @@ -1268,8 +1284,8 @@ This directive tells the SNMP agent to self-walk the \fIOID\fR, collect all the data and send it out every \fIFREQUENCY\fR seconds, where FREQUENCY is in seconds or optionally suffixed by one of s (for seconds), m (for minutes), h (for hours), d (for days), or w (for -weeks). By default scalars are included in the notification that -specify the how often the notification will be sent (unless the +weeks). By default, scalars are included in the notification that +specify how often the notification will be sent (unless the \fI\-p\fR option is specified) and which message number of how many messages a particular notification is (unless \fI\-m\fR is specified). To break the notifications into manageable packet sizes, use the @@ -1680,7 +1696,7 @@ causes it to only listen on 127.0.0.1 by default. SMUX uses the well-known TCP port 199. .PP Note the Net-SNMP agent will only operate as a SMUX \fImaster\fR -agent. It does not support acting in a SMUX subagent role. +agent. It does not support acting in an SMUX subagent role. .SS AgentX Sub-Agents The Net-SNMP agent supports the AgentX protocol (RFC 2741) in both master and subagent roles. @@ -1701,7 +1717,7 @@ Defines the permissions and ownership of the AgentX Unix Domain socket, and the parent directories of this socket. SOCKPERMS and DIRPERMS must be octal digits (see .I chmod(1) -). By default this socket will only be accessible to subagents which +). By default, this socket will only be accessible to subagents which have the same userid as the agent. .PP There is one directive specifically relevant to running as @@ -1742,7 +1758,7 @@ subagent. .IP "override [\-rw] OID TYPE VALUE" This directive allows you to override a particular OID with a different value (and possibly a different type of value). The \-rw -flag will allow snmp SETs to modify it's value as well. (note that if +flag will allow snmp SETs to modify its value as well. (note that if you're overriding original functionality, that functionality will be entirely lost. Thus SETS will do nothing more than modify the internal overridden value and will not perform any of the original @@ -1786,9 +1802,9 @@ The types of handlers available for insertion are: .RS .IP stash_cache Caches information returned from the lower level. This -greatly help the performance of the agent, at the cost -of caching the data such that its no longer "live" for -30 seconds (in this future, this will be configurable). +greatly helps the performance of the agent, at the cost +of caching the data such that it's no longer "live" for +30 seconds (in the future, this will be configurable). Note that this means snmpd will use more memory as well while the information is cached. Currently this only works for handlers registered using the table_iterator @@ -1848,7 +1864,7 @@ or any of \fI0\fR, \fIno\fR or \fIfalse\fR to disable it. The default in each case is for the feature to be turned off, so these directives are typically only used to enable the appropriate behaviour. .SH "EXAMPLE CONFIGURATION FILE" -See the EXAMPLE.CONF file in the top level source directory for a more +See the EXAMPLE.CONF file in the top-level source directory for a more detailed example of how the above information is used in real examples. .SH "FILES" diff --git a/vendor/man/snmpd.examples.5.def b/vendor/man/snmpd.examples.5.def index 3602869..873aac6 100644 --- a/vendor/man/snmpd.examples.5.def +++ b/vendor/man/snmpd.examples.5.def @@ -202,7 +202,7 @@ The same holds for the "combined subtree2 view defined below. In fact, a mask field is only needed when defining row slices across a table (or similar views), and can almost always be omitted. .PP -In general, it is advisible not to mix traditional and VACM-based +In general, it is advisable not to mix traditional and VACM-based access configuration settings, as these can sometimes interfere with each other in unexpected ways. Choose a particular style of access configuration, and stick to it. @@ -337,7 +337,7 @@ trap2sink localhost .fi .RE Alternatively, the second and third directives could be combined -(and an acknowledgement requested) using: +(and an acknowledgment requested) using: .RS informsink localhost public .RE @@ -470,7 +470,7 @@ cron 10 0 * * * versionUpdateConfig.0 = 1 .RE .PP The one-shot style of scheduling is rather less common, but the -secret SNMP virus could be activated on the next occurance of Friday 13th using: +secret SNMP virus could be activated on the next occurrence of Friday 13th using: .RS at 13 13 13 * 5 snmpVirus.0 = 1 .RE diff --git a/vendor/man/snmptrap.1.def b/vendor/man/snmptrap.1.def index 55c19d1..8040e74 100644 --- a/vendor/man/snmptrap.1.def +++ b/vendor/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/vendor/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt b/vendor/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt index 2f646cd..c31cd41 100644 --- a/vendor/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt +++ b/vendor/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt @@ -6,7 +6,7 @@ IMPORTS TEXTUAL-CONVENTION FROM SNMPv2-TC; ianaAddressFamilyNumbers MODULE-IDENTITY - LAST-UPDATED "201911040000Z" -- November 4, 2019 + LAST-UPDATED "202110190000Z" -- October 19, 2021 ORGANIZATION "IANA" CONTACT-INFO "Postal: Internet Assigned Numbers Authority @@ -23,6 +23,21 @@ ianaAddressFamilyNumbers MODULE-IDENTITY -- 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." @@ -108,6 +123,9 @@ AddressFamilyNumbers ::= TEXTUAL-CONVENTION 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 @@ -122,6 +140,8 @@ AddressFamilyNumbers ::= TEXTUAL-CONVENTION 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 @@ -156,6 +176,9 @@ AddressFamilyNumbers ::= TEXTUAL-CONVENTION mplsTpSectionEndpointIdentifier(26), mplsTpLspEndpointIdentifier(27), mplsTpPseudowireEndpointIdentifier(28), + mtipmultitopologyipversion4 (29), + mtipv6multitopologyipversion6 (30), + bgpSfc (31), eigrpCommonServiceFamily(16384), eigrpIpv4ServiceFamily(16385), eigrpIpv6ServiceFamily(16386), @@ -170,6 +193,8 @@ AddressFamilyNumbers ::= TEXTUAL-CONVENTION rBridgePortID(16395), trillNickname(16396), universallyUniqueIdentifier(16397), + routingPolicyAfi(16398), + mplsNamespaces(16399), reserved(65535) } END diff --git a/vendor/mibs/IANAifType-MIB.txt b/vendor/mibs/IANAifType-MIB.txt index 65227a5..c8e77c4 100644 --- a/vendor/mibs/IANAifType-MIB.txt +++ b/vendor/mibs/IANAifType-MIB.txt @@ -5,7 +5,7 @@ TEXTUAL-CONVENTION FROM SNMPv2-TC; ianaifType MODULE-IDENTITY - LAST-UPDATED "202004020000Z" -- April 2, 2020 + LAST-UPDATED "202208170000Z" -- August 17, 2022 ORGANIZATION "IANA" CONTACT-INFO " Internet Assigned Numbers Authority @@ -14,11 +14,33 @@ 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." @@ -44,10 +66,7 @@ DESCRIPTION "Added missing commas for 291-293." REVISION "201806280000Z" -- June 28, 2018 - DESCRIPTION "Registration of new IANAifType 294." - - REVISION "201806280000Z" -- June 28, 2018 - DESCRIPTION "Registration of new IANAifType 293." + DESCRIPTION "Registration of new IANAifTypes 293-294." REVISION "201806220000Z" -- June 22, 2018 DESCRIPTION "Registration of new IANAifType 292." @@ -362,7 +381,7 @@ Interface types must not be directly added to the IANAifType-MIB MIB module. They must instead be added - to the 'ifType definitions' registry at + to the 'Interface Types (ifType)' registry at https://www.iana.org/assignments/smi-numbers. The relationship between the assignment of ifType @@ -641,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 @@ -686,7 +705,11 @@ 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 + 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 @@ -727,24 +750,25 @@ IANAtunnelType ::= TEXTUAL-CONVENTION 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 - softwireMesh(16), -- softwire mesh tunnel - dsLite(17), -- DS-Lite tunnel - aplusp(18) -- A+P encapsulation + 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/vendor/mibs/LM-SENSORS-MIB.txt b/vendor/mibs/LM-SENSORS-MIB.txt index d0734b3..217fef7 100644 --- a/vendor/mibs/LM-SENSORS-MIB.txt +++ b/vendor/mibs/LM-SENSORS-MIB.txt @@ -17,13 +17,18 @@ IMPORTS FROM UCD-SNMP-MIB; lmSensorsMIB MODULE-IDENTITY - LAST-UPDATED "200011050000Z" + LAST-UPDATED "202411230000Z" ORGANIZATION "AdamsNames Ltd" CONTACT-INFO "Primary Contact: M J Oldfield email: m@mail.tc" DESCRIPTION "This MIB module defines objects for lm_sensor derived data." + + REVISION "202411230000Z" + DESCRIPTION + "Add the lmTempSensorsTemperature object to allow negative temperatures" + REVISION "200011050000Z" DESCRIPTION "Derived from DISKIO-MIB ex UCD." @@ -75,10 +80,22 @@ lmTempSensorsDevice OBJECT-TYPE lmTempSensorsValue OBJECT-TYPE SYNTAX Gauge32 MAX-ACCESS read-only - STATUS current + STATUS deprecated DESCRIPTION - "The temperature of this sensor in mC." + "The temperature of this sensor in mCel. + + Deprecated in favor of lmTempSensorsTemperature as temperatures can be + negative" ::= { lmTempSensorsEntry 3 } + +lmTempSensorsTemperature OBJECT-TYPE + SYNTAX Integer32 + UNITS "mCel" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The temperature of this sensor in mCel." + ::= { lmTempSensorsEntry 4 } -- lmFanSensorsTable OBJECT-TYPE diff --git a/vendor/mibs/Makefile.mib b/vendor/mibs/Makefile.mib index e6aaa7c..9109ba5 100644 --- a/vendor/mibs/Makefile.mib +++ b/vendor/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 \ @@ -84,6 +85,12 @@ SNMP-TLS-TM-MIB.txt: $(MIBDEPS) 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 diff --git a/vendor/mibs/SNMP-SSH-TM-MIB.txt b/vendor/mibs/SNMP-SSH-TM-MIB.txt new file mode 100644 index 0000000..4e0d828 --- /dev/null +++ b/vendor/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/vendor/mibs/SNMP-TLS-TM-MIB.txt b/vendor/mibs/SNMP-TLS-TM-MIB.txt index 848dff1..36cdaa6 100644 --- a/vendor/mibs/SNMP-TLS-TM-MIB.txt +++ b/vendor/mibs/SNMP-TLS-TM-MIB.txt @@ -4,72 +4,84 @@ IMPORTS MODULE-IDENTITY, OBJECT-TYPE, OBJECT-IDENTITY, mib-2, snmpDomains, Counter32, Unsigned32, Gauge32, NOTIFICATION-TYPE - FROM SNMPv2-SMI -- RFC 2578 or any update thereof + FROM SNMPv2-SMI -- RFC 2578 or any update thereof TEXTUAL-CONVENTION, TimeStamp, RowStatus, StorageType, AutonomousType - FROM SNMPv2-TC -- RFC 2579 or any update thereof + FROM SNMPv2-TC -- RFC 2579 or any update thereof MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP - FROM SNMPv2-CONF -- RFC 2580 or any update thereof + FROM SNMPv2-CONF -- RFC 2580 or any update thereof SnmpAdminString - FROM SNMP-FRAMEWORK-MIB -- RFC 3411 or any update thereof + FROM SNMP-FRAMEWORK-MIB -- RFC 3411 or any update thereof snmpTargetParamsName, snmpTargetAddrName - FROM SNMP-TARGET-MIB -- RFC 3413 or any update thereof + FROM SNMP-TARGET-MIB -- RFC 3413 or any update thereof ; snmpTlstmMIB MODULE-IDENTITY - LAST-UPDATED "201107190000Z" - - ORGANIZATION "ISMS Working Group" - CONTACT-INFO "WG-EMail: isms@lists.ietf.org - Subscribe: isms-request@lists.ietf.org - - Chairs: - Juergen Schoenwaelder - Jacobs University Bremen - Campus Ring 1 - 28725 Bremen - Germany - +49 421 200-3587 - j.schoenwaelder@jacobs-university.de - - Russ Mundy - SPARTA, Inc. - 7110 Samuel Morse Drive - Columbia, MD 21046 - USA - - Editor: - Wes Hardaker - SPARTA, Inc. - P.O. Box 382 - Davis, CA 95617 - USA - ietf@hardakers.net - " - DESCRIPTION " - The TLS Transport Model MIB - - Copyright (c) 2010-2011 IETF Trust and the persons identified + LAST-UPDATED "202311080000Z" + + ORGANIZATION "Operations and Management Area Working Group + " + CONTACT-INFO + "Author: Kenneth Vaughn + " + DESCRIPTION + "This is the MIB module for the TLS Transport Model + (TLSTM). + + Copyright (c) 2023 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)." + 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 Revised BSD License set forth in Section 4.c + of the IETF Trust's Legal Provisions Relating to IETF + Documents (https://trustee.ietf.org/license-info). + + The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', + 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', + 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document + are to be interpreted as described in BCP 14 (RFC 2119) + (RFC 8174) when, and only when, they appear in all + capitals, as shown here." + + REVISION "202311080000Z" + DESCRIPTION + "This version of this MIB module is part of + RFC 9456; see the RFC itself for full legal + notices. This version does the following: + + 1) Updates the definition of SnmpTLSFingerprint + to clarify the registry used for the one-octet + hash algorithm identifier. + + 2) Capitalizes key words in conformance with + BCP 14. + + 3) Replaces 'may not' with 'MUST NOT' to clarify + intent in several locations. + + 4) Replaces 'may not' with a clarification within + the definition of SnmpTLSAddress. + + 5) Applies cosmetic grammar improvements and + reformatting causing whitespace changes." REVISION "201107190000Z" - DESCRIPTION "This version of this MIB module is part of - RFC 6353; see the RFC itself for full legal - notices. The only change was to introduce - new wording to reflect require changes for - IDNA addresses in the SnmpTLSAddress TC." + DESCRIPTION + "This version of this MIB module is part of + RFC 6353; see the RFC itself for full legal + notices. The only change was to introduce + new wording to reflect required changes for + Internationalized Domain Names for Applications + (IDNA) addresses in the SnmpTLSAddress textual + convention (TC)." REVISION "201005070000Z" - DESCRIPTION "This version of this MIB module is part of - RFC 5953; see the RFC itself for full legal - notices." + DESCRIPTION + "This version of this MIB module is part of + RFC 5953; see the RFC itself for full legal + notices." ::= { mib-2 198 } -- ************************************************ @@ -80,6 +92,12 @@ snmpTlstmNotifications OBJECT IDENTIFIER ::= { snmpTlstmMIB 0 } snmpTlstmIdentities OBJECT IDENTIFIER ::= { snmpTlstmMIB 1 } snmpTlstmObjects OBJECT IDENTIFIER ::= { snmpTlstmMIB 2 } snmpTlstmConformance OBJECT IDENTIFIER ::= { snmpTlstmMIB 3 } +snmpTlstmHashAlgorithms OBJECT-IDENTITY + STATUS current + DESCRIPTION + "A node used to register hashing algorithm identifiers + recorded in the IANA 'SNMP-TLSTM HashAlgorithms' registry." + ::= { snmpTlstmMIB 4 } -- ************************************************ -- snmpTlstmObjects - Objects @@ -88,90 +106,95 @@ snmpTlstmConformance OBJECT IDENTIFIER ::= { snmpTlstmMIB 3 } snmpTLSTCPDomain OBJECT-IDENTITY STATUS current DESCRIPTION - "The SNMP over TLS via TCP transport domain. The + "The OBJECT IDENTIFIER representing the TDomain for the + SNMP over TLS via TCP transport domain. The corresponding transport address is of type SnmpTLSAddress. The securityName prefix to be associated with the - snmpTLSTCPDomain is 'tls'. This prefix may be used by + snmpTLSTCPDomain is 'tls'. This prefix MAY be used by security models or other components to identify which secure transport infrastructure authenticated a securityName." REFERENCE - "RFC 2579: Textual Conventions for SMIv2" + "TDomain, as defined in RFC 2579: Textual Conventions + for SMIv2" ::= { snmpDomains 8 } snmpDTLSUDPDomain OBJECT-IDENTITY STATUS current DESCRIPTION - "The SNMP over DTLS via UDP transport domain. The + "The OBJECT IDENTIFIER representing the TDomain for the + SNMP over DTLS via UDP transport domain. The corresponding transport address is of type SnmpTLSAddress. The securityName prefix to be associated with the - snmpDTLSUDPDomain is 'dtls'. This prefix may be used by + snmpDTLSUDPDomain is 'dtls'. This prefix MAY be used by security models or other components to identify which secure transport infrastructure authenticated a securityName." REFERENCE - "RFC 2579: Textual Conventions for SMIv2" + "TDomain, as defined in RFC 2579: Textual Conventions + for SMIv2" ::= { snmpDomains 9 } SnmpTLSAddress ::= TEXTUAL-CONVENTION DISPLAY-HINT "1a" STATUS current DESCRIPTION - "Represents an IPv4 address, an IPv6 address, or a - US-ASCII-encoded hostname and port number. - - 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 a colon-separated format (as described - in RFC 5952), 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. - - A hostname is always in US-ASCII (as per RFC 1123); - internationalized hostnames are encoded as A-labels as specified - in RFC 5890. 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. - - Values of this textual convention may not be directly usable - as transport-layer addressing information, and may require - run-time 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 SnmpTLSAddress 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 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." + "Represents an IPv4 address, an IPv6 address, or an + ASCII-encoded host name and port number. + + An IPv4 address MUST be in dotted decimal format followed + by a colon ':' (ASCII character 0x3A) and a decimal + port number in ASCII. + + An IPv6 address MUST be a colon-separated format (as + described in RFC 5952), surrounded by square brackets + ('[', ASCII character 0x5B, and ']', ASCII character + 0x5D), followed by a colon ':' (ASCII character 0x3A) + and a decimal port number in ASCII. + + A host name MUST be in ASCII (as per RFC 1123); + internationalized host names MUST be encoded as A-labels as + specified in RFC 5890. The host name is followed by a + colon ':' (ASCII character 0x3A) and a decimal port + number in ASCII. The name SHOULD be fully qualified + whenever possible. + + Values of this textual convention are not guaranteed to be + directly usable as transport-layer addressing information, + potentially requiring additional processing, such as + run-time 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 SnmpTLSAddress 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 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 by either 1) including SIZE constraints + on the index components or 2) specifying applicable + constraints in the conceptual row's DESCRIPTION clause or + in the surrounding documentation." REFERENCE "RFC 1123: Requirements for Internet Hosts - Application and Support - RFC 5890: Internationalized Domain Names for Applications (IDNA): - Definitions and Document Framework - RFC 5952: A Recommendation for IPv6 Address Text Representation - " + RFC 5890: Internationalized Domain Names for Applications + (IDNA): Definitions and Document Framework + RFC 5952: A Recommendation for IPv6 Address Text + Representation" SYNTAX OCTET STRING (SIZE (1..255)) SnmpTLSFingerprint ::= TEXTUAL-CONVENTION @@ -179,148 +202,164 @@ SnmpTLSFingerprint ::= TEXTUAL-CONVENTION STATUS current DESCRIPTION "A fingerprint value that can be used to uniquely reference - other data of potentially arbitrary length. - - An SnmpTLSFingerprint value is composed of a 1-octet hashing - algorithm identifier followed by the fingerprint value. The - octet value encoded is taken from the IANA TLS HashAlgorithm - Registry (RFC 5246). The remaining octets are filled using the - results of the hashing algorithm. - - This TEXTUAL-CONVENTION allows for a zero-length (blank) - SnmpTLSFingerprint value for use in tables where the - fingerprint value may be optional. MIB definitions or - implementations may refuse to accept a zero-length value as - appropriate." - REFERENCE "RFC 5246: The Transport Layer - Security (TLS) Protocol Version 1.2 - http://www.iana.org/assignments/tls-parameters/ - " + other data of potentially arbitrary length. + + An SnmpTLSFingerprint value is composed of a one-octet + hashing algorithm identifier followed by the fingerprint + value. The one-octet identifier value encoded is taken + from the IANA 'SNMP-TLSTM HashAlgorithms' registry. The + remaining octets of the SnmpTLSFingerprint value are + filled using the results of the hashing algorithm. + + Historically, the one-octet hashing algorithm identifier + was based on the IANA 'TLS HashAlgorithm' registry + (RFC 5246); however, this registry is no longer in use for + TLS 1.3 and above and is not expected to have any new + registrations added to it. To allow the fingerprint + algorithm to support additional hashing algorithms that + might be used by later versions of (D)TLS, the octet value + encoded is now taken from the IANA + 'SNMP-TLSTM HashAlgorithms' registry. The initial values + within this registry are identical to the values in the + 'TLS HashAlgorithm' registry but can be extended to + support new hashing algorithms as needed. + + This textual convention allows for a zero-length (blank) + SnmpTLSFingerprint value for use in tables where the + fingerprint value MAY be optional. MIB definitions or + implementations MAY refuse to accept a zero-length value + as appropriate." + REFERENCE + "RFC 5246: The Transport Layer Security (TLS) Protocol + Version 1.2 + https://www.iana.org/assignments/smi-numbers/" SYNTAX OCTET STRING (SIZE (0..255)) -- Identities for use in the snmpTlstmCertToTSNTable -snmpTlstmCertToTSNMIdentities OBJECT IDENTIFIER - ::= { snmpTlstmIdentities 1 } +snmpTlstmCertToTSNMIdentities OBJECT IDENTIFIER ::= + { snmpTlstmIdentities 1 } snmpTlstmCertSpecified OBJECT-IDENTITY STATUS current - DESCRIPTION "Directly specifies the tmSecurityName to be used for - this certificate. The value of the tmSecurityName - to use is specified in the snmpTlstmCertToTSNData - column. The snmpTlstmCertToTSNData column must - contain a non-zero length SnmpAdminString compliant - - value or the mapping described in this row must be - considered a failure." + DESCRIPTION + "Directly specifies the tmSecurityName to be used for this + certificate. The value of the tmSecurityName to use is + specified in the 'snmpTlstmCertToTSNData' column. The + 'snmpTlstmCertToTSNData' column MUST contain a + non-zero-length SnmpAdminString-compliant value, or the + mapping described in this row MUST be considered a + failure." ::= { snmpTlstmCertToTSNMIdentities 1 } snmpTlstmCertSANRFC822Name OBJECT-IDENTITY STATUS current - DESCRIPTION "Maps a subjectAltName's rfc822Name to a - tmSecurityName. The local part of the rfc822Name is - passed unaltered but the host-part of the name must - be passed in lowercase. This mapping results in a - 1:1 correspondence between equivalent subjectAltName - rfc822Name values and tmSecurityName values except - that the host-part of the name MUST be passed in - lowercase. - - Example rfc822Name Field: FooBar@Example.COM - is mapped to tmSecurityName: FooBar@example.com." + DESCRIPTION + "Maps a subjectAltName's rfc822Name to a tmSecurityName. + The local-part of the rfc822Name is passed unaltered, but + the domain of the name MUST be passed in lowercase. + This mapping results in a 1:1 correspondence between + equivalent subjectAltName rfc822Name values and + tmSecurityName values, except that the domain of the + name MUST be passed in lowercase. + + Example rfc822Name field: FooBar@Example.COM is mapped to + tmSecurityName: FooBar@example.com." ::= { snmpTlstmCertToTSNMIdentities 2 } snmpTlstmCertSANDNSName OBJECT-IDENTITY STATUS current - DESCRIPTION "Maps a subjectAltName's dNSName to a - tmSecurityName after first converting it to all - lowercase (RFC 5280 does not specify converting to - lowercase so this involves an extra step). This - mapping results in a 1:1 correspondence between - subjectAltName dNSName values and the tmSecurityName - values." - REFERENCE "RFC 5280 - Internet X.509 Public Key Infrastructure - Certificate and Certificate Revocation - List (CRL) Profile." + DESCRIPTION + "Maps a subjectAltName's dNSName to a tmSecurityName after + first converting it to all lowercase (RFC 5280 does not + specify converting to lowercase, so this involves an extra + step). This mapping results in a 1:1 correspondence + between subjectAltName dNSName values and the + tmSecurityName values." + REFERENCE + "RFC 5280: Internet X.509 Public Key Infrastructure + Certificate and Certificate Revocation + List (CRL) Profile" ::= { snmpTlstmCertToTSNMIdentities 3 } snmpTlstmCertSANIpAddress OBJECT-IDENTITY STATUS current - DESCRIPTION "Maps a subjectAltName's iPAddress to a - tmSecurityName by transforming the binary encoded - address as follows: - - 1) for IPv4, the value is converted into a - decimal-dotted quad address (e.g., '192.0.2.1'). - - 2) for IPv6 addresses, the value is converted into a - 32-character all lowercase hexadecimal string - without any colon separators. - - This mapping results in a 1:1 correspondence between - subjectAltName iPAddress values and the - tmSecurityName values. - - The resulting length of an encoded IPv6 address is - the maximum length supported by the View-Based - Access Control Model (VACM). Using both the - Transport Security Model's support for transport - prefixes (see the SNMP-TSM-MIB's - snmpTsmConfigurationUsePrefix object for details) - will result in securityName lengths that exceed what - VACM can handle." + DESCRIPTION + "Maps a subjectAltName's iPAddress to a tmSecurityName by + transforming the binary-encoded address as follows: + + 1) For IPv4, the value is converted into a + decimal-dotted quad address (e.g., '192.0.2.1'). + + 2) For IPv6 addresses, the value is converted into a + 32-character all-lowercase hexadecimal string + without any colon separators. + + This mapping results in a 1:1 correspondence between + subjectAltName iPAddress values and the tmSecurityName + values. + + The resulting length of an encoded IPv6 address is the + maximum length supported by the View-based Access Control + Model (VACM). Using an IPv6 address while the value of + snmpTsmConfigurationUsePrefix is 'true' (see the + SNMP-TSM-MIB, as defined in RFC 5591) will result in + securityName lengths that exceed what the VACM can handle." + REFERENCE + "RFC 5591: Transport Security Model for the Simple Network + Management Protocol (SNMP)" ::= { snmpTlstmCertToTSNMIdentities 4 } snmpTlstmCertSANAny OBJECT-IDENTITY STATUS current - DESCRIPTION "Maps any of the following fields using the - corresponding mapping algorithms: - - |------------+----------------------------| - | Type | Algorithm | - |------------+----------------------------| - | rfc822Name | snmpTlstmCertSANRFC822Name | - | dNSName | snmpTlstmCertSANDNSName | - | iPAddress | snmpTlstmCertSANIpAddress | - |------------+----------------------------| - - The first matching subjectAltName value found in the - certificate of the above types MUST be used when - deriving the tmSecurityName. The mapping algorithm - specified in the 'Algorithm' column MUST be used to - derive the tmSecurityName. - - This mapping results in a 1:1 correspondence between - subjectAltName values and tmSecurityName values. The - three sub-mapping algorithms produced by this - combined algorithm cannot produce conflicting - results between themselves." + DESCRIPTION + "Maps any of the following fields using the corresponding + mapping algorithms: + + |------------+----------------------------| + | Type | Algorithm | + |------------+----------------------------| + | rfc822Name | snmpTlstmCertSANRFC822Name | + | dNSName | snmpTlstmCertSANDNSName | + | iPAddress | snmpTlstmCertSANIpAddress | + |------------+----------------------------| + + The first subjectAltName value contained in the certificate + that matches any of the above types MUST be used when + deriving the tmSecurityName. The mapping algorithm + specified in the 'Algorithm' column of the corresponding + row MUST be used to derive the tmSecurityName. + + This mapping results in a 1:1 correspondence between + subjectAltName values and tmSecurityName values. The + three sub-mapping algorithms produced by this combined + algorithm cannot produce conflicting results between + themselves." ::= { snmpTlstmCertToTSNMIdentities 5 } snmpTlstmCertCommonName OBJECT-IDENTITY STATUS current - DESCRIPTION "Maps a certificate's CommonName to a tmSecurityName - after converting it to a UTF-8 encoding. The usage - of CommonNames is deprecated and users are - encouraged to use subjectAltName mapping methods - instead. This mapping results in a 1:1 - - correspondence between certificate CommonName values - and tmSecurityName values." + DESCRIPTION + "Maps a certificate's CommonName to a tmSecurityName after + converting it to a UTF-8 encoding. The usage of + CommonNames is deprecated, and users are encouraged to use + subjectAltName mapping methods instead. This mapping + results in a 1:1 correspondence between certificate + CommonName values and tmSecurityName values." ::= { snmpTlstmCertToTSNMIdentities 6 } -- The snmpTlstmSession Group -snmpTlstmSession OBJECT IDENTIFIER ::= { snmpTlstmObjects 1 } +snmpTlstmSession OBJECT IDENTIFIER ::= { snmpTlstmObjects 1 } snmpTlstmSessionOpens OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only STATUS current DESCRIPTION - "The number of times an openSession() request has been executed - as a (D)TLS client, regardless of whether it succeeded or - failed." + "The number of times an openSession() request has been + executed as a (D)TLS client, regardless of whether it + succeeded or failed." ::= { snmpTlstmSession 1 } snmpTlstmSessionClientCloses OBJECT-TYPE @@ -328,7 +367,7 @@ snmpTlstmSessionClientCloses OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The number of times a closeSession() request has been + "The number of times a closeSession() request has been executed as a (D)TLS client, regardless of whether it succeeded or failed." ::= { snmpTlstmSession 2 } @@ -338,8 +377,8 @@ snmpTlstmSessionOpenErrors OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The number of times an openSession() request failed to open a - session as a (D)TLS client, for any reason." + "The number of times an openSession() request failed to + open a session as a (D)TLS client, for any reason." ::= { snmpTlstmSession 3 } snmpTlstmSessionAccepts OBJECT-TYPE @@ -348,8 +387,8 @@ snmpTlstmSessionAccepts OBJECT-TYPE STATUS current DESCRIPTION "The number of times a (D)TLS server has accepted a new - connection from a client and has received at least one SNMP - message through it." + connection from a client and has received at least one + SNMP message through it." ::= { snmpTlstmSession 4 } snmpTlstmSessionServerCloses OBJECT-TYPE @@ -357,7 +396,7 @@ snmpTlstmSessionServerCloses OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The number of times a closeSession() request has been + "The number of times a closeSession() request has been executed as a (D)TLS server, regardless of whether it succeeded or failed." ::= { snmpTlstmSession 5 } @@ -367,9 +406,9 @@ snmpTlstmSessionNoSessions OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The number of times an outgoing message was dropped because - the session associated with the passed tmStateReference was no - longer (or was never) available." + "The number of times an outgoing message was dropped + because the session associated with the passed + tmStateReference was no longer (or never) available." ::= { snmpTlstmSession 6 } snmpTlstmSessionInvalidClientCertificates OBJECT-TYPE @@ -377,11 +416,12 @@ snmpTlstmSessionInvalidClientCertificates OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The number of times an incoming session was not established - on a (D)TLS server because the presented client certificate - was invalid. Reasons for invalidation include, but are not - limited to, cryptographic validation failures or lack of a - suitable mapping row in the snmpTlstmCertToTSNTable." + "The number of times an incoming session was not + established on a (D)TLS server because the presented + client certificate was invalid. Reasons for invalidation + include, but are not limited to, cryptographic validation + failures or lack of a suitable mapping row in the + snmpTlstmCertToTSNTable." ::= { snmpTlstmSession 7 } snmpTlstmSessionUnknownServerCertificate OBJECT-TYPE @@ -389,14 +429,14 @@ snmpTlstmSessionUnknownServerCertificate OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The number of times an outgoing session was not established - on a (D)TLS client because the server certificate presented - by an SNMP over (D)TLS server was invalid because no - configured fingerprint or Certification Authority (CA) was - acceptable to validate it. - This may result because there was no entry in the - snmpTlstmAddrTable or because no path could be found to a - known CA." + "The number of times an outgoing session was not + established on a (D)TLS client because the server + certificate presented by an SNMP over (D)TLS server was + invalid because no configured fingerprint or Certification + Authority (CA) was acceptable to validate it. This may + result because there was no entry in the + snmpTlstmAddrTable or because no path to a known CA could + be found." ::= { snmpTlstmSession 8 } snmpTlstmSessionInvalidServerCertificates OBJECT-TYPE @@ -404,15 +444,16 @@ snmpTlstmSessionInvalidServerCertificates OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The number of times an outgoing session was not established - on a (D)TLS client because the server certificate presented - by an SNMP over (D)TLS server could not be validated even if - the fingerprint or expected validation path was known. That - is, a cryptographic validation error occurred during - certificate validation processing. - - Reasons for invalidation include, but are not - limited to, cryptographic validation failures." + "The number of times an outgoing session was not + established on a (D)TLS client because the server + certificate presented by an SNMP over (D)TLS server could + not be validated even if the fingerprint or expected + validation path was known. That is, a cryptographic + validation error occurred during certificate validation + processing. + + Reasons for invalidation include, but are not limited to, + cryptographic validation failures." ::= { snmpTlstmSession 9 } snmpTlstmSessionInvalidCaches OBJECT-TYPE @@ -420,24 +461,25 @@ snmpTlstmSessionInvalidCaches OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The number of outgoing messages dropped because the + "The number of outgoing messages dropped because the tmStateReference referred to an invalid cache." ::= { snmpTlstmSession 10 } -- Configuration Objects -snmpTlstmConfig OBJECT IDENTIFIER ::= { snmpTlstmObjects 2 } +snmpTlstmConfig OBJECT IDENTIFIER ::= { snmpTlstmObjects 2 } -- Certificate mapping -snmpTlstmCertificateMapping OBJECT IDENTIFIER ::= { snmpTlstmConfig 1 } +snmpTlstmCertificateMapping OBJECT IDENTIFIER ::= + { snmpTlstmConfig 1 } snmpTlstmCertToTSNCount OBJECT-TYPE SYNTAX Gauge32 MAX-ACCESS read-only STATUS current DESCRIPTION - "A count of the number of entries in the + "A count of the number of entries in the snmpTlstmCertToTSNTable." ::= { snmpTlstmCertificateMapping 1 } @@ -446,9 +488,9 @@ snmpTlstmCertToTSNTableLastChanged OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The value of sysUpTime.0 when the snmpTlstmCertToTSNTable was - last modified through any means, or 0 if it has not been - modified since the command responder was started." + "The value of sysUpTime.0 when the snmpTlstmCertToTSNTable + was last modified through any means, or 0 if it has not + been modified since the command responder was started." ::= { snmpTlstmCertificateMapping 2 } snmpTlstmCertToTSNTable OBJECT-TYPE @@ -456,78 +498,82 @@ snmpTlstmCertToTSNTable OBJECT-TYPE MAX-ACCESS not-accessible STATUS current DESCRIPTION - "This table is used by a (D)TLS server to map the (D)TLS + "This table is used by a (D)TLS server to map the (D)TLS client's presented X.509 certificate to a tmSecurityName. - On an incoming (D)TLS/SNMP connection, the client's presented - certificate must either be validated based on an established - trust anchor, or it must directly match a fingerprint in this - table. This table does not provide any mechanisms for - configuring the trust anchors; the transfer of any needed - trusted certificates for path validation is expected to occur - through an out-of-band transfer. - - Once the certificate has been found acceptable (either by path - validation or directly matching a fingerprint in this table), - this table is consulted to determine the appropriate - tmSecurityName to identify with the remote connection. This - is done by considering each active row from this table in - prioritized order according to its snmpTlstmCertToTSNID value. - Each row's snmpTlstmCertToTSNFingerprint value determines - whether the row is a match for the incoming connection: - - 1) If the row's snmpTlstmCertToTSNFingerprint value - identifies the presented certificate, then consider the - row as a successful match. - - 2) If the row's snmpTlstmCertToTSNFingerprint value - identifies a locally held copy of a trusted CA - certificate and that CA certificate was used to - validate the path to the presented certificate, then - consider the row as a successful match. + On an incoming (D)TLS/SNMP connection, the client's + presented certificate either MUST be validated based on an + established trust anchor or MUST directly match a + fingerprint in this table. This table does not provide + any mechanisms for configuring the trust anchors; the + transfer of any needed trusted certificates for path + validation is expected to occur through an out-of-band + transfer. + + Once the certificate has been found acceptable (either via + path validation or by directly matching a fingerprint in + this table), this table is consulted to determine the + appropriate tmSecurityName to identify with the remote + connection. This is done by considering each active row + from this table in prioritized order according to its + snmpTlstmCertToTSNID value. Each row's + snmpTlstmCertToTSNFingerprint value determines whether the + row is a match for the incoming connection: + + 1) If the row's snmpTlstmCertToTSNFingerprint value + identifies the presented certificate, then consider + the row as a successful match. + + 2) If the row's snmpTlstmCertToTSNFingerprint value + identifies a locally held copy of a trusted CA + certificate and that CA certificate was used to + validate the path to the presented certificate, then + consider the row as a successful match. Once a matching row has been found, the - snmpTlstmCertToTSNMapType value can be used to determine how - the tmSecurityName to associate with the session should be - determined. See the snmpTlstmCertToTSNMapType column's - DESCRIPTION for details on determining the tmSecurityName - value. If it is impossible to determine a tmSecurityName from - the row's data combined with the data presented in the - - certificate, then additional rows MUST be searched looking for - another potential match. If a resulting tmSecurityName mapped - from a given row is not compatible with the needed - requirements of a tmSecurityName (e.g., VACM imposes a - 32-octet-maximum length and the certificate derived - securityName could be longer), then it must be considered an - invalid match and additional rows MUST be searched looking for - another potential match. - - If no matching and valid row can be found, the connection MUST - be closed and SNMP messages MUST NOT be accepted over it. - - Missing values of snmpTlstmCertToTSNID are acceptable and - implementations should continue to the next highest numbered - row. It is recommended that administrators skip index values - to leave room for the insertion of future rows (for example, - use values of 10 and 20 when creating initial rows). + snmpTlstmCertToTSNMapType value can be used to determine + how the tmSecurityName to associate with the session + should be determined. See the 'snmpTlstmCertToTSNMapType' + column's DESCRIPTION clause for details on determining the + tmSecurityName value. If it is impossible to determine a + tmSecurityName from the row's data combined with the data + presented in the certificate, then additional rows MUST be + searched to look for another potential match. If a + resulting tmSecurityName mapped from a given row is not + compatible with the needed requirements of a + tmSecurityName (e.g., the VACM imposes a 32-octet-maximum + length and the certificate-derived securityName could be + longer), then it MUST be considered an invalid match and + additional rows MUST be searched to look for another + potential match. + + If no matching and valid row can be found, the connection + MUST be closed and SNMP messages MUST NOT be accepted over + it. + + Missing values of snmpTlstmCertToTSNID are acceptable, and + implementations SHOULD continue to the + next-highest-numbered row. It is RECOMMENDED that + administrators skip index values to leave room for the + insertion of future rows (for example, use values of 10 + and 20 when creating initial rows). Users are encouraged to make use of certificates with - subjectAltName fields that can be used as tmSecurityNames so - that a single root CA certificate can allow all child - certificate's subjectAltName to map directly to a - tmSecurityName via a 1:1 transformation. However, this table - is flexible to allow for situations where existing deployed - certificate infrastructures do not provide adequate - subjectAltName values for use as tmSecurityNames. - Certificates may also be mapped to tmSecurityNames using the - CommonName portion of the Subject field. However, the usage - of the CommonName field is deprecated and thus this usage is - NOT RECOMMENDED. Direct mapping from each individual - certificate fingerprint to a tmSecurityName is also possible - but requires one entry in the table per tmSecurityName and - requires more management operations to completely configure a - device." + subjectAltName fields that can be used as tmSecurityNames. + This allows all child certificates of a single root CA + certificate to include a subjectAltName that maps directly + to a tmSecurityName via a 1:1 transformation. However, + this table is flexible, to allow for situations where + existing deployed certificate infrastructures do not provide + adequate subjectAltName values for use as tmSecurityNames. + Certificates MAY also be mapped to tmSecurityNames using + the CommonName portion of the Subject field. However, the + usage of the CommonName field is deprecated, and thus this + usage is NOT RECOMMENDED. Direct mapping from each + individual certificate fingerprint to a tmSecurityName is + also possible but requires one entry in the table per + tmSecurityName and requires more management operations to + completely configure a device." ::= { snmpTlstmCertificateMapping 3 } snmpTlstmCertToTSNEntry OBJECT-TYPE @@ -535,9 +581,9 @@ snmpTlstmCertToTSNEntry OBJECT-TYPE MAX-ACCESS not-accessible STATUS current DESCRIPTION - "A row in the snmpTlstmCertToTSNTable that specifies a mapping - for an incoming (D)TLS certificate to a tmSecurityName to use - for a connection." + "A row in the snmpTlstmCertToTSNTable that specifies a + mapping for an incoming (D)TLS certificate to a + tmSecurityName to use for a connection." INDEX { snmpTlstmCertToTSNID } ::= { snmpTlstmCertToTSNTable 1 } @@ -555,19 +601,20 @@ snmpTlstmCertToTSNID OBJECT-TYPE MAX-ACCESS not-accessible STATUS current DESCRIPTION - "A unique, prioritized index for the given entry. Lower + "A unique, prioritized index for the given entry. Lower numbers indicate a higher priority." ::= { snmpTlstmCertToTSNEntry 1 } snmpTlstmCertToTSNFingerprint OBJECT-TYPE - SYNTAX SnmpTLSFingerprint (SIZE(1..255)) + SYNTAX SnmpTLSFingerprint (SIZE (1..255)) MAX-ACCESS read-create STATUS current DESCRIPTION - "A cryptographic hash of an X.509 certificate. The results of - a successful matching fingerprint to either the trusted CA in - the certificate validation path or to the certificate itself - is dictated by the snmpTlstmCertToTSNMapType column." + "A cryptographic hash of an X.509 certificate. The results + of a successful matching fingerprint to either the trusted + CA in the certificate validation path or the certificate + itself is dictated by the 'snmpTlstmCertToTSNMapType' + column." ::= { snmpTlstmCertToTSNEntry 2 } snmpTlstmCertToTSNMapType OBJECT-TYPE @@ -575,37 +622,38 @@ snmpTlstmCertToTSNMapType OBJECT-TYPE MAX-ACCESS read-create STATUS current DESCRIPTION - "Specifies the mapping type for deriving a tmSecurityName from - a certificate. Details for mapping of a particular type SHALL - be specified in the DESCRIPTION clause of the OBJECT-IDENTITY - that describes the mapping. If a mapping succeeds it will - return a tmSecurityName for use by the TLSTM model and - processing stops. + "Specifies the mapping type for deriving a tmSecurityName + from a certificate. Details for mapping of a particular + type SHALL be specified in the DESCRIPTION clause of the + OBJECT-IDENTITY that describes the mapping. If a mapping + succeeds, it will return a tmSecurityName for use by the + TLSTM and processing will stop. If the resulting mapped value is not compatible with the - needed requirements of a tmSecurityName (e.g., VACM imposes a - 32-octet-maximum length and the certificate derived - securityName could be longer), then future rows MUST be - searched for additional snmpTlstmCertToTSNFingerprint matches - to look for a mapping that succeeds. - - Suitable values for assigning to this object that are defined - within the SNMP-TLS-TM-MIB can be found in the + needed requirements of a tmSecurityName (e.g., the VACM + imposes a 32-octet-maximum length and the + certificate-derived securityName could be longer), then + future rows MUST be searched for additional + snmpTlstmCertToTSNFingerprint matches to look for a + mapping that succeeds. + + Suitable values for assigning to this object that are + defined within the SNMP-TLS-TM-MIB can be found in the snmpTlstmCertToTSNMIdentities portion of the MIB tree." DEFVAL { snmpTlstmCertSpecified } ::= { snmpTlstmCertToTSNEntry 3 } snmpTlstmCertToTSNData OBJECT-TYPE - SYNTAX OCTET STRING (SIZE(0..1024)) + SYNTAX OCTET STRING (SIZE (0..1024)) MAX-ACCESS read-create STATUS current DESCRIPTION - "Auxiliary data used as optional configuration information for - a given mapping specified by the snmpTlstmCertToTSNMapType - column. Only some mapping systems will make use of this - column. The value in this column MUST be ignored for any - mapping type that does not require data present in this - column." + "Auxiliary data used as optional configuration information + for a given mapping specified by the + 'snmpTlstmCertToTSNMapType' column. Only some mapping + systems will make use of this column. The value in this + column MUST be ignored for any mapping type that does not + require that data be present in this column." DEFVAL { "" } ::= { snmpTlstmCertToTSNEntry 4 } @@ -614,9 +662,9 @@ snmpTlstmCertToTSNStorageType OBJECT-TYPE MAX-ACCESS read-create STATUS current DESCRIPTION - "The storage type for this conceptual row. Conceptual rows - having the value 'permanent' need not allow write-access to - any columnar objects in the row." + "The storage type for this conceptual row. Conceptual rows + having the value 'permanent' need not allow write-access + to any columnar objects in the row." DEFVAL { nonVolatile } ::= { snmpTlstmCertToTSNEntry 5 } @@ -625,39 +673,44 @@ snmpTlstmCertToTSNRowStatus OBJECT-TYPE MAX-ACCESS read-create STATUS current DESCRIPTION - "The status of this conceptual row. This object may be used - to create or remove rows from this table. + "The status of this conceptual row. This object MAY be + used to create or remove rows from this table. - To create a row in this table, an administrator must set this - object to either createAndGo(4) or createAndWait(5). + To create a row in this table, an administrator MUST set + this object to either createAndGo(4) or createAndWait(5). - Until instances of all corresponding columns are appropriately - configured, the value of the corresponding instance of the - snmpTlstmParamsRowStatus column is notReady(3). + Until instances of all corresponding columns are + appropriately configured, the value of the corresponding + instance of the 'snmpTlstmParamsRowStatus' column is + notReady(3). - In particular, a newly created row cannot be made active until - the corresponding snmpTlstmCertToTSNFingerprint, - snmpTlstmCertToTSNMapType, and snmpTlstmCertToTSNData columns - have been set. + In particular, a newly created row cannot be made active + until the corresponding 'snmpTlstmCertToTSNFingerprint', + 'snmpTlstmCertToTSNMapType', and 'snmpTlstmCertToTSNData' + columns have been set. - The following objects may not be modified while the + The following objects MUST NOT be modified while the value of this object is active(1): - - snmpTlstmCertToTSNFingerprint - - snmpTlstmCertToTSNMapType - - snmpTlstmCertToTSNData + + - snmpTlstmCertToTSNFingerprint + - snmpTlstmCertToTSNMapType + - snmpTlstmCertToTSNData + An attempt to set these objects while the value of snmpTlstmParamsRowStatus is active(1) will result in an inconsistentValue error." ::= { snmpTlstmCertToTSNEntry 6 } --- Maps tmSecurityNames to certificates for use by the SNMP-TARGET-MIB +-- Maps tmSecurityNames to certificates for use by the +-- SNMP-TARGET-MIB snmpTlstmParamsCount OBJECT-TYPE SYNTAX Gauge32 MAX-ACCESS read-only STATUS current DESCRIPTION - "A count of the number of entries in the snmpTlstmParamsTable." + "A count of the number of entries in the + snmpTlstmParamsTable." ::= { snmpTlstmCertificateMapping 4 } snmpTlstmParamsTableLastChanged OBJECT-TYPE @@ -665,9 +718,9 @@ snmpTlstmParamsTableLastChanged OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The value of sysUpTime.0 when the snmpTlstmParamsTable - was last modified through any means, or 0 if it has not been - modified since the command responder was started." + "The value of sysUpTime.0 when the snmpTlstmParamsTable + was last modified through any means, or 0 if it has not + been modified since the command responder was started." ::= { snmpTlstmCertificateMapping 5 } snmpTlstmParamsTable OBJECT-TYPE @@ -675,11 +728,11 @@ snmpTlstmParamsTable OBJECT-TYPE MAX-ACCESS not-accessible STATUS current DESCRIPTION - "This table is used by a (D)TLS client when a (D)TLS + "This table is used by a (D)TLS client when a (D)TLS connection is being set up using an entry in the SNMP-TARGET-MIB. It extends the SNMP-TARGET-MIB's - snmpTargetParamsTable with a fingerprint of a certificate to - use when establishing such a (D)TLS connection." + snmpTargetParamsTable with a fingerprint of a certificate + to use when establishing such a (D)TLS connection." ::= { snmpTlstmCertificateMapping 6 } snmpTlstmParamsEntry OBJECT-TYPE @@ -687,16 +740,17 @@ snmpTlstmParamsEntry OBJECT-TYPE MAX-ACCESS not-accessible STATUS current DESCRIPTION - "A conceptual row containing a fingerprint hash of a locally - held certificate for a given snmpTargetParamsEntry. The - values in this row should be ignored if the connection that - needs to be established, as indicated by the SNMP-TARGET-MIB - infrastructure, is not a certificate and (D)TLS based - connection. The connection SHOULD NOT be established if the - certificate fingerprint stored in this entry does not point to - a valid locally held certificate or if it points to an - unusable certificate (such as might happen when the - certificate's expiration date has been reached)." + "A conceptual row containing a fingerprint hash of a + locally held certificate for a given + snmpTargetParamsEntry. The values in this row SHOULD be + ignored if the connection that needs to be established, as + indicated by the SNMP-TARGET-MIB infrastructure, is not a + certificate-based and (D)TLS-based connection. The + connection SHOULD NOT be established if the certificate + fingerprint stored in this entry does not point to a valid + locally held certificate or if it points to an unusable + certificate (such as might happen when the certificate's + expiration date has been reached)." INDEX { IMPLIED snmpTargetParamsName } ::= { snmpTlstmParamsTable 1 } @@ -711,10 +765,11 @@ snmpTlstmParamsClientFingerprint OBJECT-TYPE MAX-ACCESS read-create STATUS current DESCRIPTION - "This object stores the hash of the public portion of a - locally held X.509 certificate. The X.509 certificate, its - public key, and the corresponding private key will be used - when initiating a (D)TLS connection as a (D)TLS client." + "This object stores the hash of the public portion of a + locally held X.509 certificate. The X.509 certificate, + its public key, and the corresponding private key will be + used when initiating a (D)TLS connection as a (D)TLS + client." ::= { snmpTlstmParamsEntry 1 } snmpTlstmParamsStorageType OBJECT-TYPE @@ -722,9 +777,9 @@ snmpTlstmParamsStorageType OBJECT-TYPE MAX-ACCESS read-create STATUS current DESCRIPTION - "The storage type for this conceptual row. Conceptual rows - having the value 'permanent' need not allow write-access to - any columnar objects in the row." + "The storage type for this conceptual row. Conceptual rows + having the value 'permanent' need not allow write-access + to any columnar objects in the row." DEFVAL { nonVolatile } ::= { snmpTlstmParamsEntry 2 } @@ -733,22 +788,23 @@ snmpTlstmParamsRowStatus OBJECT-TYPE MAX-ACCESS read-create STATUS current DESCRIPTION - "The status of this conceptual row. This object may be used - to create or remove rows from this table. + "The status of this conceptual row. This object MAY be + used to create or remove rows from this table. - To create a row in this table, an administrator must set this - object to either createAndGo(4) or createAndWait(5). + To create a row in this table, an administrator MUST set + this object to either createAndGo(4) or createAndWait(5). - Until instances of all corresponding columns are appropriately - configured, the value of the corresponding instance of the - snmpTlstmParamsRowStatus column is notReady(3). + Until instances of all corresponding columns are + appropriately configured, the value of the corresponding + instance of the 'snmpTlstmParamsRowStatus' column is + notReady(3). - In particular, a newly created row cannot be made active until - the corresponding snmpTlstmParamsClientFingerprint column has - been set. + In particular, a newly created row cannot be made active + until the corresponding 'snmpTlstmParamsClientFingerprint' + column has been set. - The snmpTlstmParamsClientFingerprint object may not be modified - while the value of this object is active(1). + The snmpTlstmParamsClientFingerprint object MUST NOT be + modified while the value of this object is active(1). An attempt to set these objects while the value of snmpTlstmParamsRowStatus is active(1) will result in @@ -760,7 +816,8 @@ snmpTlstmAddrCount OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "A count of the number of entries in the snmpTlstmAddrTable." + "A count of the number of entries in the + snmpTlstmAddrTable." ::= { snmpTlstmCertificateMapping 7 } snmpTlstmAddrTableLastChanged OBJECT-TYPE @@ -768,9 +825,9 @@ snmpTlstmAddrTableLastChanged OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The value of sysUpTime.0 when the snmpTlstmAddrTable - was last modified through any means, or 0 if it has not been - modified since the command responder was started." + "The value of sysUpTime.0 when the snmpTlstmAddrTable + was last modified through any means, or 0 if it has not + been modified since the command responder was started." ::= { snmpTlstmCertificateMapping 8 } snmpTlstmAddrTable OBJECT-TYPE @@ -778,62 +835,64 @@ snmpTlstmAddrTable OBJECT-TYPE MAX-ACCESS not-accessible STATUS current DESCRIPTION - "This table is used by a (D)TLS client when a (D)TLS + "This table is used by a (D)TLS client when a (D)TLS connection is being set up using an entry in the SNMP-TARGET-MIB. It extends the SNMP-TARGET-MIB's - snmpTargetAddrTable so that the client can verify that the - correct server has been reached. This verification can use - either a certificate fingerprint, or an identity - authenticated via certification path validation. - - If there is an active row in this table corresponding to the - entry in the SNMP-TARGET-MIB that was used to establish the - connection, and the row's snmpTlstmAddrServerFingerprint - column has non-empty value, then the server's presented - certificate is compared with the - snmpTlstmAddrServerFingerprint value (and the - snmpTlstmAddrServerIdentity column is ignored). If the - fingerprint matches, the verification has succeeded. If the - fingerprint does not match, then the connection MUST be - closed. + correct server has been reached. This verification can + use either 1) a certificate fingerprint or 2) an + identity authenticated via certification path validation. + + If there is an active row in this table corresponding to + the entry in the SNMP-TARGET-MIB that was used to + establish the connection and the row's + 'snmpTlstmAddrServerFingerprint' column has a non-empty + value, then the server's presented certificate is compared + with the snmpTlstmAddrServerFingerprint value (and the + 'snmpTlstmAddrServerIdentity' column is ignored). If the + fingerprint matches, the verification has succeeded. If + the fingerprint does not match, then the connection MUST + be closed. If the server's presented certificate has passed - certification path validation [RFC5280] to a configured - trust anchor, and an active row exists with a zero-length + certification path validation (RFC 5280) to a configured + trust anchor and an active row exists with a zero-length snmpTlstmAddrServerFingerprint value, then the - snmpTlstmAddrServerIdentity column contains the expected - host name. This expected host name is then compared against - the server's certificate as follows: - - - Implementations MUST support matching the expected host - name against a dNSName in the subjectAltName extension - field and MAY support checking the name against the - CommonName portion of the subject distinguished name. - - - The '*' (ASCII 0x2a) wildcard character is allowed in the - dNSName of the subjectAltName extension (and in common - name, if used to store the host name), but only as the - left-most (least significant) DNS label in that value. - This wildcard matches any left-most DNS label in the - server name. That is, the subject *.example.com matches - the server names a.example.com and b.example.com, but does - not match example.com or a.b.example.com. Implementations - MUST support wildcards in certificates as specified above, - but MAY provide a configuration option to disable them. - - - If the locally configured name is an internationalized - domain name, conforming implementations MUST convert it to - the ASCII Compatible Encoding (ACE) format for performing - comparisons, as specified in Section 7 of [RFC5280]. - - If the expected host name fails these conditions then the + 'snmpTlstmAddrServerIdentity' column contains the expected + host name. This expected host name is then compared + against the server's certificate as follows: + + - Implementations MUST support matching the expected + host name against a dNSName in the subjectAltName + extension field and MAY support checking the name + against the CommonName portion of the subject + distinguished name. + + - The '*' (ASCII 0x2A) wildcard character is allowed in + the dNSName of the subjectAltName extension (and in + CommonName, if used to store the host name), but + only as the leftmost (least significant) DNS label + in that value. This wildcard matches any leftmost + DNS label in the server name. That is, the subject + *.example.com matches the server names a.example.com + and b.example.com but does not match example.com or + a.b.example.com. Implementations MUST support + wildcards in certificates as specified above but MAY + provide a configuration option to disable them. + + - If the locally configured name is an + internationalized domain name, conforming + implementations MUST convert it to the ASCII + Compatible Encoding (ACE) format for performing + comparisons, as specified in Section 7 of RFC 5280. + + If the expected host name fails these conditions, then the connection MUST be closed. - If there is no row in this table corresponding to the entry - in the SNMP-TARGET-MIB and the server can be authorized by - another, implementation-dependent means, then the connection - MAY still proceed." + If there is no row in this table corresponding to the + entry in the SNMP-TARGET-MIB and the server can be + authorized by another, implementation-dependent means, + then the connection MAY still proceed." ::= { snmpTlstmCertificateMapping 9 } snmpTlstmAddrEntry OBJECT-TYPE @@ -841,17 +900,18 @@ snmpTlstmAddrEntry OBJECT-TYPE MAX-ACCESS not-accessible STATUS current DESCRIPTION - "A conceptual row containing a copy of a certificate's - fingerprint for a given snmpTargetAddrEntry. The values in - this row should be ignored if the connection that needs to be - established, as indicated by the SNMP-TARGET-MIB - infrastructure, is not a (D)TLS based connection. If an - snmpTlstmAddrEntry exists for a given snmpTargetAddrEntry, then - the presented server certificate MUST match or the connection - MUST NOT be established. If a row in this table does not - exist to match an snmpTargetAddrEntry row, then the connection - SHOULD still proceed if some other certificate validation path - algorithm (e.g., RFC 5280) can be used." + "A conceptual row containing a copy of a certificate's + fingerprint for a given snmpTargetAddrEntry. The values + in this row SHOULD be ignored if the connection that needs + to be established, as indicated by the SNMP-TARGET-MIB + infrastructure, is not a (D)TLS-based connection. If an + snmpTlstmAddrEntry exists for a given snmpTargetAddrEntry, + then the presented server certificate MUST match or the + connection MUST NOT be established. If a row in this + table does not exist to match an snmpTargetAddrEntry row, + then the connection SHOULD still proceed if some other + certification path validation algorithm (e.g., RFC 5280) + can be used." INDEX { IMPLIED snmpTargetAddrName } ::= { snmpTlstmAddrTable 1 } @@ -867,12 +927,12 @@ snmpTlstmAddrServerFingerprint OBJECT-TYPE MAX-ACCESS read-create STATUS current DESCRIPTION - "A cryptographic hash of a public X.509 certificate. This - object should store the hash of the public X.509 certificate - that the remote server should present during the (D)TLS - connection setup. The fingerprint of the presented - certificate and this hash value MUST match exactly or the - connection MUST NOT be established." + "A cryptographic hash of a public X.509 certificate. This + object should store the hash of the public X.509 + certificate that the remote server should present during + the (D)TLS connection setup. The fingerprint of the + presented certificate and this hash value MUST match + exactly, or the connection MUST NOT be established." DEFVAL { "" } ::= { snmpTlstmAddrEntry 1 } @@ -881,7 +941,7 @@ snmpTlstmAddrServerIdentity OBJECT-TYPE MAX-ACCESS read-create STATUS current DESCRIPTION - "The reference identity to check against the identity + "The reference identity to check against the identity presented by the remote system." DEFVAL { "" } ::= { snmpTlstmAddrEntry 2 } @@ -891,9 +951,9 @@ snmpTlstmAddrStorageType OBJECT-TYPE MAX-ACCESS read-create STATUS current DESCRIPTION - "The storage type for this conceptual row. Conceptual rows - having the value 'permanent' need not allow write-access to - any columnar objects in the row." + "The storage type for this conceptual row. Conceptual rows + having the value 'permanent' need not allow write-access + to any columnar objects in the row." DEFVAL { nonVolatile } ::= { snmpTlstmAddrEntry 3 } @@ -902,28 +962,28 @@ snmpTlstmAddrRowStatus OBJECT-TYPE MAX-ACCESS read-create STATUS current DESCRIPTION - "The status of this conceptual row. This object may be used - to create or remove rows from this table. + "The status of this conceptual row. This object may be + used to create or remove rows from this table. - To create a row in this table, an administrator must set this - object to either createAndGo(4) or createAndWait(5). + To create a row in this table, an administrator MUST set + this object to either createAndGo(4) or createAndWait(5). Until instances of all corresponding columns are - appropriately configured, the value of the - corresponding instance of the snmpTlstmAddrRowStatus - column is notReady(3). + appropriately configured, the value of the corresponding + instance of the 'snmpTlstmAddrRowStatus' column is + notReady(3). - In particular, a newly created row cannot be made active until - the corresponding snmpTlstmAddrServerFingerprint column has been - set. + In particular, a newly created row cannot be made active + until the corresponding 'snmpTlstmAddrServerFingerprint' + column has been set. - Rows MUST NOT be active if the snmpTlstmAddrServerFingerprint - column is blank and the snmpTlstmAddrServerIdentity is set to - '*' since this would insecurely accept any presented - certificate. + Rows MUST NOT be active if the + 'snmpTlstmAddrServerFingerprint' column is blank and the + snmpTlstmAddrServerIdentity is set to '*', since this + would insecurely accept any presented certificate. - The snmpTlstmAddrServerFingerprint object may not be modified - while the value of this object is active(1). + The snmpTlstmAddrServerFingerprint object MUST NOT be + modified while the value of this object is active(1). An attempt to set these objects while the value of snmpTlstmAddrRowStatus is active(1) will result in @@ -938,32 +998,33 @@ snmpTlstmServerCertificateUnknown NOTIFICATION-TYPE OBJECTS { snmpTlstmSessionUnknownServerCertificate } STATUS current DESCRIPTION - "Notification that the server certificate presented by an SNMP - over (D)TLS server was invalid because no configured - fingerprint or CA was acceptable to validate it. This may be - because there was no entry in the snmpTlstmAddrTable or - because no path could be found to known Certification - Authority. - - To avoid notification loops, this notification MUST NOT be - sent to servers that themselves have triggered the - notification." + "Notification that the server certificate presented by an + SNMP over (D)TLS server was invalid because no configured + fingerprint or CA was acceptable to validate it. This may + be because there was no entry in the snmpTlstmAddrTable or + because no path to a known CA could be found. + + To avoid notification loops, this notification MUST NOT be + sent to servers that themselves have triggered the + notification." ::= { snmpTlstmNotifications 1 } snmpTlstmServerInvalidCertificate NOTIFICATION-TYPE - OBJECTS { snmpTlstmAddrServerFingerprint, - snmpTlstmSessionInvalidServerCertificates} + OBJECTS { + snmpTlstmAddrServerFingerprint, + snmpTlstmSessionInvalidServerCertificates + } STATUS current DESCRIPTION - "Notification that the server certificate presented by an SNMP - over (D)TLS server could not be validated even if the - fingerprint or expected validation path was known. That is, a - cryptographic validation error occurred during certificate - validation processing. - - To avoid notification loops, this notification MUST NOT be - sent to servers that themselves have triggered the - notification." + "Notification that the server certificate presented by an + SNMP over (D)TLS server could not be validated even if the + fingerprint or expected validation path was known. + That is, a cryptographic validation error occurred during + certificate validation processing. + + To avoid notification loops, this notification MUST NOT be + sent to servers that themselves have triggered the + notification." ::= { snmpTlstmNotifications 2 } -- ************************************************ @@ -981,8 +1042,8 @@ snmpTlstmGroups OBJECT IDENTIFIER ::= { snmpTlstmConformance 2 } snmpTlstmCompliance MODULE-COMPLIANCE STATUS current DESCRIPTION - "The compliance statement for SNMP engines that support the - SNMP-TLS-TM-MIB" + "The compliance statement for SNMP engines that support the + SNMP-TLS-TM-MIB." MODULE MANDATORY-GROUPS { snmpTlstmStatsGroup, snmpTlstmIncomingGroup, @@ -993,6 +1054,7 @@ snmpTlstmCompliance MODULE-COMPLIANCE -- ************************************************ -- Units of conformance -- ************************************************ + snmpTlstmStatsGroup OBJECT-GROUP OBJECTS { snmpTlstmSessionOpens, @@ -1008,9 +1070,9 @@ snmpTlstmStatsGroup OBJECT-GROUP } STATUS current DESCRIPTION - "A collection of objects for maintaining - statistical information of an SNMP engine that - implements the SNMP TLS Transport Model." + "A collection of objects for maintaining statistical + information of an SNMP engine that implements the SNMP + TLSTM." ::= { snmpTlstmGroups 1 } snmpTlstmIncomingGroup OBJECT-GROUP @@ -1025,10 +1087,9 @@ snmpTlstmIncomingGroup OBJECT-GROUP } STATUS current DESCRIPTION - "A collection of objects for maintaining - incoming connection certificate mappings to - tmSecurityNames of an SNMP engine that implements the - SNMP TLS Transport Model." + "A collection of objects for maintaining incoming + connection certificate mappings to tmSecurityNames of an + SNMP engine that implements the SNMP TLSTM." ::= { snmpTlstmGroups 2 } snmpTlstmOutgoingGroup OBJECT-GROUP @@ -1047,9 +1108,9 @@ snmpTlstmOutgoingGroup OBJECT-GROUP } STATUS current DESCRIPTION - "A collection of objects for maintaining - outgoing connection certificates to use when opening - connections as a result of SNMP-TARGET-MIB settings." + "A collection of objects for maintaining outgoing + connection certificates to use when opening connections as + a result of SNMP-TARGET-MIB settings." ::= { snmpTlstmGroups 3 } snmpTlstmNotificationGroup NOTIFICATION-GROUP @@ -1059,7 +1120,7 @@ snmpTlstmNotificationGroup NOTIFICATION-GROUP } STATUS current DESCRIPTION - "Notifications" + "Notifications." ::= { snmpTlstmGroups 4 } END diff --git a/vendor/mibs/UCD-SNMP-MIB.txt b/vendor/mibs/UCD-SNMP-MIB.txt index cde67fe..bcc7da6 100644 --- a/vendor/mibs/UCD-SNMP-MIB.txt +++ b/vendor/mibs/UCD-SNMP-MIB.txt @@ -40,7 +40,7 @@ IMPORTS FROM SNMPv2-TC; ucdavis MODULE-IDENTITY - LAST-UPDATED "201606100000Z" + LAST-UPDATED "202008210000Z" ORGANIZATION "University of California, Davis" CONTACT-INFO "This mib is no longer being maintained by the University of @@ -58,6 +58,10 @@ 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" @@ -65,6 +69,7 @@ ucdavis MODULE-IDENTITY 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" @@ -746,6 +751,22 @@ memCachedX OBJECT-TYPE 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/vendor/mibs/rfclist b/vendor/mibs/rfclist index f13c15b..f8c5476 100644 --- a/vendor/mibs/rfclist +++ b/vendor/mibs/rfclist @@ -1,4 +1,4 @@ -# updated 2018-12-27 +# updated 2023-11-08 1155 RFC1155-SMI 1213 RFC1213-MIB 1227 SMUX-MIB @@ -54,8 +54,6 @@ 2456 APPN-TRAP-MIB 2457 EBN-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 @@ -151,6 +149,7 @@ 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 4011 POLICY-BASED-MANAGEMENT-MIB @@ -208,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 @@ -233,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 @@ -251,7 +252,6 @@ 6173 IFCP-MGMT-MIB 6240 PW-CEP-STD-MIB 6340 FLOAT-TC-MIB -6353 SNMP-TLS-TM-MIB 6445 MPLS-FRR-GENERAL-STD-MIB:MPLS-FRR-ONE2ONE-STD-MIB:MPLS-FRR-FACILITY-STD-MIB 6475 PMIPV6-TC-MIB:PMIPV6-MIB 6527 VRRPV3-MIB @@ -293,3 +293,5 @@ 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 +9456 SNMP-TLS-TM-MIB diff --git a/vendor/net-snmp-config.in b/vendor/net-snmp-config.in index 6b5abf8..c0fc154 100644 --- a/vendor/net-snmp-config.in +++ b/vendor/net-snmp-config.in @@ -545,7 +545,7 @@ main (int argc, char **argv) exit(1); } -#if HAVE_GETPID +#ifdef HAVE_GETPID if (pid_file != NULL) { /* * unlink the pid_file, if it exists, prior to open. Without diff --git a/vendor/net-snmp-create-v3-user.in b/vendor/net-snmp-create-v3-user.in index 452c269..65a3628 100644 --- a/vendor/net-snmp-create-v3-user.in +++ b/vendor/net-snmp-create-v3-user.in @@ -1,12 +1,10 @@ #!/bin/sh # -# $Id$ -# # this shell script is designed to add new SNMPv3 users # to Net-SNMP config file. -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 @@ -21,6 +19,7 @@ unset shifted case $1 in --version|--ver*) echo @VERSION@ + exit 0 ;; --help) usage="yes" @@ -38,7 +37,7 @@ case $1 in shift ;; md5|sha) - Aalgorithm=`echo $1 | tr a-z A-Z` + Aalgorithm=$(echo "$1" | tr a-z A-Z) shift ;; *) @@ -59,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 ;; *) @@ -87,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|SHA-512|SHA-384|SHA-256|SHA-224] [-x DES|AES] [username]" + echo " [-a MD5|SHA|SHA-512|SHA-384|SHA-256|SHA-224] [-x DES|AES|AES128] [username]" echo "" exit fi @@ -120,25 +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 -prefix="@prefix@" -# Avoid that configure complains that this script ignores @datarootdir@ -echo "@datarootdir@" >/dev/null +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/vendor/perl/ASN/ASN.pm b/vendor/perl/ASN/ASN.pm index 6429cdb..70da9ab 100644 --- a/vendor/perl/ASN/ASN.pm +++ b/vendor/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.09'; +$VERSION = '5.09052'; sub AUTOLOAD { # This AUTOLOAD is used to 'autoload' constants from the constant() diff --git a/vendor/perl/ASN/ASN.xs b/vendor/perl/ASN/ASN.xs index 9d9026b..6e953f8 100644 --- a/vendor/perl/ASN/ASN.xs +++ b/vendor/perl/ASN/ASN.xs @@ -1,8 +1,12 @@ /* -*- C -*- */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-qual" +#pragma GCC diagnostic ignored "-Wdeclaration-after-statement" #include "EXTERN.h" #include "perl.h" #include "XSUB.h" +#pragma GCC diagnostic pop #include #include diff --git a/vendor/perl/AnyData_SNMP/Storage.pm b/vendor/perl/AnyData_SNMP/Storage.pm index 37b26b9..7ad1105 100644 --- a/vendor/perl/AnyData_SNMP/Storage.pm +++ b/vendor/perl/AnyData_SNMP/Storage.pm @@ -6,7 +6,7 @@ package AnyData::Storage::SNMP; ## scalar sets? ## multi-hosts -$AnyData::Storage::VERSION = '5.09'; +$AnyData::Storage::VERSION = '5.09052'; use strict; use warnings; diff --git a/vendor/perl/MakefileSubs.pm b/vendor/perl/MakefileSubs.pm index 49e8938..804b20e 100644 --- a/vendor/perl/MakefileSubs.pm +++ b/vendor/perl/MakefileSubs.pm @@ -41,6 +41,7 @@ sub NetSNMPGetOpts { $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'}, @@ -113,8 +114,17 @@ sub AddCommonParams { my $cflags = `$opts->{'nsconfig'} --cflags` or die "net-snmp-config failed\n"; chomp($cflags); + # Remove -Wimplicit-fallthrough and -Wcast-function-type since these are + # not supported by older versions of gcc. + $cflags =~ s/-Wimplicit-fallthrough=*[0-9]*//g; + $cflags =~ s/-Wcast-function-type//g; + # Remove -Wmaybe-uninitialized because there are multiple unused + # variables in the .xs files. + $cflags =~ s/-Wmaybe-uninitialized//g; append($Params->{'CCFLAGS'}, $cflags); append($Params->{'CCFLAGS'}, $Config{'ccflags'}); + # Suppress warnings about old-style function definitions. + append($Params->{'CCFLAGS'}, '-Wno-old-style-definition'); # Suppress known Perl header shortcomings. $Params->{'CCFLAGS'} =~ s/ -W(cast-qual|write-strings)//g; append($Params->{'CCFLAGS'}, '-Wformat'); diff --git a/vendor/perl/OID/OID.pm b/vendor/perl/OID/OID.pm index 47268f2..a713732 100644 --- a/vendor/perl/OID/OID.pm +++ b/vendor/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.09'; +$VERSION = '5.09052'; sub new { my $type = shift; diff --git a/vendor/perl/OID/OID.xs b/vendor/perl/OID/OID.xs index 0922638..6f5a5b6 100644 --- a/vendor/perl/OID/OID.xs +++ b/vendor/perl/OID/OID.xs @@ -1,8 +1,12 @@ /* -*- C -*- */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-qual" +#pragma GCC diagnostic ignored "-Wdeclaration-after-statement" #include "EXTERN.h" #include "perl.h" #include "XSUB.h" +#pragma GCC diagnostic pop #include #include @@ -32,7 +36,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 @@ -96,8 +100,8 @@ __snprint_value(char *buf, size_t buf_len, netsnmp_variable_list *var, 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; @@ -130,15 +134,18 @@ __snprint_value(char *buf, size_t buf_len, netsnmp_variable_list *var, } 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; @@ -228,7 +235,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]))); } diff --git a/vendor/perl/SNMP/Makefile.PL b/vendor/perl/SNMP/Makefile.PL index 017b853..b4cc961 100644 --- a/vendor/perl/SNMP/Makefile.PL +++ b/vendor/perl/SNMP/Makefile.PL @@ -1,5 +1,6 @@ use strict; use warnings; +use Carp; use Config; use Cwd 'abs_path'; use ExtUtils::MakeMaker; @@ -106,8 +107,6 @@ sub SnmpInitMakeParams { sub GetTestInfo { my $info_file = File::Spec->catfile("t", "snmptest.cmd"); - my $snmpd_path1 = abs_path("${prefix}/sbin"); - my $snmpd_path2 = "/usr/sbin"; open(H, ">$info_file") || die "Error: could not open file '$info_file'($!)"; @@ -136,7 +135,10 @@ sub GetTestInfo { $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]); } @@ -146,11 +148,9 @@ sub GetTestInfo { $mibdir ||= prompt("Unable to locate the MIBs, Please enter the path: ", $mibdir); - $snmpd ||= prompt("Unable to locate \"snmpd\". Please enter the path: ", - $snmpd_path1); + $snmpd ||= prompt("Unable to locate \"snmpd\". Please enter the path: "); $snmptrapd ||= - prompt("Unable to locate \"snmptrapd\". Please enter the path: ", - $snmpd_path1); + prompt("Unable to locate \"snmptrapd\". Please enter the path: "); print H "SNMPD => $snmpd\n"; print H "SNMPTRAPD => $snmptrapd\n"; diff --git a/vendor/perl/SNMP/SNMP.pm b/vendor/perl/SNMP/SNMP.pm index 1113407..dc2d279 100644 --- a/vendor/perl/SNMP/SNMP.pm +++ b/vendor/perl/SNMP/SNMP.pm @@ -7,7 +7,7 @@ # modify it under the same terms as Perl itself. package SNMP; -$VERSION = '5.09'; # current release version number +$VERSION = '5.09052'; # current release version number use strict; use warnings; diff --git a/vendor/perl/SNMP/SNMP.xs b/vendor/perl/SNMP/SNMP.xs index 2e2c0fa..ca52a24 100644 --- a/vendor/perl/SNMP/SNMP.xs +++ b/vendor/perl/SNMP/SNMP.xs @@ -8,9 +8,13 @@ modify it under the same terms as Perl itself. */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-qual" +#pragma GCC diagnostic ignored "-Wdeclaration-after-statement" #include "EXTERN.h" #include "perl.h" #include "XSUB.h" +#pragma GCC diagnostic pop #include #include @@ -106,12 +110,12 @@ 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 *)); @@ -423,13 +427,11 @@ int type; #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; +#if defined(__has_attribute) && __has_attribute(nonnull) +__attribute__((nonnull(1))) +#endif +__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; @@ -487,8 +489,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; @@ -543,24 +545,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 */ @@ -569,7 +575,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 @@ -2605,6 +2611,7 @@ snmp_new_v3_session(version, peer, retries, timeout, sec_name, sec_level, sec_en SnmpSession session = {0}; void *ss = NULL; int verbose = SvIV(perl_get_sv("SNMP::verbose", 0x01 | 0x04)); + int auth_type, priv_type; snmp_sess_init(&session); @@ -2636,25 +2643,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, - OID_LENGTH(usmHMACMD5AuthProtocol)); - session.securityAuthProtoLen = OID_LENGTH(usmHMACMD5AuthProtocol); - } else -#endif - if (!strcmp(auth_proto, "SHA")) { - session.securityAuthProto = - snmp_duplicate_objid(usmHMACSHA1AuthProtocol, - OID_LENGTH(usmHMACSHA1AuthProtocol)); - session.securityAuthProtoLen = OID_LENGTH(usmHMACSHA1AuthProtocol); - } 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; @@ -2686,25 +2693,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, - OID_LENGTH(usmDESPrivProtocol)); - session.securityPrivProtoLen = OID_LENGTH(usmDESPrivProtocol); - } else -#endif - if (!strncmp(priv_proto, "AES", 3)) { - session.securityPrivProto = - snmp_duplicate_objid(usmAESPrivProtocol, - OID_LENGTH(usmAESPrivProtocol)); - session.securityPrivProtoLen = OID_LENGTH(usmAESPrivProtocol); - } 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; @@ -2808,7 +2814,6 @@ snmp_new_tunneled_session(version, peer, retries, timeout, sec_name, sec_level, } session.transport_configuration->compare = - (netsnmp_container_compare*) netsnmp_transport_config_compare; } @@ -3016,7 +3021,6 @@ snmp_read_module(module) OUTPUT: RETVAL - void snmp_set(sess_ref, varlist_ref, perl_callback) SV * sess_ref @@ -3024,6 +3028,7 @@ snmp_set(sess_ref, varlist_ref, perl_callback) SV * perl_callback PPCODE: { +#ifndef NETSNMP_NO_WRITE_SUPPORT AV *varlist; SV **varbind_ref; SV **varbind_val_f; @@ -3048,7 +3053,6 @@ snmp_set(sess_ref, varlist_ref, perl_callback) int use_enums; struct enum_list *ep; int best_guess; -#ifndef NETSNMP_NO_WRITE_SUPPORT New (0, oid_arr, MAX_OID_LEN, oid); @@ -3170,11 +3174,11 @@ snmp_set(sess_ref, varlist_ref, perl_callback) /* BUG!!! need to return an error value */ XPUSHs(&sv_undef); /* no mem or bad args */ } +done: + Safefree(oid_arr); #else /* NETSNMP_NO_WRITE_SUPPORT */ warn("error: Net-SNMP was compiled using --enable-read-only, set() can not be used."); #endif /* NETSNMP_NO_WRITE_SUPPORT */ -done: - Safefree(oid_arr); } void @@ -4821,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: @@ -5191,7 +5195,7 @@ snmp_mib_node_FETCH(tp_ref, key) 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)) { @@ -5281,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); @@ -5306,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 */ @@ -5319,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 ; diff --git a/vendor/perl/TrapReceiver/TrapReceiver.pm b/vendor/perl/TrapReceiver/TrapReceiver.pm index c0f9c03..c5844fb 100644 --- a/vendor/perl/TrapReceiver/TrapReceiver.pm +++ b/vendor/perl/TrapReceiver/TrapReceiver.pm @@ -47,7 +47,7 @@ require NetSNMP::OID; NETSNMPTRAPD_PRE_HANDLER ); -$VERSION = '5.09'; +$VERSION = '5.09052'; # 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 @@ -144,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 diff --git a/vendor/perl/TrapReceiver/TrapReceiver.xs b/vendor/perl/TrapReceiver/TrapReceiver.xs index 788963c..aca58f1 100644 --- a/vendor/perl/TrapReceiver/TrapReceiver.xs +++ b/vendor/perl/TrapReceiver/TrapReceiver.xs @@ -1,8 +1,12 @@ /* -*- c -*- */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-qual" +#pragma GCC diagnostic ignored "-Wdeclaration-after-statement" #include "EXTERN.h" #include "perl.h" #include "XSUB.h" +#pragma GCC diagnostic pop #include "ppport.h" diff --git a/vendor/perl/agent/Support/Support.pm b/vendor/perl/agent/Support/Support.pm index 681beff..ce2232c 100644 --- a/vendor/perl/agent/Support/Support.pm +++ b/vendor/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.09'; +$VERSION = '5.09052'; use strict; use warnings; diff --git a/vendor/perl/agent/agent.pm b/vendor/perl/agent/agent.pm index 0cb334e..3e86de2 100644 --- a/vendor/perl/agent/agent.pm +++ b/vendor/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.09'; +$VERSION = '5.09052'; 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/vendor/perl/agent/agent.xs b/vendor/perl/agent/agent.xs index 163a3ba..204267d 100644 --- a/vendor/perl/agent/agent.xs +++ b/vendor/perl/agent/agent.xs @@ -1,8 +1,13 @@ /* -*- C -*- */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-qual" +#pragma GCC diagnostic ignored "-Wdeclaration-after-statement" #include "EXTERN.h" #include "perl.h" #include "XSUB.h" +#pragma GCC diagnostic pop + #include #include @@ -598,6 +603,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]; @@ -630,7 +636,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 ); @@ -646,8 +666,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; } @@ -666,7 +686,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 ); @@ -682,8 +716,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; } @@ -695,7 +729,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; @@ -708,8 +756,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) { @@ -724,9 +772,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; } @@ -751,9 +799,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; } @@ -778,9 +826,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/vendor/perl/agent/default_store/default_store.pm b/vendor/perl/agent/default_store/default_store.pm index 160114b..d88103c 100644 --- a/vendor/perl/agent/default_store/default_store.pm +++ b/vendor/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.09'; +$VERSION = '5.09052'; sub AUTOLOAD { # This AUTOLOAD is used to 'autoload' constants from the constant() diff --git a/vendor/perl/agent/default_store/default_store.xs b/vendor/perl/agent/default_store/default_store.xs index 90df804..bf7814c 100644 --- a/vendor/perl/agent/default_store/default_store.xs +++ b/vendor/perl/agent/default_store/default_store.xs @@ -1,6 +1,10 @@ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-qual" +#pragma GCC diagnostic ignored "-Wdeclaration-after-statement" #include "EXTERN.h" #include "perl.h" #include "XSUB.h" +#pragma GCC diagnostic pop #include #include diff --git a/vendor/perl/default_store/default_store.pm b/vendor/perl/default_store/default_store.pm index 3675d7b..50a501f 100644 --- a/vendor/perl/default_store/default_store.pm +++ b/vendor/perl/default_store/default_store.pm @@ -202,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.09'; +$VERSION = '5.09052'; sub AUTOLOAD { # This AUTOLOAD is used to 'autoload' constants from the constant() diff --git a/vendor/perl/default_store/default_store.xs b/vendor/perl/default_store/default_store.xs index 7814ef8..3b8b53b 100644 --- a/vendor/perl/default_store/default_store.xs +++ b/vendor/perl/default_store/default_store.xs @@ -1,6 +1,10 @@ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-qual" +#pragma GCC diagnostic ignored "-Wdeclaration-after-statement" #include "EXTERN.h" #include "perl.h" #include "XSUB.h" +#pragma GCC diagnostic pop #include #include diff --git a/vendor/perl/manager/INSTALL b/vendor/perl/manager/INSTALL index 27d7436..d9a0365 100644 --- a/vendor/perl/manager/INSTALL +++ b/vendor/perl/manager/INSTALL @@ -54,13 +54,13 @@ SETTING UP APACHE (assumes you have mod_perl installed properly from above) - Idealy, it should be put behind a user/password database in your web + Ideally, it should be put behind a user/password database in your web server (something that sets the REMOTE_USER environmental for CGI scripts). This will greatly enhance its operation so that different users can be users of different groups of hosts, etc... If this is not done, everyone will use the user name "guest". - At the bottom of your httpd.conf file or in an apporpriate + At the bottom of your httpd.conf file or in an appropriate VirtualHost directive put the following lines, appropriately configuring the sql username, etc. I strongly recommend turning on SSL support for this as well.: diff --git a/vendor/python/netsnmp/client_intf.c b/vendor/python/netsnmp/client_intf.c index 49933a4..4ebb024 100644 --- a/vendor/python/netsnmp/client_intf.c +++ b/vendor/python/netsnmp/client_intf.c @@ -211,7 +211,7 @@ __sprint_num_objid(char **buf, size_t *buf_len, const oid *objid, int len) end = *buf + *buf_len; (*buf)[0] = '\0'; for (i = 0; i < len; i++) - p += snprintf(p, end - p, ".%lu", *objid++); + p += snprintf(p, end - p, ".%" NETSNMP_PRIo "u", *objid++); return SUCCESS; } @@ -349,7 +349,7 @@ __scan_num_objid(const char *buf, oid *objid, size_t *len) cp = buf; while (*buf) { if (*buf++ == '.') { - sscanf(cp, "%lu", objid++); + sscanf(cp, "%" NETSNMP_PRIo "u", objid++); /* *objid++ = atoi(cp); */ (*len)++; cp = buf; @@ -359,7 +359,7 @@ __scan_num_objid(const char *buf, oid *objid, size_t *len) } } } - sscanf(cp, "%lu", objid++); + sscanf(cp, "%" NETSNMP_PRIo "u", objid++); /* *objid++ = atoi(cp); */ (*len)++; return SUCCESS; @@ -496,7 +496,7 @@ __concat_oid_str(oid *doid_arr, size_t *doid_arr_len, const char *soid_str) return FAILURE; cp = strtok_r(soid_buf,".",&st); while (cp) { - sscanf(cp, "%lu", &(doid_arr[(*doid_arr_len)++])); + sscanf(cp, "%" NETSNMP_PRIo "u", &(doid_arr[(*doid_arr_len)++])); /* doid_arr[(*doid_arr_len)++] = atoi(cp); */ cp = strtok_r(NULL,".",&st); } @@ -693,11 +693,9 @@ __add_var_val_str(netsnmp_pdu *pdu, const oid *name, int name_length, 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; @@ -851,10 +849,14 @@ 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, ""); } @@ -932,6 +934,18 @@ 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. */ @@ -942,9 +956,10 @@ py_netsnmp_attr_set_string(PyObject *obj, const char *attr_name, 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); @@ -1254,7 +1269,6 @@ netsnmp_create_session_tunneled(PyObject *self, PyObject *args) } session.transport_configuration->compare = - (netsnmp_container_compare*) netsnmp_transport_config_compare; } @@ -1299,227 +1313,65 @@ netsnmp_delete_session(PyObject *self, PyObject *args) } -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; - struct session_list *ss; - netsnmp_pdu *pdu, *response; - netsnmp_variable_list *vars; - struct tree *tp; - int len; - oid *oid_arr; - size_t oid_arr_len = MAX_OID_LEN; - int type; - char type_str[MAX_TYPE_NAME_LEN]; - u_char *str_buf = NULL; - size_t str_buf_len = 0; - size_t out_len = 0; - int buf_over = 0; - const char *tag; - const 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]; - const 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; + 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; } - - ss = 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); - } - - 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")) { - if (str_buf == NULL) { - str_buf = (u_char *) netsnmp_malloc(STR_BUF_SIZE); - str_buf_len = STR_BUF_SIZE; - } - *str_buf = '.'; - *(str_buf+1) = '\0'; - out_len = 0; - tp = netsnmp_sprint_realloc_objid_tree(&str_buf, &str_buf_len, - &out_len, 1, &buf_over, - vars->name,vars->name_length); - if (_debug_level) - printf("netsnmp_get:str_buf:%s:%d:%d\n", 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("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); - } - __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)); + 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); + __get_type_str(type, type_str); - py_netsnmp_attr_set_string(varbind, "type", type_str, strlen(type_str)); + py_netsnmp_attr_set_string(varbind, "type", type_str, strlen(type_str)); - len = __snprint_value((char **)&str_buf, &str_buf_len, - 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); - } else { - printf("netsnmp_get: bad varbind (%d)\n", varlist_ind); - Py_XDECREF(varbind); - } - } - - /* 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: - free(oid_arr); - if (str_buf != NULL) - netsnmp_free(str_buf); - 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; @@ -1530,18 +1382,13 @@ netsnmp_getnext(PyObject *self, PyObject *args) struct session_list *ss; netsnmp_pdu *pdu, *response; netsnmp_variable_list *vars; - struct tree *tp; int len; oid *oid_arr; size_t oid_arr_len = MAX_OID_LEN; int type; - char type_str[MAX_TYPE_NAME_LEN]; - u_char *str_buf = NULL; - size_t str_buf_len = 0; - size_t out_len = 0; - int buf_over = 0; + char *str_buf = NULL; const char *tag; - const char *iid = NULL; + const char *iid; int getlabel_flag = NO_FLAGS; int sprintval_flag = USE_BASIC; int verbose = py_netsnmp_verbose(); @@ -1554,6 +1401,8 @@ netsnmp_getnext(PyObject *self, PyObject *args) 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) { @@ -1567,9 +1416,11 @@ netsnmp_getnext(PyObject *self, PyObject *args) 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; @@ -1582,7 +1433,7 @@ netsnmp_getnext(PyObject *self, PyObject *args) 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); @@ -1593,19 +1444,19 @@ 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:%zd:%d\n", - tag, iid, oid_arr_len, best_guess); + 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); varlist_len++; } else { if (verbose) - printf("error: getnext: unknown object ID (%s)", + printf("error: get: unknown object ID (%s)", (tag ? tag : "")); snmp_free_pdu(pdu); Py_DECREF(varbind); @@ -1620,7 +1471,7 @@ netsnmp_getnext(PyObject *self, PyObject *args) if (PyErr_Occurred()) { /* propagate error */ if (verbose) - printf("error: getnext: unknown python error"); + printf("error: get: unknown python error"); snmp_free_pdu(pdu); goto done; } @@ -1668,61 +1519,34 @@ 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")) { - if (str_buf == NULL) { - str_buf = (u_char *) netsnmp_malloc(STR_BUF_SIZE); - str_buf_len = STR_BUF_SIZE; - } - *str_buf = '.'; - *(str_buf+1) = '\0'; - out_len = 0; - tp = netsnmp_sprint_realloc_objid_tree(&str_buf, &str_buf_len, - &out_len, 1, &buf_over, - vars->name,vars->name_length); - - 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); - - py_netsnmp_attr_set_string(varbind, "tag", tag, STRLEN(tag)); - py_netsnmp_attr_set_string(varbind, "iid", iid, STRLEN(iid)); + if (err_ind >= 1 && varlist_ind >= err_ind - 1) + continue; - __get_type_str(type, type_str); - - py_netsnmp_attr_set_string(varbind, "type", type_str, - strlen(type_str)); - - len = __snprint_value((char **)&str_buf, &str_buf_len, - 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); + if (varbind == NULL) { + /* PySequence_GetItem failed - break to avoid NULL deref in build_python_varbind */ + break; + } + 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); + printf("%s: bad varbind (%d)\n", func_name, varlist_ind); Py_XDECREF(varbind); } } @@ -1743,6 +1567,18 @@ netsnmp_getnext(PyObject *self, PyObject *args) 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) { @@ -1758,19 +1594,13 @@ netsnmp_walk(PyObject *self, PyObject *args) netsnmp_pdu *pdu, *response; netsnmp_pdu *newpdu; netsnmp_variable_list *vars, *oldvars; - struct tree *tp; int len; oid **oid_arr = NULL; size_t *oid_arr_len = NULL; oid **oid_arr_broken_check = NULL; size_t *oid_arr_broken_check_len = NULL; - int type; - char type_str[MAX_TYPE_NAME_LEN]; int status; - u_char *str_buf = NULL; - size_t str_buf_len = 0; - size_t out_len = 0; - int buf_over = 0; + char *str_buf = NULL; const char *tag; const char *iid = NULL; int getlabel_flag = NO_FLAGS; @@ -1856,9 +1686,8 @@ 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) @@ -1968,9 +1797,8 @@ netsnmp_walk(PyObject *self, PyObject *args) } else { newpdu = snmp_pdu_create(SNMP_MSG_GETNEXT); - for(vars = (response ? response->variables : NULL), - varlist_ind = 0, - oldvars = (pdu ? pdu->variables : NULL); + for(vars = response->variables, varlist_ind = 0, + oldvars = (pdu ? pdu->variables : NULL); vars && (varlist_ind < varlist_len); vars = vars->next_variable, varlist_ind++, oldvars = (oldvars ? oldvars->next_variable : NULL)) { @@ -2007,46 +1835,15 @@ netsnmp_walk(PyObject *self, PyObject *args) } varbind = py_netsnmp_construct_varbind(); + if (varbind == NULL) + break; - if (PyObject_HasAttrString(varbind, "tag")) { - if (str_buf == NULL) { - str_buf = (u_char *) netsnmp_malloc(STR_BUF_SIZE); - str_buf_len = STR_BUF_SIZE; - } - str_buf[0] = '.'; - str_buf[1] = '\0'; - out_len = 0; - tp = netsnmp_sprint_realloc_objid_tree(&str_buf, &str_buf_len, - &out_len, 1, &buf_over, - vars->name,vars->name_length); - - 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)); - - __get_type_str(type, type_str); - - py_netsnmp_attr_set_string(varbind, "type", type_str, - strlen(type_str)); - - len = __snprint_value((char **)&str_buf, &str_buf_len, - vars, tp, type, sprintval_flag); - str_buf[len] = '\0'; + 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); - py_netsnmp_attr_set_string(varbind, "val", (char *) str_buf, - len); + py_netsnmp_attr_set_string(varbind, "val", str_buf, len); /* push the varbind onto the return varbinds */ PyList_Append(varbinds, varbind); @@ -2055,7 +1852,8 @@ netsnmp_walk(PyObject *self, PyObject *args) /* 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)); + Py_BuildValue(hex ? "y#" : "s#", str_buf, + len)); } else { /* Return None for this variable. */ _PyTuple_Resize(&val_tuple, result_count+1); @@ -2122,16 +1920,10 @@ netsnmp_getbulk(PyObject *self, PyObject *args) struct session_list *ss; netsnmp_pdu *pdu, *response; netsnmp_variable_list *vars; - struct tree *tp; int len; oid *oid_arr; size_t oid_arr_len = MAX_OID_LEN; - int type; - char type_str[MAX_TYPE_NAME_LEN]; - u_char *str_buf = NULL; - size_t str_buf_len = 0; - size_t out_len = 0; - int buf_over = 0; + char *str_buf = NULL; const char *tag; const char *iid; int getlabel_flag = NO_FLAGS; @@ -2190,7 +1982,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) { @@ -2269,50 +2061,20 @@ netsnmp_getbulk(PyObject *self, PyObject *args) vars = vars->next_variable, varbind_ind++) { varbind = py_netsnmp_construct_varbind(); + if (varbind == NULL) + break; - if (PyObject_HasAttrString(varbind, "tag")) { - if (str_buf == NULL) { - str_buf = (u_char *) netsnmp_malloc(STR_BUF_SIZE); - str_buf_len = STR_BUF_SIZE; - } - *str_buf = '.'; - *(str_buf+1) = '\0'; - out_len = 0; - buf_over = 0; - tp = netsnmp_sprint_realloc_objid_tree(&str_buf, &str_buf_len, - &out_len, 1, &buf_over, - vars->name,vars->name_length); - 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); + 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); - py_netsnmp_attr_set_string(varbind, "type", type_str, - strlen(type_str)); - - len = __snprint_value((char **)&str_buf, &str_buf_len, - 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)); + Py_BuildValue(hex ? "y#" : "s#", str_buf, len)); Py_DECREF(varbind); @@ -2375,7 +2137,7 @@ netsnmp_set(PyObject *self, PyObject *args) oid *oid_arr; 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(); @@ -2446,23 +2208,20 @@ netsnmp_set(PyObject *self, PyObject *args) snmp_free_pdu(pdu); goto done; } - memset(tmp_val_str, 0, sizeof(tmp_val_str)); - if (tmplen >= (Py_ssize_t)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"); diff --git a/vendor/python/netsnmp/tests/test.py b/vendor/python/netsnmp/tests/test.py index 9048b90..3d1d4ce 100644 --- a/vendor/python/netsnmp/tests/test.py +++ b/vendor/python/netsnmp/tests/test.py @@ -74,6 +74,8 @@ def test_v1_get(self): 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') @@ -81,6 +83,25 @@ def test_v1_get(self): 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") @@ -123,6 +144,10 @@ def test_v1_walk(self): 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()) @@ -130,6 +155,10 @@ def test_v1_walk(self): 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): @@ -165,6 +194,10 @@ def test_v1_mv_get(self): 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) @@ -172,6 +205,10 @@ def test_v1_mv_get(self): 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'), @@ -185,6 +222,10 @@ def test_v1_mv_get(self): 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): @@ -216,6 +257,17 @@ def test_v1_walk_3(self): 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") @@ -237,6 +289,10 @@ def test_v2c_getnext(self): 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") @@ -245,6 +301,11 @@ def test_v2c_getnext(self): 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") @@ -264,6 +325,11 @@ def test_v2c_getbulk(self): 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") @@ -311,6 +377,10 @@ def test_v3_get(self): 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") @@ -327,6 +397,10 @@ def test_v3_getnext(self): 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") @@ -343,6 +417,10 @@ def test_v3_getbulk(self): 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") @@ -438,6 +516,10 @@ def testFuncs(self): 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") @@ -460,11 +542,61 @@ def testFuncs(self): 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/vendor/python/setup.py b/vendor/python/setup.py index 2547842..ce4c86a 100644 --- a/vendor/python/setup.py +++ b/vendor/python/setup.py @@ -1,4 +1,3 @@ -from distutils.core import setup, Extension from setuptools import setup, Extension, find_packages import os import re @@ -17,14 +16,14 @@ 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() + " " + os.popen(basedir+'/net-snmp-config --base-cflags '+basedir).read() - libs = re.findall(r"-l(\S+)", netsnmp_libs) - libdirs = re.findall(r"-L(\S+)", libdir) - incdirs = re.findall(r"-I(\S+)", incdir) + 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/vendor/sedscript.in b/vendor/sedscript.in index 7814ce9..0a9b6e4 100644 --- a/vendor/sedscript.in +++ b/vendor/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/vendor/snmplib/Makefile.depend b/vendor/snmplib/Makefile.depend index 457d7f2..33de485 100644 --- a/vendor/snmplib/Makefile.depend +++ b/vendor/snmplib/Makefile.depend @@ -1,6 +1,9 @@ # DO NOT DELETE THIS LINE -- make depend depends on it. ./asn1.lo: ../include/net-snmp/net-snmp-config.h +./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 @@ -23,7 +26,9 @@ ./asn1.lo: ../include/net-snmp/library/snmpTCPDomain.h ./asn1.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -44,7 +49,7 @@ ./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 @@ -52,8 +57,14 @@ ./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 @@ -82,7 +93,9 @@ ./callback.lo: ../include/net-snmp/library/snmpTCPDomain.h ./callback.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -100,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 @@ -108,10 +121,66 @@ ./callback.lo: ../include/net-snmp/library/snmp_assert.h ./callback.lo: ../include/net-snmp/version.h ./cert_util.lo: ../include/net-snmp/net-snmp-config.h +./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/machine/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 @@ -139,7 +208,9 @@ ./check_varbind.lo: ../include/net-snmp/library/snmpTCPDomain.h ./check_varbind.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -159,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 @@ -169,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 @@ -181,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 @@ -210,7 +280,9 @@ ./closedir.lo: ../include/net-snmp/library/snmpTCPDomain.h ./closedir.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -249,7 +321,9 @@ ./container.lo: ../include/net-snmp/library/snmpTCPDomain.h ./container.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -268,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 @@ -289,8 +363,8 @@ ./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 @@ -320,7 +394,9 @@ ./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 @@ -340,7 +416,7 @@ ./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: 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 @@ -361,8 +437,8 @@ ./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_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 @@ -392,7 +468,9 @@ ./container_iterator.lo: ../include/net-snmp/library/snmpTCPDomain.h ./container_iterator.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -411,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 @@ -432,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 @@ -463,7 +541,9 @@ ./container_list_ssll.lo: ../include/net-snmp/library/snmpTCPDomain.h ./container_list_ssll.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -482,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 @@ -503,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 @@ -534,7 +614,9 @@ ./container_null.lo: ../include/net-snmp/library/snmpTCPDomain.h ./container_null.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -553,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 @@ -574,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 @@ -605,7 +687,9 @@ ./data_list.lo: ../include/net-snmp/library/snmpTCPDomain.h ./data_list.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -624,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 @@ -645,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 @@ -675,7 +759,9 @@ ./default_store.lo: ../include/net-snmp/library/snmpTCPDomain.h ./default_store.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -699,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 @@ -734,7 +820,9 @@ ./dir_utils.lo: ../include/net-snmp/library/snmpTCPDomain.h ./dir_utils.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -753,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 @@ -774,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 @@ -806,7 +894,9 @@ ./fd_event_manager.lo: ../include/net-snmp/library/snmpTCPDomain.h ./fd_event_manager.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -826,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 @@ -847,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 @@ -880,7 +970,9 @@ ./file_utils.lo: ../include/net-snmp/library/snmpTCPDomain.h ./file_utils.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -899,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 @@ -920,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 @@ -952,7 +1044,9 @@ ./gettimeofday.lo: ../include/net-snmp/library/snmpTCPDomain.h ./gettimeofday.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -990,7 +1084,9 @@ ./inet_ntop.lo: ../include/net-snmp/library/snmpTCPDomain.h ./inet_ntop.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1027,7 +1123,9 @@ ./inet_pton.lo: ../include/net-snmp/library/snmpTCPDomain.h ./inet_pton.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1063,7 +1161,9 @@ ./int64.lo: ../include/net-snmp/library/snmpTCPDomain.h ./int64.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1102,7 +1202,9 @@ ./keytools.lo: ../include/net-snmp/library/snmpTCPDomain.h ./keytools.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1120,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 @@ -1160,7 +1262,9 @@ ./large_fd_set.lo: ../include/net-snmp/library/snmpTCPDomain.h ./large_fd_set.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1180,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 @@ -1201,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 @@ -1232,7 +1335,9 @@ ./lcd_time.lo: ../include/net-snmp/library/snmpTCPDomain.h ./lcd_time.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1250,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 @@ -1265,8 +1370,7 @@ ./lcd_time.lo: ../include/net-snmp/library/transform_oids.h ./md5.lo: ../include/net-snmp/net-snmp-config.h ./md5.lo: ../include/net-snmp/net-snmp-includes.h -./md5.lo: ../include/net-snmp/definitions.h -./md5.lo: ../include/net-snmp/types.h +./md5.lo: ../include/net-snmp/definitions.h ../include/net-snmp/types.h ./md5.lo: ../include/net-snmp/library/oid.h ./md5.lo: ../include/net-snmp/library/types.h ./md5.lo: ../include/net-snmp/library/snmp_api.h @@ -1290,7 +1394,9 @@ ./md5.lo: ../include/net-snmp/library/snmpTCPDomain.h ./md5.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1309,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 @@ -1328,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 @@ -1358,7 +1463,9 @@ ./mib.lo: ../include/net-snmp/library/snmpTCPDomain.h ./mib.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1380,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 @@ -1417,7 +1524,9 @@ ./oid_stash.lo: ../include/net-snmp/library/snmpTCPDomain.h ./oid_stash.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1436,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 @@ -1457,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 @@ -1486,7 +1595,9 @@ ./opendir.lo: ../include/net-snmp/library/snmpTCPDomain.h ./opendir.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1523,7 +1634,9 @@ ./parse.lo: ../include/net-snmp/library/snmpTCPDomain.h ./parse.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1546,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 @@ -1582,7 +1695,9 @@ ./read_config.lo: ../include/net-snmp/library/snmpTCPDomain.h ./read_config.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1606,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 @@ -1640,7 +1755,9 @@ ./readdir.lo: ../include/net-snmp/library/snmpTCPDomain.h ./readdir.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1652,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 @@ -1677,7 +1795,9 @@ ./scapi.lo: ../include/net-snmp/library/snmpTCPDomain.h ./scapi.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1694,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 @@ -1734,7 +1854,9 @@ ./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 @@ -1743,6 +1865,7 @@ ./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 @@ -1772,7 +1895,9 @@ ./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 @@ -1806,7 +1931,9 @@ ./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 @@ -1842,7 +1969,9 @@ ./snmp_alarm.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmp_alarm.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1867,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 @@ -1902,7 +2031,9 @@ ./snmp_api.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmp_api.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1926,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 @@ -1941,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 @@ -1967,7 +2097,9 @@ ./snmp_auth.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmp_auth.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -1986,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 @@ -2023,7 +2155,9 @@ ./snmp_client.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmp_client.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2065,7 +2199,9 @@ ./snmp_debug.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmp_debug.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2090,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 @@ -2125,7 +2261,9 @@ ./snmp_enum.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmp_enum.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2171,7 +2309,9 @@ ./snmp_logging.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmp_logging.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2195,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 snprintf.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 @@ -2230,7 +2371,9 @@ ./snmp_openssl.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmp_openssl.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2250,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 @@ -2271,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 @@ -2301,7 +2444,9 @@ ./snmp_parse_args.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmp_parse_args.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2321,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 @@ -2342,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 @@ -2371,7 +2516,9 @@ ./snmp_secmod.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmp_secmod.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2396,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 @@ -2405,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 @@ -2436,7 +2583,9 @@ ./snmp_service.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmp_service.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2456,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 @@ -2477,8 +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_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 @@ -2507,7 +2656,9 @@ ./snmp_transport.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmp_transport.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2525,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 @@ -2564,7 +2715,9 @@ ./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 @@ -2591,7 +2744,7 @@ ./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: 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 @@ -2632,7 +2785,9 @@ ./snmptsm.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmptsm.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2650,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 @@ -2670,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 @@ -2700,7 +2854,9 @@ ./snmpusm.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmpusm.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2723,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 @@ -2763,7 +2919,9 @@ ./snmpv3.lo: ../include/net-snmp/library/snmpTCPDomain.h ./snmpv3.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2787,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 @@ -2831,7 +2989,9 @@ ./strlcat.lo: ../include/net-snmp/library/snmpTCPDomain.h ./strlcat.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2868,7 +3028,9 @@ ./strlcpy.lo: ../include/net-snmp/library/snmpTCPDomain.h ./strlcpy.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2905,7 +3067,9 @@ ./strtok_r.lo: ../include/net-snmp/library/snmpTCPDomain.h ./strtok_r.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2944,7 +3108,9 @@ ./strtoull.lo: ../include/net-snmp/library/snmpTCPDomain.h ./strtoull.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2957,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 @@ -2982,7 +3147,9 @@ ./system.lo: ../include/net-snmp/library/snmpTCPDomain.h ./system.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -2999,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 @@ -3041,7 +3208,9 @@ ./text_utils.lo: ../include/net-snmp/library/snmpTCPDomain.h ./text_utils.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -3060,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 @@ -3081,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 @@ -3112,7 +3281,9 @@ ./tools.lo: ../include/net-snmp/library/snmpTCPDomain.h ./tools.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -3129,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 @@ -3164,7 +3335,9 @@ ./ucd_compat.lo: ../include/net-snmp/library/snmpTCPDomain.h ./ucd_compat.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -3181,8 +3354,7 @@ ./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 @@ -3206,7 +3378,9 @@ ./vacm.lo: ../include/net-snmp/library/snmpTCPDomain.h ./vacm.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -3247,22 +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 @@ -3273,6 +3447,7 @@ ./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/library/snmpTCPDomain.h ./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h +./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/library/snmpIPXDomain.h ./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/library/ucd_compat.h ./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/library/mib.h @@ -3317,7 +3492,9 @@ ./transports/snmpAliasDomain.lo: ../include/net-snmp/library/snmpTCPDomain.h ./transports/snmpAliasDomain.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -3339,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 @@ -3360,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 @@ -3389,7 +3566,9 @@ ./transports/snmpCallbackDomain.lo: ../include/net-snmp/library/snmpTCPDomain.h ./transports/snmpCallbackDomain.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -3414,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 @@ -3422,6 +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/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 @@ -3450,6 +3670,8 @@ ./transports/snmpIPXDomain.lo: ../include/net-snmp/library/snmpTCPDomain.h ./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 @@ -3494,7 +3716,9 @@ ./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 @@ -3504,6 +3728,7 @@ ./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 @@ -3512,7 +3737,7 @@ ./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/snmp_logging.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 ./transports/snmpSSHDomain.lo: ../include/net-snmp/library/types.h @@ -3525,6 +3750,7 @@ ./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 ./transports/snmpSSHDomain.lo: ../include/net-snmp/library/callback.h ./transports/snmpSSHDomain.lo: ../include/net-snmp/library/snmp_transport.h @@ -3538,7 +3764,9 @@ ./transports/snmpSSHDomain.lo: ../include/net-snmp/library/snmpTCPDomain.h ./transports/snmpSSHDomain.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -3547,7 +3775,6 @@ ./transports/snmpSSHDomain.lo: ../include/net-snmp/library/snmp_impl.h ./transports/snmpSSHDomain.lo: ../include/net-snmp/library/snmp.h ./transports/snmpSSHDomain.lo: ../include/net-snmp/library/snmp-tc.h -./transports/snmpSSHDomain.lo: ../include/net-snmp/library/snmpSSHDomain.h ./transports/snmpSSHDomain.lo: ../include/net-snmp/library/tools.h ./transports/snmpSSHDomain.lo: ../include/net-snmp/library/system.h ./transports/snmpSSHDomain.lo: ../include/net-snmp/library/default_store.h @@ -3585,7 +3812,9 @@ ./transports/snmpSTDDomain.lo: ../include/net-snmp/library/snmpTCPDomain.h ./transports/snmpSTDDomain.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -3623,7 +3852,9 @@ ./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 @@ -3665,7 +3896,9 @@ ./transports/snmpTCPBaseDomain.lo: ../include/net-snmp/library/snmpTCPDomain.h ./transports/snmpTCPBaseDomain.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -3703,7 +3936,9 @@ ./transports/snmpTCPDomain.lo: ../include/net-snmp/library/snmpTCPDomain.h ./transports/snmpTCPDomain.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -3713,6 +3948,7 @@ ./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 @@ -3746,7 +3982,9 @@ ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmpTCPDomain.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -3755,6 +3993,7 @@ ./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: ./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 @@ -3762,7 +4001,7 @@ ./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: ../include/net-snmp/library/factory.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 @@ -3772,6 +4011,7 @@ ./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: ./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 @@ -3798,7 +4038,9 @@ ./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 @@ -3817,7 +4059,7 @@ ./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 @@ -3850,7 +4092,9 @@ ./transports/snmpUDPBaseDomain.lo: ../include/net-snmp/library/snmpTCPDomain.h ./transports/snmpUDPBaseDomain.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -3892,7 +4136,9 @@ ./transports/snmpUDPDomain.lo: ../include/net-snmp/library/snmpTCPDomain.h ./transports/snmpUDPDomain.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -3902,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 @@ -3939,7 +4186,9 @@ ./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/library/snmpTCPDomain.h ./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 @@ -3949,13 +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 @@ -3980,7 +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/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 @@ -3990,7 +4244,6 @@ ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/snmp_impl.h ./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/snmpIPv6BaseDomain.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 @@ -4019,7 +4272,9 @@ ./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 @@ -4029,6 +4284,7 @@ ./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 @@ -4061,7 +4317,9 @@ ./transports/snmpUnixDomain.lo: ../include/net-snmp/library/snmpTCPDomain.h ./transports/snmpUnixDomain.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./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 diff --git a/vendor/snmplib/Makefile.in b/vendor/snmplib/Makefile.in index e3163ea..ecbfc4d 100644 --- a/vendor/snmplib/Makefile.in +++ b/vendor/snmplib/Makefile.in @@ -57,7 +57,6 @@ INCLUDESUBDIRHEADERS=README \ data_list.h \ default_store.h \ dir_utils.h \ - factory.h \ fd_event_manager.h \ file_utils.h \ getopt.h \ @@ -231,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/vendor/snmplib/asn1.c b/vendor/snmplib/asn1.c index cfbcd74..f0e7c9a 100644 --- a/vendor/snmplib/asn1.c +++ b/vendor/snmplib/asn1.c @@ -167,7 +167,7 @@ SOFTWARE. #include "gw.h" #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -181,7 +181,7 @@ SOFTWARE. #ifdef HAVE_STDLIB_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif @@ -301,16 +301,13 @@ _asn_length_err(const char *str, size_t wrongsize, size_t rightsize) * @param wrongsize wrong length * @param rightsize expected length */ -static - void +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, + snprintf(ebuf, sizeof(ebuf), "%s length %lu too short: need %lu", str, (unsigned long)wrongsize, (unsigned long)rightsize); - ebuf[ sizeof(ebuf)-1 ] = 0; ERROR_MSG(ebuf); } @@ -348,7 +345,7 @@ asn_parse_nlength(u_char *pkt, size_t pkt_len, u_long *data_len) * long length; first byte is length of length (after masking high bit) */ len_len = (int) ((*pkt & ~0x80) + 1); - if ((int) pkt_len <= len_len ) + if (pkt_len < len_len) return NULL; /* still too short for length and data */ /* now we know we have enough data to parse length */ @@ -774,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)) @@ -783,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)); @@ -2341,7 +2338,7 @@ asn_parse_signed_int64(u_char * data, high = 0xFFFFFF; } - while (asn_length--) { + for ( ; asn_length; asn_length--) { high = ((0x00FFFFFF & high) << 8) | ((low & 0xFF000000U) >> 24); low = ((low & 0x00FFFFFF) << 8) | *bufp++; } @@ -3101,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)) { @@ -3442,6 +3440,9 @@ asn_realloc_rbuild_bitstring(u_char ** pkt, size_t * pkt_len, static const char *errpre = "build bitstring"; size_t start_offset = *offset; + if (str == NULL && strlength != 0) + return 0; + while ((*pkt_len - *offset) < strlength) { if (!(r && asn_realloc(pkt, pkt_len))) { return 0; diff --git a/vendor/snmplib/callback.c b/vendor/snmplib/callback.c index 0df5897..96854f5 100644 --- a/vendor/snmplib/callback.c +++ b/vendor/snmplib/callback.c @@ -20,23 +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_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif #if !defined(mingw32) && defined(HAVE_SYS_TIME_H) @@ -118,7 +118,7 @@ NETSNMP_STATIC_INLINE int _callback_lock(int major, int minor, const char* warn, int do_assert) { int lock_holded=0; - NETSNMP_SELECT_TIMEVAL lock_time = { 0, 1000 }; + NETSNMP_SELECT_TIMEVAL lock_time; #ifdef NETSNMP_PARANOID_LEVEL_HIGH if (major >= MAX_CALLBACK_IDS || minor >= MAX_CALLBACK_SUBIDS) { @@ -132,8 +132,11 @@ _callback_lock(int major, int minor, const char* warn, int do_assert) types[major], (SNMP_CALLBACK_LIBRARY == major) ? SNMP_STRORNULL(lib[minor]) : "null")); #endif - while (CALLBACK_LOCK_COUNT(major,minor) >= 1 && ++lock_holded < 100) + while (CALLBACK_LOCK_COUNT(major,minor) >= 1 && ++lock_holded < 100) { + lock_time.tv_sec = 0; + lock_time.tv_usec = 1000; select(0, NULL, NULL, NULL, &lock_time); + } if(lock_holded >= 100) { if (NULL != warn) diff --git a/vendor/snmplib/cert_util.c b/vendor/snmplib/cert_util.c index e7b7114..5b5aaaa 100644 --- a/vendor/snmplib/cert_util.c +++ b/vendor/snmplib/cert_util.c @@ -42,32 +42,34 @@ netsnmp_feature_child_of(tls_fingerprint_build, cert_util_all); #include +#include + #if 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 @@ -114,16 +116,14 @@ static netsnmp_container *_trusted_certs = NULL; static void _setup_containers(void); static void _cert_indexes_load(void); -static void _cert_free(netsnmp_cert *cert, void *context); -static void _key_free(netsnmp_key *key, void *context); -static int _cert_compare(netsnmp_cert *lhs, netsnmp_cert *rhs); -static int _cert_sn_compare(netsnmp_cert *lhs, netsnmp_cert *rhs); -static int _cert_sn_ncompare(netsnmp_cert *lhs, netsnmp_cert *rhs); -static int _cert_cn_compare(netsnmp_cert *lhs, netsnmp_cert *rhs); -static int _cert_fn_compare(netsnmp_cert_common *lhs, - netsnmp_cert_common *rhs); -static int _cert_fn_ncompare(netsnmp_cert_common *lhs, - netsnmp_cert_common *rhs); +static void _cert_free(void *cert, void *context); +static void _key_free(void *key, void *context); +static int _cert_compare(const void *p, const void *q); +static int _cert_sn_compare(const void *p, const void *q); +static int _cert_sn_ncompare(const void *p, const void *q); +static int _cert_cn_compare(const void *p, const void *q); +static int _cert_fn_compare(const void *p, const void *q); +static int _cert_fn_ncompare(const void *p, const void *q); static void _find_partner(netsnmp_cert *cert, netsnmp_key *key); static netsnmp_cert *_find_issuer(netsnmp_cert *cert); static netsnmp_void_array *_cert_find_subset_fn(const char *filename, @@ -200,7 +200,7 @@ _setup_trusted_certs(void) return; } _trusted_certs->container_name = strdup("trusted certificates"); - _trusted_certs->compare = (netsnmp_container_compare*) strcmp; + _trusted_certs->compare = netsnmp_str_compare; } /* @@ -351,8 +351,8 @@ _get_cert_container(const char *use) return NULL; } c->container_name = strdup(use); - c->free_item = (netsnmp_container_obj_func*)_cert_free; - c->compare = (netsnmp_container_compare*)_cert_compare; + c->free_item = _cert_free; + c->compare = _cert_compare; return c; } @@ -362,6 +362,8 @@ _setup_containers(void) { netsnmp_container *additional_keys; + int rc; + _certs = _get_cert_container("netsnmp certificates"); if (NULL == _certs) return; @@ -375,7 +377,8 @@ _setup_containers(void) } additional_keys->container_name = strdup("certs_cn"); additional_keys->free_item = NULL; - additional_keys->compare = (netsnmp_container_compare*)_cert_cn_compare; + additional_keys->compare = _cert_cn_compare; + CONTAINER_SET_OPTIONS(additional_keys, CONTAINER_KEY_ALLOW_DUPLICATES, rc); netsnmp_container_add_index(_certs, additional_keys); /** additional keys: subject name */ @@ -387,8 +390,9 @@ _setup_containers(void) } additional_keys->container_name = strdup("certs_sn"); additional_keys->free_item = NULL; - additional_keys->compare = (netsnmp_container_compare*)_cert_sn_compare; - additional_keys->ncompare = (netsnmp_container_compare*)_cert_sn_ncompare; + additional_keys->compare = _cert_sn_compare; + additional_keys->ncompare = _cert_sn_ncompare; + CONTAINER_SET_OPTIONS(additional_keys, CONTAINER_KEY_ALLOW_DUPLICATES, rc); netsnmp_container_add_index(_certs, additional_keys); /** additional keys: file name */ @@ -400,8 +404,9 @@ _setup_containers(void) } additional_keys->container_name = strdup("certs_fn"); additional_keys->free_item = NULL; - additional_keys->compare = (netsnmp_container_compare*)_cert_fn_compare; - additional_keys->ncompare = (netsnmp_container_compare*)_cert_fn_ncompare; + additional_keys->compare = _cert_fn_compare; + additional_keys->ncompare = _cert_fn_ncompare; + CONTAINER_SET_OPTIONS(additional_keys, CONTAINER_KEY_ALLOW_DUPLICATES, rc); netsnmp_container_add_index(_certs, additional_keys); _keys = netsnmp_container_find("cert_keys:binary_array"); @@ -411,8 +416,8 @@ _setup_containers(void) return; } _keys->container_name = strdup("netsnmp certificate keys"); - _keys->free_item = (netsnmp_container_obj_func*)_key_free; - _keys->compare = (netsnmp_container_compare*)_cert_fn_compare; + _keys->free_item = _key_free; + _keys->compare = _cert_fn_compare; _setup_trusted_certs(); } @@ -548,20 +553,22 @@ netsnmp_key_free(netsnmp_key *key) } static void -_cert_free(netsnmp_cert *cert, void *context) +_cert_free(void *cert, void *context) { netsnmp_cert_free(cert); } static void -_key_free(netsnmp_key *key, void *context) +_key_free(void *key, void *context) { netsnmp_key_free(key); } static int -_cert_compare(netsnmp_cert *lhs, netsnmp_cert *rhs) +_cert_compare(const void *p, const void *q) { + const netsnmp_cert *lhs = p, *rhs = q; + netsnmp_assert((lhs != NULL) && (rhs != NULL)); netsnmp_assert((lhs->fingerprint != NULL) && (rhs->fingerprint != NULL)); @@ -571,7 +578,8 @@ _cert_compare(netsnmp_cert *lhs, netsnmp_cert *rhs) } static int -_cert_path_compare(netsnmp_cert_common *lhs, netsnmp_cert_common *rhs) +_cert_path_compare(const netsnmp_cert_common *lhs, + const netsnmp_cert_common *rhs) { int rc; @@ -587,8 +595,9 @@ _cert_path_compare(netsnmp_cert_common *lhs, netsnmp_cert_common *rhs) } static int -_cert_cn_compare(netsnmp_cert *lhs, netsnmp_cert *rhs) +_cert_cn_compare(const void *p, const void *q) { + const netsnmp_cert *lhs = p, *rhs = q; int rc; const char *lhcn, *rhcn; @@ -608,13 +617,13 @@ _cert_cn_compare(netsnmp_cert *lhs, netsnmp_cert *rhs) return rc; /** in case of equal common names, sub-sort by path */ - return _cert_path_compare((netsnmp_cert_common*)lhs, - (netsnmp_cert_common*)rhs); + return _cert_path_compare(&lhs->info, &rhs->info); } static int -_cert_sn_compare(netsnmp_cert *lhs, netsnmp_cert *rhs) +_cert_sn_compare(const void *p, const void *q) { + const netsnmp_cert *lhs = p, *rhs = q; int rc; const char *lhsn, *rhsn; @@ -634,13 +643,13 @@ _cert_sn_compare(netsnmp_cert *lhs, netsnmp_cert *rhs) return rc; /** in case of equal common names, sub-sort by path */ - return _cert_path_compare((netsnmp_cert_common*)lhs, - (netsnmp_cert_common*)rhs); + return _cert_path_compare(&lhs->info, &rhs->info); } static int -_cert_fn_compare(netsnmp_cert_common *lhs, netsnmp_cert_common *rhs) +_cert_fn_compare(const void *p, const void *q) { + const netsnmp_cert_common *lhs = p, *rhs = q; int rc; netsnmp_assert((lhs != NULL) && (rhs != NULL)); @@ -654,8 +663,10 @@ _cert_fn_compare(netsnmp_cert_common *lhs, netsnmp_cert_common *rhs) } static int -_cert_fn_ncompare(netsnmp_cert_common *lhs, netsnmp_cert_common *rhs) +_cert_fn_ncompare(const void *p, const void *q) { + const netsnmp_cert_common *lhs = p, *rhs = q; + netsnmp_assert((lhs != NULL) && (rhs != NULL)); netsnmp_assert((lhs->filename != NULL) && (rhs->filename != NULL)); @@ -663,8 +674,10 @@ _cert_fn_ncompare(netsnmp_cert_common *lhs, netsnmp_cert_common *rhs) } static int -_cert_sn_ncompare(netsnmp_cert *lhs, netsnmp_cert *rhs) +_cert_sn_ncompare(const void *p, const void *q) { + const netsnmp_cert *lhs = p, *rhs = q; + netsnmp_assert((lhs != NULL) && (rhs != NULL)); netsnmp_assert((lhs->subject != NULL) && (rhs->subject != NULL)); @@ -1029,7 +1042,7 @@ netsnmp_ocert_get(netsnmp_cert *cert) } if (NULL == cert->fingerprint) { - cert->hash_type = netsnmp_openssl_cert_get_hash_type(ocert); + cert->hash_type = NS_HASH_SHA1; cert->fingerprint = netsnmp_openssl_cert_get_fingerprint(ocert, cert->hash_type); } @@ -1415,7 +1428,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)) @@ -1487,6 +1501,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); @@ -1626,8 +1642,10 @@ _cert_indexes_load(void) } static void -_cert_print(netsnmp_cert *c, void *context) +_cert_print(void *p, void *context) { + netsnmp_cert *c = p; + if (NULL == c) return; @@ -1658,8 +1676,10 @@ _cert_print(netsnmp_cert *c, void *context) } static void -_key_print(netsnmp_key *k, void *context) +_key_print(void *p, void *context) { + netsnmp_key *k = p; + if (NULL == k) return; @@ -1671,8 +1691,8 @@ _key_print(netsnmp_key *k, void *context) void netsnmp_cert_dump_all(void) { - CONTAINER_FOR_EACH(_certs, (netsnmp_container_obj_func*)_cert_print, NULL); - CONTAINER_FOR_EACH(_keys, (netsnmp_container_obj_func*)_key_print, NULL); + CONTAINER_FOR_EACH(_certs, _cert_print, NULL); + CONTAINER_FOR_EACH(_keys, _key_print, NULL); } #ifdef CERT_MAIN @@ -1706,8 +1726,6 @@ main(int argc, char** argv) #endif /* CERT_MAIN */ -static netsnmp_cert *_cert_find_fp(const char *fingerprint); - void netsnmp_fp_lowercase_and_strip_colon(char *fp) { @@ -1732,7 +1750,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 */ } @@ -2043,7 +2061,7 @@ netsnmp_cert_trust(SSL_CTX *ctx, netsnmp_cert *thiscert) SNMPERR_GENERR); /* Put the certificate into the store */ - fingerprint = netsnmp_openssl_cert_get_fingerprint(cert, -1); + fingerprint = netsnmp_openssl_cert_get_fingerprint(cert, NS_HASH_SHA1); DEBUGMSGTL(("cert:trust", "putting trusted cert %p = %s in certstore %p\n", cert, fingerprint, certstore)); @@ -2415,7 +2433,7 @@ _time_filter(const void *text, void *ctx) * ***************************************************************************/ #define MAP_CONFIG_TOKEN "certSecName" static void _parse_map(const char *token, char *line); -static void _map_free(netsnmp_cert_map* entry, void *ctx); +static void _map_free(void *map, void *ctx); static void _purge_config_entries(void); static void @@ -2520,14 +2538,16 @@ netsnmp_cert_map_find(netsnmp_cert_map *map) #endif /* NETSNMP_FEATURE_REMOVE_CERT_MAP_FIND */ static void -_map_free(netsnmp_cert_map *map, void *context) +_map_free(void *map, void *context) { netsnmp_cert_map_free(map); } static int -_map_compare(netsnmp_cert_map *lhs, netsnmp_cert_map *rhs) +_map_compare(const void *p, const void *q) { + const netsnmp_cert_map *lhs = p, *rhs = q; + netsnmp_assert((lhs != NULL) && (rhs != NULL)); if (lhs->priority < rhs->priority) @@ -2539,9 +2559,11 @@ _map_compare(netsnmp_cert_map *lhs, netsnmp_cert_map *rhs) } static int -_map_fp_compare(netsnmp_cert_map *lhs, netsnmp_cert_map *rhs) +_map_fp_compare(const void *p, const void *q) { + const netsnmp_cert_map *lhs = p, *rhs = q; int rc; + netsnmp_assert((lhs != NULL) && (rhs != NULL)); if ((rc = strcmp(lhs->fingerprint, rhs->fingerprint)) != 0) @@ -2556,8 +2578,10 @@ _map_fp_compare(netsnmp_cert_map *lhs, netsnmp_cert_map *rhs) } static int -_map_fp_ncompare(netsnmp_cert_map *lhs, netsnmp_cert_map *rhs) +_map_fp_ncompare(const void *p, const void *q) { + const netsnmp_cert_map *lhs = p, *rhs = q; + netsnmp_assert((lhs != NULL) && (rhs != NULL)); return strncmp(lhs->fingerprint, rhs->fingerprint, @@ -2576,8 +2600,8 @@ netsnmp_cert_map_container_create(int with_fp) } chain_map->container_name = strdup("cert_map"); - chain_map->free_item = (netsnmp_container_obj_func*)_map_free; - chain_map->compare = (netsnmp_container_compare*)_map_compare; + chain_map->free_item = _map_free; + chain_map->compare = _map_compare; if (!with_fp) return chain_map; @@ -2593,8 +2617,8 @@ netsnmp_cert_map_container_create(int with_fp) return NULL; } fp->container_name = strdup("cert2sn_fp"); - fp->compare = (netsnmp_container_compare*)_map_fp_compare; - fp->ncompare = (netsnmp_container_compare*)_map_fp_ncompare; + fp->compare = _map_fp_compare; + fp->ncompare = _map_fp_ncompare; netsnmp_container_add_index(chain_map, fp); return chain_map; @@ -2745,7 +2769,7 @@ netsnmp_certToTSN_parse_common(char **line) map->fingerprint = strdup(buf); } else { map->fingerprint = - netsnmp_openssl_cert_get_fingerprint(tmpcert->ocert, -1); + netsnmp_openssl_cert_get_fingerprint(tmpcert->ocert, NS_HASH_SHA1); } if (NULL == *line) { diff --git a/vendor/snmplib/container.c b/vendor/snmplib/container.c index 2d3304b..5e5a940 100644 --- a/vendor/snmplib/container.c +++ b/vendor/snmplib/container.c @@ -20,6 +20,7 @@ #include #include #include +#include "factory.h" #include @@ -54,9 +55,6 @@ typedef struct container_type_s { netsnmp_container_compare *compare; } container_type; -netsnmp_factory * -netsnmp_container_get_factory(const char *type); - /*------------------------------------------------------------------ */ static void @@ -137,7 +135,7 @@ netsnmp_container_free_list(void) /* * free memory used by each factory entry */ - CONTAINER_FOR_EACH(containers, ((netsnmp_container_obj_func *)_factory_free), NULL); + CONTAINER_FOR_EACH(containers, _factory_free, NULL); /* * free factory container @@ -284,7 +282,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) @@ -293,13 +299,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; @@ -584,64 +593,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 */ @@ -764,5 +771,10 @@ 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 */ +} + +int netsnmp_str_compare(const void *left, const void *right) +{ + return strcmp(left, right); } diff --git a/vendor/snmplib/container_binary_array.c b/vendor/snmplib/container_binary_array.c index 14d1f8e..4d8872e 100644 --- a/vendor/snmplib/container_binary_array.c +++ b/vendor/snmplib/container_binary_array.c @@ -15,18 +15,18 @@ #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 @@ -39,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 */ @@ -55,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) { @@ -111,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; /* @@ -141,13 +99,10 @@ 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 @@ -247,9 +202,16 @@ netsnmp_binary_array_release(netsnmp_container *c) binary_array_table *t = (binary_array_table*)c->container_data; SNMP_FREE(t->data); SNMP_FREE(t); + SNMP_FREE(c->container_name); 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) { @@ -266,12 +228,13 @@ netsnmp_binary_array_options_set(netsnmp_container *c, int set, u_int flags) t->dirty = 1; /* force sort */ Sort_Array(c); } - } else - flags = (u_int)-1; /* unsupported flag */ - } - else + return flags; + } else { + return -1; /* unsupported flag */ + } + } else { return ((c->flags & flags) == flags); - return flags; + } } NETSNMP_STATIC_INLINE size_t @@ -347,6 +310,31 @@ netsnmp_binary_array_get_at(netsnmp_container *c, size_t pos, void **entry) 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) { @@ -381,6 +369,8 @@ 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; } @@ -485,7 +475,7 @@ netsnmp_binary_array_insert_before(netsnmp_container *c, size_t index, if (NULL == entry) return -1; - if (index > (t->count + 1)) { + if (index > t->count) { DEBUGMSGTL(("container:insert:before", "index out of range\n")); return -1; } @@ -495,6 +485,8 @@ netsnmp_binary_array_insert_before(netsnmp_container *c, size_t index, */ _ba_resize_check(t); + netsnmp_assert(t->count < t->max_size); + /* * shift array */ @@ -507,9 +499,14 @@ netsnmp_binary_array_insert_before(netsnmp_container *c, size_t index, 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; @@ -519,7 +516,9 @@ 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; - int dirty = 0, i = -2; + 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); @@ -529,9 +528,9 @@ netsnmp_binary_array_insert(netsnmp_container *c, const void *const_entry) /* * check key if we have at least 1 item and duplicates aren't allowed */ - if (! (c->flags & CONTAINER_KEY_ALLOW_DUPLICATES) && t->count) { + if (!duplicates_allowed && t->count) { i = binary_search(entry, c, 1, &next); - if (i > 0) { + if (i >= 0) { DEBUGMSGTL(("container","not inserting duplicate key\n")); return -1; } @@ -540,26 +539,27 @@ netsnmp_binary_array_insert(netsnmp_container *c, const void *const_entry) /* * if unsorted, just add at the end */ - if (c->flags & CONTAINER_KEY_UNSORTED) { + if (!sorted) { pos = t->count; - dirty = 1; } else { /** if we haven't searched for key yet, do it now */ if (-2 == i) { if (0 == t->count) { next = 0; i = -1; - } else + } else { i = binary_search(entry, c, 1, &next); + } } pos = next; - if ( i > 0 ) /* if key found, advance past any dups */ + /* 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, dirty); + return netsnmp_binary_array_insert_before(c, pos, entry, !sorted); } /********************************************************************** @@ -802,6 +802,11 @@ netsnmp_container_get_binary_array(void) } c->container_data = netsnmp_binary_array_initialize(); + if (NULL == c->container_data) { + free(c); + snmp_log(LOG_ERR, "couldn't allocate memory for container_data\n"); + return NULL; + } /* * NOTE: CHANGES HERE MUST BE DUPLICATED IN duplicate AS WELL!! @@ -826,7 +831,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; @@ -888,8 +892,10 @@ _ba_iterator_position(binary_array_iterator *it, size_t pos) } static void * -_ba_iterator_curr(binary_array_iterator *it) +_ba_iterator_curr(netsnmp_iterator *nit) { + binary_array_iterator *it = (void *)nit; + if(NULL == it) { netsnmp_assert(NULL != it); return NULL; @@ -899,14 +905,18 @@ _ba_iterator_curr(binary_array_iterator *it) } static void * -_ba_iterator_first(binary_array_iterator *it) +_ba_iterator_first(netsnmp_iterator *nit) { + binary_array_iterator *it = (void *)nit; + return _ba_iterator_position(it, 0); } static void * -_ba_iterator_next(binary_array_iterator *it) +_ba_iterator_next(netsnmp_iterator *nit) { + binary_array_iterator *it = (void *)nit; + if(NULL == it) { netsnmp_assert(NULL != it); return NULL; @@ -918,8 +928,9 @@ _ba_iterator_next(binary_array_iterator *it) } static void * -_ba_iterator_last(binary_array_iterator *it) +_ba_iterator_last(netsnmp_iterator *nit) { + binary_array_iterator *it = (void *)nit; binary_array_table* t = _ba_it2cont(it); if(NULL == t) { netsnmp_assert(NULL != t); @@ -930,9 +941,11 @@ _ba_iterator_last(binary_array_iterator *it) } static int -_ba_iterator_remove(binary_array_iterator *it) +_ba_iterator_remove(netsnmp_iterator *nit) { + binary_array_iterator *it = (void *)nit; binary_array_table* t = _ba_it2cont(it); + if(NULL == t) { netsnmp_assert(NULL != t); return -1; @@ -949,8 +962,9 @@ _ba_iterator_remove(binary_array_iterator *it) } static int -_ba_iterator_reset(binary_array_iterator *it) +_ba_iterator_reset(netsnmp_iterator *nit) { + binary_array_iterator *it = (void *)nit; binary_array_table* t = _ba_it2cont(it); if(NULL == t) { netsnmp_assert(NULL != t); @@ -993,15 +1007,15 @@ _ba_iterator_get(netsnmp_container *c) it->base.container = c; - it->base.first = (netsnmp_iterator_rtn*)_ba_iterator_first; - it->base.next = (netsnmp_iterator_rtn*)_ba_iterator_next; - it->base.curr = (netsnmp_iterator_rtn*)_ba_iterator_curr; - it->base.last = (netsnmp_iterator_rtn*)_ba_iterator_last; - it->base.remove = (netsnmp_iterator_rc*)_ba_iterator_remove; - it->base.reset = (netsnmp_iterator_rc*)_ba_iterator_reset; - it->base.release = (netsnmp_iterator_rc*)_ba_iterator_release; + it->base.first = _ba_iterator_first; + it->base.next = _ba_iterator_next; + it->base.curr = _ba_iterator_curr; + it->base.last = _ba_iterator_last; + it->base.remove = _ba_iterator_remove; + it->base.reset = _ba_iterator_reset; + it->base.release = _ba_iterator_release; - (void)_ba_iterator_reset(it); + (void)_ba_iterator_reset(&it->base); - return (netsnmp_iterator *)it; + return &it->base; } diff --git a/vendor/snmplib/container_iterator.c b/vendor/snmplib/container_iterator.c index a320045..9ec01d1 100644 --- a/vendor/snmplib/container_iterator.c +++ b/vendor/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 @@ -303,8 +303,10 @@ static int _iterator_free(netsnmp_container *c) } static void * -_iterator_find(iterator_info *ii, const void *data) +_iterator_find(netsnmp_container *c, const void *data) { + iterator_info *ii = (void *)c; + DEBUGMSGT(("container_iterator",">%s\n", "_iterator_find")); if((NULL == ii) || (NULL == data)) @@ -314,8 +316,10 @@ _iterator_find(iterator_info *ii, const void *data) } static void * -_iterator_find_next(iterator_info *ii, const void *data) +_iterator_find_next(netsnmp_container *c, const void *data) { + iterator_info *ii = (void *)c; + DEBUGMSGT(("container_iterator",">%s\n", "_iterator_find_next")); if(NULL == ii) @@ -325,8 +329,10 @@ _iterator_find_next(iterator_info *ii, const void *data) } static int -_iterator_insert(iterator_info *ii, const void *data) +_iterator_insert(netsnmp_container *c, const void *data) { + iterator_info *ii = (void *)c; + DEBUGMSGT(("container_iterator",">%s\n", "_iterator_insert")); if(NULL == ii) @@ -339,8 +345,10 @@ _iterator_insert(iterator_info *ii, const void *data) } static int -_iterator_remove(iterator_info *ii, const void *data) +_iterator_remove(netsnmp_container *c, const void *data) { + iterator_info *ii = (void *)c; + DEBUGMSGT(("container_iterator",">%s\n", "_iterator_remove")); if(NULL == ii) @@ -353,8 +361,10 @@ _iterator_remove(iterator_info *ii, const void *data) } static int -_iterator_release(iterator_info *ii, const void *data) +_iterator_release(netsnmp_container *c, const void *data) { + iterator_info *ii = (void *)c; + DEBUGMSGT(("container_iterator",">%s\n", "_iterator_release")); if(NULL == ii) @@ -367,8 +377,9 @@ _iterator_release(iterator_info *ii, const void *data) } static size_t -_iterator_size(iterator_info *ii) +_iterator_size(netsnmp_container *c) { + iterator_info *ii = (void *)c; size_t count = 0; netsnmp_ref_void loop_ctx = { NULL }; netsnmp_ref_void tmp = { NULL }; @@ -399,9 +410,10 @@ _iterator_size(iterator_info *ii) } static void -_iterator_for_each(iterator_info *ii, netsnmp_container_obj_func *f, +_iterator_for_each(netsnmp_container *c, netsnmp_container_obj_func *f, void *ctx) { + iterator_info *ii = (void *)c; netsnmp_ref_void loop_ctx = { NULL }; netsnmp_ref_void tmp = { NULL }; @@ -468,16 +480,16 @@ netsnmp_container_iterator_get(void *iterator_user_ctx, */ ii->c.cfree = _iterator_free; ii->c.compare = compare; - ii->c.get_size = (netsnmp_container_size*)_iterator_size; + ii->c.get_size = _iterator_size; ii->c.init = NULL; - ii->c.insert = (netsnmp_container_op*)_iterator_insert; - ii->c.remove = (netsnmp_container_op*)_iterator_remove; - ii->c.release = (netsnmp_container_op*)_iterator_release; - ii->c.find = (netsnmp_container_rtn*)_iterator_find; - ii->c.find_next = (netsnmp_container_rtn*)_iterator_find_next; + ii->c.insert = _iterator_insert; + ii->c.remove = _iterator_remove; + ii->c.release = _iterator_release; + ii->c.find = _iterator_find; + ii->c.find_next = _iterator_find_next; ii->c.get_subset = NULL; ii->c.get_iterator = NULL; - ii->c.for_each = (netsnmp_container_func*)_iterator_for_each; + ii->c.for_each = _iterator_for_each; ii->c.clear = _iterator_clear; /* diff --git a/vendor/snmplib/container_list_ssll.c b/vendor/snmplib/container_list_ssll.c index 0e84fdd..691381a 100644 --- a/vendor/snmplib/container_list_ssll.c +++ b/vendor/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,6 +28,7 @@ #include #include +#include "factory.h" netsnmp_feature_child_of(container_linked_list, container_types); netsnmp_feature_child_of(container_fifo, container_types); @@ -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,7 +129,7 @@ _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 @@ -339,21 +336,9 @@ netsnmp_container_get_ssll(void) sl->c.for_each = _ssll_for_each; sl->c.clear = _ssll_clear; - - return (netsnmp_container*)sl; -} - -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; + return &sl->c; } - netsnmp_container * netsnmp_container_get_usll(void) { @@ -387,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); } @@ -448,8 +422,9 @@ _ssll_it2cont(ssll_iterator *it) } static void * -_ssll_iterator_curr(ssll_iterator *it) +_ssll_iterator_curr(netsnmp_iterator *p) { + ssll_iterator *it = (void *)p; sl_container *t = _ssll_it2cont(it); if ((NULL == t) || (NULL == it->pos)) return NULL; @@ -458,8 +433,9 @@ _ssll_iterator_curr(ssll_iterator *it) } static void * -_ssll_iterator_first(ssll_iterator *it) +_ssll_iterator_first(netsnmp_iterator *p) { + ssll_iterator *it = (void *)p; sl_container *t = _ssll_it2cont(it); if ((NULL == t) || (NULL == t->head)) return NULL; @@ -468,8 +444,9 @@ _ssll_iterator_first(ssll_iterator *it) } static void * -_ssll_iterator_next(ssll_iterator *it) +_ssll_iterator_next(netsnmp_iterator *p) { + ssll_iterator *it = (void *)p; sl_container *t = _ssll_it2cont(it); if ((NULL == t) || (NULL == it->pos)) return NULL; @@ -482,8 +459,9 @@ _ssll_iterator_next(ssll_iterator *it) } static void * -_ssll_iterator_last(ssll_iterator *it) +_ssll_iterator_last(netsnmp_iterator *p) { + ssll_iterator *it = (void *)p; sl_node *n; sl_container *t = _ssll_it2cont(it); if(NULL == t) @@ -505,8 +483,9 @@ _ssll_iterator_last(ssll_iterator *it) } static int -_ssll_iterator_reset(ssll_iterator *it) +_ssll_iterator_reset(netsnmp_iterator *p) { + ssll_iterator *it = (void *)p; sl_container *t; /** can't use it2conf cuz we might be out of sync */ @@ -557,16 +536,16 @@ _ssll_iterator_get(netsnmp_container *c) it->base.container = c; - it->base.first = (netsnmp_iterator_rtn*)_ssll_iterator_first; - it->base.next = (netsnmp_iterator_rtn*)_ssll_iterator_next; - it->base.curr = (netsnmp_iterator_rtn*)_ssll_iterator_curr; - it->base.last = (netsnmp_iterator_rtn*)_ssll_iterator_last; - it->base.reset = (netsnmp_iterator_rc*)_ssll_iterator_reset; - it->base.release = (netsnmp_iterator_rc*)_ssll_iterator_release; + it->base.first = _ssll_iterator_first; + it->base.next = _ssll_iterator_next; + it->base.curr = _ssll_iterator_curr; + it->base.last = _ssll_iterator_last; + it->base.reset = _ssll_iterator_reset; + it->base.release = _ssll_iterator_release; - (void)_ssll_iterator_reset(it); + (void)_ssll_iterator_reset(&it->base); - return (netsnmp_iterator *)it; + return &it->base; } #else /* NETSNMP_FEATURE_REMOVE_CONTAINER_LINKED_LIST */ netsnmp_feature_unused(container_linked_list); diff --git a/vendor/snmplib/container_null.c b/vendor/snmplib/container_null.c index 89627ef..18fc743 100644 --- a/vendor/snmplib/container_null.c +++ b/vendor/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,6 +33,7 @@ #include #include #include +#include "factory.h" netsnmp_feature_child_of(container_null, container_types); @@ -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/vendor/snmplib/default_store.c b/vendor/snmplib/default_store.c index 5977445..5466f99 100644 --- a/vendor/snmplib/default_store.c +++ b/vendor/snmplib/default_store.c @@ -128,22 +128,22 @@ #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 @@ -355,6 +355,8 @@ netsnmp_ds_parse_boolean(char *line) char *st; value = strtok_r(line, " \t\n", &st); + if (!value) + goto invalid; if (strcasecmp(value, "yes") == 0 || strcasecmp(value, "true") == 0) { return 1; @@ -363,12 +365,14 @@ netsnmp_ds_parse_boolean(char *line) return 0; } else { itmp = strtol(value, &endptr, 10); - if (*endptr != 0 || itmp < 0 || itmp > 1) { - config_perror("Should be yes|no|true|false|0|1"); - return -1; - } + if (*endptr != 0 || itmp < 0 || itmp > 1) + goto invalid; return itmp; } + +invalid: + config_perror("Should be yes|no|true|false|0|1"); + return -1; } void @@ -402,13 +406,17 @@ netsnmp_ds_handle_config(const char *token, char *line) case ASN_INTEGER: value = strtok_r(line, " \t\n", &st); - itmp = strtol(value, &endptr, 10); - if (*endptr != 0) { - config_perror("Bad integer value"); - } else { - netsnmp_ds_set_int(drsp->storeid, drsp->which, itmp); - } - DEBUGMSGTL(("netsnmp_ds_handle_config", "int: %d\n", itmp)); + if (!value) { + config_perror("Missing value"); + } else { + itmp = strtol(value, &endptr, 10); + if (*endptr != 0) { + config_perror("Bad integer value"); + } else { + netsnmp_ds_set_int(drsp->storeid, drsp->which, itmp); + } + DEBUGMSGTL(("netsnmp_ds_handle_config", "int: %d\n", itmp)); + } break; case ASN_OCTET_STR: diff --git a/vendor/snmplib/dir_utils.c b/vendor/snmplib/dir_utils.c index c2dd989..48c1a0f 100644 --- a/vendor/snmplib/dir_utils.c +++ b/vendor/snmplib/dir_utils.c @@ -14,26 +14,26 @@ #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 -#if HAVE_DIRENT_H +#ifdef HAVE_DIRENT_H # include # define NAMLEN(dirent) strlen((dirent)->d_name) #else @@ -93,10 +93,8 @@ netsnmp_directory_container_read_some(netsnmp_container *user_container, container = netsnmp_container_find("nsfile_directory_container:" "binary_array"); if (container) { - container->compare = (netsnmp_container_compare*) - netsnmp_file_compare_name; - container->free_item = (netsnmp_container_obj_func *) - netsnmp_file_container_free; + container->compare = netsnmp_file_compare_name; + container->free_item = netsnmp_file_container_free; } } else diff --git a/vendor/snmplib/factory.h b/vendor/snmplib/factory.h new file mode 100644 index 0000000..903fe2c --- /dev/null +++ b/vendor/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/vendor/snmplib/file_utils.c b/vendor/snmplib/file_utils.c index a0b4f7b..02f51e6 100644 --- a/vendor/snmplib/file_utils.c +++ b/vendor/snmplib/file_utils.c @@ -2,18 +2,18 @@ #include #include -#if HAVE_IO_H +#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 @@ -21,7 +21,7 @@ #include -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H # include #endif #ifdef HAVE_SYS_STAT_H @@ -244,14 +244,16 @@ netsnmp_file_close(netsnmp_file * filei) #endif /* NETSNMP_FEATURE_REMOVE_FILE_CLOSE */ void -netsnmp_file_container_free(netsnmp_file *file, void *context) +netsnmp_file_container_free(void *file, void *context) { netsnmp_file_release(file); } int -netsnmp_file_compare_name(netsnmp_file *lhs, netsnmp_file *rhs) +netsnmp_file_compare_name(const void *p, const void *q) { + const netsnmp_file *lhs = p, *rhs = q; + netsnmp_assert((NULL != lhs) && (NULL != rhs)); netsnmp_assert((NULL != lhs->name) && (NULL != rhs->name)); diff --git a/vendor/snmplib/gettimeofday.c b/vendor/snmplib/gettimeofday.c index df5c0a0..c8d07ae 100644 --- a/vendor/snmplib/gettimeofday.c +++ b/vendor/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/vendor/snmplib/inet_ntop.c b/vendor/snmplib/inet_ntop.c index 17423b5..5037b2a 100644 --- a/vendor/snmplib/inet_ntop.c +++ b/vendor/snmplib/inet_ntop.c @@ -19,17 +19,17 @@ #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_NAMESER_H +#ifdef HAVE_ARPA_NAMESER_H #include #endif #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include diff --git a/vendor/snmplib/inet_pton.c b/vendor/snmplib/inet_pton.c index 9a0e41f..dc4e1e7 100644 --- a/vendor/snmplib/inet_pton.c +++ b/vendor/snmplib/inet_pton.c @@ -21,17 +21,17 @@ #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_NAMESER_H +#ifdef HAVE_ARPA_NAMESER_H #include #endif #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include diff --git a/vendor/snmplib/int64.c b/vendor/snmplib/int64.c index 693fb40..3b1f705 100644 --- a/vendor/snmplib/int64.c +++ b/vendor/snmplib/int64.c @@ -14,7 +14,7 @@ #ifdef HAVE_INTTYPES_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -266,7 +266,7 @@ isZeroU64(const struct counter64 *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) { @@ -340,7 +340,7 @@ netsnmp_c64_check_for_32bit_wrap(struct counter64 *old_val, 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) { int rc; @@ -352,7 +352,7 @@ netsnmp_c64_check32_and_update(struct counter64 *prev_val, * 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; diff --git a/vendor/snmplib/keytools.c b/vendor/snmplib/keytools.c index 129a7c0..3f6f0c2 100644 --- a/vendor/snmplib/keytools.c +++ b/vendor/snmplib/keytools.c @@ -29,13 +29,13 @@ #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 @@ -127,7 +127,7 @@ generate_Ku(const oid * hashtype, u_int hashtype_len, #ifdef NETSNMP_USE_OPENSSL EVP_MD_CTX *ctx = NULL; const EVP_MD *hashfn = NULL; -#elif NETSNMP_USE_INTERNAL_CRYPTO +#elif defined(NETSNMP_USE_INTERNAL_CRYPTO) SHA_CTX csha1; MD5_CTX cmd5; char cryptotype = 0; @@ -181,6 +181,9 @@ generate_Ku(const oid * hashtype, u_int hashtype_len, ctx = EVP_MD_CTX_new(); #elif defined(HAVE_EVP_MD_CTX_CREATE) ctx = EVP_MD_CTX_create(); +#elif defined(HAVE_VOID_EVP_MD_CTX_INIT) + ctx = malloc(sizeof(*ctx)); + EVP_MD_CTX_init(ctx); #else ctx = malloc(sizeof(*ctx)); if (!EVP_MD_CTX_init(ctx)) { @@ -193,7 +196,7 @@ generate_Ku(const oid * hashtype, u_int hashtype_len, goto generate_Ku_quit; } -#elif NETSNMP_USE_INTERNAL_CRYPTO +#elif defined(NETSNMP_USE_INTERNAL_CRYPTO) #ifndef NETSNMP_DISABLE_MD5 if (NETSNMP_USMAUTH_HMACMD5 == auth_type) { if (!MD5_Init(&cmd5)) @@ -219,7 +222,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 { @@ -228,7 +231,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; @@ -248,7 +251,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 { @@ -258,7 +261,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; @@ -299,7 +302,7 @@ 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, auth_type;; diff --git a/vendor/snmplib/large_fd_set.c b/vendor/snmplib/large_fd_set.c index c30cd44..9a099f0 100644 --- a/vendor/snmplib/large_fd_set.c +++ b/vendor/snmplib/large_fd_set.c @@ -91,41 +91,28 @@ 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 - * functions. However, since NFDBITS != 8 * sizeof(fd_set.fds_bits[0]) for at - * least HP-UX on ia64 and since that combination uses big endian, use the - * macros from on such systems. - */ 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; - if (nfdbits == NFDBITS) - p->fds_bits[n / nfdbits] |= (1ULL << (n % nfdbits)); - else - FD_SET(n, p); + 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; - if (nfdbits == NFDBITS) - p->fds_bits[n / nfdbits] &= ~(1ULL << (n % nfdbits)); - else - FD_CLR(n, p); + 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; - if (nfdbits == NFDBITS) - return (p->fds_bits[n / nfdbits] & (1ULL << (n % nfdbits))) != 0; - else - return FD_ISSET(n, p) != 0; + return (fds_array[n / nfdbits] & (1ULL << (n % nfdbits))) != 0; } void diff --git a/vendor/snmplib/lcd_time.c b/vendor/snmplib/lcd_time.c index 548d561..5c30cd1 100644 --- a/vendor/snmplib/lcd_time.c +++ b/vendor/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,7 +32,7 @@ #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif diff --git a/vendor/snmplib/md5.c b/vendor/snmplib/md5.c index 2ce3680..96b1eaf 100644 --- a/vendor/snmplib/md5.c +++ b/vendor/snmplib/md5.c @@ -37,13 +37,13 @@ #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 diff --git a/vendor/snmplib/mib.c b/vendor/snmplib/mib.c index 8eb504e..3a7c439 100644 --- a/vendor/snmplib/mib.c +++ b/vendor/snmplib/mib.c @@ -49,19 +49,19 @@ 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 @@ -69,32 +69,32 @@ SOFTWARE. #ifdef HAVE_INTTYPES_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 # 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 @@ -660,7 +660,7 @@ sprint_realloc_octet_string(u_char ** buf, size_t * buf_len, case NETSNMP_STRING_OUTPUT_GUESS: hex = 0; for (cp = var->val.string, x = 0; x < (int) var->val_len; x++, cp++) { - if (!isprint(*cp) && !isspace(*cp)) { + if ((!isprint(*cp) || !isascii(*cp)) && !isspace(*cp)) { hex = 1; } } @@ -1197,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; @@ -1206,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; @@ -1257,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) { @@ -1283,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); @@ -1296,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) { @@ -1387,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)) { @@ -1402,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)) { @@ -1484,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)) { @@ -1499,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)) { @@ -1908,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)) { @@ -1916,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)) { @@ -2222,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) { @@ -2309,6 +2323,10 @@ snmp_out_options(char *options, int argc, char *const *argv) case 'p': /* What if argc/argv are null ? */ if (!*(options)) { + if (optind == argc || argc == 0) { + fprintf(stderr, "Missing precision for -Op\n"); + return options-1; + } options = argv[optind++]; } netsnmp_ds_set_string(NETSNMP_DS_LIBRARY_ID, @@ -2394,7 +2412,7 @@ snmp_out_toggle_options_usage(const char *lead, FILE * outf) fprintf(outf, "%sX: extended index format\n", lead); } -char * +const char * snmp_in_options(char *optarg, int argc, char *const *argv) { char *cp; @@ -2417,18 +2435,22 @@ snmp_in_options(char *optarg, int argc, char *const *argv) netsnmp_ds_toggle_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_READ_UCD_STYLE_OID); break; case 's': - /* What if argc/argv are null ? */ - if (!*(++cp)) - cp = argv[optind++]; + if (!*(++cp)) { + cp = optind < argc ? argv[optind++] : NULL; + if (!cp) + return "?"; + } netsnmp_ds_set_string(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OIDSUFFIX, cp); return NULL; /* -Is... is a standalone option, so we're done here */ case 'S': - /* What if argc/argv are null ? */ - if (!*(++cp)) - cp = argv[optind++]; + if (!*(++cp)) { + cp = optind < argc ? argv[optind++] : NULL; + if (!cp) + return "?"; + } netsnmp_ds_set_string(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OIDPREFIX, cp); @@ -2445,7 +2467,7 @@ snmp_in_options(char *optarg, int argc, char *const *argv) return NULL; } -char * +const char * snmp_in_toggle_options(char *options) { return snmp_in_options( options, 0, NULL ); @@ -2488,7 +2510,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"); /* @@ -2654,7 +2676,7 @@ netsnmp_get_mib_directory(void) void netsnmp_fixup_mib_directory(void) { - char *homepath = netsnmp_getenv("HOME"); + const char *homepath = netsnmp_gethomedir(); char *mibpath = netsnmp_get_mib_directory(); char *oldmibpath = NULL; char *ptr_home; @@ -2757,40 +2779,40 @@ netsnmp_init_mib(void) env_var = strdup(env_var); } if (env_var && ((*env_var == '+') || (*env_var == '-'))) { - entry = - (char *) malloc(strlen(NETSNMP_DEFAULT_MIBS) + strlen(env_var) + 2); - if (!entry) { + int res; + + if (*env_var == '+') + res = asprintf(&entry, "%s%c%s", NETSNMP_DEFAULT_MIBS, + ENV_SEPARATOR_CHAR, env_var + 1); + else + res = asprintf(&entry, "%s%c%s", env_var + 1, ENV_SEPARATOR_CHAR, + NETSNMP_DEFAULT_MIBS); + SNMP_FREE(env_var); + if (res < 0) { DEBUGMSGTL(("init_mib", "env mibs malloc failed")); - SNMP_FREE(env_var); return; - } else { - if (*env_var == '+') - sprintf(entry, "%s%c%s", NETSNMP_DEFAULT_MIBS, ENV_SEPARATOR_CHAR, - env_var+1); - else - sprintf(entry, "%s%c%s", env_var+1, ENV_SEPARATOR_CHAR, - NETSNMP_DEFAULT_MIBS ); } - SNMP_FREE(env_var); env_var = entry; } - DEBUGMSGTL(("init_mib", - "Seen MIBS: Looking in '%s' for mib files ...\n", - env_var)); - entry = strtok_r(env_var, ENV_SEPARATOR, &st); - while (entry) { - if (strcasecmp(entry, DEBUG_ALWAYS_TOKEN) == 0) { - read_all_mibs(); - } else if (strstr(entry, "/") != NULL) { - read_mib(entry); - } else { - netsnmp_read_module(entry); + if (env_var != NULL) { + DEBUGMSGTL(("init_mib", + "Seen MIBS: Looking in '%s' for mib files ...\n", + env_var)); + entry = strtok_r(env_var, ENV_SEPARATOR, &st); + while (entry) { + if (strcasecmp(entry, DEBUG_ALWAYS_TOKEN) == 0) { + read_all_mibs(); + } else if (strstr(entry, "/") != NULL) { + read_mib(entry); + } else { + netsnmp_read_module(entry); + } + entry = strtok_r(NULL, ENV_SEPARATOR, &st); } - entry = strtok_r(NULL, ENV_SEPARATOR, &st); + adopt_orphans(); + SNMP_FREE(env_var); } - adopt_orphans(); - SNMP_FREE(env_var); env_var = netsnmp_getenv("MIBFILES"); if (env_var != NULL) { @@ -3005,7 +3027,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. @@ -3016,7 +3038,7 @@ 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; char buf[SPRINT_MAX_LEN]; @@ -3723,13 +3745,13 @@ 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 @in. + * @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 @prefix. - * @param[in/out] indexes Variable list for which var->name should be set + * @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 @in. + * should be appended to @p in. */ int build_oid_noalloc(oid * in, size_t in_len, size_t * out_len, @@ -4024,7 +4046,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; @@ -4942,9 +4964,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; } @@ -4964,21 +4986,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 */ @@ -5060,7 +5084,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) @@ -5089,12 +5113,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 */ @@ -5216,6 +5241,8 @@ get_module_node(const char *fname, * Isolate the first component of the name ... */ name = strdup(fname); + if (name == NULL) + return -1; cp = strchr(name, '.'); if (cp != NULL) { *cp = '\0'; @@ -5268,13 +5295,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++) { @@ -5284,7 +5311,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; } @@ -5292,7 +5319,7 @@ node_to_oid(struct tree *tp, oid * objid, size_t * objidlen) if (numids < lenids) memmove(objid, op, numids * sizeof(oid)); - return (numids); + return numids; } /* @@ -5677,6 +5704,8 @@ _add_strings_to_oid(void *tp, char *cp, case '"': case '\'': doingquote = *cp++; + if (*cp == '\0') + goto bad_id; /* * insert length if requested */ @@ -6087,8 +6116,7 @@ snmp_parse_oid(const char *argv, oid * root, size_t * rootlen) #ifndef NETSNMP_DISABLE_MIB_LOADING size_t savlen = *rootlen; #endif /* NETSNMP_DISABLE_MIB_LOADING */ - static size_t tmpbuf_len = 0; - static char *tmpbuf = NULL; + char *tmpbuf = NULL; const char *suffix, *prefix; suffix = netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, @@ -6100,53 +6128,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 = malloc(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)) { - free(tmpbuf); - 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)) { - free(tmpbuf); - return root; - } + if (get_wild_node(argv, root, rootlen)) + goto out; } else { #endif /* NETSNMP_DISABLE_MIB_LOADING */ - if (read_objid(argv, root, rootlen)) { - free(tmpbuf); - return root; - } + if (read_objid(argv, root, rootlen)) + goto out; #ifndef NETSNMP_DISABLE_MIB_LOADING *rootlen = savlen; - if (get_node(argv, root, rootlen)) { - free(tmpbuf); - 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)) { - free(tmpbuf); - return root; - } + if (get_wild_node(argv, root, rootlen)) + goto out; } #endif /* NETSNMP_DISABLE_MIB_LOADING */ + + root = NULL; + +out: free(tmpbuf); - return NULL; + return root; } #ifndef NETSNMP_DISABLE_MIB_LOADING diff --git a/vendor/snmplib/mt_support.c b/vendor/snmplib/mt_support.c index d28ebe4..376cedb 100644 --- a/vendor/snmplib/mt_support.c +++ b/vendor/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/vendor/snmplib/openssl/openssl_aes_cfb.c b/vendor/snmplib/openssl/openssl_aes_cfb.c index 999e5a7..15f23bf 100644 --- a/vendor/snmplib/openssl/openssl_aes_cfb.c +++ b/vendor/snmplib/openssl/openssl_aes_cfb.c @@ -59,23 +59,23 @@ void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out, size_t length, const AES_KEY *key, - unsigned char *ivec, int *num, const int enc) { - - CRYPTO_cfb128_encrypt(in,out,length,key,ivec,num,enc,(block128_f)AES_encrypt); + unsigned char *ivec, int *num, const int enc) +{ + CRYPTO_cfb128_encrypt(in,out,length,key,ivec,num,enc,AES_encrypt); } /* N.B. This expects the input to be packed, MS bit first */ void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out, size_t length, const AES_KEY *key, unsigned char *ivec, int *num, const int enc) - { - CRYPTO_cfb128_1_encrypt(in,out,length,key,ivec,num,enc,(block128_f)AES_encrypt); - } +{ + CRYPTO_cfb128_1_encrypt(in,out,length,key,ivec,num,enc,AES_encrypt); +} void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out, size_t length, const AES_KEY *key, unsigned char *ivec, int *num, const int enc) - { - CRYPTO_cfb128_8_encrypt(in,out,length,key,ivec,num,enc,(block128_f)AES_encrypt); - } +{ + CRYPTO_cfb128_8_encrypt(in,out,length,key,ivec,num,enc,AES_encrypt); +} diff --git a/vendor/snmplib/openssl/openssl_aes_core.c b/vendor/snmplib/openssl/openssl_aes_core.c index 56301b9..7b7dbae 100644 --- a/vendor/snmplib/openssl/openssl_aes_core.c +++ b/vendor/snmplib/openssl/openssl_aes_core.c @@ -779,8 +779,9 @@ int AES_set_decrypt_key(const unsigned char *userKey, const int bits, * in and out can overlap */ void AES_encrypt(const unsigned char *in, unsigned char *out, - const AES_KEY *key) { - + const void *key_arg) +{ + const AES_KEY *const key = key_arg; const u32 *rk; u32 s0, s1, s2, s3, t0, t1, t2, t3; #ifndef FULL_UNROLL diff --git a/vendor/snmplib/parse.c b/vendor/snmplib/parse.c index ac5a36d..1a63df5 100644 --- a/vendor/snmplib/parse.c +++ b/vendor/snmplib/parse.c @@ -37,60 +37,60 @@ 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 @@ -156,12 +156,13 @@ struct tc { /* textual conventions */ struct enum_list *enums; struct range_list *ranges; char *description; + int lineno; } *tclist; int tc_alloc; -int mibLine = 0; -const char *File = "(none)"; -static int anonymous = 0; +static int mibLine; +static const char *File = "(none)"; +static int anonymous; struct objgroup { char *name; @@ -580,7 +581,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 **); @@ -598,7 +598,7 @@ static struct node *parse_capabilities(FILE *, char *); static struct node *parse_moduleIdentity(FILE *, char *); static struct node *parse_macro(FILE *, char *); static void parse_imports(FILE *); -static struct node *parse(FILE *, struct node *); +static struct node *parse(FILE *); static int read_module_internal(const char *); static int read_module_replacements(const char *); @@ -827,13 +827,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 +936,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 @@ -1849,15 +1843,11 @@ do_linkup(struct module *mp, struct node *np) nbuckets[i] = NULL; while (onp) { snmp_log(LOG_WARNING, - "Unlinked OID in %s: %s ::= { %s %ld }\n", + "Cannot resolve OID in %s: %s ::= { %s %ld } at line %d in %s\n", (mp->name ? mp->name : ""), (onp->label ? onp->label : ""), (onp->parent ? onp->parent : ""), - onp->subid); - snmp_log(LOG_WARNING, - "Undefined identifier: %s near line %d of %s\n", - (onp->parent ? onp->parent : ""), - onp->lineno, onp->filename); + onp->subid, onp->lineno, onp->filename); np = onp; onp = onp->next; } @@ -1866,18 +1856,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) { @@ -1905,11 +1899,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; @@ -1921,11 +1915,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; } @@ -2013,8 +2015,13 @@ parse_objectid(FILE * fp, char *name) np = alloc_node(nop->modid); if (np == NULL) goto err; - if (root == NULL) + if (root == NULL) { root = np; + } else { + netsnmp_assert(oldnp); + oldnp->next = np; + } + oldnp = np; np->parent = strdup(op->label); if (count == (length - 2)) { @@ -2026,10 +2033,8 @@ parse_objectid(FILE * fp, char *name) goto err; } else { if (!nop->label) { - nop->label = (char *) malloc(20 + ANON_LEN); - if (nop->label == NULL) + if (asprintf(&nop->label, "%s%d", ANON, anonymous++) < 0) goto err; - sprintf(nop->label, "%s%d", ANON, anonymous++); } np->label = strdup(nop->label); } @@ -2038,13 +2043,6 @@ 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... */ } @@ -2053,8 +2051,8 @@ parse_objectid(FILE * fp, char *name) * 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; @@ -2192,8 +2190,7 @@ parse_enumlist(FILE * fp, struct enum_list **retp) /* * this is an enumerated label */ - *epp = - (struct enum_list *) calloc(1, sizeof(struct enum_list)); + *epp = calloc(1, sizeof(struct enum_list)); if (*epp == NULL) return (NULL); /* @@ -2203,28 +2200,52 @@ parse_enumlist(FILE * fp, struct enum_list **retp) type = get_token(fp, token, MAXTOKEN); if (type != LEFTPAREN) { print_error("Expected \"(\"", token, type); - return NULL; + goto err; } type = get_token(fp, token, MAXTOKEN); if (type != NUMBER) { print_error("Expected integer", token, type); - return NULL; + goto err; } (*epp)->value = strtol(token, NULL, 10); + (*epp)->lineno = mibLine; type = get_token(fp, token, MAXTOKEN); if (type != RIGHTPAREN) { print_error("Expected \")\"", token, type); - return NULL; + goto err; + } else { + struct enum_list *op = ep; + while (op != *epp) { + if (strcmp((*epp)->label, op->label) == 0) { + snmp_log(LOG_ERR, + "Duplicate enum label '%s' at line %d in %s. First at line %d\n", + (*epp)->label, mibLine, File, op->lineno); + erroneousMibs++; + break; + } + else if ((*epp)->value == op->value) { + snmp_log(LOG_ERR, + "Duplicate enum value '%d' at line %d in %s. First at line %d\n", + (*epp)->value, mibLine, File, op->lineno); + erroneousMibs++; + break; + } + op = op->next; + } } epp = &(*epp)->next; } } if (type == ENDOFFILE) { print_error("Expected \"}\"", token, type); - return NULL; + goto err; } *retp = ep; return ep; + +err: + free_enums(&ep); + return NULL; } static struct range_list * @@ -2278,7 +2299,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); @@ -2435,14 +2456,24 @@ parse_asntype(FILE * fp, char *name, int *ntype, char *ntoken) /* * textual convention */ + tcp = NULL; for (i = 0; i < tc_alloc; i++) { - if (tclist[i].type == 0) - break; + if (tclist[i].type == 0) { + if (tcp == NULL) + tcp = &tclist[i]; + } else if (strcmp(name, tclist[i].descriptor) == 0 && + tclist[i].modid == current_module) { + snmp_log(LOG_ERR, + "Duplicate TEXTUAL-CONVENTION '%s' at line %d in %s. First at line %d\n", + name, mibLine, File, tclist[i].lineno); + erroneousMibs++; + } } - if (i == tc_alloc) { + if (tcp == NULL) { tclist = realloc(tclist, (tc_alloc + TC_INCR)*sizeof(struct tc)); memset(tclist+tc_alloc, 0, TC_INCR*sizeof(struct tc)); + tcp = tclist + tc_alloc; tc_alloc += TC_INCR; } if (!(type & SYNTAX_MASK)) { @@ -2450,11 +2481,11 @@ parse_asntype(FILE * fp, char *name, int *ntype, char *ntoken) token, type); goto err; } - tcp = &tclist[i]; tcp->modid = current_module; tcp->descriptor = strdup(name); tcp->hint = hint; tcp->description = descr; + tcp->lineno = mibLine; tcp->type = type; *ntype = get_token(fp, ntoken, MAXTOKEN); if (*ntype == LEFTPAREN) { @@ -2690,7 +2721,8 @@ parse_objecttype(FILE * fp, char *name) /* * Mark's defVal section */ - type = get_token(fp, quoted_string_buffer, MAXTOKEN); + type = get_token(fp, quoted_string_buffer, + sizeof(quoted_string_buffer)); if (type != LEFTBRACKET) { print_error("Bad DEFAULTVALUE", quoted_string_buffer, type); @@ -2704,7 +2736,8 @@ parse_objecttype(FILE * fp, char *name) defbuf[0] = 0; while (1) { - type = get_token(fp, quoted_string_buffer, MAXTOKEN); + type = get_token(fp, quoted_string_buffer, + sizeof(quoted_string_buffer)); if ((type == RIGHTBRACKET && --level == 0) || type == ENDOFFILE) break; @@ -2725,6 +2758,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); } @@ -2870,8 +2912,7 @@ parse_notificationDefinition(FILE * fp, char *name) type = get_token(fp, quoted_string_buffer, MAXQUOTESTR); if (type != QUOTESTRING) { print_error("Bad DESCRIPTION", quoted_string_buffer, type); - free_node(np); - return NULL; + goto free_node; } if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_SAVE_MIB_DESCRS)) { @@ -2882,17 +2923,16 @@ parse_notificationDefinition(FILE * fp, char *name) type = get_token(fp, quoted_string_buffer, MAXQUOTESTR); if (type != QUOTESTRING) { print_error("Bad REFERENCE", quoted_string_buffer, type); - free_node(np); - return NULL; + goto free_node; } + free(np->reference); np->reference = strdup(quoted_string_buffer); break; case OBJECTS: np->varbinds = getVarbinds(fp, &np->varbinds); if (!np->varbinds) { print_error("Bad OBJECTS list", token, type); - free_node(np); - return NULL; + goto free_node; } break; default: @@ -2904,6 +2944,10 @@ parse_notificationDefinition(FILE * fp, char *name) type = get_token(fp, token, MAXTOKEN); } return merge_parse_objectid(np, fp, name); + +free_node: + free_node(np); + return NULL; } /* @@ -2928,8 +2972,7 @@ parse_trapDefinition(FILE * fp, char *name) type = get_token(fp, quoted_string_buffer, MAXQUOTESTR); if (type != QUOTESTRING) { print_error("Bad DESCRIPTION", quoted_string_buffer, type); - free_node(np); - return NULL; + goto free_node; } if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_SAVE_MIB_DESCRS)) { @@ -2941,8 +2984,7 @@ parse_trapDefinition(FILE * fp, char *name) type = get_token(fp, quoted_string_buffer, MAXQUOTESTR); if (type != QUOTESTRING) { print_error("Bad REFERENCE", quoted_string_buffer, type); - free_node(np); - return NULL; + goto free_node; } np->reference = strdup(quoted_string_buffer); break; @@ -2952,8 +2994,7 @@ parse_trapDefinition(FILE * fp, char *name) type = get_token(fp, token, MAXTOKEN); if (type != LABEL) { print_error("Bad Trap Format", token, type); - free_node(np); - return NULL; + goto free_node; } np->parent = strdup(token); /* @@ -2963,16 +3004,14 @@ parse_trapDefinition(FILE * fp, char *name) } else if (type == LABEL) { np->parent = strdup(token); } else { - free_node(np); - return NULL; + goto free_node; } break; case VARIABLES: np->varbinds = getVarbinds(fp, &np->varbinds); if (!np->varbinds) { print_error("Bad VARIABLES list", token, type); - free_node(np); - return NULL; + goto free_node; } break; default: @@ -2989,35 +3028,32 @@ parse_trapDefinition(FILE * fp, char *name) if (type != NUMBER) { print_error("Expected a Number", token, type); - free_node(np); - return NULL; + goto free_node; } np->subid = strtoul(token, NULL, 10); np->next = alloc_node(current_module); - if (np->next == NULL) { - free_node(np); - return (NULL); - } + if (np->next == NULL) + goto free_node; /* Catch the syntax error */ if (np->parent == NULL) { - free_node(np->next); - free_node(np); gMibError = MODULE_SYNTAX_ERROR; - return (NULL); + goto free_next_node; } np->next->parent = np->parent; - np->parent = (char *) malloc(strlen(np->parent) + 2); - if (np->parent == NULL) { - free_node(np->next); - free_node(np); - return (NULL); - } - strcpy(np->parent, np->next->parent); - strcat(np->parent, "#"); + np->parent = NULL; + if (asprintf(&np->parent, "%s#", np->next->parent) < 0) + goto free_next_node; np->next->label = strdup(np->parent); return np; + +free_next_node: + free_node(np->next); + +free_node: + free_node(np); + return NULL; } @@ -3103,18 +3139,24 @@ eat_syntax(FILE * fp, char *token, int maxtoken) static int compliance_lookup(const char *name, int modid) { - if (modid == -1) { - struct objgroup *op = - (struct objgroup *) malloc(sizeof(struct objgroup)); - if (!op) - return 0; - op->next = objgroups; - op->name = strdup(name); - op->line = mibLine; - objgroups = op; - return 1; - } else + struct objgroup *op; + + if (modid != -1) return find_tree_node(name, modid) != NULL; + + op = malloc(sizeof(struct objgroup)); + if (!op) + return 0; + + op->next = objgroups; + op->name = strdup(name); + if (!op->name) { + free(op); + return 0; + } + op->line = mibLine; + objgroups = op; + return 1; } static struct node * @@ -3153,7 +3195,8 @@ parse_compliance(FILE * fp, char *name) np->description = strdup(quoted_string_buffer); type = get_token(fp, token, MAXTOKEN); if (type == REFERENCE) { - type = get_token(fp, quoted_string_buffer, MAXTOKEN); + type = get_token(fp, quoted_string_buffer, + sizeof(quoted_string_buffer)); if (type != QUOTESTRING) { print_error("Bad REFERENCE", quoted_string_buffer, type); goto skip; @@ -3296,7 +3339,7 @@ parse_capabilities(FILE * fp, char *name) print_error("Expected DESCRIPTION", token, type); goto skip; } - type = get_token(fp, quoted_string_buffer, MAXTOKEN); + type = get_token(fp, quoted_string_buffer, sizeof(quoted_string_buffer)); if (type != QUOTESTRING) { print_error("Bad DESCRIPTION", quoted_string_buffer, type); goto skip; @@ -3307,7 +3350,8 @@ parse_capabilities(FILE * fp, char *name) } type = get_token(fp, token, MAXTOKEN); if (type == REFERENCE) { - type = get_token(fp, quoted_string_buffer, MAXTOKEN); + type = get_token(fp, quoted_string_buffer, + sizeof(quoted_string_buffer)); if (type != QUOTESTRING) { print_error("Bad REFERENCE", quoted_string_buffer, type); goto skip; @@ -3429,7 +3473,8 @@ parse_capabilities(FILE * fp, char *name) print_error("Expected DESCRIPTION", token, type); goto skip; } - type = get_token(fp, quoted_string_buffer, MAXTOKEN); + type = get_token(fp, quoted_string_buffer, + sizeof(quoted_string_buffer)); if (type != QUOTESTRING) { print_error("Bad DESCRIPTION", quoted_string_buffer, type); goto skip; @@ -3636,14 +3681,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); /* @@ -3656,7 +3703,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) { @@ -3693,10 +3740,10 @@ parse_imports(FILE * fp) * 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. @@ -3706,29 +3753,36 @@ 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; + import_list[i].label = NULL; mp->imports[i].modid = import_list[i].modid; DEBUGMSGTL(("parse-mibs", "#### adding Module %d '%s' %d\n", mp->modid, 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: + for (i = 0; i < import_count; ++i) + free(import_list[i].label); + free(import_list); return; } @@ -3878,6 +3932,57 @@ read_import_replacements(const char *old_module_name, return read_module_replacements(old_module_name); } +static int +read_from_file(struct module *mp, const char *name) +{ + const char *oldFile = File; + int oldLine = mibLine; + int oldModule = current_module; + FILE *fp; + struct node *np; + int res; + + if (mp->no_imports != -1) { + DEBUGMSGTL(("parse-mibs", "Module %s already loaded\n", + name)); + return MODULE_ALREADY_LOADED; + } + if ((fp = fopen(mp->file, "r")) == NULL) { + int rval; + if (errno == ENOTDIR || errno == ENOENT) + rval = MODULE_NOT_FOUND; + else + rval = MODULE_LOAD_FAILED; + snmp_log_perror(mp->file); + return rval; + } +#ifdef HAVE_FLOCKFILE + flockfile(fp); +#endif + mp->no_imports = 0; /* Note that we've read the file */ + File = mp->file; + mibLine = 1; + current_module = mp->modid; + /* + * Parse the file + */ + np = parse(fp); +#ifdef HAVE_FUNLOCKFILE + funlockfile(fp); +#endif + fclose(fp); + File = oldFile; + mibLine = oldLine; + current_module = oldModule; + res = !np && gMibError == MODULE_SYNTAX_ERROR ? + MODULE_SYNTAX_ERROR : MODULE_LOADED_OK; + while (np) { + struct node *nnp = np->next; + free_node(np); + np = nnp; + } + return res; +} /* * Read in the named module @@ -3888,53 +3993,12 @@ static int read_module_internal(const char *name) { struct module *mp; - FILE *fp; - struct node *np; netsnmp_init_mib_internals(); for (mp = module_head; mp; mp = mp->next) - if (!label_compare(mp->name, name)) { - const char *oldFile = File; - int oldLine = mibLine; - int oldModule = current_module; - - if (mp->no_imports != -1) { - DEBUGMSGTL(("parse-mibs", "Module %s already loaded\n", - name)); - return MODULE_ALREADY_LOADED; - } - if ((fp = fopen(mp->file, "r")) == NULL) { - int rval; - if (errno == ENOTDIR || errno == ENOENT) - rval = MODULE_NOT_FOUND; - else - rval = MODULE_LOAD_FAILED; - snmp_log_perror(mp->file); - return rval; - } -#ifdef HAVE_FLOCKFILE - flockfile(fp); -#endif - mp->no_imports = 0; /* Note that we've read the file */ - File = mp->file; - mibLine = 1; - current_module = mp->modid; - /* - * Parse the file - */ - np = parse(fp, NULL); -#ifdef HAVE_FUNLOCKFILE - funlockfile(fp); -#endif - fclose(fp); - File = oldFile; - mibLine = oldLine; - current_module = oldModule; - if ((np == NULL) && (gMibError == MODULE_SYNTAX_ERROR) ) - return MODULE_SYNTAX_ERROR; - return MODULE_LOADED_OK; - } + if (!label_compare(mp->name, name)) + return read_from_file(mp, name); return MODULE_NOT_FOUND; } @@ -3942,7 +4006,7 @@ read_module_internal(const char *name) void adopt_orphans(void) { - struct node *np, *onp; + struct node *np = NULL, *onp; struct tree *tp; int i, adopted = 1; @@ -3998,12 +4062,11 @@ adopt_orphans(void) while (onp) { char modbuf[256]; snmp_log(LOG_WARNING, - "Cannot adopt OID in %s: %s ::= { %s %ld }\n", + "Cannot resolve OID in %s: %s ::= { %s %ld } at line %d in %s\n", module_name(onp->modid, modbuf), (onp->label ? onp->label : ""), (onp->parent ? onp->parent : ""), - onp->subid); - + onp->subid, onp->lineno, onp->filename); np = onp; onp = onp->next; } @@ -4265,6 +4328,12 @@ new_module(const char *name, const char *file) return; mp->name = strdup(name); mp->file = strdup(file); + if (mp->name == NULL || mp->file == NULL) { + free(mp->name); + free(mp->file); + free(mp); + return; + } mp->imports = NULL; mp->no_imports = -1; /* Not yet loaded */ mp->modid = max_module; @@ -4308,12 +4377,23 @@ scan_objlist(struct node *root, struct module *mp, struct objgroup *list, const mibLine = oLine; } +static void free_objgroup(struct objgroup *o) +{ + while (o) { + struct objgroup *next = o->next; + + free(o->name); + free(o); + o = next; + } +} + /* * Parses a mib file and returns a linked list of nodes found in the file. * Returns NULL on error. */ static struct node * -parse(FILE * fp, struct node *root) +parse(FILE * fp) { #ifdef TEST extern void xmalloc_stats(FILE *); @@ -4326,7 +4406,7 @@ parse(FILE * fp, struct node *root) #define BETWEEN_MIBS 1 #define IN_MIB 2 int state = BETWEEN_MIBS; - struct node *np, *nnp; + struct node *np = NULL, *root = NULL; struct objgroup *oldgroups = NULL, *oldobjects = NULL, *oldnotifs = NULL; @@ -4336,16 +4416,9 @@ parse(FILE * fp, struct node *root) free(last_err_module); last_err_module = NULL; - np = root; - if (np != NULL) { - /* - * now find end of chain - */ - while (np->next) - np = np->next; - } - while (type != ENDOFFILE) { + struct node *nnp; + if (lasttype == CONTINUE) lasttype = type; else @@ -4356,7 +4429,7 @@ parse(FILE * fp, struct node *root) if (state != IN_MIB) { print_error("Error, END before start of MIB", NULL, type); gMibError = MODULE_SYNTAX_ERROR; - return NULL; + goto free_mib; } else { struct module *mp; #ifdef TEST @@ -4420,9 +4493,6 @@ parse(FILE * fp, struct node *root) if (nnp == NULL) { print_error("Bad parse of MACRO", NULL, type); gMibError = MODULE_SYNTAX_ERROR; - /* - * return NULL; - */ } free_node(nnp); /* IGNORE */ nnp = NULL; @@ -4444,7 +4514,7 @@ parse(FILE * fp, struct node *root) if (type == ENDOFFILE) { print_error("Expected \"}\"", token, type); gMibError = MODULE_SYNTAX_ERROR; - return NULL; + goto free_mib; } type = get_token(fp, token, MAXTOKEN); } @@ -4454,7 +4524,7 @@ parse(FILE * fp, struct node *root) if (state != BETWEEN_MIBS) { print_error("Error, nested MIBS", NULL, type); gMibError = MODULE_SYNTAX_ERROR; - return NULL; + goto free_mib; } state = IN_MIB; current_module = which_module(name); @@ -4479,7 +4549,7 @@ parse(FILE * fp, struct node *root) if (nnp == NULL) { print_error("Bad parse of OBJECT-TYPE", NULL, type); gMibError = MODULE_SYNTAX_ERROR; - return NULL; + goto free_mib; } break; case OBJGROUP: @@ -4487,7 +4557,7 @@ parse(FILE * fp, struct node *root) if (nnp == NULL) { print_error("Bad parse of OBJECT-GROUP", NULL, type); gMibError = MODULE_SYNTAX_ERROR; - return NULL; + goto free_mib; } break; case NOTIFGROUP: @@ -4495,7 +4565,7 @@ parse(FILE * fp, struct node *root) if (nnp == NULL) { print_error("Bad parse of NOTIFICATION-GROUP", NULL, type); gMibError = MODULE_SYNTAX_ERROR; - return NULL; + goto free_mib; } break; case TRAPTYPE: @@ -4503,7 +4573,7 @@ parse(FILE * fp, struct node *root) if (nnp == NULL) { print_error("Bad parse of TRAP-TYPE", NULL, type); gMibError = MODULE_SYNTAX_ERROR; - return NULL; + goto free_mib; } break; case NOTIFTYPE: @@ -4511,7 +4581,7 @@ parse(FILE * fp, struct node *root) if (nnp == NULL) { print_error("Bad parse of NOTIFICATION-TYPE", NULL, type); gMibError = MODULE_SYNTAX_ERROR; - return NULL; + goto free_mib; } break; case COMPLIANCE: @@ -4519,7 +4589,7 @@ parse(FILE * fp, struct node *root) if (nnp == NULL) { print_error("Bad parse of MODULE-COMPLIANCE", NULL, type); gMibError = MODULE_SYNTAX_ERROR; - return NULL; + goto free_mib; } break; case AGENTCAP: @@ -4527,7 +4597,7 @@ parse(FILE * fp, struct node *root) if (nnp == NULL) { print_error("Bad parse of AGENT-CAPABILITIES", NULL, type); gMibError = MODULE_SYNTAX_ERROR; - return NULL; + goto free_mib; } break; case MACRO: @@ -4535,9 +4605,6 @@ parse(FILE * fp, struct node *root) if (nnp == NULL) { print_error("Bad parse of MACRO", NULL, type); gMibError = MODULE_SYNTAX_ERROR; - /* - * return NULL; - */ } free_node(nnp); /* IGNORE */ nnp = NULL; @@ -4547,7 +4614,7 @@ parse(FILE * fp, struct node *root) if (nnp == NULL) { print_error("Bad parse of MODULE-IDENTITY", NULL, type); gMibError = MODULE_SYNTAX_ERROR; - return NULL; + goto free_mib; } break; case OBJIDENTITY: @@ -4555,7 +4622,7 @@ parse(FILE * fp, struct node *root) if (nnp == NULL) { print_error("Bad parse of OBJECT-IDENTITY", NULL, type); gMibError = MODULE_SYNTAX_ERROR; - return NULL; + goto free_mib; } break; case OBJECT: @@ -4563,19 +4630,19 @@ parse(FILE * fp, struct node *root) if (type != IDENTIFIER) { print_error("Expected IDENTIFIER", token, type); gMibError = MODULE_SYNTAX_ERROR; - return NULL; + goto free_mib; } type = get_token(fp, token, MAXTOKEN); if (type != EQUALS) { print_error("Expected \"::=\"", token, type); gMibError = MODULE_SYNTAX_ERROR; - return NULL; + goto free_mib; } nnp = parse_objectid(fp, name); if (nnp == NULL) { print_error("Bad parse of OBJECT IDENTIFIER", NULL, type); gMibError = MODULE_SYNTAX_ERROR; - return NULL; + goto free_mib; } break; case EQUALS: @@ -4587,9 +4654,10 @@ parse(FILE * fp, struct node *root) default: print_error("Bad operator", token, type); gMibError = MODULE_SYNTAX_ERROR; - return NULL; + goto free_mib; } if (nnp) { + struct node *op; if (np) np->next = nnp; else @@ -4598,10 +4666,33 @@ parse(FILE * fp, struct node *root) np = np->next; if (np->type == TYPE_OTHER) np->type = type; + op = root; + while (op != nnp) { + if (strcmp(nnp->label, op->label) == 0 && nnp->subid != op->subid) { + snmp_log(LOG_ERR, + "Duplicate Object '%s' at line %d in %s. First at line %d\n", + op->label, mibLine, File, op->lineno); + erroneousMibs++; + } + op = op->next; + } } } DEBUGMSGTL(("parse-file", "End of file (%s)\n", File)); return root; + +free_mib: + for (; root; root = np) { + np = root->next; + free_node(root); + } + free_objgroup(objgroups); + objgroups = NULL; + free_objgroup(objects); + objects = NULL; + free_objgroup(notifs); + notifs = NULL; + return NULL; } /* @@ -4642,7 +4733,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; diff --git a/vendor/snmplib/read_config.c b/vendor/snmplib/read_config.c index ee8173e..159f4be 100644 --- a/vendor/snmplib/read_config.c +++ b/vendor/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,39 +97,39 @@ #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 -#if HAVE_IO_H +#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 @@ -158,7 +158,8 @@ struct config_files *config_files = NULL; static struct config_line * internal_register_config_handler(const char *type_param, const char *token, - void (*parser) (const char *, char *), + void (*parser1) (const char *, char *), + void (*parser2) (const char *, const char *), void (*releaser) (void), const char *help, int when) { @@ -187,7 +188,7 @@ internal_register_config_handler(const char *type_param, *cptr = '\0'; ++cptr; } - ltmp2 = internal_register_config_handler(c, token, parser, + ltmp2 = internal_register_config_handler(c, token, parser1, parser2, releaser, help, when); } return ltmp2; @@ -208,6 +209,11 @@ internal_register_config_handler(const char *type_param, } (*ctmp)->fileHeader = strdup(type); + if (!(*ctmp)->fileHeader) { + free(*ctmp); + *ctmp = NULL; + return NULL; + } DEBUGMSGTL(("9:read_config:type", "new type %s\n", type)); } @@ -232,6 +238,12 @@ internal_register_config_handler(const char *type_param, (*ltmp)->config_time = when; (*ltmp)->config_token = strdup(token); + if (!(*ltmp)->config_token) { + free(*ltmp); + *ltmp = NULL; + return NULL; + } + if (help != NULL) (*ltmp)->help = strdup(help); } @@ -240,7 +252,8 @@ internal_register_config_handler(const char *type_param, * Add/Replace the parse/free functions for the given line type * in the given file type. */ - (*ltmp)->parse_line = parser; + (*ltmp)->parse_line1 = parser1; + (*ltmp)->parse_line2 = parser2; (*ltmp)->free_func = releaser; return (*ltmp); @@ -253,7 +266,7 @@ register_prenetsnmp_mib_handler(const char *type, void (*parser) (const char *, char *), void (*releaser) (void), const char *help) { - return internal_register_config_handler(type, token, parser, releaser, + return internal_register_config_handler(type, token, parser, NULL, releaser, help, PREMIB_CONFIG); } @@ -308,7 +321,7 @@ register_config_handler(const char *type, void (*parser) (const char *, char *), void (*releaser) (void), const char *help) { - return internal_register_config_handler(type, token, parser, releaser, + return internal_register_config_handler(type, token, parser, NULL, releaser, help, NORMAL_CONFIG); } @@ -318,9 +331,7 @@ register_const_config_handler(const char *type, void (*parser) (const char *, const char *), void (*releaser) (void), const char *help) { - return internal_register_config_handler(type, token, - (void(*)(const char *, char *)) - parser, releaser, + return internal_register_config_handler(type, token, NULL, parser, releaser, help, NORMAL_CONFIG); } @@ -329,9 +340,16 @@ register_app_config_handler(const char *token, void (*parser) (const char *, char *), void (*releaser) (void), const char *help) { - return (register_config_handler(NULL, token, parser, releaser, help)); + return register_config_handler(NULL, token, parser, releaser, help); } +struct config_line * +register_const_app_config_handler(const char *token, + void (*parser) (const char *, const char *), + void (*releaser) (void), const char *help) +{ + return register_const_config_handler(NULL, token, parser, releaser, help); +} /** @@ -512,6 +530,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; @@ -524,11 +544,14 @@ read_config_find_handler(struct config_line *line_handlers, /* * searches a config_line linked list for a match */ -int +static int 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) { @@ -551,7 +574,10 @@ run_config_handler(struct config_line *lptr, while ((cp > cptr) && isspace((unsigned char)(*cp))) { *(cp--) = '\0'; } - (*(lptr->parse_line)) (token, cptr); + if (lptr->parse_line1) + lptr->parse_line1(token, cptr); + else + lptr->parse_line2(token, cptr); } else DEBUGMSGTL(("9:read_config:parser", @@ -577,13 +603,13 @@ run_config_handler(struct config_line *lptr, */ #define SNMP_CONFIG_DELIMETERS " \t=" -int +static int snmp_config_when(char *line, int when) { char *cptr, buf[STRINGMAX]; struct config_line *lptr = NULL; struct config_files *ctmp = config_files; - char *st; + char *st, *start_from, *end; if (line == NULL) { config_perror("snmp_config() called with a null string."); @@ -609,6 +635,10 @@ snmp_config_when(char *line, int when) return SNMPERR_GENERR; } cptr = strtok_r(NULL, SNMP_CONFIG_DELIMETERS, &st); + if (!cptr) { + netsnmp_config_error("Invalid configuration line %s", line); + return SNMPERR_GENERR; + } lptr = read_config_find_handler(lptr, cptr); } else { /* @@ -626,7 +656,11 @@ snmp_config_when(char *line, int when) /* * use the original string instead since strtok_r messed up the original */ - line = skip_white(line + (cptr - buf) + strlen(cptr) + 1); + end = line + strlen(line); + start_from = line + (cptr - buf) + strlen(cptr) + 1; + if (start_from > end) + start_from = end; + line = skip_white(start_from); return (run_config_handler(lptr, cptr, line, when)); } @@ -759,6 +793,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; @@ -833,7 +870,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; } @@ -1129,11 +1166,11 @@ const char * get_configuration_directory(void) { char defaultPath[SPRINT_MAX_LEN]; - char *homepath; + const char *homepath; if (NULL == netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_CONFIGURATION_DIR)) { - homepath = netsnmp_getenv("HOME"); + homepath = netsnmp_gethomedir(); snprintf(defaultPath, sizeof(defaultPath), "%s%c%s%c%s%s%s%s", SNMPCONFPATH, ENV_SEPARATOR_CHAR, SNMPSHAREPATH, ENV_SEPARATOR_CHAR, SNMPLIBPATH, @@ -1245,6 +1282,9 @@ read_config_files_in_path(const char *path, struct config_files *ctmp, return SNMPERR_GENERR; envconfpath = strdup(path); + if (NULL == envconfpath) { + return SNMPERR_GENERR; + } DEBUGMSGTL(("read_config:path", " config path used for %s:%s (persistent path:%s)\n", ctmp->fileHeader, envconfpath, perspath)); @@ -1394,6 +1434,9 @@ read_config_files_of_type(int when, struct config_files *ctmp) * keyword transforms the perspath pointer into a dangling pointer. */ perspath = strdup(get_persistent_directory()); + if (perspath == NULL) { + return SNMPERR_GENERR; + } if (envconfpath == NULL) { /* * read just the config files (no persistent stuff), since @@ -1405,6 +1448,9 @@ read_config_files_of_type(int when, struct config_files *ctmp) ret = SNMPERR_SUCCESS; free(perspath); perspath = strdup(get_persistent_directory()); + if (perspath == NULL) { + return SNMPERR_GENERR; + } if ( read_config_files_in_path(perspath, ctmp, when, perspath, persfile) == SNMPERR_SUCCESS ) ret = SNMPERR_SUCCESS; @@ -1455,7 +1501,7 @@ read_config_files(int when) { void read_config_print_usage(const char *lead) { - struct config_files *ctmp = config_files; + struct config_files *ctmp; struct config_line *ltmp; if (lead == NULL) @@ -2008,7 +2054,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; @@ -2028,7 +2074,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); @@ -2038,6 +2084,7 @@ read_config_read_octet_string_const(const char *readfrom, u_char ** str, /* * copy validated data */ + *len = ilen; cptr = *str; for (i = 0; i < ilen; i++) { if (1 == sscanf(readfrom, "%2x", &tmp)) @@ -2054,7 +2101,6 @@ read_config_read_octet_string_const(const char *readfrom, u_char ** str, * Terminate the output buffer. */ *cptr++ = '\0'; - *len = ilen; readfrom = skip_white_const(readfrom); } else { /* @@ -2087,7 +2133,7 @@ read_config_read_octet_string_const(const char *readfrom, u_char ** str, * read_config_save_objid(): saves an objid as a numerical string */ char * -read_config_save_objid(char *saveto, oid * objid, size_t len) +read_config_save_objid(char *saveto, const oid *objid, size_t len) { int i; @@ -2100,10 +2146,9 @@ read_config_save_objid(char *saveto, oid * objid, size_t len) /* * in case len=0, this makes it easier to read it back in */ - for (i = 0; i < (int) len; i++) { - sprintf(saveto, ".%" NETSNMP_PRIo "d", objid[i]); - saveto += strlen(saveto); - } + for (i = 0; i < len; i++) + saveto += sprintf(saveto, ".%" NETSNMP_PRIo "d", objid[i]); + return saveto; } @@ -2144,7 +2189,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; } @@ -2223,7 +2268,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; } @@ -2302,7 +2347,7 @@ read_config_read_memory(int type, char *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; } @@ -2381,7 +2426,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/vendor/snmplib/scapi.c b/vendor/snmplib/scapi.c index 00c9174..ac77004 100644 --- a/vendor/snmplib/scapi.c +++ b/vendor/snmplib/scapi.c @@ -29,16 +29,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 @@ -48,7 +48,7 @@ #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include "memcheck.h" @@ -65,6 +65,7 @@ netsnmp_feature_child_of(usm_scapi, usm_support); #ifdef NETSNMP_USE_INTERNAL_MD5 #include #endif +#include #include #include #include @@ -131,7 +132,7 @@ 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 netsnmp_auth_alg_info _auth_alg_info[] = { +static const netsnmp_auth_alg_info _auth_alg_info[] = { { NETSNMP_USMAUTH_NOAUTH, "usmNoAuthProtocol", usmNoAuthProtocol, OID_LENGTH(usmNoAuthProtocol), 0, 0 }, { NETSNMP_USMAUTH_HMACSHA1, "usmHMACSHA1AuthProtocol", @@ -161,7 +162,7 @@ static netsnmp_auth_alg_info _auth_alg_info[] = { { -1, "unknown", NULL, 0, 0, 0 } }; -static netsnmp_priv_alg_info _priv_alg_info[] = { +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 @@ -209,7 +210,7 @@ static netsnmp_priv_alg_info _priv_alg_info[] = { * * returns a pointer to a netsnmp_priv_alg_info struct */ -netsnmp_priv_alg_info * +const netsnmp_priv_alg_info * sc_get_priv_alg_byoid(const oid *privoid, u_int len) { int i = 0; @@ -239,7 +240,7 @@ sc_get_priv_alg_byoid(const oid *privoid, u_int len) * * returns a pointer to a netsnmp_priv_alg_info struct */ -netsnmp_priv_alg_info * +const netsnmp_priv_alg_info * sc_get_priv_alg_bytype(u_int type) { int i = 0; @@ -260,7 +261,7 @@ sc_get_priv_alg_bytype(u_int type) * * returns a pointer to a netsnmp_auth_alg_info struct */ -netsnmp_auth_alg_info * +const netsnmp_auth_alg_info * sc_find_auth_alg_byoid(const oid *authoid, u_int len) { int i = 0; @@ -290,7 +291,7 @@ sc_find_auth_alg_byoid(const oid *authoid, u_int len) * * returns a pointer to a netsnmp_auth_alg_info struct */ -netsnmp_auth_alg_info * +const netsnmp_auth_alg_info * sc_get_auth_alg_byindex(u_int index) { DEBUGTRACE; @@ -307,7 +308,7 @@ sc_get_auth_alg_byindex(u_int index) * * returns a pointer to a netsnmp_auth_alg_info struct */ -netsnmp_auth_alg_info * +const netsnmp_auth_alg_info * sc_find_auth_alg_bytype(u_int type) { int i = 0; @@ -335,7 +336,7 @@ sc_find_auth_alg_bytype(u_int type) int sc_get_authtype(const oid * hashtype, u_int hashtype_len) { - netsnmp_auth_alg_info *aai; + const netsnmp_auth_alg_info *aai; DEBUGTRACE; @@ -349,7 +350,7 @@ sc_get_authtype(const oid * hashtype, u_int hashtype_len) int sc_get_privtype(const oid * privtype, u_int privtype_len) { - netsnmp_priv_alg_info *pai; + const netsnmp_priv_alg_info *pai; DEBUGTRACE; @@ -371,7 +372,7 @@ sc_get_privtype(const oid * privtype, u_int privtype_len) int sc_get_auth_maclen(int hashtype) { - netsnmp_auth_alg_info *aai; + const netsnmp_auth_alg_info *aai; DEBUGTRACE; @@ -392,7 +393,7 @@ sc_get_auth_maclen(int hashtype) int sc_get_proper_auth_length_bytype(int hashtype) { - netsnmp_auth_alg_info *aai; + const netsnmp_auth_alg_info *aai; DEBUGTRACE; @@ -411,7 +412,7 @@ sc_get_proper_auth_length_bytype(int hashtype) oid * sc_get_auth_oid(int type, size_t *oid_len) { - netsnmp_auth_alg_info *ai; + const netsnmp_auth_alg_info *ai; DEBUGTRACE; @@ -433,7 +434,7 @@ sc_get_auth_oid(int type, size_t *oid_len) const char* sc_get_auth_name(int type) { - netsnmp_auth_alg_info *ai; + const netsnmp_auth_alg_info *ai; DEBUGTRACE; @@ -452,7 +453,7 @@ sc_get_auth_name(int type) oid * sc_get_priv_oid(int type, size_t *oid_len) { - netsnmp_priv_alg_info *ai; + const netsnmp_priv_alg_info *ai; DEBUGTRACE; @@ -490,7 +491,7 @@ netsnmp_feature_child_of(scapi_get_proper_priv_length, netsnmp_unused); int sc_get_proper_priv_length(const oid * privtype, u_int privtype_len) { - netsnmp_priv_alg_info *pai; + const netsnmp_priv_alg_info *pai; DEBUGTRACE; @@ -507,7 +508,7 @@ sc_get_proper_priv_length(const oid * privtype, u_int privtype_len) * * returns a pointer to a netsnmp_priv_alg_info struct */ -netsnmp_priv_alg_info * +const netsnmp_priv_alg_info * sc_get_priv_alg_byindex(u_int index) { DEBUGTRACE; @@ -522,7 +523,7 @@ sc_get_priv_alg_byindex(u_int index) int sc_get_proper_priv_length_bytype(int privtype) { - netsnmp_priv_alg_info *pai; + const netsnmp_priv_alg_info *pai; DEBUGTRACE; @@ -554,7 +555,7 @@ sc_init(void) gettimeofday(&tv, (struct timezone *) 0); netsnmp_srandom((unsigned)(tv.tv_sec ^ tv.tv_usec)); -#elif NETSNMP_USE_PKCS11 +#elif defined(NETSNMP_USE_PKCS11) DEBUGTRACE; rval = pkcs_init(); #else @@ -595,7 +596,7 @@ sc_random(u_char * buf, size_t * buflen) #ifdef NETSNMP_USE_OPENSSL RAND_bytes(buf, *buflen); /* will never fail */ MAKE_MEM_DEFINED(buf, *buflen); -#elif NETSNMP_USE_PKCS11 /* NETSNMP_USE_PKCS11 */ +#elif defined(NETSNMP_USE_PKCS11) /* NETSNMP_USE_PKCS11 */ pkcs_random(buf, *buflen); #else /* NETSNMP_USE_INTERNAL_MD5 */ /* @@ -789,7 +790,7 @@ sc_generate_keyed_hash(const oid * authtypeOID, size_t authtypeOIDlen, *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 (NETSNMP_USMAUTH_HMACMD5 == auth_type) { @@ -815,7 +816,7 @@ sc_generate_keyed_hash(const oid * authtypeOID, size_t authtypeOIDlen, *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 @@ -994,7 +995,7 @@ sc_hash_type(int auth_type, const u_char * buf, size_t buf_len, u_char * MAC, #endif return (rval); -#elif NETSNMP_USE_INTERNAL_CRYPTO +#elif defined(NETSNMP_USE_INTERNAL_CRYPTO) #ifndef NETSNMP_DISABLE_MD5 if (NETSNMP_USMAUTH_HMACMD5 == auth_type) { if (*MAC_len < MD5_DIGEST_LENGTH) @@ -1017,7 +1018,7 @@ sc_hash_type(int auth_type, const u_char * buf, size_t buf_len, u_char * MAC, 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 (NETSNMP_USMAUTH_HMACMD5 == auth_type) { @@ -1175,7 +1176,7 @@ sc_encrypt(const oid * privtype, size_t privtypelen, int rval = SNMPERR_SUCCESS; u_char pad_block[128]; /* bigger than anything I need */ u_char my_iv[128]; /* ditto */ - netsnmp_priv_alg_info *pai = NULL; + const netsnmp_priv_alg_info *pai = NULL; #ifndef NETSNMP_DISABLE_DES int pad, plast, pad_size = 0; #ifdef OLD_DES @@ -1370,7 +1371,7 @@ sc_encrypt(const oid * privtype, size_t privtypelen, { int rval = SNMPERR_SUCCESS, priv_type u_char pkcs_des_key[8]; - netsnmp_priv_alg_info *pai; + const netsnmp_priv_alg_info *pai; DEBUGTRACE; @@ -1469,7 +1470,7 @@ sc_decrypt(const oid * privtype, size_t privtypelen, #endif DES_cblock key_struct; #endif - netsnmp_priv_alg_info *pai = NULL; + const netsnmp_priv_alg_info *pai = NULL; DEBUGTRACE; @@ -1580,11 +1581,11 @@ 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_char pkcs_des_key[8]; - netsnmp_priv_alg_info *pai; + const netsnmp_priv_alg_info *pai; DEBUGTRACE; diff --git a/vendor/snmplib/sd-daemon.c b/vendor/snmplib/sd-daemon.c index bc91a8b..fbf7aae 100644 --- a/vendor/snmplib/sd-daemon.c +++ b/vendor/snmplib/sd-daemon.c @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include #include @@ -313,7 +313,12 @@ int netsnmp_sd_notify(int unset_environment, const char *state) { memset(&sockaddr, 0, sizeof(sockaddr)); sockaddr.sa.sa_family = AF_UNIX; - strncpy(sockaddr.un.sun_path, e, sizeof(sockaddr.un.sun_path)); + if (sizeof(sockaddr.un.sun_path) <= snprintf(sockaddr.un.sun_path, + sizeof(sockaddr.un.sun_path), "%s", e)) { + DEBUGMSGTL(("systemd:netsnmp_sd_notify", "Unix socket path %s is too long.\n", e)); + r = -EINVAL; + goto finish; + } if (sockaddr.un.sun_path[0] == '@') sockaddr.un.sun_path[0] = 0; diff --git a/vendor/snmplib/snmp-tc.c b/vendor/snmplib/snmp-tc.c index 397f524..ea9f3b3 100644 --- a/vendor/snmplib/snmp-tc.c +++ b/vendor/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 @@ -135,6 +135,7 @@ date_n_time(const time_t * when, size_t * length) * Null time */ if (when == NULL || *when == 0 || *when == (time_t) - 1) { +invalid_time: string[0] = 0; string[1] = 0; string[2] = 1; @@ -152,6 +153,9 @@ date_n_time(const time_t * when, size_t * length) * Basic 'local' time handling */ tm_p = localtime(when); + if (!tm_p) + goto invalid_time; + yauron = tm_p->tm_year + 1900; string[0] = (u_char)(yauron >> 8); string[1] = (u_char)yauron; @@ -255,12 +259,12 @@ ctime_to_timet(const char *str) */ #ifdef HAVE_STRUCT_TM_TM_ISDST -#if HAVE_DECL_DAYLIGHT +#if HAVE_DECL_DAYLIGHT==1 tm.tm_isdst = !!daylight; #else tm.tm_isdst = 0; #endif -#if HAVE_DECL_TIMEZONE && defined(HAVE_SCALAR_TIMEZONE) +#if defined(HAVE_DECL_TIMEZONE) && defined(HAVE_SCALAR_TIMEZONE) tm.tm_sec -= timezone; #endif #endif diff --git a/vendor/snmplib/snmp.c b/vendor/snmplib/snmp.c index a354cfb..40e501b 100644 --- a/vendor/snmplib/snmp.c +++ b/vendor/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 @@ -74,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 diff --git a/vendor/snmplib/snmp_alarm.c b/vendor/snmplib/snmp_alarm.c index 8e76d43..50eec8c 100644 --- a/vendor/snmplib/snmp_alarm.c +++ b/vendor/snmplib/snmp_alarm.c @@ -18,26 +18,26 @@ */ #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 diff --git a/vendor/snmplib/snmp_api.c b/vendor/snmplib/snmp_api.c index 79c28aa..ad30397 100644 --- a/vendor/snmplib/snmp_api.c +++ b/vendor/snmplib/snmp_api.c @@ -47,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 @@ -102,7 +102,7 @@ SOFTWARE. #endif #include -#if HAVE_LOCALE_H +#ifdef HAVE_LOCALE_H #include #endif @@ -399,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: @@ -636,10 +638,30 @@ snmp_sess_perror(const char *prog_string, netsnmp_session * 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" @@ -874,8 +896,11 @@ init_snmp(const char *type) /* * set our current locale properly to initialize isprint() type functions + * + * Do not use setlocale on qnx, it is buggy + * https://www.qnx.com/developers/docs/7.1/#com.qnx.doc.neutrino.lib_ref/topic/s/setlocale.html */ -#ifdef HAVE_SETLOCALE +#if defined(HAVE_SETLOCALE) && !defined(__QNX__) setlocale(LC_CTYPE, ""); #endif @@ -1014,6 +1039,8 @@ snmp_open(netsnmp_session *session) return NULL; } + slp->session->flags &= ~SNMP_FLAGS_SESSION_USER; + snmp_session_insert(slp); return (slp->session); @@ -1051,6 +1078,8 @@ snmp_open_ex(netsnmp_session *session, slp->internal->hook_realloc_build = frbuild; slp->internal->check_packet = fcheck; + slp->session->flags &= ~SNMP_FLAGS_SESSION_USER; + snmp_session_insert(slp); return (slp->session); @@ -1111,7 +1140,10 @@ _sess_copy(netsnmp_session * in_session) session->securityEngineID = NULL; session->securityName = NULL; session->securityAuthProto = NULL; + session->securityAuthLocalKey = NULL; session->securityPrivProto = NULL; + session->securityPrivLocalKey = NULL; + session->sessUser = NULL; /* * session now points to the new structure that still contains pointers to * data allocated elsewhere. Some of this data is copied to space malloc'd @@ -1244,6 +1276,22 @@ _sess_copy(netsnmp_session * in_session) session->securityNameLen = strlen(cp); } + if (in_session->securityAuthLocalKey) { + session->securityAuthLocalKey = + netsnmp_memdup(in_session->securityAuthLocalKey, + in_session->securityAuthLocalKeyLen); + session->securityAuthLocalKeyLen = + in_session->securityAuthLocalKeyLen; + } + + if (in_session->securityPrivLocalKey) { + session->securityPrivLocalKey = + netsnmp_memdup(in_session->securityPrivLocalKey, + in_session->securityPrivLocalKeyLen); + session->securityPrivLocalKeyLen = + in_session->securityPrivLocalKeyLen; + } + if (session->retries == SNMP_DEFAULT_RETRIES) { int retry = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_RETRIES); @@ -1289,6 +1337,19 @@ _sess_copy(netsnmp_session * in_session) } } +#ifndef NETSNMP_NO_WRITE_SUPPORT + if (in_session->sessUser) { + struct usmUser *user; + + user = calloc(1, sizeof(struct usmUser)); + if (user == NULL) { + snmp_sess_close(slp); + return NULL; + } + session->sessUser = usm_cloneFrom_user(in_session->sessUser, user); + } +#endif /* NETSNMP_NO_WRITE_SUPPORT */ + /* Anything below this point should only be done if the transport had no say in the matter */ if (session->securityLevel == 0) @@ -1570,7 +1631,7 @@ 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); @@ -1877,6 +1938,9 @@ void * snmp_sess_open(netsnmp_session * pss) { void *pvoid; + + pss->flags |= SNMP_FLAGS_SESSION_USER; + pvoid = _sess_open(pss); if (!pvoid) { SET_SNMP_ERROR(pss->s_snmp_errno); @@ -1895,6 +1959,26 @@ 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) +{ + free(s->localname); + free(s->peername); + free(s->community); + free(s->contextEngineID); + free(s->contextName); + free(s->securityEngineID); + free(s->securityName); + free(s->securityAuthProto); + free(s->securityAuthLocalKey); + free(s->securityPrivProto); + free(s->securityPrivLocalKey); + free(s->paramName); +#ifndef NETSNMP_NO_TRAP_STATS + free(s->trap_stats); +#endif /* NETSNMP_NO_TRAP_STATS */ + usm_free_user(s->sessUser); +} /* * Do a "deep free()" of a netsnmp_session. @@ -1902,32 +1986,20 @@ 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); -#ifndef NETSNMP_NO_TRAP_STATS - SNMP_FREE(s->trap_stats); -#endif /* NETSNMP_NO_TRAP_STATS */ + if (!s) + return; - /* - * clear session from any callbacks - */ - netsnmp_callback_clear_client_arg(s, 0, 0); + netsnmp_cleanup_session(s); - free((char *) s); - } + /* + * clear session from any callbacks + */ + netsnmp_callback_clear_client_arg(s, 0, 0); + + free(s); } /* @@ -1975,10 +2047,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; @@ -2012,7 +2084,7 @@ snmp_sess_close(void *sessp) } snmp_free_session(sesp); - free((char *) slp); + free(slp); return 1; } @@ -2096,11 +2168,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; @@ -2108,8 +2184,9 @@ snmpv3_verify_msg(netsnmp_request_list *rp, netsnmp_pdu *pdu) USM specific (and maybe other future ones) */ if (pdu->securityModel == SNMP_SEC_MODEL_USM && (rpdu->securityEngineIDLen != pdu->securityEngineIDLen || - memcmp(rpdu->securityEngineID, pdu->securityEngineID, - pdu->securityEngineIDLen))) + (pdu->securityEngineIDLen && + memcmp(rpdu->securityEngineID, pdu->securityEngineID, + pdu->securityEngineIDLen)))) return 0; /* the securityName must match though regardless of secmodel */ @@ -2742,7 +2819,7 @@ snmpv3_packet_build(netsnmp_session * session, netsnmp_pdu *pdu, 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", - __func__, pdu_data_len, sizeof(spdu_buf)); + NETSNMP_FUNCTION, pdu_data_len, sizeof(spdu_buf)); return -1; } memcpy(cp, pdu_data, pdu_data_len); @@ -5099,7 +5176,7 @@ _build_initial_pdu_packet(struct session_list *slp, netsnmp_pdu *pdu, int bulk) 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. @@ -5423,16 +5500,16 @@ _sess_async_send(void *sessp, /** * Send a PDU asynchronously. * - * @param[in] slp Session pointer. + * @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 @pdu. - * @param[in] cb_data Will be passed as fifth argument to @callback. + * 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 @pdu and frees @pdu. - * If not successful, returns zero and expects the caller to free @pdu. + * @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, @@ -5487,7 +5564,7 @@ void snmp_free_var(netsnmp_variable_list * var) { snmp_free_var_internals(var); - free((char *) var); + free(var); } void @@ -5598,6 +5675,13 @@ _sess_process_packet_parse_pdu(void *sessp, netsnmp_session * sp, *c = 0; filtered = netsnmp_transport_filter_check(sourceaddr); } + else if (!strncmp(addrtxt, "callback", 8)) { + /* do not filter internal request */ + DEBUGMSGTL(("sess_process_packet:filter", + "bypass packet from %s \n", + addrtxt)); + filtered = 1; + } if ((filter == -1) && filtered) dropstr = "matched blocklist"; else if ((filter == 1) && !filtered) @@ -6814,7 +6898,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; } @@ -6859,7 +6943,7 @@ snmp_sess_timeout(void *sessp) } if (freeme != NULL) { - free((char *) freeme); + free(freeme); freeme = NULL; } } @@ -6927,7 +7011,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). @@ -6976,17 +7066,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; @@ -7040,18 +7137,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. diff --git a/vendor/snmplib/snmp_auth.c b/vendor/snmplib/snmp_auth.c index 56539be..824af0b 100644 --- a/vendor/snmplib/snmp_auth.c +++ b/vendor/snmplib/snmp_auth.c @@ -33,36 +33,36 @@ 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 diff --git a/vendor/snmplib/snmp_client.c b/vendor/snmplib/snmp_client.c index d4b0eb1..99f47c8 100644 --- a/vendor/snmplib/snmp_client.c +++ b/vendor/snmplib/snmp_client.c @@ -52,41 +52,41 @@ SOFTWARE. #ifdef HAVE_INTTYPES_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 -#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 @@ -444,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; } @@ -491,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; @@ -508,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 @@ -853,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; } } @@ -865,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; } } @@ -877,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; } } diff --git a/vendor/snmplib/snmp_debug.c b/vendor/snmplib/snmp_debug.c index 0872657..1d66a6e 100644 --- a/vendor/snmplib/snmp_debug.c +++ b/vendor/snmplib/snmp_debug.c @@ -18,26 +18,30 @@ #ifndef HAVE_PRIORITYNAMES #include #endif -#if HAVE_STDLIB_H +#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 #ifdef HAVE_PRIORITYNAMES -#include + #if defined( HAVE_SYSLOG_H ) + #include + #elif defined ( HAVE_SYS_SYSLOG_H ) + #include + #endif #endif #include @@ -147,7 +151,7 @@ netsnmp_get_debug_log_level(void) static void debug_config_debug_log_level(const char *configtoken, char *line) { -#if !HAVE_PRIORITYNAMES +#ifndef HAVE_PRIORITYNAMES static const struct strval_s { const char *c_name; int c_val; @@ -680,9 +684,25 @@ snmp_debug_shutdown(void) #endif /* NETSNMP_NO_DEBUGGING */ +#ifdef HAVE_WOLFSSL_WOLFCRYPT_LOGGING_H +#include +#include + +static void snmp_log_wolfssl_msg(const int logLevel NETSNMP_ATTRIBUTE_UNUSED, + const char* const msg) +{ + DEBUGMSGTL(("snmp_openssl", msg, "\n")); +} +#endif + void snmp_debug_init(void) { +#ifdef HAVE_WOLFSSL_WOLFCRYPT_LOGGING_H + wolfSSL_Debugging_ON(); + wolfSSL_SetLoggingCb(snmp_log_wolfssl_msg); +#endif + register_prenetsnmp_mib_handler("snmp", "doDebugging", debug_config_turn_on_debugging, NULL, "(1|0)"); diff --git a/vendor/snmplib/snmp_enum.c b/vendor/snmplib/snmp_enum.c index 9bd0d6f..75ac5b2 100644 --- a/vendor/snmplib/snmp_enum.c +++ b/vendor/snmplib/snmp_enum.c @@ -12,7 +12,7 @@ #include #endif #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -41,9 +41,9 @@ struct snmp_enum_list_str { struct snmp_enum_list_str *next; }; -static struct snmp_enum_list ***snmp_enum_lists; -unsigned int current_maj_num; -unsigned int current_min_num; +static struct snmp_enum_list **snmp_enum_lists; +static unsigned int current_maj_num; +static unsigned int current_min_num; static struct snmp_enum_list_str *sliststorage; static void @@ -52,52 +52,20 @@ free_enum_list(struct snmp_enum_list *list); int init_snmp_enum(const char *type) { - int i; - if (NULL != snmp_enum_lists) return SE_OK; - snmp_enum_lists = (struct snmp_enum_list ***) - calloc(1, sizeof(struct snmp_enum_list **) * SE_MAX_IDS); + snmp_enum_lists = calloc(SE_MAX_IDS * SE_MAX_SUBIDS, + sizeof(*snmp_enum_lists)); if (!snmp_enum_lists) return SE_NOMEM; current_maj_num = SE_MAX_IDS; - - for (i = 0; i < SE_MAX_IDS; i++) { - if (!snmp_enum_lists[i]) - snmp_enum_lists[i] = (struct snmp_enum_list **) - calloc(1, sizeof(struct snmp_enum_list *) * SE_MAX_SUBIDS); - if (!snmp_enum_lists[i]) - return SE_NOMEM; - } current_min_num = SE_MAX_SUBIDS; register_const_config_handler(type, "enum", se_read_conf, NULL, NULL); return SE_OK; } -int -se_store_in_list(struct snmp_enum_list *new_list, - unsigned int major, unsigned int minor) -{ - int ret = SE_OK; - - if (major > current_maj_num || minor > current_min_num) { - /* - * XXX: realloc - */ - return SE_NOMEM; - } - netsnmp_assert(NULL != snmp_enum_lists); - - if (snmp_enum_lists[major][minor] != NULL) - ret = SE_ALREADY_THERE; - - snmp_enum_lists[major][minor] = new_list; - - return ret; -} - void se_read_conf(const char *word, const char *cptr) { @@ -134,7 +102,7 @@ se_read_conf(const char *word, const char *cptr) break; } cp2 = e_enum; - while (*(cp2++) != ':') + while (*cp2 != 0 && *cp2++ != ':') ; se_add_pair(major, minor, strdup(cp2), value); if (!cp) @@ -150,7 +118,7 @@ se_read_conf(const char *word, const char *cptr) break; } cp2 = e_enum; - while (*(cp2++) != ':') + while (*cp2 != 0 && *cp2++ != ':') ; se_add_pair_to_slist(e_name, strdup(cp2), value); if (!cp) @@ -201,14 +169,22 @@ se_store_list(unsigned int major, unsigned int minor, const char *type) } #endif /* NETSNMP_FEATURE_REMOVE_SNMP_ENUM_STORE_LIST */ -struct snmp_enum_list * -se_find_list(unsigned int major, unsigned int minor) +static struct snmp_enum_list ** +se_find_list_ptr(unsigned int major, unsigned int minor) { - if (major > current_maj_num || minor > current_min_num) + if (major >= current_maj_num || minor >= current_min_num) return NULL; netsnmp_assert(NULL != snmp_enum_lists); - return snmp_enum_lists[major][minor]; + return &snmp_enum_lists[major * current_min_num + minor]; +} + +struct snmp_enum_list * +se_find_list(unsigned int major, unsigned int minor) +{ + struct snmp_enum_list **p = se_find_list_ptr(major, minor); + + return p ? *p : NULL; } int @@ -284,13 +260,19 @@ se_find_label(unsigned int major, unsigned int minor, int value) return se_find_label_in_list(se_find_list(major, minor), value); } +/* + * Ownership of 'label' is transferred from the caller to this function. + * 'label' is freed if list insertion fails. + */ int se_add_pair_to_list(struct snmp_enum_list **list, char *label, int value) { - struct snmp_enum_list *lastnode = NULL, *tmp; + struct snmp_enum_list *lastnode = NULL, *new_node, *tmp; - if (!list) + if (!list) { + free(label); return SE_DNE; + } tmp = *list; while (tmp) { @@ -302,32 +284,26 @@ se_add_pair_to_list(struct snmp_enum_list **list, char *label, int value) tmp = tmp->next; } - if (lastnode) { - lastnode->next = SNMP_MALLOC_STRUCT(snmp_enum_list); - lastnode = lastnode->next; - } else { - (*list) = SNMP_MALLOC_STRUCT(snmp_enum_list); - lastnode = (*list); - } - if (!lastnode) { + new_node = SNMP_MALLOC_STRUCT(snmp_enum_list); + if (!new_node) { free(label); return (SE_NOMEM); } - lastnode->label = label; - lastnode->value = value; - lastnode->next = NULL; + + if (lastnode) + lastnode->next = new_node; + else + *list = new_node; + new_node->label = label; + new_node->value = value; + new_node->next = NULL; return (SE_OK); } int se_add_pair(unsigned int major, unsigned int minor, char *label, int value) { - struct snmp_enum_list *list = se_find_list(major, minor); - int created = (list) ? 1 : 0; - int ret = se_add_pair_to_list(&list, label, value); - if (!created) - se_store_in_list(list, major, minor); - return ret; + return se_add_pair_to_list(se_find_list_ptr(major, minor), label, value); } /* @@ -380,26 +356,34 @@ se_find_free_value_in_slist(const char *listname) } #endif /* NETSNMP_FEATURE_REMOVE_SE_FIND_FREE_VALUE_IN_SLIST */ +/* + * Ownership of 'label' is transferred from the caller to this function. + * 'label' is freed if list insertion fails. + */ int se_add_pair_to_slist(const char *listname, char *label, int value) { - struct snmp_enum_list *list = se_find_slist(listname); - int created = (list) ? 1 : 0; - int ret = se_add_pair_to_list(&list, label, value); + struct snmp_enum_list **list_p = se_find_slist_ptr(listname); - if (!created) { + if (!list_p) { struct snmp_enum_list_str *sptr = SNMP_MALLOC_STRUCT(snmp_enum_list_str); if (!sptr) { - free_enum_list(list); + free(label); return SE_NOMEM; } sptr->next = sliststorage; sptr->name = strdup(listname); - sptr->list = list; + if (!sptr->name) { + free(sptr); + free(label); + return SE_NOMEM; + } + list_p = &sptr->list; sliststorage = sptr; } - return ret; + + return se_add_pair_to_list(list_p, label, value); } static void @@ -419,7 +403,7 @@ void clear_snmp_enum(void) { struct snmp_enum_list_str *sptr = sliststorage, *next = NULL; - int i, j; + unsigned int major, minor; while (sptr != NULL) { next = sptr->next; @@ -430,18 +414,18 @@ clear_snmp_enum(void) } sliststorage = NULL; - if (snmp_enum_lists) { - for (i = 0; i < SE_MAX_IDS; i++) { - if (snmp_enum_lists[i]) { - for (j = 0; j < SE_MAX_SUBIDS; j++) { - if (snmp_enum_lists[i][j]) - free_enum_list(snmp_enum_lists[i][j]); - } - SNMP_FREE(snmp_enum_lists[i]); - } + for (major = 0; major < current_maj_num; major++) { + for (minor = 0; minor < current_min_num; minor++) { + struct snmp_enum_list **list_ptr = se_find_list_ptr(major, minor); + + if (!list_ptr || !*list_ptr) + continue; + free_enum_list(*list_ptr); } - SNMP_FREE(snmp_enum_lists); } + current_maj_num = 0; + current_min_num = 0; + SNMP_FREE(snmp_enum_lists); } void diff --git a/vendor/snmplib/snmp_logging.c b/vendor/snmplib/snmp_logging.c index 81a759f..72247c5 100644 --- a/vendor/snmplib/snmp_logging.c +++ b/vendor/snmplib/snmp_logging.c @@ -25,45 +25,45 @@ #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 @@ -111,9 +111,9 @@ netsnmp_feature_want(logging_outputs); * logh_head: A list of all log handlers, in increasing order of priority * logh_priorities: 'Indexes' into this list, by priority */ -netsnmp_log_handler *logh_head = NULL; -netsnmp_log_handler *logh_priorities[LOG_DEBUG+1]; -static int logh_enabled = 0; +static netsnmp_log_handler *logh_head; +static netsnmp_log_handler *logh_priorities[LOG_DEBUG+1]; +static int logh_enabled; #ifndef NETSNMP_FEATURE_REMOVE_LOGGING_SYSLOG static char syslogname[64] = DEFAULT_LOG_ID; @@ -327,7 +327,7 @@ snmp_log_options(char *optarg, int argc, char *const *argv) */ char missing_opt = 'e'; /* old -L is new -Le */ int priority = LOG_DEBUG; - int pri_max = LOG_EMERG; + int pri_max = LOG_DEBUG; int inc_optind = 0; netsnmp_log_handler *logh; @@ -353,7 +353,7 @@ snmp_log_options(char *optarg, int argc, char *const *argv) * Finally, handle ".... -Lx value ...." syntax * (*without* surrounding quotes) */ - if ((!*optarg) && (NULL != argv)) { + if (!*optarg && argv && optind < argc) { /* * We've run off the end of the argument * so move on to the next. @@ -546,9 +546,12 @@ sprintf_stamp(time_t * now, char *sbuf) time(now); } tm = localtime(now); - sprintf(sbuf, "%.4d-%.2d-%.2d %.2d:%.2d:%.2d ", - tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, - tm->tm_hour, tm->tm_min, tm->tm_sec); + if (tm) + sprintf(sbuf, "%.4d-%.2d-%.2d %.2d:%.2d:%.2d ", + tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, + tm->tm_hour, tm->tm_min, tm->tm_sec); + else + sprintf(sbuf, "(unknown)"); return sbuf; } @@ -953,6 +956,7 @@ netsnmp_add_loghandler( netsnmp_log_handler *logh ) logh2->prev->next = logh; else logh_head = logh; + logh->prev = logh2->prev; logh->next = logh2; logh2->prev = logh; } else if (logh_head ) { @@ -962,6 +966,7 @@ netsnmp_add_loghandler( netsnmp_log_handler *logh ) for (logh2 = logh_head; logh2->next; logh2 = logh2->next) ; logh2->next = logh; + logh->prev = logh2; } else { logh_head = logh; } @@ -996,11 +1001,11 @@ netsnmp_register_loghandler( int type, int priority ) logh->type = type; switch ( type ) { +#ifndef NETSNMP_FEATURE_REMOVE_LOGGING_STDIO case NETSNMP_LOGHANDLER_STDOUT: logh->imagic = 1; logh->handler = log_handler_stdouterr; break; -#ifndef NETSNMP_FEATURE_REMOVE_LOGGING_STDIO case NETSNMP_LOGHANDLER_STDERR: logh->handler = log_handler_stdouterr; break; @@ -1327,7 +1332,7 @@ snmp_log_string(int priority, const char *str) * ensure this logging is turned on (see snmp_disable_stderrlog * and its cohorts). */ - if (logh->enabled && (priority >= logh->pri_max)) + if (logh->enabled && priority <= logh->pri_max) logh->handler( logh, priority, str ); } } diff --git a/vendor/snmplib/snmp_openssl.c b/vendor/snmplib/snmp_openssl.c index 01d72af..4471a7a 100644 --- a/vendor/snmplib/snmp_openssl.c +++ b/vendor/snmplib/snmp_openssl.c @@ -12,11 +12,29 @@ */ #include +#include #include #include +#if defined(NETSNMP_USE_OPENSSL) && defined(HAVE_LIBSSL) && !defined(NETSNMP_FEATURE_REMOVE_CERT_UTIL) + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#endif /* NETSNMP_USE_OPENSSL & ... */ + /** OpenSSL compat functions for apps */ #if defined(NETSNMP_USE_OPENSSL) @@ -90,19 +108,6 @@ 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 - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - static u_char have_started_already = 0; /* @@ -126,8 +131,12 @@ void netsnmp_init_openssl(void) { #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 @@ -284,31 +293,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; @@ -479,7 +487,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) @@ -499,6 +507,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 */ @@ -517,18 +530,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; } @@ -537,9 +586,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 */ @@ -645,11 +698,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; @@ -661,7 +715,7 @@ netsnmp_openssl_get_cert_chain(SSL *ssl) /* * get fingerprint and save it */ - fingerprint = netsnmp_openssl_cert_get_fingerprint(ocert, -1); + fingerprint = netsnmp_openssl_cert_get_fingerprint(ocert, NS_HASH_SHA1); if (NULL == fingerprint) return NULL; @@ -687,7 +741,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 { @@ -695,9 +750,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, -1); + fingerprint = netsnmp_openssl_cert_get_fingerprint(ocert_tmp, NS_HASH_SHA1); if (NULL == fingerprint) break; cert_map = netsnmp_cert_map_alloc(NULL, ocert); @@ -713,7 +769,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 */ @@ -818,8 +874,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")); @@ -901,8 +956,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 */ diff --git a/vendor/snmplib/snmp_parse_args.c b/vendor/snmplib/snmp_parse_args.c index 3ba2674..4c8c248 100644 --- a/vendor/snmplib/snmp_parse_args.c +++ b/vendor/snmplib/snmp_parse_args.c @@ -20,43 +20,43 @@ #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 @@ -202,7 +202,7 @@ netsnmp_parse_args(int argc, int flags) { int arg, ret, sp = 0; - char *cp; + const char *cp; char *Apsz = NULL; char *Xpsz = NULL; char *Cpsz = NULL; @@ -231,8 +231,15 @@ netsnmp_parse_args(int argc, DEBUGMSGTL(("snmp_parse_args", " arg %d = %s\n", arg, argv[arg])); } +#ifdef __linux__ + /* + * glibc only resets the internal getopt() state if optind is set to zero. + */ + optind = 0; +#else optind = 1; - while ((arg = getopt(argc, argv, Opts)) != EOF) { +#endif + while (optind < argc && (arg = getopt(argc, argv, Opts)) != EOF) { DEBUGMSGTL(("snmp_parse_args", "handling (#%d): %c (optarg %s) (sp %d)\n", optind, arg, optarg, sp)); switch (arg) { @@ -330,6 +337,7 @@ netsnmp_parse_args(int argc, break; case 's': + free(session->localname); session->localname = strdup(optarg); break; @@ -392,7 +400,6 @@ netsnmp_parse_args(int argc, } session->transport_configuration->compare = - (netsnmp_container_compare*) netsnmp_transport_config_compare; } @@ -478,6 +485,7 @@ netsnmp_parse_args(int argc, #endif /* SNMPV3_CMD_OPTIONS */ case '?': + case ':': ret = NETSNMP_PARSE_ARGS_ERROR_USAGE; goto out; @@ -626,12 +634,12 @@ netsnmp_parse_args(int argc, /* * get the hostname */ - if (optind == argc) { + if (optind >= argc) { fprintf(stderr, "No hostname specified.\n"); 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) /* diff --git a/vendor/snmplib/snmp_secmod.c b/vendor/snmplib/snmp_secmod.c index 614c31f..1362a68 100644 --- a/vendor/snmplib/snmp_secmod.c +++ b/vendor/snmplib/snmp_secmod.c @@ -14,15 +14,15 @@ #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 diff --git a/vendor/snmplib/snmp_service.c b/vendor/snmplib/snmp_service.c index 54cb4ac..7dbd1c8 100644 --- a/vendor/snmplib/snmp_service.c +++ b/vendor/snmplib/snmp_service.c @@ -313,6 +313,9 @@ netsnmp_register_user_target(const char* token, char* cptr) char* target = (char*)malloc(len); int i = 0; + if (application == NULL || domain == NULL || target == NULL) { + goto done; + } { char* cp = copy_nword(cptr, application, len); if (cp == NULL) { diff --git a/vendor/snmplib/snmp_transport.c b/vendor/snmplib/snmp_transport.c index c8c85cb..085d3f6 100644 --- a/vendor/snmplib/snmp_transport.c +++ b/vendor/snmplib/snmp_transport.c @@ -11,20 +11,20 @@ #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 @@ -291,6 +291,7 @@ int netsnmp_transport_filter_add(const char *addrtxt) { char *tmp; + int res; /* * create the container, if needed @@ -305,7 +306,10 @@ netsnmp_transport_filter_add(const char *addrtxt) snmp_log(LOG_ERR,"netsnmp_transport_filter_add strdup failed\n"); return(-1); } - return CONTAINER_INSERT(filtered, tmp); + res = CONTAINER_INSERT(filtered, tmp); + if (res) + free(tmp); + return res; } int @@ -458,9 +462,7 @@ netsnmp_transport_recv(netsnmp_transport *t, void *packet, int length, char *str = netsnmp_transport_peer_string(t, opaque ? *opaque : NULL, olength ? *olength : 0); - if (debugLength) - DEBUGMSGT_NC(("transport:recv","%d bytes from %s\n", - length, str)); + DEBUGMSGT_NC(("transport:recv","%d bytes from %s\n", length, str)); SNMP_FREE(str); } @@ -641,7 +643,7 @@ netsnmp_tdomain_transport_tspec(netsnmp_tdomain_spec *tspec) const char * const *spec = NULL; int any_found = 0; char buf[SNMP_MAXPATH]; - char **lspec = NULL; + const char **lspec = NULL; char *tokenized_domain = NULL; application = tspec->application; @@ -716,6 +718,8 @@ netsnmp_tdomain_transport_tspec(netsnmp_tdomain_spec *tspec) const char *cp; if ((cp = strchr(str, ':')) != NULL) { char* mystring = (char*)malloc(cp + 1 - str); + if (mystring == NULL) + return NULL; memcpy(mystring, str, cp - str); mystring[cp - str] = '\0'; addr = cp + 1; @@ -748,14 +752,20 @@ netsnmp_tdomain_transport_tspec(netsnmp_tdomain_spec *tspec) const char *cp = default_domain; char *ptr = NULL; tokenized_domain = strdup(default_domain); + if (!tokenized_domain) + return NULL; while (*++cp) if (*cp == ',') commas++; lspec = calloc(commas+2, sizeof(char *)); + if (!lspec) { + free(tokenized_domain); + return NULL; + } commas = 1; 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); @@ -976,8 +986,10 @@ netsnmp_transport_remove_from_list(netsnmp_transport_list **transport_list, } int -netsnmp_transport_config_compare(netsnmp_transport_config *left, - netsnmp_transport_config *right) { +netsnmp_transport_config_compare(const void *p, const void *q) +{ + const netsnmp_transport_config *left = p, *right = q; + return strcmp(left->key, right->key); } @@ -986,8 +998,16 @@ netsnmp_transport_create_config(const char *key, const char *value) { netsnmp_transport_config *entry = SNMP_MALLOC_TYPEDEF(netsnmp_transport_config); + if (!entry) + return NULL; entry->key = strdup(key); entry->value = strdup(value); + if (!entry->key || !entry->value) { + free(entry->key); + free(entry->value); + free(entry); + return NULL; + } return entry; } @@ -1005,8 +1025,8 @@ typedef struct trans_cache_s { 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); +static void _tc_free_item(void *tc, void *context); +static int _tc_compare(const void *p, const void *q); /** initialize transport cache */ static int @@ -1025,8 +1045,8 @@ _tc_init(void) } _container->container_name = strdup("trans_cache"); - _container->free_item = (netsnmp_container_obj_func*) _tc_free_item; - _container->compare = (netsnmp_container_compare*) _tc_compare; + _container->free_item = _tc_free_item; + _container->compare = _tc_compare; return 0; } @@ -1037,8 +1057,10 @@ _tc_init(void) * sort by af, type, local */ static int -_tc_compare(trans_cache *lhs, trans_cache *rhs) +_tc_compare(const void *p, const void *q) { + const trans_cache *lhs = p, *rhs = q; + netsnmp_assert((lhs != NULL) && (rhs != NULL)); DEBUGMSGTL(("9:transport:cache:compare", "%p/%p\n", lhs, rhs)); @@ -1059,7 +1081,7 @@ _tc_compare(trans_cache *lhs, trans_cache *rhs) return 1; if (AF_INET == lhs->af) { - struct sockaddr_in *lha = &lhs->bind_addr.sin, + const 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; @@ -1073,7 +1095,7 @@ _tc_compare(trans_cache *lhs, trans_cache *rhs) } #ifdef NETSNMP_ENABLE_IPV6 else if (AF_INET6 == lhs->af) { - struct sockaddr_in6 *lha = &lhs->bind_addr.sin6, + const 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)); @@ -1113,7 +1135,7 @@ _tc_free(trans_cache *tc) } static void -_tc_free_item(trans_cache *tc, void *context) +_tc_free_item(void *tc, void *context) { _tc_free(tc); } @@ -1288,7 +1310,7 @@ netsnmp_transport_cache_get(int af, int type, int local, #define USE_CACHE 1 -#if USE_CACHE +#ifdef USE_CACHE /** check for existing transport */ tc = _tc_find(af, type, local, bind_addr); if (tc) { @@ -1307,7 +1329,7 @@ netsnmp_transport_cache_get(int af, int type, int local, } DEBUGMSGTL(("transport:cache:get", "new transport %p\n", t)); -#if USE_CACHE +#ifdef USE_CACHE /** create transport cache for new transport */ tc = _tc_add(af, type, local, bind_addr, t); if (NULL == tc) { diff --git a/vendor/snmplib/snmpksm.c b/vendor/snmplib/snmpksm.c index d30347a..c6dcfcf 100644 --- a/vendor/snmplib/snmpksm.c +++ b/vendor/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 @@ -62,9 +62,9 @@ #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 "(?)"; } @@ -263,6 +263,10 @@ init_ksm(void) void shutdown_ksm(void) { + unregister_sec_mod(NETSNMP_SEC_MODEL_KSM); + if (kcontext) + krb5_free_context(kcontext); + kcontext = NULL; } /* diff --git a/vendor/snmplib/snmpusm.c b/vendor/snmplib/snmpusm.c index efd8d5d..bb4b78a 100644 --- a/vendor/snmplib/snmpusm.c +++ b/vendor/snmplib/snmpusm.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. * @@ -34,17 +34,20 @@ #ifdef HAVE_STDLIB_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef HAVE_STDINT_H +#include +#endif +#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 @@ -53,7 +56,7 @@ #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif @@ -62,6 +65,7 @@ #include #include +#include #include #include #include @@ -76,6 +80,10 @@ #include #include +#ifdef HAVE_OPENSSL_DH_H +#include +#endif + netsnmp_feature_child_of(usm_all, libnetsnmp); netsnmp_feature_child_of(usm_support, usm_all); @@ -153,7 +161,7 @@ typedef struct usm_alg_type_s { int value; } usm_alg_type_t; -static usm_alg_type_t usm_auth_type[] = { +static const usm_alg_type_t usm_auth_type[] = { { "NOAUTH", NETSNMP_USMAUTH_NOAUTH }, { "SHA", NETSNMP_USMAUTH_HMACSHA1 }, { "SHA-1", NETSNMP_USMAUTH_HMACSHA1 }, @@ -176,7 +184,7 @@ static usm_alg_type_t usm_auth_type[] = { { NULL, -1 } }; -static usm_alg_type_t usm_priv_type[] = { +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 }, @@ -299,7 +307,6 @@ usm_clone(netsnmp_pdu *pdu, netsnmp_pdu *new_pdu) 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); @@ -470,8 +477,8 @@ emergency_print(u_char * field, u_int length) static struct usmUser * usm_get_user_from_list(const u_char *engineID, size_t engineIDLen, - const char *name, struct usmUser *puserList, - int use_default) + const char *name, size_t nameLen, + struct usmUser *puserList, int use_default) { struct usmUser *ptr; @@ -498,11 +505,25 @@ usm_get_user_from_list(const u_char *engineID, size_t engineIDLen, /* * return "" user used to facilitate engineID discovery */ - if (use_default && !strcmp(name, "")) + if (use_default && !strcmp(name, "")) { + DEBUGMSGTL(("usm", "return noNameUser\n")); return noNameUser; + } return NULL; } + +struct usmUser * +usm_get_user2(const u_char *engineID, size_t engineIDLen, const void *name, + size_t nameLen) +{ + DEBUGMSGTL(("usm", "getting user %.*s\n", (int)nameLen, + (const char *)name)); + return usm_get_user_from_list(engineID, engineIDLen, name, nameLen, + userList, 1); +} + + /* * usm_get_user(): Returns a user from userList based on the engineID, * engineIDLen and name of the requested user. @@ -511,8 +532,7 @@ 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); + return usm_get_user2(engineID, engineIDLen, name, strlen(name)); } static struct usmUser * @@ -762,14 +782,27 @@ usm_free_user(struct usmUser *user) 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) { /* ack, this shouldn't happen */ + if (user->prev != NULL && user->prev != (struct usmUser *)-1) { /* ack, this shouldn't happen */ user->prev->next = user->next; } - if (user->next != NULL) { + 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 */ @@ -852,6 +885,9 @@ asn_predict_int_length(int type, long number, size_t len) static int asn_predict_length(int type, u_char * ptr, size_t u_char_len) { + /* Check for integer overflow. */ + if (u_char_len > SIZE_MAX - (1 + 3)) + return -1; if (type & ASN_SEQUENCE) return 1 + 3 + u_char_len; @@ -862,6 +898,10 @@ asn_predict_length(int type, u_char * ptr, size_t u_char_len) u_char_len = asn_predict_int_length(type, value, u_char_len); } + /* Check for integer overflow. */ + if (u_char_len > SIZE_MAX - (1 + 3)) + return -1; + if (u_char_len < 0x80) return 1 + 1 + u_char_len; else if (u_char_len < 0xFF) @@ -1297,6 +1337,7 @@ usm_generate_out_msg(int msgProcModel, /* (UNUSED) */ * secStateRef, pointer to cached info provided only for * * Response, otherwise NULL. */ + struct usmUser *sessUser, /* IN - pointer to current session user. */ u_char * secParams, /* OUT */ /* * BER encoded securityParameters pointer to offset within @@ -1398,8 +1439,12 @@ usm_generate_out_msg(int msgProcModel, /* (UNUSED) */ * we do allow an unknown user name for * unauthenticated requests. */ - if ((user = usm_get_user(secEngineID, secEngineIDLen, secName)) - == NULL && secLevel != SNMP_SEC_LEVEL_NOAUTH) { + if (sessUser) + user = sessUser; + else + user = usm_get_user2(secEngineID, secEngineIDLen, secName, secNameLen); + + if (user == NULL && secLevel != SNMP_SEC_LEVEL_NOAUTH) { DEBUGMSGTL(("usm", "Unknown User(%s)\n", secName)); return SNMPERR_USM_UNKNOWNSECURITYNAME; } @@ -1770,6 +1815,7 @@ usm_secmod_generate_out_msg(struct snmp_secmod_outgoing_params *parms) parms->secLevel, parms->scopedPdu, parms->scopedPduLen, parms->secStateRef, + parms->session->sessUser, parms->secParams, parms->secParamsLen, parms->wholeMsg, parms->wholeMsgLen); } @@ -1803,6 +1849,8 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ * secStateRef, pointer to cached info provided only for * * Response, otherwise NULL. */ + struct usmUser *sessUser, /* IN - pointer to current session user. */ + u_char ** wholeMsg, /* IN/OUT */ /* * Points at the pointer to the packet buffer, which might get extended @@ -1894,8 +1942,12 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ * we do allow an unknown user name for * unauthenticated requests. */ - if ((user = usm_get_user(secEngineID, secEngineIDLen, secName)) - == NULL && secLevel != SNMP_SEC_LEVEL_NOAUTH) { + if (sessUser) + user = sessUser; + else + user = usm_get_user2(secEngineID, secEngineIDLen, secName, secNameLen); + + if (user == NULL && secLevel != SNMP_SEC_LEVEL_NOAUTH) { DEBUGMSGTL(("usm", "Unknown User\n")); return SNMPERR_USM_UNKNOWNSECURITYNAME; } @@ -2280,6 +2332,7 @@ usm_secmod_rgenerate_out_msg(struct snmp_secmod_outgoing_params *parms) parms->secLevel, parms->scopedPdu, parms->scopedPduLen, parms->secStateRef, + parms->session->sessUser, parms->wholeMsg, parms->wholeMsgLen, parms->wholeMsgOffset); } @@ -2933,12 +2986,17 @@ usm_process_in_msg(int msgProcModel, /* (UNUSED) */ * Locate the User record. * If the user/engine ID is unknown, report this as an error. */ - if ((user = usm_get_user_from_list(secEngineID, *secEngineIDLen, - secName, userList, + + if (sess && sess->sessUser) + user = sess->sessUser; + else + user = usm_get_user_from_list(secEngineID, *secEngineIDLen, + secName, *secNameLen, userList, (((sess && sess->isAuthoritative == SNMP_SESS_AUTHORITATIVE) || - (!sess)) ? 0 : 1))) - == NULL) { + (!sess)) ? 0 : 1)); + + if (user == NULL) { DEBUGMSGTL(("usm", "Unknown User(%s)\n", secName)); snmp_increment_statistic(STAT_USMSTATSUNKNOWNUSERNAMES); error = SNMPERR_USM_UNKNOWNSECURITYNAME; @@ -3270,7 +3328,7 @@ usm_handle_report(struct session_list *slp, int usm_extend_user_kul(struct usmUser *user, u_int privKeyBufSize) { - netsnmp_priv_alg_info *pai; + const netsnmp_priv_alg_info *pai; DEBUGMSGTL(("usm", "extending key\n")); @@ -3466,11 +3524,17 @@ usm_create_user_from_session(netsnmp_session * session) * now that we have the engineID, create an entry in the USM list * for this user using the information in the session */ - user = usm_get_user_from_list(session->securityEngineID, - session->securityEngineIDLen, - session->securityName, - usm_get_userList(), 0); - if (NULL != user) { + if ((session->flags & SNMP_FLAGS_SESSION_USER) == 0) + user = usm_get_user_from_list(session->securityEngineID, + session->securityEngineIDLen, + session->securityName, + session->securityNameLen, + usm_get_userList(), 0); + else + user = NULL; + + + if (user) { DEBUGMSGTL(("usm", "user exists x=%p\n", user)); } else { if (usm_build_user(&user, session) != SNMPERR_SUCCESS) @@ -3609,9 +3673,17 @@ usm_create_user_from_session(netsnmp_session * session) */ user->userStatus = RS_ACTIVE; user->userStorageType = ST_READONLY; - usm_add_user(user); + + if (session->flags & SNMP_FLAGS_SESSION_USER) { + if (session->sessUser) + usm_free_user(session->sessUser); + session->sessUser = user; + } else { + usm_add_user(user); + } } - DEBUGMSGTL(("9:usm", "user created\n")); + DEBUGMSGTL(("9:usm", "user created and stored in %s\n", session->flags & + SNMP_FLAGS_SESSION_USER ? "session" : "local store")); return SNMPERR_SUCCESS; @@ -3628,7 +3700,7 @@ usm_create_user_from_session_hook(struct session_list *slp, } static int -usm_build_probe_pdu(netsnmp_pdu **pdu) +usm_build_probe_pdu(netsnmp_pdu **pdu, struct usmUser **sessUser) { struct usmUser *user; @@ -3649,7 +3721,11 @@ usm_build_probe_pdu(netsnmp_pdu **pdu) /* * create the empty user */ - user = usm_get_user(NULL, 0, (*pdu)->securityName); + if (sessUser && *sessUser) + user = *sessUser; + else + user = usm_get_user2(NULL, 0, (*pdu)->securityName, + (*pdu)->securityNameLen); if (user == NULL) { user = (struct usmUser *) calloc(1, sizeof(struct usmUser)); if (user == NULL) { @@ -3665,7 +3741,10 @@ usm_build_probe_pdu(netsnmp_pdu **pdu) user->privProtocolLen = sizeof(usmNoPrivProtocol) / sizeof(oid); user->privProtocol = snmp_duplicate_objid(usmNoPrivProtocol, user->privProtocolLen); - usm_add_user(user); + if (sessUser) + *sessUser = user; + else + usm_add_user(user); } return 0; } @@ -3674,9 +3753,11 @@ static int usm_discover_engineid(struct session_list *slp, netsnmp_session *session) { netsnmp_pdu *pdu = NULL, *response = NULL; + struct usmUser **user; int status, i; - if (usm_build_probe_pdu(&pdu) != 0) { + user = session->flags & SNMP_FLAGS_SESSION_USER ? &session->sessUser : NULL; + if (usm_build_probe_pdu(&pdu, user) != 0) { DEBUGMSGTL(("snmp_api", "unable to create probe PDU\n")); return SNMP_ERR_GENERR; } @@ -3741,7 +3822,7 @@ static int usm_discover_engineid(struct session_list *slp, } static int -usm_lookup_alg_type(const char *str, usm_alg_type_t *types) +usm_lookup_alg_type(const char *str, const usm_alg_type_t *types) { int i, l; l = strlen(str); @@ -3754,7 +3835,7 @@ usm_lookup_alg_type(const char *str, usm_alg_type_t *types) } static const char * -usm_lookup_alg_str(int value, usm_alg_type_t *types) +usm_lookup_alg_str(int value, const usm_alg_type_t *types) { int i; for (i = 0; types[i].label; ++i) @@ -3829,15 +3910,8 @@ usm_cloneFrom_user(struct usmUser *from, struct usmUser *to) */ SNMP_FREE(to->authKey); - if (from->authKeyLen > 0 && - (to->authKey = (u_char *) malloc(from->authKeyLen)) - != NULL) { - to->authKeyLen = from->authKeyLen; - memcpy(to->authKey, from->authKey, to->authKeyLen); - } else { - to->authKey = NULL; - to->authKeyLen = 0; - } + to->authKey = netsnmp_memdup(from->authKey, from->authKeyLen); + to->authKeyLen = to->authKey ? from->authKeyLen : 0; /* * copy the authKeyKu @@ -4088,9 +4162,14 @@ usm_store_users(int majorID, int minorID, void *serverarg, void *clientarg) return SNMPERR_SUCCESS; } -/* - * usm_parse_user(): reads in a line containing a saved user profile +/** + * usm_read_user(): reads in a line containing a saved user profile * and returns a pointer to a newly created struct usmUser. + * + * @param[in] line Line of text containing a saved user profile + * + * @return A pointer to the newly-created struct usmUser if + * parsing succeeded; NULL if an error occurred. */ static struct usmUser * usm_read_user(const char *line) @@ -4104,41 +4183,81 @@ usm_read_user(const char *line) user->userStatus = atoi(line); line = skip_token_const(line); + if (line == NULL) { + DEBUGMSGTL(("usm", "Configuration line missing userStorageType\n")); + usm_free_user(user); + return NULL; + } + user->userStorageType = atoi(line); line = skip_token_const(line); + if (line == NULL) { + DEBUGMSGTL(("usm", "Configuration line missing engineID\n")); + usm_free_user(user); + return NULL; + } line = read_config_read_octet_string_const(line, &user->engineID, &user->engineIDLen); - /* - * set the lcd entry for this engineID to the minimum boots/time - * values so that its a known engineid and won't return a report pdu. - * This is mostly important when receiving v3 traps so that the usm - * will at least continue processing them. - */ - set_enginetime(user->engineID, user->engineIDLen, 1, 0, 0); - + if (line == NULL) { + DEBUGMSGTL(("usm", "Configuration line missing name\n")); + usm_free_user(user); + return NULL; + } line = read_config_read_octet_string(line, (u_char **) & user->name, &len); + if (line == NULL) { + DEBUGMSGTL(("usm", "Configuration line missing security name\n")); + usm_free_user(user); + return NULL; + } line = read_config_read_octet_string(line, (u_char **) & user->secName, &len); SNMP_FREE(user->cloneFrom); user->cloneFromLen = 0; + if (line == NULL) { + DEBUGMSGTL(("usm", "Configuration line missing clone from\n")); + usm_free_user(user); + return NULL; + } line = read_config_read_objid_const(line, &user->cloneFrom, &user->cloneFromLen); SNMP_FREE(user->authProtocol); user->authProtocolLen = 0; + if (line == NULL) { + DEBUGMSGTL(("usm", "Configuration line missing authentication protocol\n")); + usm_free_user(user); + return NULL; + } line = read_config_read_objid_const(line, &user->authProtocol, &user->authProtocolLen); + + if (line == NULL) { + DEBUGMSGTL(("usm", "Configuration line missing authentication key\n")); + usm_free_user(user); + return NULL; + } line = read_config_read_octet_string_const(line, &user->authKey, &user->authKeyLen); SNMP_FREE(user->privProtocol); user->privProtocolLen = 0; + if (line == NULL) { + DEBUGMSGTL(("usm", "Configuration line missing privacy protocol\n")); + usm_free_user(user); + return NULL; + } line = read_config_read_objid_const(line, &user->privProtocol, &user->privProtocolLen); + + if (line == NULL) { + DEBUGMSGTL(("usm", "Configuration line missing privacy key\n")); + usm_free_user(user); + return NULL; + } line = read_config_read_octet_string(line, &user->privKey, &user->privKeyLen); @@ -4151,8 +4270,24 @@ usm_read_user(const char *line) user->privKeyLen = proper_length; } + if (line == NULL) { + DEBUGMSGTL(("usm", "Configuration line missing public string\n")); + usm_free_user(user); + return NULL; + } line = read_config_read_octet_string(line, &user->userPublicString, &user->userPublicStringLen); + + /* + * set the lcd entry for this engineID to the minimum boots/time + * values so that its a known engineid and won't return a report pdu. + * This is mostly important when receiving v3 traps so that the usm + * will at least continue processing them. + * Note: We do this at the end so that it only runs if the parsing + * was successful + */ + set_enginetime(user->engineID, user->engineIDLen, 1, 0, 0); + return user; } @@ -4392,7 +4527,7 @@ usm_create_usmUser_from_string(char *line, const char **errorMsg) int ret2, properLen, properPrivKeyLen; const oid *def_auth_prot, *def_priv_prot; size_t def_auth_prot_len, def_priv_prot_len; - netsnmp_priv_alg_info *pai; + 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); @@ -4486,8 +4621,15 @@ usm_create_usmUser_from_string(char *line, const char **errorMsg) */ newuser->authProtocol[0] = 0; cp = copy_nword(cp, buf, sizeof(buf)); - if ((strncmp(cp, "default", 7) == 0) && (NULL != def_auth_prot)) { + /* If no authentication protocol was specified, or it was explicitly + * set to use the default, use the default auth protocol + */ + if (buf[0] == '\0' || strcmp(buf, "default") == 0) { SNMP_FREE(newuser->authProtocol); + if (!def_auth_prot) { + *errorMsg = "def_auth_prot == NULL"; + goto fail; + } newuser->authProtocol = snmp_duplicate_objid(def_auth_prot, def_auth_prot_len); if (newuser->authProtocol == NULL) { @@ -4863,11 +5005,13 @@ init_usm_post_config(int majorid, int minorid, void *serverarg, void *clientarg) { size_t salt_integer_len = sizeof(salt_integer); + uint64_t current_time; 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); + current_time = time(NULL); + salt_integer = current_time; } #ifdef HAVE_AES @@ -4875,16 +5019,21 @@ init_usm_post_config(int majorid, int minorid, void *serverarg, 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); + current_time = time(NULL); + salt_integer64_1 = current_time; } 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); + current_time = time(NULL); + salt_integer64_2 = current_time; } #endif + // Free noNameUser before it is assigned + usm_free_user(noNameUser); + #ifndef NETSNMP_DISABLE_MD5 noNameUser = usm_create_initial_user("", usmHMACMD5AuthProtocol, OID_LENGTH(usmHMACMD5AuthProtocol), diff --git a/vendor/snmplib/snmpv3.c b/vendor/snmplib/snmpv3.c index 29c2a0f..b77b8ec 100644 --- a/vendor/snmplib/snmpv3.c +++ b/vendor/snmplib/snmpv3.c @@ -22,38 +22,38 @@ #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 @@ -203,6 +203,7 @@ snmpv3_parse_arg(int arg, char *optarg, netsnmp_session *session, char **Apsz, free(ebuf); return (-1); } + free(session->securityEngineID); session->securityEngineID = ebuf; session->securityEngineIDLen = eout_len; break; @@ -227,18 +228,21 @@ snmpv3_parse_arg(int arg, char *optarg, netsnmp_session *session, char **Apsz, free(ebuf); return (-1); } + free(session->contextEngineID); session->contextEngineID = ebuf; session->contextEngineIDLen = eout_len; break; } case 'n': - session->contextName = optarg; + free(session->contextName); + session->contextName = strdup(optarg); session->contextNameLen = strlen(optarg); break; case 'u': - session->securityName = optarg; + free(session->securityName); + session->securityName = strdup(optarg); session->securityNameLen = strlen(optarg); break; @@ -266,8 +270,13 @@ snmpv3_parse_arg(int arg, char *optarg, netsnmp_session *session, char **Apsz, case 'a': { int auth_type = usm_lookup_auth_type(optarg); if (auth_type > 0) { - session->securityAuthProto = - sc_get_auth_oid(auth_type, &session->securityAuthProtoLen); + const oid *auth_proto; + + auth_proto = sc_get_auth_oid(auth_type, + &session->securityAuthProtoLen); + free(session->securityAuthProto); + session->securityAuthProto = snmp_duplicate_objid(auth_proto, + session->securityAuthProtoLen); } else { fprintf(stderr, "Invalid authentication protocol specified after -3a flag: %s\n", @@ -277,7 +286,9 @@ snmpv3_parse_arg(int arg, char *optarg, netsnmp_session *session, char **Apsz, } break; - case 'x': + case 'x': { + const oid *priv_proto; + priv_type = usm_lookup_priv_type(optarg); if (priv_type < 0) { fprintf(stderr, @@ -285,11 +296,17 @@ snmpv3_parse_arg(int arg, char *optarg, netsnmp_session *session, char **Apsz, optarg); return (-1); } - session->securityPrivProto = - sc_get_priv_oid(priv_type, &session->securityPrivProtoLen); + priv_proto = sc_get_priv_oid(priv_type, &session->securityPrivProtoLen); + free(session->securityPrivProto); + session->securityPrivProto = snmp_duplicate_objid(priv_proto, + session->securityPrivProtoLen); break; - + } case 'A': + if (*Apsz && zero_sensitive) { + memset(*Apsz, 0x0, strlen(*Apsz)); + } + free(*Apsz); *Apsz = strdup(optarg); if (NULL == *Apsz) { fprintf(stderr, "malloc failure processing -%c flag.\n", @@ -301,6 +318,10 @@ snmpv3_parse_arg(int arg, char *optarg, netsnmp_session *session, char **Apsz, break; case 'X': + if (*Xpsz && zero_sensitive) { + memset(*Xpsz, 0x0, strlen(*Xpsz)); + } + free(*Xpsz); *Xpsz = strdup(optarg); if (NULL == *Xpsz) { fprintf(stderr, "malloc failure processing -%c flag.\n", @@ -348,6 +369,7 @@ snmpv3_parse_arg(int arg, char *optarg, netsnmp_session *session, char **Apsz, SNMP_FREE(kbuf); return (-1); } + free(session->securityAuthLocalKey); session->securityAuthLocalKey = kbuf; session->securityAuthLocalKeyLen = kout_len; break; @@ -367,6 +389,7 @@ snmpv3_parse_arg(int arg, char *optarg, netsnmp_session *session, char **Apsz, SNMP_FREE(kbuf); return (-1); } + free(session->securityPrivLocalKey); session->securityPrivLocalKey = kbuf; session->securityPrivLocalKeyLen = kout_len; break; @@ -557,8 +580,13 @@ setup_engineID(u_char ** eidp, const char *text) /* * Allocate memory and store enterprise ID. */ - if ((bufp = (u_char *) calloc(1, len)) == NULL) { - snmp_log_perror("setup_engineID malloc"); + if (len == 0) { + snmp_log(LOG_ERR, "%s(): len == 0\n", __func__); + return -1; + } + bufp = calloc(1, len); + if (bufp == NULL) { + snmp_log_perror("setup_engineID() calloc()"); return -1; } if (localEngineIDType == ENGINEID_TYPE_NETSNMP_RND) @@ -855,7 +883,23 @@ version_conf(const char *word, char *cptr) void oldengineID_conf(const char *word, char *cptr) { - read_config_read_octet_string(cptr, &oldEngineID, &oldEngineIDLength); + unsigned char *EngineID = NULL; + size_t EngineIDLength = 0; + + if (oldEngineID) { + free(oldEngineID); + oldEngineID = NULL; + oldEngineIDLength = 0; + } + + read_config_read_octet_string(cptr, &EngineID, &EngineIDLength); + if (EngineIDLength < 4) { + config_perror("Invalid oldEngineID"); + free(EngineID); + return; + } + oldEngineID = EngineID; + oldEngineIDLength = EngineIDLength; } /* @@ -1048,9 +1092,9 @@ init_snmpv3_post_config(int majorid, int minorid, void *serverarg, c_engineID = snmpv3_generate_engineID(&engineIDLen); - if (engineIDLen == 0 || !c_engineID) { + if (!c_engineID || engineIDLen == 0) { /* - * Somethine went wrong - help! + * Something went wrong - help! */ SNMP_FREE(c_engineID); return SNMPERR_GENERR; diff --git a/vendor/snmplib/snprintf.c b/vendor/snmplib/snprintf.c index b92fba9..82bc658 100644 --- a/vendor/snmplib/snprintf.c +++ b/vendor/snmplib/snprintf.c @@ -60,7 +60,7 @@ #if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include diff --git a/vendor/snmplib/strlcat.c b/vendor/snmplib/strlcat.c index 4325410..f495c6a 100644 --- a/vendor/snmplib/strlcat.c +++ b/vendor/snmplib/strlcat.c @@ -20,7 +20,7 @@ #ifndef HAVE_STRLCAT -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include diff --git a/vendor/snmplib/strlcpy.c b/vendor/snmplib/strlcpy.c index 0235a30..c5ec5a1 100644 --- a/vendor/snmplib/strlcpy.c +++ b/vendor/snmplib/strlcpy.c @@ -5,7 +5,7 @@ */ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include diff --git a/vendor/snmplib/strtol.c b/vendor/snmplib/strtol.c index 4d2c6e8..ad9f410 100644 --- a/vendor/snmplib/strtol.c +++ b/vendor/snmplib/strtol.c @@ -29,12 +29,12 @@ #include -#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/vendor/snmplib/strtoul.c b/vendor/snmplib/strtoul.c index ac9be25..d819ba9 100644 --- a/vendor/snmplib/strtoul.c +++ b/vendor/snmplib/strtoul.c @@ -29,12 +29,12 @@ #include -#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/vendor/snmplib/system.c b/vendor/snmplib/system.c index b23f872..826196f 100644 --- a/vendor/snmplib/system.c +++ b/vendor/snmplib/system.c @@ -55,24 +55,24 @@ SOFTWARE. #ifdef HAVE_INTTYPES_H #include #endif -#if HAVE_IO_H +#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 @@ -81,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 @@ -108,22 +108,22 @@ 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 @@ -137,7 +137,7 @@ SOFTWARE. #ifdef HAVE_SYS_STAT_H #include #endif -#if HAVE_FCNTL_H +#ifdef HAVE_FCNTL_H #include #endif @@ -145,19 +145,19 @@ 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 HAVE_CRT_EXTERNS_H +#ifdef HAVE_CRT_EXTERNS_H #include /* for _NSGetArgv() */ #endif @@ -165,18 +165,18 @@ SOFTWARE. #include #endif -#if HAVE_PWD_H +#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 @@ -282,8 +282,8 @@ netsnmp_daemonize(int quit_immediately, int stderr_log) { int i = 0; DEBUGMSGT(("daemonize","deamonizing...\n")); -#if HAVE_FORK -#if HAVE__NSGETEXECUTABLEPATH +#ifdef HAVE_FORK +#ifdef HAVE__NSGETEXECUTABLEPATH char path [PATH_MAX] = ""; uint32_t size = sizeof (path); @@ -303,7 +303,7 @@ 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. */ -#if HAVE_FORKALL +#ifdef HAVE_FORKALL i = forkall(); #else i = fork(); @@ -329,7 +329,7 @@ netsnmp_daemonize(int quit_immediately, int stderr_log) /* * Fork to let the process/session group leader exit. */ -#if HAVE_FORKALL +#ifdef HAVE_FORKALL i = forkall(); #else i = fork(); @@ -642,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; @@ -705,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; @@ -770,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; @@ -797,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); @@ -816,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; @@ -840,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; @@ -858,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")); @@ -905,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 @@ -920,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 @@ -992,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]; @@ -1355,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)) @@ -1421,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(); @@ -1459,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/vendor/snmplib/text_utils.c b/vendor/snmplib/text_utils.c index b089633..47e88b9 100644 --- a/vendor/snmplib/text_utils.c +++ b/vendor/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 diff --git a/vendor/snmplib/tools.c b/vendor/snmplib/tools.c index 751440b..4b3950e 100644 --- a/vendor/snmplib/tools.c +++ b/vendor/snmplib/tools.c @@ -27,11 +27,11 @@ #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 @@ -46,7 +46,7 @@ #ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -64,7 +64,7 @@ #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif @@ -394,7 +394,9 @@ netsnmp_binary_to_hex(u_char ** dest, size_t *dest_len, int allow_realloc, return 0; if (NULL == *dest) { - s = (unsigned char *) calloc(1, olen); + s = calloc(1, olen); + if (s == NULL) + return 0; *dest_len = olen; } else @@ -583,8 +585,8 @@ netsnmp_hex_to_binary(u_char ** buf, size_t * buf_len, size_t * offset, } while (*cp != '\0') { - if (!isxdigit((int) *cp) || - !isxdigit((int) *(cp+1))) { + if (!isxdigit((unsigned char)cp[0]) || + !isxdigit((unsigned char)cp[1])) { if ((NULL != delim) && (NULL != strchr(delim, *cp))) { cp++; continue; @@ -1072,6 +1074,8 @@ atime_ready(const_marker_t pm, int delta_ms) return 0; now = atime_newMarker(); + if (!now) + return 0; diff = atime_diff(pm, now); free(now); @@ -1097,6 +1101,8 @@ uatime_ready(const_marker_t pm, unsigned int delta_ms) return 0; now = atime_newMarker(); + if (!now) + return 0; diff = uatime_diff(pm, now); free(now); @@ -1148,6 +1154,8 @@ marker_tticks(const_marker_t pm) { int res; marker_t now = atime_newMarker(); + if (!now) + return 0; res = atime_diff(pm, now); free(now); @@ -1407,3 +1415,12 @@ netsnmp_string_time_to_secs(const char *time_string) { return secs; } #endif /* NETSNMP_FEATURE_REMOVE_STRING_TIME_TO_SECS */ + +const char *netsnmp_gethomedir(void) { + const char *homepath = netsnmp_getenv("HOME"); +#ifdef _WIN32 + if (!homepath) + homepath = netsnmp_getenv("USERPROFILE"); +#endif + return homepath; +} diff --git a/vendor/snmplib/transports/snmpAAL5PVCDomain.c b/vendor/snmplib/transports/snmpAAL5PVCDomain.c index e050dfe..e89ce1b 100644 --- a/vendor/snmplib/transports/snmpAAL5PVCDomain.c +++ b/vendor/snmplib/transports/snmpAAL5PVCDomain.c @@ -7,18 +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_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif #include diff --git a/vendor/snmplib/transports/snmpAliasDomain.c b/vendor/snmplib/transports/snmpAliasDomain.c index 5d04783..cda8a49 100644 --- a/vendor/snmplib/transports/snmpAliasDomain.c +++ b/vendor/snmplib/transports/snmpAliasDomain.c @@ -7,15 +7,15 @@ #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 diff --git a/vendor/snmplib/transports/snmpCallbackDomain.c b/vendor/snmplib/transports/snmpCallbackDomain.c index 160164e..e0f4400 100644 --- a/vendor/snmplib/transports/snmpCallbackDomain.c +++ b/vendor/snmplib/transports/snmpCallbackDomain.c @@ -10,27 +10,27 @@ #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 @@ -510,13 +510,12 @@ netsnmp_callback_hook_build(netsnmp_session * sp, #endif case SNMP_VERSION_3: if (pdu->securityNameLen == 0) { - pdu->securityName = malloc(sp->securityNameLen); + pdu->securityName = netsnmp_memdup(sp->securityName, + sp->securityNameLen + 1); if (pdu->securityName == NULL) { sp->s_snmp_errno = SNMPERR_MALLOC; return -1; } - memmove(pdu->securityName, - sp->securityName, sp->securityNameLen); pdu->securityNameLen = sp->securityNameLen; } if (pdu->securityModel == -1) diff --git a/vendor/snmplib/transports/snmpDTLSUDPDomain.c b/vendor/snmplib/transports/snmpDTLSUDPDomain.c index c7032e6..5902f4a 100644 --- a/vendor/snmplib/transports/snmpDTLSUDPDomain.c +++ b/vendor/snmplib/transports/snmpDTLSUDPDomain.c @@ -23,7 +23,7 @@ netsnmp_feature_require(cert_util); netsnmp_feature_require(sockaddr_size); -#include +#include "snmpIPBaseDomain.h" #include #include #include @@ -33,30 +33,30 @@ netsnmp_feature_require(sockaddr_size); #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 @@ -121,12 +121,14 @@ static bio_cache *biocache = NULL; static int openssl_addr_index = 0; +#ifdef HAVE_SSL_CTX_SET_COOKIE_GENERATE_CB 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); +#endif /* this stores remote connections in a list to search through */ /* XXX: optimize for searching */ @@ -337,10 +339,12 @@ start_new_cached_connection(netsnmp_transport *t, DIEHERE("failed to create the SSL Context"); } +#ifdef HAVE_SSL_CTX_SET_COOKIE_GENERATE_CB /* turn on cookie exchange */ /* Set DTLS cookie generation and verification callbacks */ SSL_CTX_set_cookie_generate_cb(ctx, netsnmp_dtls_gen_cookie); SSL_CTX_set_cookie_verify_cb(ctx, netsnmp_dtls_verify_cookie); +#endif tlsdata->ssl = SSL_new(ctx); } @@ -667,7 +671,7 @@ netsnmp_dtlsudp_recv(netsnmp_transport *t, void *buf, int size, if (rc > 0) { if (olen > sizeof(*addr_pair)) snmp_log(LOG_ERR, "%s: from address length %d > %d\n", - __func__, olen, (int)sizeof(*addr_pair)); + NETSNMP_FUNCTION, olen, (int)sizeof(*addr_pair)); memcpy(addr_pair, opaque, SNMP_MIN(sizeof(*addr_pair), olen)); } SNMP_FREE(opaque); @@ -1692,6 +1696,7 @@ netsnmp_dtlsudp_ctor(void) int cookie_initialized=0; unsigned char cookie_secret[NETSNMP_COOKIE_SECRET_LENGTH]; +#ifdef HAVE_SSL_CTX_SET_COOKIE_GENERATE_CB int netsnmp_dtls_gen_cookie(SSL *ssl, unsigned char *cookie, unsigned int *cookie_len) { @@ -1873,5 +1878,6 @@ int netsnmp_dtls_verify_cookie(SSL *ssl, return rc; } +#endif /* #ifdef HAVE_SSL_CTX_SET_COOKIE_GENERATE_CB */ #endif /* HAVE_LIBSSL_DTLS */ diff --git a/vendor/snmplib/transports/snmpIPBaseDomain.c b/vendor/snmplib/transports/snmpIPBaseDomain.c index c85311f..4ed1589 100644 --- a/vendor/snmplib/transports/snmpIPBaseDomain.c +++ b/vendor/snmplib/transports/snmpIPBaseDomain.c @@ -1,7 +1,7 @@ #include #include #include -#include +#include "snmpIPBaseDomain.h" #include #include #include @@ -49,7 +49,7 @@ int netsnmp_parse_ep_str(struct netsnmp_ep_str *ep_str, const char *endpoint) cp[0] = '\0'; cp++; } else { - goto invalid; + goto err; } } else if (*cp != '@' && (*cp != ':' || cp[1] == ':')) { addrstr = cp; @@ -69,28 +69,33 @@ int netsnmp_parse_ep_str(struct netsnmp_ep_str *ep_str, const char *endpoint) *cp++ = '\0'; portstr = cp; if (!netsnmp_isnumber(cp)) - goto invalid; + goto err; } else if (cp && *cp) { - goto invalid; + goto err; } } - if (addrstr) - strlcpy(ep_str->addr, addrstr, sizeof(ep_str->addr)); + 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 >= 0 && port <= 0xffff) + if (port <= 0xffff) strlcpy(ep_str->port, portstr, sizeof(ep_str->port)); else - goto invalid; + goto err; } free(dup); return 1; -invalid: +err: + free(ep_str->addr); + ep_str->addr = NULL; free(dup); return 0; } @@ -102,20 +107,58 @@ int netsnmp_bindtodevice(int fd, const char *iface) 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; + { + /* + * +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 } + +int netsnmp_ipbase_session_init(struct netsnmp_transport_s *transport, + struct snmp_session *sess) { + union { + struct sockaddr sa; + struct sockaddr_in sin; + struct sockaddr_in6 sin6; + } ss; + socklen_t len = sizeof(ss); + + if (!sess) { + DEBUGMSGTL(("netsnmp_ipbase", "session pointer is NULL\n")); + return SNMPERR_SUCCESS; + } + + if (getsockname(transport->sock, (struct sockaddr *)&ss, &len) == -1) { + DEBUGMSGTL(("netsnmp_ipbase", "getsockname error %s\n", strerror(errno))); + return SNMPERR_SUCCESS; + } + switch (ss.sa.sa_family) { + case AF_INET: + sess->local_port = ntohs(ss.sin.sin_port); + break; + case AF_INET6: + sess->local_port = ntohs(ss.sin6.sin6_port); + break; + default: + DEBUGMSGTL(("netsnmp_ipbase", "unsupported address family %d\n", + ss.sa.sa_family)); + return SNMPERR_SUCCESS; + } + + DEBUGMSGTL(("netsnmp_ipbase", "local port number %d\n", sess->local_port)); + + return SNMPERR_SUCCESS; +} diff --git a/vendor/include/net-snmp/library/snmpIPBaseDomain.h b/vendor/snmplib/transports/snmpIPBaseDomain.h similarity index 83% rename from vendor/include/net-snmp/library/snmpIPBaseDomain.h rename to vendor/snmplib/transports/snmpIPBaseDomain.h index 0938fda..3a25391 100644 --- a/vendor/include/net-snmp/library/snmpIPBaseDomain.h +++ b/vendor/snmplib/transports/snmpIPBaseDomain.h @@ -2,7 +2,7 @@ #define _SNMPIPBASEDOMAIN_H_ #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif @@ -30,12 +30,16 @@ struct netsnmp_ep { * means "bind to any port". */ struct netsnmp_ep_str { - char addr[64]; + char *addr; char iface[16]; char port[6]; }; +struct netsnmp_transport_s; + int netsnmp_parse_ep_str(struct netsnmp_ep_str *ep_str, const char *endpoint); int netsnmp_bindtodevice(int fd, const char *iface); +int netsnmp_ipbase_session_init(struct netsnmp_transport_s *transport, + struct snmp_session *sess); #endif /* _SNMPIPBASEDOMAIN_H_ */ diff --git a/vendor/snmplib/transports/snmpIPXDomain.c b/vendor/snmplib/transports/snmpIPXDomain.c index 9d460f4..5eb2887 100644 --- a/vendor/snmplib/transports/snmpIPXDomain.c +++ b/vendor/snmplib/transports/snmpIPXDomain.c @@ -7,21 +7,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_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif diff --git a/vendor/snmplib/transports/snmpIPv4BaseDomain.c b/vendor/snmplib/transports/snmpIPv4BaseDomain.c index 579cbe8..d43f987 100644 --- a/vendor/snmplib/transports/snmpIPv4BaseDomain.c +++ b/vendor/snmplib/transports/snmpIPv4BaseDomain.c @@ -4,7 +4,7 @@ #include #include -#include +#include "snmpIPBaseDomain.h" #include #include @@ -12,24 +12,24 @@ #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 @@ -97,25 +97,31 @@ netsnmp_sockaddr_in3(struct netsnmp_ep *ep, !netsnmp_parse_ep_str(&ep_str, default_target)) snmp_log(LOG_ERR, "Invalid default target %s\n", default_target); - if (inpeername && *inpeername != '\0' && - !netsnmp_parse_ep_str(&ep_str, inpeername)) - return 0; + 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; + } 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 (strcmp(ep_str.addr, "255.255.255.255") == 0) { + if (ep_str.addr && strcmp(ep_str.addr, "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 if (strcmp(ep_str.addr, "") != 0) { + } 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", "couldn't resolve hostname \"%s\"\n", ep_str.addr)); + free(ep_str.addr); return 0; } DEBUGMSGTL(("netsnmp_sockaddr_in", @@ -128,6 +134,7 @@ netsnmp_sockaddr_in3(struct netsnmp_ep *ep, 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; } diff --git a/vendor/snmplib/transports/snmpIPv6BaseDomain.c b/vendor/snmplib/transports/snmpIPv6BaseDomain.c index 3bc5b72..01ded90 100644 --- a/vendor/snmplib/transports/snmpIPv6BaseDomain.c +++ b/vendor/snmplib/transports/snmpIPv6BaseDomain.c @@ -15,7 +15,7 @@ #ifdef NETSNMP_ENABLE_IPV6 #include -#include +#include "snmpIPBaseDomain.h" #include #include #include @@ -24,27 +24,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_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 @@ -63,11 +63,11 @@ #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 -#if HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID +#ifdef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID static unsigned netsnmp_if_nametoindex(const char *ifname) { @@ -188,7 +188,7 @@ int netsnmp_ipv6_ostring_to_sockaddr(struct sockaddr_in6 *sin6, const void *o, static int netsnmp_resolve_v6_hostname(struct in6_addr *addr, const char *hostname) { -#if HAVE_GETADDRINFO +#ifdef HAVE_GETADDRINFO struct addrinfo hint = { 0 }; struct addrinfo *addrs; int err; @@ -207,7 +207,7 @@ static int netsnmp_resolve_v6_hostname(struct in6_addr *addr, DEBUGMSGTL(("netsnmp_sockaddr_in6", "Failed to resolve IPv6 hostname\n")); } return 1; -#elif HAVE_GETIPNODEBYNAME +#elif defined(HAVE_GETIPNODEBYNAME) struct hostent *hp; int err; @@ -220,7 +220,7 @@ static int netsnmp_resolve_v6_hostname(struct in6_addr *addr, DEBUGMSGTL(("netsnmp_sockaddr_in6", "hostname (resolved okay)\n")); memcpy(addr, hp->h_addr, hp->h_length); return 1; -#elif HAVE_GETHOSTBYNAME +#elif defined(HAVE_GETHOSTBYNAME) struct hostent *hp; hp = netsnmp_gethostbyname(hostname); @@ -299,7 +299,7 @@ netsnmp_sockaddr_in6_3(struct netsnmp_ep *ep, 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[0]) { + if (ep_str.addr && ep_str.addr[0]) { char *scope_id; scope_id = strchr(ep_str.addr, '%'); @@ -313,6 +313,7 @@ netsnmp_sockaddr_in6_3(struct netsnmp_ep *ep, !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; } } @@ -321,6 +322,7 @@ netsnmp_sockaddr_in6_3(struct netsnmp_ep *ep, inet_ntop(AF_INET6, &addr->sin6_addr, debug_addr, sizeof(debug_addr)), (int)addr->sin6_scope_id, ntohs(addr->sin6_port))); + free(ep_str.addr); return 1; } diff --git a/vendor/snmplib/transports/snmpSSHDomain.c b/vendor/snmplib/transports/snmpSSHDomain.c index ac6f214..dce24e4 100644 --- a/vendor/snmplib/transports/snmpSSHDomain.c +++ b/vendor/snmplib/transports/snmpSSHDomain.c @@ -14,30 +14,30 @@ #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 @@ -83,14 +83,6 @@ static netsnmp_tdomain sshDomain; #define SNMPSSHDOMAIN_USE_EXTERNAL_PIPE 1 -/* - * Not static since it is needed here as well as in snmpUDPDomain, but not - * public either - */ -int -netsnmp_sockaddr_in2(struct sockaddr_in *addr, - const char *inpeername, const char *default_target); - /* * Return a string representing the address in data, or else the "far end" * address if data is NULL. @@ -194,10 +186,9 @@ netsnmp_ssh_recv(netsnmp_transport *t, void *buf, int size, 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; struct iovec iov[1]; - char cmsg[CMSG_SPACE(sizeof(remoteuser))+4096]; + char cmsg[2 * 4096]; struct cmsghdr *cmsgptr; u_char *charbuf = buf; @@ -225,8 +216,10 @@ netsnmp_ssh_recv(netsnmp_transport *t, void *buf, int size, DEBUGMSGTL(("ssh", "received first msg over SSH; internal SSH protocol version %d\n", charbuf[0])); for (cmsgptr = CMSG_FIRSTHDR(&msg); cmsgptr != NULL; cmsgptr = CMSG_NXTHDR(&msg, cmsgptr)) { +#if defined(SCM_CREDENTIALS) if (cmsgptr->cmsg_level == SOL_SOCKET && cmsgptr->cmsg_type == SCM_CREDENTIALS) { /* received credential info */ + struct ucred *remoteuser; struct passwd *user_pw; remoteuser = (struct ucred *) CMSG_DATA(cmsgptr); @@ -246,8 +239,32 @@ netsnmp_ssh_recv(netsnmp_transport *t, void *buf, int size, strlcpy(addr_pair->username, user_pw->pw_name, sizeof(addr_pair->username)); } - DEBUGMSGTL(("ssh", "Setting user name to %s\n", - addr_pair->username)); +#elif defined(SCM_CREDS) + if (cmsgptr->cmsg_level == SOL_SOCKET && cmsgptr->cmsg_type == SCM_CREDS) { + /* received credential info */ + struct cmsgcred *remoteuser; + struct passwd *user_pw; + + remoteuser = (void *)CMSG_DATA(cmsgptr); + + if ((user_pw = getpwuid(remoteuser->cmcred_uid)) == NULL) { + snmp_log(LOG_ERR, "No user found for uid %d\n", + remoteuser->cmcred_uid); + return -1; + } + if (strlen(user_pw->pw_name) > + sizeof(addr_pair->username)-1) { + snmp_log(LOG_ERR, + "User name '%s' too long for snmp\n", + user_pw->pw_name); + return -1; + } + strlcpy(addr_pair->username, user_pw->pw_name, + sizeof(addr_pair->username)); + } +#endif + DEBUGMSGTL(("ssh", "Setting user name to %s\n", + addr_pair->username)); } if (addr_pair->username[0] == '\0') { @@ -531,12 +548,20 @@ netsnmp_ssh_accept(netsnmp_transport *t) return newsock; } +#ifdef SO_PASSCRED /* 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)); } +#elif defined(LOCAL_CREDS) + { + int one = 1; + setsockopt(newsock, SOL_SOCKET, LOCAL_CREDS, (void *) &one, + sizeof(one)); + } +#endif if (t->data != NULL) { free(t->data); @@ -641,15 +666,24 @@ netsnmp_ssh_transport(const struct sockaddr_in *addr, int local) return NULL; } +#if defined(SO_PASSCRED) /* set the SO_PASSCRED option so we can receive the remote uid */ { int one = 1; setsockopt(t->sock, SOL_SOCKET, SO_PASSCRED, (void *) &one, sizeof(one)); } +#elif defined(LOCAL_CREDS) + { + int one = 1; + setsockopt(t->sock, SOL_SOCKET, LOCAL_CREDS, (void *) &one, + sizeof(one)); + } +#endif + unlink(unaddr->sun_path); - rc = bind(t->sock, unaddr, SUN_LEN(unaddr)); + rc = bind(t->sock, (struct sockaddr *)unaddr, SUN_LEN(unaddr)); if (rc != 0) { DEBUGMSGTL(("netsnmp_ssh_transport", "couldn't bind \"%s\", errno %d (%s)\n", @@ -697,8 +731,9 @@ netsnmp_ssh_transport(const struct sockaddr_in *addr, int local) sshdomain_sock_group = -1; DEBUGMSGTL(("ssh", "Setting socket user/group to %d/%d\n", sshdomain_sock_user, sshdomain_sock_group)); - chown(unaddr->sun_path, - sshdomain_sock_user, sshdomain_sock_group); + if (chown(unaddr->sun_path, + sshdomain_sock_user, sshdomain_sock_group) < 0) + snmp_log_perror("SSH socket chown"); } } @@ -805,7 +840,11 @@ netsnmp_ssh_transport(const struct sockaddr_in *addr, int local) /* open the SSH session and channel */ addr_pair->session = libssh2_session_init(); +#ifdef HAVE_LIBSSH2_SESSION_HANDSHAKE + if (libssh2_session_handshake(addr_pair->session, t->sock)) { +#else if (libssh2_session_startup(addr_pair->session, t->sock)) { +#endif shutdown: snmp_log(LOG_ERR, "Failed to establish an SSH session\n"); netsnmp_ssh_close(t); diff --git a/vendor/snmplib/transports/snmpSTDDomain.c b/vendor/snmplib/transports/snmpSTDDomain.c index 7a8449f..1c77143 100644 --- a/vendor/snmplib/transports/snmpSTDDomain.c +++ b/vendor/snmplib/transports/snmpSTDDomain.c @@ -7,15 +7,15 @@ #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 @@ -236,14 +236,9 @@ netsnmp_std_transport(const char *instring, size_t instring_len, close(outfd[0]); close(outfd[1]); - /* call exec */ 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"); } } diff --git a/vendor/snmplib/transports/snmpSocketBaseDomain.c b/vendor/snmplib/transports/snmpSocketBaseDomain.c index 7fa6ced..3fa9da9 100644 --- a/vendor/snmplib/transports/snmpSocketBaseDomain.c +++ b/vendor/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 diff --git a/vendor/snmplib/transports/snmpTCPBaseDomain.c b/vendor/snmplib/transports/snmpTCPBaseDomain.c index 56fe2d9..88291cf 100644 --- a/vendor/snmplib/transports/snmpTCPBaseDomain.c +++ b/vendor/snmplib/transports/snmpTCPBaseDomain.c @@ -7,27 +7,27 @@ #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 diff --git a/vendor/snmplib/transports/snmpTCPDomain.c b/vendor/snmplib/transports/snmpTCPDomain.c index b1ee67f..a356240 100644 --- a/vendor/snmplib/transports/snmpTCPDomain.c +++ b/vendor/snmplib/transports/snmpTCPDomain.c @@ -1,34 +1,34 @@ #include #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 @@ -53,14 +53,6 @@ typedef netsnmp_indexed_addr_pair netsnmp_udp_addr_pair; oid netsnmp_snmpTCPDomain[] = { TRANSPORT_DOMAIN_TCP_IP }; static netsnmp_tdomain tcpDomain; -/* - * Not static since it is needed here as well as in snmpUDPDomain, but not - * public either - */ -int -netsnmp_sockaddr_in2(struct sockaddr_in *addr, - const char *inpeername, const char *default_target); - /* * Return a string representing the address in data, or else the "far end" * address if data is NULL. @@ -296,6 +288,7 @@ netsnmp_tcp_transport(const struct netsnmp_ep *ep, int local) t->f_send = netsnmp_tcpbase_send; t->f_close = netsnmp_socketbase_close; t->f_accept = netsnmp_tcp_accept; + t->f_setup_session = netsnmp_ipbase_session_init; t->f_fmtaddr = netsnmp_tcp_fmtaddr; t->f_get_taddr = netsnmp_ipv4_get_taddr; diff --git a/vendor/snmplib/transports/snmpTCPIPv6Domain.c b/vendor/snmplib/transports/snmpTCPIPv6Domain.c index 2006977..305a770 100644 --- a/vendor/snmplib/transports/snmpTCPIPv6Domain.c +++ b/vendor/snmplib/transports/snmpTCPIPv6Domain.c @@ -3,37 +3,37 @@ #ifdef NETSNMP_TRANSPORT_TCPIPV6_DOMAIN #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_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_FCNTL_H +#ifdef HAVE_FCNTL_H #include #endif @@ -301,6 +301,7 @@ netsnmp_tcp6_transport(const struct netsnmp_ep *ep, int local) t->f_send = netsnmp_tcpbase_send; t->f_close = netsnmp_socketbase_close; t->f_accept = netsnmp_tcp6_accept; + t->f_setup_session = netsnmp_ipbase_session_init; t->f_fmtaddr = netsnmp_tcp6_fmtaddr; t->f_get_taddr = netsnmp_ipv6_get_taddr; diff --git a/vendor/snmplib/transports/snmpTLSBaseDomain.c b/vendor/snmplib/transports/snmpTLSBaseDomain.c index 4215302..e301de4 100644 --- a/vendor/snmplib/transports/snmpTLSBaseDomain.c +++ b/vendor/snmplib/transports/snmpTLSBaseDomain.c @@ -4,21 +4,21 @@ netsnmp_feature_require(cert_util); -#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 @@ -50,17 +50,28 @@ netsnmp_feature_require(cert_util); #include #include +#ifndef X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS +#define X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS 0 +#endif + #define LOGANDDIE(msg) do { snmp_log(LOG_ERR, "%s\n", msg); return 0; } while(0) int openssl_local_index; #ifndef HAVE_ERR_GET_ERROR_ALL -/* A backport of the OpenSSL 1.1.1e ERR_get_error_all() function. */ +/* + * A backport of the OpenSSL 3.0 ERR_get_error_all() function. See also + * OpenSSL commit b13342e933c5 ("Modernise the ERR functionality further (new + * functions and deprecations)"). + */ static unsigned long ERR_get_error_all(const char **file, int *line, const char **func, const char **data, int *flags) { - *func = NULL; + *func = "(?)"; +#ifdef HAVE_ERR_GET_ERROR_FUNC + ERR_get_error_func(func); +#endif return ERR_get_error_line_data(file, line, data, flags); } #endif @@ -81,7 +92,7 @@ int verify_callback(int ok, X509_STORE_CTX *ctx) { /* things to do: */ X509_NAME_oneline(X509_get_subject_name(thecert), buf, sizeof(buf)); - fingerprint = netsnmp_openssl_cert_get_fingerprint(thecert, -1); + fingerprint = netsnmp_openssl_cert_get_fingerprint(thecert, NS_HASH_SHA1); DEBUGMSGTL(("tls_x509:verify", "Cert: %s\n", buf)); DEBUGMSGTL(("tls_x509:verify", " fp: %s\n", fingerprint ? fingerprint : "unknown")); @@ -160,7 +171,7 @@ _netsnmp_tlsbase_verify_remote_fingerprint(X509 *remote_cert, char *fingerprint; fingerprint = - netsnmp_openssl_cert_get_fingerprint(remote_cert, -1); + netsnmp_openssl_cert_get_fingerprint(remote_cert, NS_HASH_SHA1); if (!fingerprint) { /* no peer cert */ @@ -177,7 +188,7 @@ _netsnmp_tlsbase_verify_remote_fingerprint(X509 *remote_cert, if (peer_cert) tlsdata->their_fingerprint = - netsnmp_openssl_cert_get_fingerprint(peer_cert->ocert, -1); + netsnmp_openssl_cert_get_fingerprint(peer_cert->ocert, NS_HASH_SHA1); } if (!tlsdata->their_fingerprint && try_default) { @@ -189,7 +200,7 @@ _netsnmp_tlsbase_verify_remote_fingerprint(X509 *remote_cert, if (peer_cert) tlsdata->their_fingerprint = - netsnmp_openssl_cert_get_fingerprint(peer_cert->ocert, -1); + netsnmp_openssl_cert_get_fingerprint(peer_cert->ocert, NS_HASH_SHA1); } if (tlsdata->their_fingerprint) { @@ -222,8 +233,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")); @@ -276,11 +288,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'; @@ -355,7 +365,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")); @@ -450,7 +461,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; @@ -490,7 +501,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()))) @@ -517,6 +528,8 @@ SSL_CTX * sslctx_client_setup(const SSL_METHOD *method, _netsnmpTLSBaseData *tlsbase) { netsnmp_cert *id_cert, *peer_cert; SSL_CTX *the_ctx; + X509 *ocert; + const char *msg; /*********************************************************************** * Set up the client context @@ -524,7 +537,8 @@ sslctx_client_setup(const SSL_METHOD *method, _netsnmpTLSBaseData *tlsbase) { the_ctx = SSL_CTX_new(NETSNMP_REMOVE_CONST(SSL_METHOD *, method)); if (!the_ctx) { snmp_log(LOG_ERR, "ack: %p\n", the_ctx); - LOGANDDIE("can't create a new context"); + msg = "can't create a new context"; + goto err; } MAKE_MEM_DEFINED(the_ctx, 256/*sizeof(*the_ctx)*/); SSL_CTX_set_read_ahead (the_ctx, 1); /* Required for DTLS */ @@ -544,25 +558,48 @@ sslctx_client_setup(const SSL_METHOD *method, _netsnmpTLSBaseData *tlsbase) { id_cert = netsnmp_cert_find(NS_CERT_IDENTITY, NS_CERTKEY_DEFAULT, NULL); } - if (!id_cert) - LOGANDDIE ("error finding client identity keys"); + if (!id_cert) { + msg = "error finding client identity keys"; + goto err; + } - if (!id_cert->key || !id_cert->key->okey) - LOGANDDIE("failed to load private key"); + if (!id_cert->key || !id_cert->key->okey) { + msg = "failed to load private key"; + goto err; + } DEBUGMSGTL(("sslctx_client", "using public key: %s\n", id_cert->info.filename)); DEBUGMSGTL(("sslctx_client", "using private key: %s\n", id_cert->key->info.filename)); - if (SSL_CTX_use_certificate(the_ctx, id_cert->ocert) <= 0) - LOGANDDIE("failed to set the certificate to use"); + if (SSL_CTX_use_certificate(the_ctx, id_cert->ocert) <= 0) { + msg = "failed to set the client certificate to use"; + goto err; + } + + if (SSL_CTX_use_PrivateKey(the_ctx, id_cert->key->okey) <= 0) { + msg = "failed to set the client private key to use"; + goto err; + } - if (SSL_CTX_use_PrivateKey(the_ctx, id_cert->key->okey) <= 0) - LOGANDDIE("failed to set the private key to use"); + if (!SSL_CTX_check_private_key(the_ctx)) { + msg = "client public and private keys incompatible"; + goto err; + } - if (!SSL_CTX_check_private_key(the_ctx)) - LOGANDDIE("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)) { + msg = "failed to add intermediate client certificate"; + goto err; + } + } + } if (tlsbase->their_identity) peer_cert = netsnmp_cert_find(NS_CERT_REMOTE_PEER, @@ -576,22 +613,33 @@ 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) - LOGANDDIE ("failed to set verify paths"); + if (netsnmp_cert_trust(the_ctx, peer_cert) != SNMPERR_SUCCESS) { + msg = "failed to set verify paths"; + goto err; + } } - /* 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)) + if (!_trust_this_cert(the_ctx, tlsbase->trust_cert)) { + SSL_CTX_free(the_ctx); return 0; + } } return _sslctx_common_setup(the_ctx, tlsbase); + +err: + snmp_log(LOG_ERR, "%s\n", msg); + SSL_CTX_free(the_ctx); + return 0; } SSL_CTX * sslctx_server_setup(const SSL_METHOD *method) { netsnmp_cert *id_cert; + X509 *ocert; + const char *msg; /*********************************************************************** * Set up the server context @@ -599,30 +647,54 @@ 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"); + msg = "can't create a new server context"; + goto err; } 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) { + msg = "error finding server identity keys"; + goto err; + } - if (!id_cert->key || !id_cert->key->okey) - LOGANDDIE("failed to load private key"); + if (!id_cert->key || !id_cert->key->okey) { + msg = "failed to load server private key"; + goto err; + } DEBUGMSGTL(("sslctx_server", "using public key: %s\n", id_cert->info.filename)); DEBUGMSGTL(("sslctx_server", "using private key: %s\n", id_cert->key->info.filename)); - if (SSL_CTX_use_certificate(the_ctx, id_cert->ocert) <= 0) - LOGANDDIE("failed to set the certificate to use"); + if (SSL_CTX_use_certificate(the_ctx, id_cert->ocert) <= 0) { + msg = "failed to set the server certificate to use"; + goto err; + } + + if (SSL_CTX_use_PrivateKey(the_ctx, id_cert->key->okey) <= 0) { + msg = "failed to set the server private key to use"; + goto err; + } - if (SSL_CTX_use_PrivateKey(the_ctx, id_cert->key->okey) <= 0) - LOGANDDIE("failed to set the private key to use"); + if (!SSL_CTX_check_private_key(the_ctx)) { + msg ="server public and private keys incompatible"; + goto err; + } - if (!SSL_CTX_check_private_key(the_ctx)) - LOGANDDIE("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)) { + msg = "failed to add intermediate server certificate"; + goto err; + } + } + } SSL_CTX_set_read_ahead(the_ctx, 1); /* XXX: DTLS only? */ @@ -632,7 +704,14 @@ sslctx_server_setup(const SSL_METHOD *method) { SSL_VERIFY_CLIENT_ONCE, &verify_callback); + SSL_CTX_set_options(the_ctx, SSL_OP_CIPHER_SERVER_PREFERENCE); + return _sslctx_common_setup(the_ctx, NULL); + +err: + snmp_log(LOG_ERR, "%s\n", msg); + SSL_CTX_free(the_ctx); + return NULL; } int @@ -728,7 +807,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; } @@ -1185,17 +1264,10 @@ void _openssl_log_error(int rc, SSL *con, const char *location) { /* 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/vendor/snmplib/transports/snmpTLSTCPDomain.c b/vendor/snmplib/transports/snmpTLSTCPDomain.c index ea5423f..0ddf023 100644 --- a/vendor/snmplib/transports/snmpTLSTCPDomain.c +++ b/vendor/snmplib/transports/snmpTLSTCPDomain.c @@ -18,34 +18,34 @@ netsnmp_feature_require(cert_util); #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 @@ -719,7 +719,7 @@ netsnmp_tlstcp_open_client(netsnmp_transport *t) } #ifdef SSL_CTX_set_max_proto_version - SSL_CTX_set_max_proto_version(tlsdata->ssl_context, TLS1_VERSION); + SSL_CTX_set_max_proto_version(tlsdata->ssl_context, 0); #endif /* RFC5953 Section 5.3.1: Establishing a Session as a Client @@ -919,7 +919,7 @@ netsnmp_tlstcp_open_server(netsnmp_transport *t) 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); + SSL_CTX_set_max_proto_version(tlsdata->ssl_context, 0); #endif t->sock = BIO_get_fd(tlsdata->accept_bio, NULL); diff --git a/vendor/snmplib/transports/snmpUDPBaseDomain.c b/vendor/snmplib/transports/snmpUDPBaseDomain.c index 0306423..cd6b15e 100644 --- a/vendor/snmplib/transports/snmpUDPBaseDomain.c +++ b/vendor/snmplib/transports/snmpUDPBaseDomain.c @@ -19,27 +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_NET_IF_H +#ifdef HAVE_NET_IF_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 #ifdef WIN32 @@ -315,7 +315,7 @@ int netsnmp_udpbase_sendto_unix(int fd, const struct in_addr *srcip, sizeof(struct sockaddr)); else rc = sendmsg(fd, &m, MSG_DONTWAIT); - if (rc >= 0 || errno != EINVAL) + if (rc >= 0 || (errno != EINVAL && errno != ENETUNREACH)) return rc; /* @@ -533,9 +533,6 @@ netsnmp_udpbase_send(netsnmp_transport *t, const void *buf, int size, void netsnmp_udp_base_ctor(void) { - netsnmp_static_assert(sizeof(in_addr_t) == - sizeof((struct sockaddr_in *)NULL)->sin_addr); - #if defined(WIN32) && defined(HAVE_IP_PKTINFO) SOCKET s = socket(AF_INET, SOCK_DGRAM, 0); GUID WSARecvMsgGuid = WSAID_WSARECVMSG; @@ -543,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/vendor/snmplib/transports/snmpUDPDomain.c b/vendor/snmplib/transports/snmpUDPDomain.c index 46c8187..f7797a3 100644 --- a/vendor/snmplib/transports/snmpUDPDomain.c +++ b/vendor/snmplib/transports/snmpUDPDomain.c @@ -17,7 +17,7 @@ #include #include -#include +#include "snmpIPBaseDomain.h" #include #include @@ -27,30 +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_NETGROUP_H +#include +#endif +#ifdef HAVE_SYS_UIO_H #include #endif @@ -82,10 +85,6 @@ static netsnmp_tdomain udpDomain; */ typedef netsnmp_indexed_addr_pair netsnmp_udp_addr_pair; -int -netsnmp_sockaddr_in2(struct sockaddr_in *addr, - const char *inpeername, const char *default_target); - /* * Return a string representing the address in data, or else the "far end" * address if data is NULL. @@ -142,6 +141,7 @@ netsnmp_udp_transport_base(netsnmp_transport *t) t->f_send = netsnmp_udpbase_send; t->f_close = netsnmp_socketbase_close; t->f_accept = NULL; + t->f_setup_session = netsnmp_ipbase_session_init; t->f_fmtaddr = netsnmp_udp_fmtaddr; t->f_get_taddr = netsnmp_ipv4_get_taddr; @@ -386,7 +386,7 @@ netsnmp_udp_parse_security(const char *token, char *param) /* Nope, wasn't a dotted quad. Must be a hostname. */ 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; } } diff --git a/vendor/snmplib/transports/snmpUDPIPv4BaseDomain.c b/vendor/snmplib/transports/snmpUDPIPv4BaseDomain.c index d506551..1e15a2f 100644 --- a/vendor/snmplib/transports/snmpUDPIPv4BaseDomain.c +++ b/vendor/snmplib/transports/snmpUDPIPv4BaseDomain.c @@ -13,31 +13,31 @@ #include #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 @@ -208,6 +208,11 @@ netsnmp_udpipv4base_transport_bind(netsnmp_transport *t, 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", @@ -282,6 +287,8 @@ netsnmp_udpipv4base_transport_with_source(const struct netsnmp_ep *ep, */ 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 @@ -302,7 +309,7 @@ netsnmp_udpipv4base_transport_with_source(const struct netsnmp_ep *ep, return t; /* for Linux VRF Traps we try to bind the iface if clientaddr is not set */ - if (ep) { + 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", diff --git a/vendor/snmplib/transports/snmpUDPIPv6Domain.c b/vendor/snmplib/transports/snmpUDPIPv6Domain.c index 4627286..1842d2a 100644 --- a/vendor/snmplib/transports/snmpUDPIPv6Domain.c +++ b/vendor/snmplib/transports/snmpUDPIPv6Domain.c @@ -6,7 +6,7 @@ */ #include -#include +#include "snmpIPBaseDomain.h" #include #include @@ -19,42 +19,37 @@ #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_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 @@ -77,6 +72,12 @@ static const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT; oid netsnmp_UDPIPv6Domain[] = { TRANSPORT_DOMAIN_UDP_IPV6 }; static netsnmp_tdomain udp6Domain; +/* + * needs to be in sync with the definitions in snmplib/snmpTCPDomain.c + * and perl/agent/agent.xs + */ +typedef netsnmp_indexed_addr_pair netsnmp_udp_addr_pair; + /* * Return a string representing the address in data, or else the "far end" * address if data is NULL. @@ -88,7 +89,191 @@ netsnmp_udp6_fmtaddr(netsnmp_transport *t, const void *data, int len) return netsnmp_ipv6_fmtaddr("UDP/IPv6", t, data, len); } +#if defined(HAVE_IPV6_RECVPKTINFO) && !defined(WIN32) + +#define netsnmp_udp6_recvfrom_sendto_defined + +enum { + cmsg_data_size = sizeof(struct in6_pktinfo) +}; + +int +netsnmp_udp6_recvfrom(int s, void *buf, int len, struct sockaddr *from, + socklen_t *fromlen, struct sockaddr *dstip, + socklen_t *dstlen, int *if_index) +{ + int r; + struct iovec iov; + char cmsg[CMSG_SPACE(cmsg_data_size)]; + struct cmsghdr *cm; + struct msghdr msg; + + iov.iov_base = buf; + iov.iov_len = len; + + memset(&msg, 0, sizeof msg); + msg.msg_name = from; + msg.msg_namelen = *fromlen; + msg.msg_iov = &iov; + msg.msg_iovlen = 1; + msg.msg_control = &cmsg; + msg.msg_controllen = sizeof(cmsg); + + r = recvmsg(s, &msg, MSG_DONTWAIT); + + if (r == -1) { + return -1; + } + + { + char buf[INET6_ADDRSTRLEN]; + DEBUGMSGTL(("udp6:recv", "got source addr: %s\n", inet_ntop(AF_INET6, + &(((struct sockaddr_in6 *)from)->sin6_addr), buf, + sizeof(struct sockaddr_in6)))); + } + + { + /* Get the local port number for use in diagnostic messages */ + int r2 = getsockname(s, dstip, dstlen); + netsnmp_assert(r2 == 0); + } + + for (cm = CMSG_FIRSTHDR(&msg); cm != NULL; cm = CMSG_NXTHDR(&msg, cm)) { + if (cm->cmsg_level == IPPROTO_IPV6 && cm->cmsg_type == IPV6_PKTINFO) { + struct in6_pktinfo* src = (struct in6_pktinfo *)CMSG_DATA(cm); + + netsnmp_assert(dstip->sa_family == AF_INET6); + ((struct sockaddr_in6*)dstip)->sin6_addr = src->ipi6_addr; + *if_index = src->ipi6_ifindex; + + { + char buf[INET6_ADDRSTRLEN]; + DEBUGMSGTL(("udp6:recv", + "got destination (local) addr %s, iface %d\n", + inet_ntop(AF_INET6, + &(((struct sockaddr_in6 *)dstip)->sin6_addr), buf, + sizeof(struct sockaddr_in6)), *if_index)); + } + } + } + + return r; +} + +int netsnmp_udp6_sendto(int fd, const struct in6_addr *srcip, int if_index, + const struct sockaddr *remote, const void *data, + int len) +{ + struct iovec iov; + struct msghdr m = { NULL }; + char cmsg[CMSG_SPACE(cmsg_data_size)]; + int rc; +#ifdef HAVE_SO_BINDTODEVICE + char iface[IFNAMSIZ]; + socklen_t ifacelen = IFNAMSIZ; +#endif + + iov.iov_base = NETSNMP_REMOVE_CONST(void *, data); + iov.iov_len = len; + + m.msg_name = NETSNMP_REMOVE_CONST(void *, remote); + m.msg_namelen = sizeof(struct sockaddr_in6); + m.msg_iov = &iov; + m.msg_iovlen = 1; + m.msg_flags = 0; + + if (srcip && memcmp(&srcip->s6_addr, &in6addr_any, sizeof(struct in6_addr)) != 0) { + struct cmsghdr *cm; + struct in6_pktinfo ipi; + int use_sendto = FALSE; + + memset(cmsg, 0, sizeof(cmsg)); + + m.msg_control = &cmsg; + m.msg_controllen = sizeof(cmsg); + + cm = CMSG_FIRSTHDR(&m); + cm->cmsg_len = CMSG_LEN(cmsg_data_size); + + cm->cmsg_level = IPPROTO_IPV6; + cm->cmsg_type = IPV6_PKTINFO; + + 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(("udp6:sendto", + "getsockopt SO_BINDTODEVICE failed: %s\n", + strerror(errno))); + } else if (ifacelen == 0) { + DEBUGMSGTL(("udp6:sendto", + "sendto: SO_BINDTODEVICE not set\n")); + } else { + DEBUGMSGTL(("udp6:sendto", + "sendto: SO_BINDTODEVICE dev=%s using ifindex=%d\n", + iface, if_index)); + use_sendto = TRUE; + } +#endif /* HAVE_SO_BINDTODEVICE */ + + ipi.ipi6_addr = *srcip; + memcpy(CMSG_DATA(cm), &ipi, sizeof(ipi)); + { + char buf[INET6_ADDRSTRLEN]; + DEBUGMSGTL(("udp6:sendto", "sending from %s\n", + inet_ntop(AF_INET6, srcip, buf, INET6_ADDRSTRLEN))); + } + + /* + * 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) + return rc; + + /* + * The error might be caused by broadcast srcip (i.e. we're responding + * to a broadcast request) - sendmsg does not like it. Try to resend it + * using the interface on which it was received + */ + + DEBUGMSGTL(("udp6:sendto", "re-sending on iface %d\n", if_index)); + + { + struct in6_pktinfo ipi; + memset(&ipi, 0, sizeof(ipi)); + ipi.ipi6_addr = in6addr_any; + ipi.ipi6_ifindex = if_index; + memcpy(CMSG_DATA(cm), &ipi, sizeof(ipi)); + } + + rc = sendmsg(fd, &m, MSG_DONTWAIT); + if (rc >= 0 || errno != EINVAL) + return rc; + + DEBUGMSGTL(("udp6:sendto", "re-sending without source address\n")); + m.msg_control = NULL; + m.msg_controllen = 0; + } + + return sendmsg(fd, &m, MSG_DONTWAIT); +} + +#endif /* HAVE_IPV6_RECVPKTINFO || !WIN32 */ /* * You can write something into opaque that will subsequently get passed back @@ -102,24 +287,32 @@ netsnmp_udp6_recv(netsnmp_transport *t, void *buf, int size, { int rc = -1; socklen_t fromlen = sizeof(struct sockaddr_in6); + netsnmp_indexed_addr_pair *addr_pair = NULL; struct sockaddr *from; if (t != NULL && t->sock >= 0) { - from = (struct sockaddr *) malloc(sizeof(struct sockaddr_in6)); - if (from == NULL) { + addr_pair = SNMP_MALLOC_TYPEDEF(netsnmp_indexed_addr_pair); + if (addr_pair == NULL) { *opaque = NULL; *olength = 0; return -1; } else { - memset(from, 0, fromlen); + from = &addr_pair->remote_addr.sa; } - while (rc < 0) { - rc = recvfrom(t->sock, buf, size, 0, from, &fromlen); - if (rc < 0 && errno != EINTR) { - break; - } - } + while (rc < 0) { +#ifdef netsnmp_udp6_recvfrom_sendto_defined + socklen_t local_addr_len = sizeof(addr_pair->local_addr); + rc = netsnmp_udp6_recvfrom(t->sock, buf, size, from, &fromlen, + &addr_pair->local_addr.sa, + &local_addr_len, &(addr_pair->if_index)); +#else + rc = recvfrom(t->sock, buf, size, 0, from, &fromlen); +#endif /* netsnmp_udp6_recvfrom_sendto_defined */ + if (rc < 0 && errno != EINTR) { + break; + } + } if (rc >= 0) { DEBUGIF("netsnmp_udp6") { @@ -133,8 +326,8 @@ netsnmp_udp6_recv(netsnmp_transport *t, void *buf, int size, DEBUGMSGTL(("netsnmp_udp6", "recvfrom fd %d err %d (\"%s\")\n", t->sock, errno, strerror(errno))); } - *opaque = (void *) from; - *olength = sizeof(struct sockaddr_in6); + *opaque = (void *) addr_pair; + *olength = sizeof(netsnmp_indexed_addr_pair); } return rc; } @@ -146,32 +339,52 @@ netsnmp_udp6_send(netsnmp_transport *t, const void *buf, int size, void **opaque, int *olength) { int rc = -1; + const netsnmp_indexed_addr_pair *addr_pair = NULL; const struct sockaddr *to = NULL; - if (opaque != NULL && *opaque != NULL && - *olength == sizeof(struct sockaddr_in6)) { - to = (const struct sockaddr *) (*opaque); + if (opaque != NULL && *opaque != NULL && NULL != olength && + (*olength == sizeof(netsnmp_indexed_addr_pair) || + *olength == sizeof(struct sockaddr_in6))) { + addr_pair = (const netsnmp_indexed_addr_pair *) (*opaque); } else if (t != NULL && t->data != NULL && - ((t->data_length == sizeof(struct sockaddr_in6)) || - (t->data_length == sizeof(netsnmp_indexed_addr_pair)))) { - to = (const struct sockaddr *) (t->data); + 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_udp6") { - char *str = netsnmp_udp6_fmtaddr(NULL, to, - sizeof(struct sockaddr_in6)); + char *str = netsnmp_udp6_fmtaddr(NULL, addr_pair, + sizeof(netsnmp_indexed_addr_pair)); DEBUGMSGTL(("netsnmp_udp6", "send %d bytes from %p to %s on fd %d\n", size, buf, str, t->sock)); free(str); } - while (rc < 0) { - rc = sendto(t->sock, buf, size, 0, to,sizeof(struct sockaddr_in6)); - if (rc < 0 && errno != EINTR) { - break; - } - } + + while (rc < 0) { +#ifdef netsnmp_udp6_recvfrom_sendto_defined + rc = netsnmp_udp6_sendto(t->sock, + addr_pair ? &(addr_pair->local_addr.sin6.sin6_addr) : NULL, + addr_pair ? addr_pair->if_index : 0, to, buf, size); +#else + rc = sendto(t->sock, buf, size, 0, to, sizeof(struct sockaddr_in6)); +#endif /* netsnmp_udp6_recvfrom_sendto_defined */ + if (rc < 0 && errno != EINTR) { + DEBUGMSGTL(("netsnmp_udp6", "sendto error, rc %d (errno %d)\n", + rc, errno)); + break; + } + } } return rc; } @@ -256,6 +469,7 @@ netsnmp_udp6_transport_init(const struct netsnmp_ep *ep, int flags) t->f_send = netsnmp_udp6_send; t->f_close = netsnmp_socketbase_close; t->f_accept = NULL; + t->f_setup_session = netsnmp_ipbase_session_init; t->f_fmtaddr = netsnmp_udp6_fmtaddr; t->f_get_taddr = netsnmp_ipv6_get_taddr; @@ -266,6 +480,21 @@ netsnmp_udp6_transport_init(const struct netsnmp_ep *ep, int flags) return t; } +static void set_ipv6_recvpktinfo_sockopt(int sd) +{ +#if defined(HAVE_IPV6_RECVPKTINFO) && !defined(WIN32) + int sockopt = 1; + + if (setsockopt(sd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &sockopt, + sizeof(sockopt)) == -1) { + DEBUGMSGTL(("netsnmp_udp6", "couldn't set IPV6_RECVPKTINFO: %s\n", + strerror(errno))); + } else { + DEBUGMSGTL(("netsnmp_udp6", "set IPV6_RECVPKTINFO\n")); + } +#endif +} + int netsnmp_udp6_transport_bind(netsnmp_transport *t, const struct netsnmp_ep *ep, @@ -292,6 +521,7 @@ netsnmp_udp6_transport_bind(netsnmp_transport *t, } } #endif + set_ipv6_recvpktinfo_sockopt(t->sock); #else /* NETSNMP_NO_LISTEN_SUPPORT */ return -1; #endif /* NETSNMP_NO_LISTEN_SUPPORT */ @@ -300,10 +530,15 @@ netsnmp_udp6_transport_bind(netsnmp_transport *t, DEBUGIF("netsnmp_udp6") { char *str; str = netsnmp_udp6_fmtaddr(NULL, addr, sizeof(*addr)); - DEBUGMSGTL(("netsnmp_udpbase", "binding socket: %d to %s\n", + 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", @@ -419,6 +654,8 @@ netsnmp_udp6_transport_with_source(const struct netsnmp_ep *ep, */ 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 @@ -701,7 +938,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; @@ -710,7 +947,8 @@ 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] = (0xffu << (8 - jj)); memset(mask.s6_addr + j + 1, '\0', 15 - j); @@ -739,17 +977,28 @@ netsnmp_udp6_parse_security(const char *token, char *param) memset(&pton_addr.sin6_addr.s6_addr, '\0', sizeof(struct in6_addr)); } else if (inet_pton(AF_INET6, sourcep, &pton_addr.sin6_addr) != 1) { - /* Nope, wasn't a numeric address. Must be a hostname. */ -#if HAVE_GETADDRINFO - int gai_error; - - hints.ai_family = AF_INET6; - hints.ai_socktype = SOCK_DGRAM; - gai_error = netsnmp_getaddrinfo(sourcep, NULL, &hints, &res); - if (gai_error != 0) { - config_perror(gai_strerror(gai_error)); + /* 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(sourcep, NULL, &hints, + &res); + if (gai_error != 0) { + config_perror(gai_strerror(gai_error)); + return; + } + } #else config_perror("getaddrinfo() not available"); return; @@ -790,7 +1039,7 @@ netsnmp_udp6_parse_security(const char *token, char *param) com2Sec6ListLast = end; } } -#if HAVE_GETADDRINFO +#ifdef HAVE_GETADDRINFO if (res != &hints) freeaddrinfo(res); #endif @@ -840,7 +1089,8 @@ netsnmp_udp6_getSecName(void *opaque, int olength, const char **secName, const char **contextName) { const com2Sec6Entry *c; - struct sockaddr_in6 *from = (struct sockaddr_in6 *) opaque; + netsnmp_udp_addr_pair *addr_pair = (netsnmp_udp_addr_pair *) opaque; + struct sockaddr_in6 *from = (struct sockaddr_in6 *) &(addr_pair->remote_addr); char *ztcommunity = NULL; char str6[INET6_ADDRSTRLEN]; @@ -863,8 +1113,11 @@ netsnmp_udp6_getSecName(void *opaque, int olength, * name. */ - if (opaque == NULL || olength != sizeof(struct sockaddr_in6) - || from->sin6_family != PF_INET6) { + DEBUGMSGTL(("netsnmp_udp_getSecName", "opaque = %p (len = %d), sizeof = %d, family = %d (%d)\n", + opaque, olength, (int)sizeof(netsnmp_udp_addr_pair), + from->sin6_family, AF_INET6)); + if (opaque == NULL || olength != sizeof(netsnmp_udp_addr_pair) || + from->sin6_family != PF_INET6) { DEBUGMSGTL(("netsnmp_udp6_getSecName", "no IPv6 source address in PDU?\n")); return 1; diff --git a/vendor/snmplib/transports/snmpUDPsharedDomain.c b/vendor/snmplib/transports/snmpUDPsharedDomain.c index 036596c..10d08f0 100644 --- a/vendor/snmplib/transports/snmpUDPsharedDomain.c +++ b/vendor/snmplib/transports/snmpUDPsharedDomain.c @@ -9,31 +9,31 @@ #include #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 @@ -181,8 +181,10 @@ _transport_common(netsnmp_transport *t) t->flags = NETSNMP_TRANSPORT_FLAG_SHARED; if (t->base_transport->domain == netsnmpUDPDomain) t->f_get_taddr = netsnmp_ipv4_get_taddr; +#ifdef NETSNMP_ENABLE_IPV6 else if (t->base_transport->domain == netsnmp_UDPIPv6Domain) t->f_get_taddr = netsnmp_ipv6_get_taddr; +#endif else netsnmp_assert(0); diff --git a/vendor/snmplib/transports/snmpUnixDomain.c b/vendor/snmplib/transports/snmpUnixDomain.c index 6e1b920..1526b88 100644 --- a/vendor/snmplib/transports/snmpUnixDomain.c +++ b/vendor/snmplib/transports/snmpUnixDomain.c @@ -9,18 +9,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_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif @@ -149,6 +149,7 @@ netsnmp_unix_recv(netsnmp_transport *t, void *buf, int size, if (rc < 0 && errno != EINTR) { DEBUGMSGTL(("netsnmp_unix", "recv fd %d err %d (\"%s\")\n", t->sock, errno, strerror(errno))); + free(to); return rc; } *opaque = (void*)to; @@ -360,6 +361,7 @@ netsnmp_unix_transport(const struct sockaddr_un *addr, int local) t->local_length = strlen(addr->sun_path); t->local = strdup(addr->sun_path); if (t->local == NULL) { + netsnmp_unix_close(t); netsnmp_transport_free(t); return NULL; } diff --git a/vendor/snmplib/vacm.c b/vendor/snmplib/vacm.c index 9f73949..0e24e3c 100644 --- a/vendor/snmplib/vacm.c +++ b/vendor/snmplib/vacm.c @@ -22,31 +22,31 @@ #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 diff --git a/vendor/testing/RUNFULLTESTS b/vendor/testing/RUNFULLTESTS index f7f4cbb..112717e 100644 --- a/vendor/testing/RUNFULLTESTS +++ b/vendor/testing/RUNFULLTESTS @@ -141,7 +141,9 @@ DEBUG("Running tests:\n"); DEBUG("-" x 78, "\n"); $ENV{'PATH'}="$opts{'builddir'}/agent/.libs:$opts{'builddir'}/apps/.libs:$opts{'builddir'}:$ENV{'PATH'}"; -$ENV{'LD_LIBRARY_PATH'}=`find $opts{'builddir'} -name '*.so' | grep -v NetSNMP/agent/default_store | sed 's,/[^/]*\$,,' | sort -u | tr '\n' :`; +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"); @@ -207,7 +209,7 @@ sub decide_exec { sub configured_with { my ($opt) = @_; - my $cfglog = "$opts{'srcdir'}/config.log"; + my $cfglog = "$opts{'builddir'}/config.log"; if (open my $fh, $cfglog) { while (my $line = <$fh>) { diff --git a/vendor/testing/fulltests/default/T0142snmpv2csetnull_simple b/vendor/testing/fulltests/default/T0142snmpv2csetnull_simple new file mode 100644 index 0000000..0f1b8f3 --- /dev/null +++ b/vendor/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/vendor/testing/fulltests/default/T0222snmpv3bulkget_simple b/vendor/testing/fulltests/default/T0222snmpv3bulkget_simple index 9b3527a..bc9225f 100644 --- a/vendor/testing/fulltests/default/T0222snmpv3bulkget_simple +++ b/vendor/testing/fulltests/default/T0222snmpv3bulkget_simple @@ -10,14 +10,12 @@ SKIPIFNOT USING_MIBII_SYSTEM_MIB_MODULE # Begin test # -DEFAUTHTYPE=SHA -DEFPRIVTYPE=AES # standard V3 configuration: . ./Sv3config STARTAGENT -CAPTURE "snmpbulkget $SNMP_FLAGS -On -Cn1 -Cr1472 $PRIVTESTARGS $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" +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 diff --git a/vendor/testing/fulltests/default/T032snmpv3engineidchange_simple b/vendor/testing/fulltests/default/T032snmpv3engineidchange_simple new file mode 100644 index 0000000..2ef89a5 --- /dev/null +++ b/vendor/testing/fulltests/default/T032snmpv3engineidchange_simple @@ -0,0 +1,74 @@ +#!/bin/sh + +. ../support/simple_eval_tools.sh + +HEADER SNMPv3 exactEngineID change and SIGHUP + +SKIPIF NETSNMP_DISABLE_SET_SUPPORT +SKIPIF NETSNMP_NO_WRITE_SUPPORT +SKIPIFNOT USING_SNMPV3_USMUSER_MODULE +SKIPIFNOT NETSNMP_CAN_DO_CRYPTO +SKIPIFNOT NETSNMP_ENABLE_SCAPI_AUTHPRIV + +# +# Begin test +# + +# standard SNMPv3 USM agent configuration +DEFSECURITYLEVEL=authPriv +. ./Sv3usmconfigagent + +# test user +NEWUSER=newtestuser +NEWAUTHPASS=newauthpass +NEWPRIVPASS=newprivpass + +#The "exactEngineID" +AGENT_ENGINEID=0x8000b85c03049081004b00 +AGENT_ENGINEID_NEW=0x8000b85c03049081004b01 + +#Add user in snmpd.conf and start the agent + +CONFIGAGENT exactEngineID $AGENT_ENGINEID +CONFIGAGENT createUser $NEWUSER $DEFAUTHTYPE $NEWAUTHPASS $DEFPRIVTYPE $NEWPRIVPASS +CONFIGAGENT rouser $NEWUSER priv + +# Start the agent +STARTAGENT + +#Perform snmpget with the configured 'exactEngineID' +CAPTURE "snmpget -On $SNMP_FLAGS -v 3 -u $NEWUSER -l ap -a $DEFAUTHTYPE \ +-A $NEWAUTHPASS -x $DEFPRIVTYPE -X $NEWPRIVPASS -e $AGENT_ENGINEID \ +$SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT 1.3.6.1.6.3.10.2.1.1.0" +CHECKORDIE ".1.3.6.1.6.3.10.2.1.1.0 = Hex-STRING: 80 00 B8 5C 03 04 90 81 00 4B 00" + +#Remove the old exactEngineID i.e $AGENT_ENGINEID +sed '/exactEngineID/d' $SNMP_CONFIG_FILE >$SNMP_CONFIG_FILE.new +mv $SNMP_CONFIG_FILE.new $SNMP_CONFIG_FILE + +#Modify the 'exactEngineID' to a new value +CONFIGAGENT exactEngineID $AGENT_ENGINEID_NEW + +#Send SIGHUP and validate the snmpget with the modified and the old 'exactEngineID' +if ISDEFINED HAVE_SIGHUP; then + +HUPAGENT +DELAY + +#Validate snmpget with MODIFIED 'exactEngineID' +CAPTURE "snmpget -On $SNMP_FLAGS -v 3 -u $NEWUSER -l ap -a $DEFAUTHTYPE \ +-A $NEWAUTHPASS -x $DEFPRIVTYPE -X $NEWPRIVPASS -e $AGENT_ENGINEID_NEW \ +$SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT 1.3.6.1.6.3.10.2.1.1.0" +CHECKORDIE ".1.3.6.1.6.3.10.2.1.1.0 = Hex-STRING: 80 00 B8 5C 03 04 90 81 00 4B 01" + +#Validate snmpget with OLD 'exactEngineID' +#snmpget should timeout with OLD enginID. +CAPTURE "snmpget -On $SNMP_FLAGS -v 3 -u $NEWUSER -l ap -a $DEFAUTHTYPE \ +-A $NEWAUTHPASS -x $DEFPRIVTYPE -X $NEWPRIVPASS -e $AGENT_ENGINEID \ +$SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT 1.3.6.1.6.3.10.2.1.1.0" +CHECKORDIE "Timeout" +fi + +## stop agent and finish +STOPAGENT +FINISHED diff --git a/vendor/testing/fulltests/default/T055agentv1mintrap_simple b/vendor/testing/fulltests/default/T055agentv1mintrap_simple index 7026dcb..4a1c0e1 100644 --- a/vendor/testing/fulltests/default/T055agentv1mintrap_simple +++ b/vendor/testing/fulltests/default/T055agentv1mintrap_simple @@ -5,8 +5,6 @@ HEADER snmpv1 traps are sent by snmpd without notification mib support SKIPIFNOT USING_EXAMPLES_EXAMPLE_MODULE -# To do: figure out why this test fails with Xcode 12. -[ "${TRAVIS_OS_NAME}" = "osx" ] && SKIP "Skipping T055 on OS/X" # # Begin test diff --git a/vendor/testing/fulltests/default/T056agentv2cmintrap_simple b/vendor/testing/fulltests/default/T056agentv2cmintrap_simple index 7292853..73c7a23 100644 --- a/vendor/testing/fulltests/default/T056agentv2cmintrap_simple +++ b/vendor/testing/fulltests/default/T056agentv2cmintrap_simple @@ -5,8 +5,6 @@ HEADER snmpv2c traps are sent by snmpd without notification mib support SKIPIFNOT USING_EXAMPLES_EXAMPLE_MODULE -# To do: figure out why this test fails with Xcode 12. -[ "${TRAVIS_OS_NAME}" = "osx" ] && SKIP "Skipping T056 on OS/X" # # Begin test diff --git a/vendor/testing/fulltests/default/T113agentxtrap_simple b/vendor/testing/fulltests/default/T113agentxtrap_simple index 4fa5e2f..e4c6c92 100644 --- a/vendor/testing/fulltests/default/T113agentxtrap_simple +++ b/vendor/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/vendor/testing/fulltests/default/T114agentxagentxtrap_simple b/vendor/testing/fulltests/default/T114agentxagentxtrap_simple index fbcd76a..a814236 100644 --- a/vendor/testing/fulltests/default/T114agentxagentxtrap_simple +++ b/vendor/testing/fulltests/default/T114agentxagentxtrap_simple @@ -10,7 +10,7 @@ SKIPIFNOT USING_AGENTX_MASTER_MODULE # Begin test # -# start the trap demon +# start the trap daemon CONFIGTRAPD disableAuthorization yes STARTTRAPD @@ -33,7 +33,7 @@ CAPTURE "agentxtrap $AGENTX_SERVER 1.3.6.1.4.1.8072.9999.9999.0 0.0 s mostly_har # stop the master agent STOPAGENT -# stop the trap demon +# stop the trap daemon STOPTRAPD # Check that the trap was received diff --git a/vendor/testing/fulltests/default/T181trap2sinkclientaddr6_simple b/vendor/testing/fulltests/default/T181trap2sinkclientaddr6_simple index 7459a37..541e5d4 100644 --- a/vendor/testing/fulltests/default/T181trap2sinkclientaddr6_simple +++ b/vendor/testing/fulltests/default/T181trap2sinkclientaddr6_simple @@ -5,6 +5,7 @@ HEADER Agent uses clientaddr for v6 trapsink source SKIPIF NETSNMP_DISABLE_SNMPV2C +SKIPIFNOT NETSNMP_TRANSPORT_UDPIPV6_DOMAIN . ./S180trapaddrinfra diff --git a/vendor/testing/fulltests/default/T183trapsessclientaddr6_simple b/vendor/testing/fulltests/default/T183trapsessclientaddr6_simple index d7d9c41..b04a702 100644 --- a/vendor/testing/fulltests/default/T183trapsessclientaddr6_simple +++ b/vendor/testing/fulltests/default/T183trapsessclientaddr6_simple @@ -5,6 +5,7 @@ HEADER Agent uses clientaddr for v6 trapsess source SKIPIF NETSNMP_DISABLE_SNMPV2C +SKIPIFNOT NETSNMP_TRANSPORT_UDPIPV6_DOMAIN . ./S180trapaddrinfra diff --git a/vendor/testing/fulltests/default/T185trapsesssource6_simple b/vendor/testing/fulltests/default/T185trapsesssource6_simple index 60079ab..64a9016 100644 --- a/vendor/testing/fulltests/default/T185trapsesssource6_simple +++ b/vendor/testing/fulltests/default/T185trapsesssource6_simple @@ -5,6 +5,7 @@ HEADER Agent uses -s argument for v6 trapsess source SKIPIF NETSNMP_DISABLE_SNMPV2C +SKIPIFNOT NETSNMP_TRANSPORT_UDPIPV6_DOMAIN . ./S180trapaddrinfra diff --git a/vendor/testing/fulltests/default/T200snmpv2cwalkall_simple b/vendor/testing/fulltests/default/T200snmpv2cwalkall_simple index afe0c9b..5d5f16f 100644 --- a/vendor/testing/fulltests/default/T200snmpv2cwalkall_simple +++ b/vendor/testing/fulltests/default/T200snmpv2cwalkall_simple @@ -4,8 +4,6 @@ HEADER "full snmpwalk (SNMPv2c) against agent (may take time)" -[ "${TRAVIS_OS_NAME}" = "osx" ] && SKIP "Skipping MIB walk on OS/X" - if test `uname -s` = "HP-UX" ; then if test `id -u` != "0" ; then # The agent needs to be run as root - else force skip diff --git a/vendor/testing/fulltests/snmpv3/T010scapitest_capp.c b/vendor/testing/fulltests/snmpv3/T010scapitest_capp.c index 713f74b..f790b6b 100644 --- a/vendor/testing/fulltests/snmpv3/T010scapitest_capp.c +++ b/vendor/testing/fulltests/snmpv3/T010scapitest_capp.c @@ -43,7 +43,7 @@ #include #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif @@ -154,7 +154,7 @@ int main(int argc, char **argv) { int rval = SNMPERR_SUCCESS; - char ch; + int ch; local_progname = argv[0]; @@ -304,7 +304,7 @@ test_dokeyedhash(void) auth_idx = 0, mlcount = 0; /* MAC Length count. */ size_t hblen; /* Hash Buffer length. */ - netsnmp_auth_alg_info *ai; + const netsnmp_auth_alg_info *ai; u_int hashbuf_len[] = { LOCAL_MAXBUF, USM_MD5_AND_SHA_AUTH_LEN, @@ -400,7 +400,7 @@ test_docrypt(void) { int rval, index = 0, secret_len, iv_len, bigstring_len = strlen((const char *) BIGSTRING); - netsnmp_priv_alg_info *pi; + const netsnmp_priv_alg_info *pi; size_t buf_len, cryptbuf_len; u_char buf[LOCAL_MAXBUF], diff --git a/vendor/testing/fulltests/snmpv3/T020hashtests_capp.c b/vendor/testing/fulltests/snmpv3/T020hashtests_capp.c index 0e2092d..5031a35 100644 --- a/vendor/testing/fulltests/snmpv3/T020hashtests_capp.c +++ b/vendor/testing/fulltests/snmpv3/T020hashtests_capp.c @@ -28,8 +28,8 @@ main(int argc, char **argv) { u_char buf[] = "wes hardaker"; u_char MAC[MAX_HASH_LEN]; size_t MAC_LEN = sizeof(MAC); - u_char sha1key[20] = "55555555555555555555"; - u_char md5key[16] = "5555555555555555"; + u_char sha1key[20] __attribute__((nonstring)) = "55555555555555555555"; + u_char md5key[16] __attribute__((nonstring)) = "5555555555555555"; u_char sha1proper[20] = { 0x4a, 0x55, 0x2f, 0x65, 0x79, 0x3a, 0x49, 0x35, 0x37, 0x91, 0x51, 0x1d, diff --git a/vendor/testing/fulltests/snmpv3/T040keymanagetest_capp.c b/vendor/testing/fulltests/snmpv3/T040keymanagetest_capp.c index 15b9cf9..8b9ea48 100644 --- a/vendor/testing/fulltests/snmpv3/T040keymanagetest_capp.c +++ b/vendor/testing/fulltests/snmpv3/T040keymanagetest_capp.c @@ -31,7 +31,7 @@ #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include @@ -110,7 +110,7 @@ int main(int argc, char **argv) { int rval = SNMPERR_SUCCESS, failcount = 0; - char ch; + int ch; local_progname = argv[0]; optarg = NULL; diff --git a/vendor/testing/fulltests/snmpv3/T050etimetest_capp.c b/vendor/testing/fulltests/snmpv3/T050etimetest_capp.c index 5890ce8..9a3e460 100644 --- a/vendor/testing/fulltests/snmpv3/T050etimetest_capp.c +++ b/vendor/testing/fulltests/snmpv3/T050etimetest_capp.c @@ -29,7 +29,7 @@ #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif @@ -95,8 +95,9 @@ static int test_etime(void); int main(int argc, char **argv) { - int rval = SNMPERR_SUCCESS, failcount = 0; - char ch; + int rval = SNMPERR_SUCCESS; + int failcount NETSNMP_ATTRIBUTE_UNUSED = 0; + int ch; local_progname = argv[0]; diff --git a/vendor/testing/fulltests/support/clib_build b/vendor/testing/fulltests/support/clib_build index 7df2a99..f4dcd39 100644 --- a/vendor/testing/fulltests/support/clib_build +++ b/vendor/testing/fulltests/support/clib_build @@ -15,7 +15,7 @@ cat >>"$2.c" < #include #include -#include +#include "snmplib/transports/snmpIPBaseDomain.h" #include /* testing specific header */ diff --git a/vendor/testing/fulltests/support/myip b/vendor/testing/fulltests/support/myip index bc6373b..9f72f00 100644 --- a/vendor/testing/fulltests/support/myip +++ b/vendor/testing/fulltests/support/myip @@ -9,8 +9,10 @@ use strict; use warnings; import IO::Socket::INET6; -if (eval "Socket6->import(qw(AF_INET6 inet_ntop inet_pton pack_sockaddr_in6 - sockaddr_in6))") { +# For older Perl versions AF_INET6 is defined in the Socket6 package. For newer +# Perl versions all IPv6 functionality we need is defined in the Socket package. +if (eval "use Socket6 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 diff --git a/vendor/testing/fulltests/support/simple_TESTCONF.sh b/vendor/testing/fulltests/support/simple_TESTCONF.sh index f9f1e43..ecc67ef 100644 --- a/vendor/testing/fulltests/support/simple_TESTCONF.sh +++ b/vendor/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 diff --git a/vendor/testing/fulltests/support/simple_eval_tools.sh b/vendor/testing/fulltests/support/simple_eval_tools.sh index 7773ca4..e54f7ab 100644 --- a/vendor/testing/fulltests/support/simple_eval_tools.sh +++ b/vendor/testing/fulltests/support/simple_eval_tools.sh @@ -525,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 @@ -536,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- @@ -686,8 +684,7 @@ FINISHED() { rm -f core fi echo "$headerStr...FAIL" >> $SNMP_TMPDIR/invoked - if [ -n "${TRAVIS_OS_NAME}" ] || [ -n "$APPVEYOR" ] || - [ -n "$CIRRUS_CI" ]; then + if [ -n "$APPVEYOR" ] || [ -n "$CIRRUS_CI" ]; then { find "$SNMP_TMPDIR" -type f | while read -r f; do diff --git a/vendor/testing/fulltests/support/simple_run b/vendor/testing/fulltests/support/simple_run index 84518bd..e02d16b 100644 --- a/vendor/testing/fulltests/support/simple_run +++ b/vendor/testing/fulltests/support/simple_run @@ -81,7 +81,7 @@ for dd in agent bin sbin ; do 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 diff --git a/vendor/testing/fulltests/tls/T300TlsPerl.t b/vendor/testing/fulltests/tls/T300TlsPerl.t index 5602ebe..fb8edb9 100644 --- a/vendor/testing/fulltests/tls/T300TlsPerl.t +++ b/vendor/testing/fulltests/tls/T300TlsPerl.t @@ -5,11 +5,4 @@ $agentaddress = "tlstcp:localhost:9875"; $feature = "NETSNMP_TRANSPORT_TLSTCP_DOMAIN"; -if (!defined($ENV{'TRAVIS_OS_NAME'})) { - do "$ENV{'srcdir'}/testing/fulltests/tls/S300tlsperl.pl"; -} else { - # Skip this test on Travis CI - use Test; - plan(tests => 1); - ok(1); -} +do "$ENV{'srcdir'}/testing/fulltests/tls/S300tlsperl.pl"; diff --git a/vendor/testing/fulltests/unit-tests/T001defaultstore_clib.c b/vendor/testing/fulltests/unit-tests/T001defaultstore_clib.c index 0144f7d..541309c 100644 --- a/vendor/testing/fulltests/unit-tests/T001defaultstore_clib.c +++ b/vendor/testing/fulltests/unit-tests/T001defaultstore_clib.c @@ -11,7 +11,7 @@ for(i = 0; i < NETSNMP_DS_MAX_IDS; i++) { ("default store boolean: setting %d/%d returned failure", i, j)); OKF(SNMPERR_SUCCESS == netsnmp_ds_set_int(i, j, i*j), ("default store int: setting %d/%d returned failure", i, j)); - sprintf(buf,"%d/%d", i, j); + snprintf(buf, sizeof(buf), "%d/%d", i, j); OKF(SNMPERR_SUCCESS == netsnmp_ds_set_string(i, j, buf), ("default store string: setting %d/%d returned failure", i, j)); } @@ -26,7 +26,7 @@ for(i = 0; i < NETSNMP_DS_MAX_IDS; i++) { ("default store boolean %d/%d was the expected value", i, j)); OKF(netsnmp_ds_get_int(i, j) == (i*j), ("default store int %d/%d was the expected value", i, j)); - sprintf(buf,"%d/%d", i, j); + snprintf(buf, sizeof(buf), "%d/%d", i, j); OKF(strcmp(netsnmp_ds_get_string(i, j), buf) == 0, ("default store string %d/%d was the expected value", i, j)); } diff --git a/vendor/testing/fulltests/unit-tests/T002containers_clib.c b/vendor/testing/fulltests/unit-tests/T002containers_clib.c index 99b2e94..744c988 100644 --- a/vendor/testing/fulltests/unit-tests/T002containers_clib.c +++ b/vendor/testing/fulltests/unit-tests/T002containers_clib.c @@ -5,7 +5,7 @@ void *p; init_snmp("container-test"); container = netsnmp_container_find("fifo"); -container->compare = (netsnmp_container_compare*) strcmp; +container->compare = netsnmp_str_compare; CONTAINER_INSERT(container, "foo"); CONTAINER_INSERT(container, "bar"); diff --git a/vendor/testing/fulltests/unit-tests/T004snmp_enum_clib.c b/vendor/testing/fulltests/unit-tests/T004snmp_enum_clib.c index 4836877..03b5d10 100644 --- a/vendor/testing/fulltests/unit-tests/T004snmp_enum_clib.c +++ b/vendor/testing/fulltests/unit-tests/T004snmp_enum_clib.c @@ -32,34 +32,35 @@ char tmp_persist_file[256]; char *se_find_result; -sprintf(tmp_persist_file, "/tmp/snmp-enum-unit-test-%d", getpid()); +snprintf(tmp_persist_file, sizeof(tmp_persist_file), + "/tmp/snmp-enum-unit-test-%ld", (long)getpid()); netsnmp_setenv("SNMP_PERSISTENT_FILE", tmp_persist_file, 1); init_snmp_enum("snmp"); STORE_AND_COMPARE(1, 1, "enum 1:1|"); -se_add_pair(1, 1, strdup("hi"), 1); +OK(se_add_pair(1, 1, strdup("hi"), 1) == SE_OK, "add to list"); STORE_AND_COMPARE(1, 1, "enum 1:1 1:hi|"); -se_add_pair(1, 1, strdup("there"), 2); +OK(se_add_pair(1, 1, strdup("there"), 2) == SE_OK, "add to list"); STORE_AND_COMPARE(1, 1, "enum 1:1 1:hi 2:there|"); -se_add_pair(1, 1, strdup(LONG_STRING), 3); -se_add_pair(1, 1, strdup(LONG_STRING), 4); -se_add_pair(1, 1, strdup(LONG_STRING), 5); -se_add_pair(1, 1, strdup(LONG_STRING), 6); -se_add_pair(1, 1, strdup(LONG_STRING), 7); -se_add_pair(1, 1, strdup(LONG_STRING), 8); -se_add_pair(1, 1, strdup(LONG_STRING), 9); +OK(se_add_pair(1, 1, strdup(LONG_STRING), 3) == SE_OK, "add to list"); +OK(se_add_pair(1, 1, strdup(LONG_STRING), 4) == SE_OK, "add to list"); +OK(se_add_pair(1, 1, strdup(LONG_STRING), 5) == SE_OK, "add to list"); +OK(se_add_pair(1, 1, strdup(LONG_STRING), 6) == SE_OK, "add to list"); +OK(se_add_pair(1, 1, strdup(LONG_STRING), 7) == SE_OK, "add to list"); +OK(se_add_pair(1, 1, strdup(LONG_STRING), 8) == SE_OK, "add to list"); +OK(se_add_pair(1, 1, strdup(LONG_STRING), 9) == SE_OK, "add to list"); STORE_AND_COMPARE(1, 1, "enum 1:1 1:hi 2:there 3:" LONG_STRING " 4:" LONG_STRING " 5:" LONG_STRING " 6:" LONG_STRING " 7:" LONG_STRING " 8:" LONG_STRING " 9:" LONG_STRING "|"); -se_add_pair(1, 1, strdup(LONG_STRING), 10); +OK(se_add_pair(1, 1, strdup(LONG_STRING), 10) == SE_OK, "add to list"); STORE_AND_COMPARE(1, 1, "enum 1:1 1:hi 2:there 3:" LONG_STRING " 4:" LONG_STRING " 5:" LONG_STRING " 6:" LONG_STRING " 7:" LONG_STRING @@ -72,9 +73,11 @@ OK(strcmp(se_find_label(1, 1, 2), "there") == 0, "lookup by string #1 should be the proper number"); -se_add_pair_to_slist("testing", strdup(STRING1), 42); -se_add_pair_to_slist("testing", strdup(STRING2), 2); -se_add_pair_to_slist("testing", strdup(STRING3), 2); +OK(se_add_pair_to_slist("testing", strdup(STRING1), 42) == SE_OK, + "add to list"); +OK(se_add_pair_to_slist("testing", strdup(STRING2), 2) == SE_OK, "add to list"); +OK(se_add_pair_to_slist("testing", strdup(STRING3), 2) == SE_ALREADY_THERE, + "add to list"); OK(se_find_value_in_slist("testing", STRING1) == 42, "lookup by number should be the proper string"); diff --git a/vendor/testing/fulltests/unit-tests/T011snmp_old_api_registration_cagentlib.c b/vendor/testing/fulltests/unit-tests/T011snmp_old_api_registration_cagentlib.c index 2c1d084..9aac696 100644 --- a/vendor/testing/fulltests/unit-tests/T011snmp_old_api_registration_cagentlib.c +++ b/vendor/testing/fulltests/unit-tests/T011snmp_old_api_registration_cagentlib.c @@ -44,3 +44,4 @@ netsnmp_register_old_api("exp.327.b", OK(res == MIB_DUPLICATE_REGISTRATION, "Handler registration (2)."); snmp_shutdown("snmp"); +free(sess); diff --git a/vendor/testing/fulltests/unit-tests/T012binary_array_oid_clib.c b/vendor/testing/fulltests/unit-tests/T012binary_array_oid_clib.c index aeeb502..d200613 100644 --- a/vendor/testing/fulltests/unit-tests/T012binary_array_oid_clib.c +++ b/vendor/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/vendor/testing/fulltests/unit-tests/T013binary_array_string_clib.c b/vendor/testing/fulltests/unit-tests/T013binary_array_string_clib.c index cc4361b..19a01c6 100644 --- a/vendor/testing/fulltests/unit-tests/T013binary_array_string_clib.c +++ b/vendor/testing/fulltests/unit-tests/T013binary_array_string_clib.c @@ -18,7 +18,7 @@ int i; init_snmp(test_name); c = netsnmp_container_get_binary_array(); -c->compare = (netsnmp_container_compare*)strcmp; +c->compare = netsnmp_str_compare; for (i = 0; i < sizeof(b)/sizeof(b[0]); ++i) CONTAINER_INSERT(c, b[i]); diff --git a/vendor/testing/fulltests/unit-tests/T014gethostbyaddr_clib.c b/vendor/testing/fulltests/unit-tests/T014gethostbyaddr_clib.c index 13a2b5f..f29faf4 100644 --- a/vendor/testing/fulltests/unit-tests/T014gethostbyaddr_clib.c +++ b/vendor/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; @@ -57,7 +57,7 @@ SOCK_STARTUP; if (bind(s, (struct sockaddr *) &sin6_addr, sizeof(sin6_addr)) >= 0) { addr = NULL; - strcpy(buf, "(failed)"); + strncpy(buf, "(failed)", sizeof(buf)); h = netsnmp_gethostbyaddr(&v6loop, sizeof(v6loop), AF_INET6); if (h) { memset(&hints, 0, sizeof(hints)); @@ -74,7 +74,7 @@ SOCK_STARTUP; } } if (!ap) - strcpy(buf, "no AF_INET6 address found"); + strncpy(buf, "no AF_INET6 address found", sizeof(buf)); } else { snprintf(buf, sizeof(buf), "getaddrinfo() failed: %s", strerror(errno)); diff --git a/vendor/testing/fulltests/unit-tests/T016read_config_clib.c b/vendor/testing/fulltests/unit-tests/T016read_config_clib.c index 06ceed5..9476a94 100644 --- a/vendor/testing/fulltests/unit-tests/T016read_config_clib.c +++ b/vendor/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/vendor/testing/fulltests/unit-tests/T018read_config_capp.c b/vendor/testing/fulltests/unit-tests/T018read_config_capp.c index 25f014b..b26be1c 100644 --- a/vendor/testing/fulltests/unit-tests/T018read_config_capp.c +++ b/vendor/testing/fulltests/unit-tests/T018read_config_capp.c @@ -53,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"); diff --git a/vendor/testing/fulltests/unit-tests/T021netsnmp_sprint_integer_clib.c b/vendor/testing/fulltests/unit-tests/T021netsnmp_sprint_integer_clib.c new file mode 100644 index 0000000..7cf232f --- /dev/null +++ b/vendor/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/vendor/testing/fulltests/unit-tests/T021netsnmp_sprint_realloc_no_type_clib.c b/vendor/testing/fulltests/unit-tests/T021netsnmp_sprint_realloc_no_type_clib.c index 57793d4..1484029 100644 --- a/vendor/testing/fulltests/unit-tests/T021netsnmp_sprint_realloc_no_type_clib.c +++ b/vendor/testing/fulltests/unit-tests/T021netsnmp_sprint_realloc_no_type_clib.c @@ -15,6 +15,7 @@ size_t buf_len, out_len; int buf_overflow, i; char mibdir[PATH_MAX]; int ret; +netsnmp_variable_list variable; snprintf(mibdir, sizeof(mibdir), "%s/%s", ABS_SRCDIR, "mibs"); netsnmp_ds_set_string(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_MIBDIRS, mibdir); @@ -22,7 +23,6 @@ netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT, TRUE) init_snmp("T021"); -netsnmp_variable_list variable; variable.next_variable = NULL; variable.name = objid; variable.name_length = sizeof(objid) / sizeof(objid[0]); diff --git a/vendor/testing/fulltests/unit-tests/T022netsnmp_parse_ep_str_clib.c b/vendor/testing/fulltests/unit-tests/T022netsnmp_parse_ep_str_clib.c index acf731c..a727bde 100644 --- a/vendor/testing/fulltests/unit-tests/T022netsnmp_parse_ep_str_clib.c +++ b/vendor/testing/fulltests/unit-tests/T022netsnmp_parse_ep_str_clib.c @@ -5,7 +5,7 @@ struct one_test_data { const char *in; int res; - struct netsnmp_ep_str expected; + struct { const char *addr; const char *iface; const char *port; } expected; }; static struct one_test_data test_data[] = { @@ -44,7 +44,8 @@ SOCK_STARTUP; 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(strcmp(ep_str.addr, p->expected.addr) == 0, + 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, @@ -53,6 +54,7 @@ SOCK_STARTUP; 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); } } diff --git a/vendor/testing/fulltests/unit-tests/T026read_config_clib.c b/vendor/testing/fulltests/unit-tests/T026read_config_clib.c new file mode 100644 index 0000000..d10ed04 --- /dev/null +++ b/vendor/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/vendor/testing/fulltests/unit-tests/T027read_mib_clib.c b/vendor/testing/fulltests/unit-tests/T027read_mib_clib.c new file mode 100644 index 0000000..04cd6f6 --- /dev/null +++ b/vendor/testing/fulltests/unit-tests/T027read_mib_clib.c @@ -0,0 +1,43 @@ +/* + * HEADER Testing read_mib() + * + * See also https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=37187. + * See also https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39320. + */ + +static const char* mibs[] = { + "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", + "102H::={1365\x93""-72}1H::={1\x93""1}0H::={0\x93""0}" +}; + +char *path; +FILE *f; +int i, res; + +res = asprintf(&path, "/tmp/read-mib-input-%d", getpid()); +OKF(res >= 0, ("asprintf() returned %d", res)); +for (i = 0; i < sizeof(mibs) / sizeof(mibs[0]); i++) { + f = fopen(path, "wb"); + OKF(f != NULL, ("fopen() %s", f ? "succeeded" : "failed")); + res = fwrite(mibs[i], strlen(mibs[i]), 1, f); + OKF(res == 1, ("fwrite() %s", res == 1 ? "succeeded" : "failed")); + fclose(f); + read_mib(path); + unlink(path); +} +free(path); diff --git a/vendor/testing/fulltests/unit-tests/T030snmp_handler_unregistration_cagentlib.c b/vendor/testing/fulltests/unit-tests/T030snmp_handler_unregistration_cagentlib.c new file mode 100644 index 0000000..e85a5c6 --- /dev/null +++ b/vendor/testing/fulltests/unit-tests/T030snmp_handler_unregistration_cagentlib.c @@ -0,0 +1,30 @@ +/* + * HEADER Testing SNMP handler registration and unregistration. + * See also https://github.com/net-snmp/net-snmp/issues/983. + */ + +static const oid Oid[] = { 1, 3, 6, 1, 4, 1, 8072, 2, 4, 1, 1, 2, 0 }; +netsnmp_handler_registration *handler; +netsnmp_watcher_info *watcher; +int res; + +init_snmp("snmp"); +handler = netsnmp_create_handler_registration("handler", NULL, Oid, + OID_LENGTH(Oid), HANDLER_CAN_RWRITE); +OK(handler != NULL, "Handler registration"); +if (!handler) + goto shutdown; + +handler->contextName = strdup("contextName"); +watcher = netsnmp_create_watcher_info(NULL, 0, ASN_INTEGER, WATCHER_FIXED_SIZE); +OK(watcher, "Watcher creation"); +if (!watcher) + goto unregister; +res = netsnmp_register_watched_instance2(handler, watcher); +OK(res == MIB_REGISTERED_OK, "Register watched instance"); + +unregister: +netsnmp_unregister_handler(handler); + +shutdown: +snmp_shutdown("snmp"); diff --git a/vendor/testing/fulltests/unit-tests/T102pdu_build_clib.c b/vendor/testing/fulltests/unit-tests/T102pdu_build_clib.c index 91ea3ef..b3b61f4 100644 --- a/vendor/testing/fulltests/unit-tests/T102pdu_build_clib.c +++ b/vendor/testing/fulltests/unit-tests/T102pdu_build_clib.c @@ -1,13 +1,13 @@ /* HEADER PDU building */ -SOCK_STARTUP; - netsnmp_pdu *pdu; u_char *packet; size_t packet_len, offset = 0; netsnmp_session session, *ss; int rc; +SOCK_STARTUP; + init_snmp("testing"); snmp_sess_init(&session); #if !defined(NETSNMP_DISABLE_SNMPV2C) @@ -35,6 +35,7 @@ pdu->version = session.version; OKF((pdu != NULL), ("Creating a GET PDU failed")); rc = snmp_build(&packet, &packet_len, &offset, ss, pdu); +snmp_free_pdu(pdu); #ifndef NETSNMP_NOTIFY_ONLY OKF((rc == SNMPERR_SUCCESS), @@ -45,8 +46,11 @@ OKF((rc != SNMPERR_SUCCESS), #endif /* NETSNMP_NOTIFY_ONLY */ offset = 0; +pdu = snmp_pdu_create(SNMP_MSG_GET); +pdu->version = session.version; pdu->command = 163; /* a SET message */ rc = snmp_build(&packet, &packet_len, &offset, ss, pdu); +snmp_free_pdu(pdu); #ifndef NETSNMP_NO_WRITE_SUPPORT OKF((rc == SNMPERR_SUCCESS), @@ -59,8 +63,11 @@ OKF((rc != SNMPERR_SUCCESS), offset = 0; +pdu = snmp_pdu_create(SNMP_MSG_GET); +pdu->version = session.version; pdu->command = SNMP_MSG_INFORM; rc = snmp_build(&packet, &packet_len, &offset, ss, pdu); +snmp_free_pdu(pdu); OKF((rc == SNMPERR_SUCCESS), ("Building an INFORM PDU/packet should have succeed: %d", rc)); diff --git a/vendor/testing/fulltests/unit-tests/T104agentx_parse_cagentlib.c b/vendor/testing/fulltests/unit-tests/T104agentx_parse_cagentlib.c index d179033..4ea78b6 100644 --- a/vendor/testing/fulltests/unit-tests/T104agentx_parse_cagentlib.c +++ b/vendor/testing/fulltests/unit-tests/T104agentx_parse_cagentlib.c @@ -28,3 +28,5 @@ fprintf(stderr, "rc = %d\n", rc); fflush(stderr); OKF(rc != 0, ("Parsing of AgentX data failed")); + +netsnmp_cleanup_session(&session); diff --git a/vendor/testing/fulltests/unit-tests/T105trap_parse_clib.c b/vendor/testing/fulltests/unit-tests/T105trap_parse_clib.c new file mode 100644 index 0000000..8c6bf96 --- /dev/null +++ b/vendor/testing/fulltests/unit-tests/T105trap_parse_clib.c @@ -0,0 +1,44 @@ +/* HEADER Parsing of an SNMP trap with no varbinds */ +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; +netsnmp_pdu *pdu = calloc(1, sizeof(*pdu)); +int rc; + +snmp_set_do_debugging(TRUE); +debug_register_tokens("dumpv_recv,dumpv_send,asn,recv"); +memset(&session, 0, sizeof(session)); +snmp_sess_init(&session); +rc = snmp_parse(NULL, &session, pdu, trap_pdu, trap_pdu_length); + +OKF((rc == 0), ("Parsing of a trap PDU")); + +snmp_free_pdu(pdu); + +netsnmp_cleanup_session(&session); diff --git a/vendor/win32/Configure b/vendor/win32/Configure index b73370c..37f597f 100644 --- a/vendor/win32/Configure +++ b/vendor/win32/Configure @@ -191,6 +191,8 @@ my $perl_define = 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) ], diff --git a/vendor/win32/build.pl b/vendor/win32/build.pl index 2d1f9d9..1624d4b 100644 --- a/vendor/win32/build.pl +++ b/vendor/win32/build.pl @@ -14,21 +14,21 @@ 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") { +if ($target_arch ne "x86" && $target_arch ne "x64" && $target_arch ne "arm64") { print "Error: unsupported target architecture $target_arch\n"; die; } my @perl_arch = split(/-/, $Config{archname}); my $openssl = false; -my $default_openssldir = $target_arch eq "x64" ? +my $default_openssldir = $target_arch eq "x64" || $target_arch eq "arm64" ? "C:\\OpenSSL-Win64" : "C:\\OpenSSL-Win32"; my $default_opensslincdir = $default_openssldir . "\\include"; my $opensslincdir = $default_opensslincdir; -my $default_openssllibdir = $default_openssldir . "\\lib\\VC"; +my $default_openssllibdir = $default_openssldir . "\\lib\\VC\\x64"; 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; @@ -58,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: "; @@ -95,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") { @@ -152,10 +148,15 @@ die; } +my $openssllibsubdir = $link_dynamic ? "\\MD" : "\\MT"; +if ($debug) { + $openssllibsubdir .= "d"; +} + my $linktype = $link_dynamic ? "dynamic" : "static"; $configOpts = (($openssl ? "--with-ssl --enable-blumenthal-aes" : "") . " " . ($opensslincdir ? "--with-sslincdir=$opensslincdir" : "") . " " . - ($openssllibdir ? "--with-ssllibdir=$openssllibdir" : "") . " " . + ($openssllibdir ? "--with-ssllibdir=$openssllibdir" . "$openssllibsubdir" : "") . " " . ($sdk ? "--with-sdk" : "") . " " . ($b_ipv6 ? "--with-ipv6" : "") . " " . ($b_winextdll ? "--with-winextdll" : "") . " " . diff --git a/vendor/win32/mib_module_includes.h b/vendor/win32/mib_module_includes.h index 41dc1f9..f4d3c1d 100644 --- a/vendor/win32/mib_module_includes.h +++ b/vendor/win32/mib_module_includes.h @@ -70,7 +70,7 @@ #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/vendor/win32/net-snmp/agent/mib_module_config.h b/vendor/win32/net-snmp/agent/mib_module_config.h index 28f7ba7..2f2e97a 100644 --- a/vendor/win32/net-snmp/agent/mib_module_config.h +++ b/vendor/win32/net-snmp/agent/mib_module_config.h @@ -160,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/vendor/win32/net-snmp/net-snmp-config.h b/vendor/win32/net-snmp/net-snmp-config.h index 1dc5b04..9b8f9d9 100644 --- a/vendor/win32/net-snmp/net-snmp-config.h +++ b/vendor/win32/net-snmp/net-snmp-config.h @@ -96,6 +96,9 @@ 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 */ @@ -207,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 @@ -314,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 */ @@ -642,9 +648,6 @@ /* 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 */ @@ -706,7 +709,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 @@ -1181,7 +1184,7 @@ #if defined(_M_PPC) || defined(_M_MPPC) # define NETSNMP_BIGENDIAN 1 -#elif defined(_M_IX86) || defined(_M_X64) +#elif defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM64) # define NETSNMP_BIGENDIAN 0 #else # error Unknown byte order @@ -1475,6 +1478,9 @@ #define HAVE_AES 1 #endif +/* Define to 1 if you have the `ERR_get_error_all' function. */ +#define HAVE_ERR_GET_ERROR_ALL 1 + #else /* ! NETSNMP_USE_OPENSSL */ /* define if you are using the MD5 code ...*/ @@ -1772,57 +1778,11 @@ enum { #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 +# pragma comment(lib, "libcrypto.lib") +# pragma comment(lib, "libssl.lib") # 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 +# pragma comment(lib, "libcrypto_static.lib") +# pragma comment(lib, "libssl_static.lib") # endif # pragma comment(lib, "gdi32.lib") # pragma comment(lib, "user32.lib") @@ -1839,7 +1799,7 @@ enum { #define NETSNMP_CAN_USE_NLIST #endif -#if HAVE_DMALLOC_H +#ifdef HAVE_DMALLOC_H #define DMALLOC_FUNC_CHECK #endif diff --git a/vendor/win32/net-snmp/net-snmp-config.h.in b/vendor/win32/net-snmp/net-snmp-config.h.in index 9e38a57..d2d0074 100644 --- a/vendor/win32/net-snmp/net-snmp-config.h.in +++ b/vendor/win32/net-snmp/net-snmp-config.h.in @@ -96,6 +96,9 @@ 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 */ @@ -207,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 @@ -314,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 */ @@ -642,9 +648,6 @@ /* 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 */ @@ -706,7 +709,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 @@ -1181,7 +1184,7 @@ #if defined(_M_PPC) || defined(_M_MPPC) # define NETSNMP_BIGENDIAN 1 -#elif defined(_M_IX86) || defined(_M_X64) +#elif defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM64) # define NETSNMP_BIGENDIAN 0 #else # error Unknown byte order @@ -1475,6 +1478,9 @@ #define HAVE_AES 1 #endif +/* Define to 1 if you have the `ERR_get_error_all' function. */ +#define HAVE_ERR_GET_ERROR_ALL 1 + #else /* ! NETSNMP_USE_OPENSSL */ /* define if you are using the MD5 code ...*/ @@ -1772,57 +1778,11 @@ enum { #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 +# pragma comment(lib, "libcrypto.lib") +# pragma comment(lib, "libssl.lib") # 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 +# pragma comment(lib, "libcrypto_static.lib") +# pragma comment(lib, "libssl_static.lib") # endif # pragma comment(lib, "gdi32.lib") # pragma comment(lib, "user32.lib") @@ -1839,7 +1799,7 @@ enum { #define NETSNMP_CAN_USE_NLIST #endif -#if HAVE_DMALLOC_H +#ifdef HAVE_DMALLOC_H #define DMALLOC_FUNC_CHECK #endif From d0b23e0c16a78851d8e725b3553058ca2ee8af9d Mon Sep 17 00:00:00 2001 From: Freddie Akeroyd Date: Tue, 28 Apr 2026 23:15:19 +0100 Subject: [PATCH 2/2] delete generated file --- vendor/win32/net-snmp/net-snmp-config.h | 1908 ----------------------- 1 file changed, 1908 deletions(-) delete mode 100644 vendor/win32/net-snmp/net-snmp-config.h diff --git a/vendor/win32/net-snmp/net-snmp-config.h b/vendor/win32/net-snmp/net-snmp-config.h deleted file mode 100644 index 9b8f9d9..0000000 --- a/vendor/win32/net-snmp/net-snmp-config.h +++ /dev/null @@ -1,1908 +0,0 @@ -/* 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 `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) || defined(_M_ARM64) -# 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 - -/* Define to 1 if you have the `ERR_get_error_all' function. */ -#define HAVE_ERR_GET_ERROR_ALL 1 - -#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 -# pragma comment(lib, "libcrypto.lib") -# pragma comment(lib, "libssl.lib") -# else -# pragma comment(lib, "libcrypto_static.lib") -# pragma comment(lib, "libssl_static.lib") -# 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 */ -