[Pkg-net-snmp-commits] [pkg-net-snmp] 01/06: Imported Upstream version 5.7.3+dfsg

Hideki Yamane henrich at moszumanska.debian.org
Thu May 28 13:52:20 UTC 2015


This is an automated email from the git hooks/post-receive script.

henrich pushed a commit to branch master
in repository pkg-net-snmp.

commit ac870b5736176a341af94d0d53ed560104e57219
Author: Hideki Yamane <henrich at debian.org>
Date:   Tue Apr 28 20:29:48 2015 +0900

    Imported Upstream version 5.7.3+dfsg
---
 .gitignore                                         |    2 +
 CHANGES                                            |  128 +-
 COPYING                                            |   35 +-
 ChangeLog                                          | 3471 +++++++++++++++++++-
 FAQ                                                |    2 +-
 Makefile.in                                        |    6 +-
 Makefile.top                                       |    5 +-
 NEWS                                               |   20 +-
 README                                             |    5 +-
 README.win32                                       |    5 +-
 acconfig.h                                         |    9 -
 agent/Makefile.depend                              |  810 +----
 agent/agent_index.c                                |   28 +-
 agent/agent_registry.c                             |   18 +-
 agent/agent_trap.c                                 |    4 +-
 agent/auto_nlist.c                                 |    1 +
 agent/helpers/Makefile.depend                      |  101 +-
 agent/helpers/instance.c                           |    2 +-
 agent/helpers/old_api.c                            |   17 +-
 agent/helpers/table_data.c                         |    3 +-
 agent/helpers/table_dataset.c                      |   13 +-
 agent/helpers/table_tdata.c                        |    3 +-
 agent/kernel.c                                     |   38 +-
 agent/mibgroup/Makefile.depend                     |  525 ++-
 agent/mibgroup/agent/extend.c                      |   52 +-
 agent/mibgroup/agent/nsCache.c                     |    3 +-
 agent/mibgroup/agent/nsTransactionTable.c          |    1 +
 agent/mibgroup/agentx/agentx_config.c              |    4 +-
 agent/mibgroup/agentx/master_admin.c               |    2 +-
 agent/mibgroup/agentx/subagent.c                   |    2 +-
 agent/mibgroup/disman/event/mteTrigger.c           |   15 +-
 agent/mibgroup/disman/expr/expExpressionConf.c     |    2 +-
 agent/mibgroup/disman/expr/expValue.c              |    6 +-
 .../disman/expression/expExpressionTable.c         |    6 +-
 agent/mibgroup/disman/expression/expObjectTable.c  |   15 +-
 agent/mibgroup/disman/mteObjectsTable.c            |    3 +-
 agent/mibgroup/disman/mteTriggerDeltaTable.c       |    4 +-
 agent/mibgroup/disman/mteTriggerExistenceTable.c   |   24 +-
 agent/mibgroup/disman/mteTriggerTable.c            |   48 +-
 agent/mibgroup/disman/mteTriggerThresholdTable.c   |   42 +-
 agent/mibgroup/disman/nslookup/lookupCtlTable.c    |    2 +-
 agent/mibgroup/disman/ping/pingCtlTable.c          |   35 +-
 .../disman/traceroute/traceRouteCtlTable.c         |   40 +-
 .../etherlike-mib/data_access/dot3stats_linux.c    |   10 +-
 .../dot3StatsTable/dot3StatsTable_data_access.c    |    3 +-
 agent/mibgroup/examples/delayed_instance.c         |    3 +-
 agent/mibgroup/examples/example.c                  |   12 +-
 agent/mibgroup/examples/netSnmpHostsTable.c        |   12 +-
 agent/mibgroup/hardware/cpu/cpu_kstat.c            |    2 +
 agent/mibgroup/hardware/cpu/cpu_linux.c            |   24 +-
 agent/mibgroup/hardware/cpu/cpu_mach.c             |    1 +
 agent/mibgroup/hardware/cpu/cpu_perfstat.c         |    2 +-
 agent/mibgroup/hardware/cpu/cpu_pstat.c            |  100 +-
 agent/mibgroup/hardware/cpu/cpu_sysctl.c           |  117 +-
 agent/mibgroup/hardware/fsys/fsys_getfsstats.c     |   27 +-
 agent/mibgroup/hardware/fsys/fsys_mntctl.c         |    9 +-
 agent/mibgroup/hardware/fsys/fsys_mntent.c         |    8 +-
 agent/mibgroup/hardware/fsys/mnttypes.h            |   12 +
 agent/mibgroup/hardware/fsys/mounts.h              |    6 +
 agent/mibgroup/hardware/memory.h                   |    2 +-
 agent/mibgroup/hardware/memory/hw_mem.c            |    9 +-
 agent/mibgroup/hardware/memory/memory_darwin.c     |   15 +-
 agent/mibgroup/hardware/memory/memory_freebsd.c    |   54 +-
 agent/mibgroup/hardware/memory/memory_netbsd.c     |   16 +-
 agent/mibgroup/host/data_access/swinst_apt.c       |    9 +-
 agent/mibgroup/host/data_access/swinst_darwin.c    |    7 +-
 agent/mibgroup/host/data_access/swinst_pkginfo.c   |  142 +-
 agent/mibgroup/host/data_access/swrun_cygwin.c     |   18 +-
 agent/mibgroup/host/data_access/swrun_darwin.c     |   15 +-
 agent/mibgroup/host/data_access/swrun_kinfo.c      |   87 +-
 agent/mibgroup/host/data_access/swrun_kvm_proc.c   |   18 +-
 .../host/data_access/swrun_procfs_status.c         |   70 +-
 agent/mibgroup/host/data_access/swrun_procinfo.c   |    6 +-
 agent/mibgroup/host/hr_disk.c                      |    6 +
 agent/mibgroup/host/hr_partition.c                 |    4 +
 agent/mibgroup/host/hr_print.c                     |    5 +-
 agent/mibgroup/host/hr_swinst.c                    |    7 +-
 agent/mibgroup/host/hr_swrun.c                     |   33 +
 agent/mibgroup/host/hr_system.c                    |   28 +-
 agent/mibgroup/if-mib/data_access/interface.c      |    2 +
 .../mibgroup/if-mib/data_access/interface_linux.c  |   44 +-
 .../mibgroup/if-mib/data_access/interface_sysctl.c |    5 +-
 .../mibgroup/if-mib/ifTable/ifTable_data_access.c  |    5 -
 .../mibgroup/if-mib/ifXTable/ifXTable_interface.c  |    2 +-
 agent/mibgroup/ip-forward-mib/data_access/route.h  |    4 +
 .../ip-forward-mib/data_access/route_ioctl.c       |   36 +-
 .../ip-forward-mib/data_access/route_linux.c       |    1 -
 .../ip-forward-mib/data_access/route_solaris.c     |  258 ++
 .../ip-forward-mib/data_access/route_sysctl.c      |  436 +++
 .../ip-forward-mib/data_access/route_sysctl.h      |    9 +
 .../inetCidrRouteTable_interface.c                 |    2 +
 .../ipCidrRouteTable/ipCidrRouteTable.c            |   12 +-
 .../ipCidrRouteTable/ipCidrRouteTable.h            |   12 +-
 .../ipCidrRouteTable_data_access.c                 |    5 +-
 .../ipCidrRouteTable/ipCidrRouteTable_interface.c  |    6 +-
 agent/mibgroup/ip-mib/data_access/arp.h            |    2 +
 agent/mibgroup/ip-mib/data_access/arp_sysctl.c     |  330 ++
 agent/mibgroup/ip-mib/data_access/defaultrouter.h  |    2 +
 .../ip-mib/data_access/defaultrouter_linux.c       |   24 +-
 .../ip-mib/data_access/defaultrouter_sysctl.c      |  230 ++
 agent/mibgroup/ip-mib/data_access/ipaddress.h      |    2 +
 .../mibgroup/ip-mib/data_access/ipaddress_common.c |   63 +-
 .../mibgroup/ip-mib/data_access/ipaddress_ioctl.c  |    2 +-
 .../mibgroup/ip-mib/data_access/ipaddress_sysctl.c |  272 ++
 agent/mibgroup/ip-mib/data_access/scalars_common.h |    3 +-
 agent/mibgroup/ip-mib/data_access/scalars_linux.c  |  146 +
 agent/mibgroup/ip-mib/data_access/scalars_sysctl.c |  291 ++
 agent/mibgroup/ip-mib/data_access/systemstats.h    |    2 +
 .../ip-mib/data_access/systemstats_common.c        |   42 +-
 .../ip-mib/data_access/systemstats_linux.c         |   23 +-
 .../ip-mib/data_access/systemstats_sysctl.c        |  791 +++++
 .../inetNetToMediaTable_data_access.c              |    2 +-
 .../ipSystemStatsTable_data_access.c               |    1 +
 agent/mibgroup/ip-mib/ip_scalars.c                 |  297 +-
 agent/mibgroup/kernel_sunos5.c                     |   24 +-
 agent/mibgroup/kernel_sunos5.h                     |    2 +
 agent/mibgroup/mibII.h                             |   20 +-
 agent/mibgroup/mibII/at.c                          |    3 +-
 agent/mibgroup/mibII/icmp.c                        |  477 ++-
 agent/mibgroup/mibII/icmp.h                        |   17 +-
 agent/mibgroup/mibII/interfaces.c                  |    4 +-
 agent/mibgroup/mibII/ip.c                          |    2 +-
 agent/mibgroup/mibII/ipCidrRouteTable.c            |   30 +-
 agent/mibgroup/mibII/kernel_linux.c                |    8 +-
 agent/mibgroup/mibII/kernel_linux.h                |  156 +-
 .../mibII/{kernel_linux.h => kernel_mib.h}         |   25 +-
 agent/mibgroup/mibII/kernel_netbsd.c               |  119 +-
 agent/mibgroup/mibII/kernel_netbsd.h               |   85 +-
 agent/mibgroup/mibII/kernel_sysctl.c               |  175 +
 agent/mibgroup/mibII/kernel_sysctl.h               |   19 +
 agent/mibgroup/mibII/mibII_common.h                |    5 +-
 agent/mibgroup/mibII/mta_sendmail.c                |   14 +-
 agent/mibgroup/mibII/snmp_mib.c                    |    6 +-
 agent/mibgroup/mibII/snmp_mib_5_5.c                |    6 +-
 agent/mibgroup/mibII/tcpTable.c                    |   92 +-
 agent/mibgroup/mibII/udpTable.c                    |    1 +
 agent/mibgroup/mibII/updates.c                     |   26 +-
 agent/mibgroup/mibII/var_route.c                   |    1 +
 .../notification/snmpNotifyFilterProfileTable.c    |    4 +-
 agent/mibgroup/notification/snmpNotifyTable.c      |   16 +-
 .../rmon-mib/data_access/etherstats_linux.c        |    6 +-
 .../etherStatsTable/etherStatsTable_data_access.c  |   50 +-
 agent/mibgroup/sctp-mib/sctpScalars_linux.c        |   41 +-
 agent/mibgroup/sctp-mib/sctpTables_linux.c         |    8 +-
 .../snmpNotifyFilterTable_interface.c              |    2 +-
 .../usmDHUserKeyTable/usmDHUserKeyTable_data_set.c |   10 +-
 agent/mibgroup/snmpv3/usmUser.c                    |    4 +-
 agent/mibgroup/target/snmpTargetAddrEntry.c        |  255 +-
 agent/mibgroup/target/snmpTargetAddrEntry.h        |   11 +-
 agent/mibgroup/target/target.c                     |   17 +-
 agent/mibgroup/tcp-mib/data_access/tcpConn.h       |    4 +-
 agent/mibgroup/tcp-mib/data_access/tcpConn_linux.c |    6 +-
 agent/mibgroup/tcp-mib/data_access/tcpConn_unsup.c |   60 +
 agent/mibgroup/testhandler.c                       |    3 +-
 agent/mibgroup/ucd-snmp/disk.c                     |    2 -
 agent/mibgroup/ucd-snmp/disk_hw.c                  |    5 +-
 agent/mibgroup/ucd-snmp/diskio.c                   |  226 +-
 agent/mibgroup/ucd-snmp/dlmod.c                    |  170 +-
 agent/mibgroup/ucd-snmp/dlmod.h                    |    2 +-
 agent/mibgroup/ucd-snmp/extensible.c               |    8 +-
 agent/mibgroup/ucd-snmp/lmsensorsMib.c             |    4 +-
 agent/mibgroup/ucd-snmp/loadave.c                  |   15 +-
 agent/mibgroup/ucd-snmp/logmatch.c                 |   34 +-
 agent/mibgroup/ucd-snmp/pass.c                     |    2 +-
 agent/mibgroup/ucd-snmp/pass_common.c              |   12 +-
 agent/mibgroup/ucd-snmp/pass_persist.c             |   13 +
 agent/mibgroup/ucd-snmp/vmstat.c                   |    6 +-
 agent/mibgroup/ucd-snmp/vmstat.h                   |    1 +
 agent/mibgroup/udp-mib/data_access/udp_endpoint.h  |    4 +-
 .../udp-mib/data_access/udp_endpoint_unsup.c       |   65 +
 agent/mibgroup/util_funcs.c                        |    2 +-
 agent/mibgroup/util_funcs/get_pid_from_inode.h     |    4 +-
 agent/mibgroup/utilities/iquery.c                  |    8 +-
 agent/mibgroup/utilities/override.c                |    6 +-
 agent/mibgroup/winExtDLL.c                         |  275 +-
 agent/snmp_agent.c                                 |    3 +
 agent/snmp_vars.c                                  |    1 -
 agent/snmpd.c                                      |    9 +
 apps/Makefile.depend                               |  312 +-
 apps/agentxtrap.c                                  |   17 +-
 apps/snmpdf.c                                      |  123 +-
 apps/snmpnetstat/Makefile.depend                   |  186 +-
 apps/snmpnetstat/Makefile.in                       |    8 +-
 apps/snmpnetstat/if.c                              |   81 +-
 apps/snmpnetstat/inet.c                            |  210 +-
 apps/snmpnetstat/inet6.c                           |  140 +-
 apps/snmpnetstat/inetx.c                           |  584 ++++
 apps/snmpnetstat/main.c                            |   72 +-
 apps/snmpnetstat/netstat.h                         |   15 +-
 apps/snmpnetstat/route.c                           |  126 +-
 apps/snmpnetstat/routex.c                          |  558 ++++
 apps/snmpstatus.c                                  |    4 +
 apps/snmptls.c                                     |    4 +-
 apps/snmptranslate.c                               |    4 +-
 apps/snmptrapd.c                                   |   11 +-
 apps/snmptrapd_sql.c                               |   14 +-
 configure                                          | 1926 +++++++----
 configure.ac                                       |    3 +-
 configure.d/config_modules_agent                   |   14 +-
 configure.d/config_modules_lib                     |   16 +-
 configure.d/config_os_headers                      |   77 +-
 configure.d/config_os_libs2                        |   49 +-
 configure.d/config_os_misc4                        |   97 +
 configure.d/config_os_progs                        |    9 +-
 configure.d/config_os_struct_members               |   85 +-
 dist/Makefile                                      |    2 +-
 dist/generation-scripts/gen-variables              |   10 -
 dist/makerelease.xml                               |  197 +-
 dist/net-snmp.spec                                 |   21 +-
 dist/release                                       |    3 -
 dist/run-autoconf                                  |    2 +-
 include/net-snmp/agent/agent_registry.h            |   25 +-
 include/net-snmp/agent/old_api.h                   |    2 +-
 include/net-snmp/agent/snmp_vars.h                 |    2 +-
 include/net-snmp/data_access/ip_scalars.h          |    5 +
 include/net-snmp/data_access/ipaddress.h           |    2 +
 include/net-snmp/library/large_fd_set.h            |   12 +-
 include/net-snmp/library/read_config.h             |    5 +-
 include/net-snmp/library/snmpUDPBaseDomain.h       |   16 +-
 include/net-snmp/library/snmpUDPDomain.h           |    3 +-
 include/net-snmp/library/snmpUDPIPv4BaseDomain.h   |    3 +-
 include/net-snmp/library/system.h                  |    3 +-
 include/net-snmp/library/tools.h                   |   21 +-
 include/net-snmp/net-snmp-config.h.in              |   57 +-
 include/net-snmp/system/darwin10.h                 |   12 +-
 include/net-snmp/system/darwin11.h                 |   20 +-
 include/net-snmp/system/darwin12.h                 |   20 +-
 include/net-snmp/system/{darwin10.h => darwin13.h} |   23 +-
 include/net-snmp/system/darwin9.h                  |   11 -
 include/net-snmp/system/freebsd10.h                |    4 +-
 include/net-snmp/system/freebsd11.h                |    3 +
 include/net-snmp/system/freebsd12.h                |    3 +
 include/net-snmp/system/freebsd9.h                 |    2 +-
 include/net-snmp/types.h                           |    4 +-
 local/Makefile.in                                  |    4 +-
 local/gittools/shell-functions                     |   12 +
 local/mib2c.iterate_access.conf                    |    3 +-
 local/{snmpconf => snmpconf.in}                    |    8 +-
 m4/ac_add_search_path.m4                           |    2 +-
 man/Makefile.in                                    |   30 +-
 man/netsnmp_config_api.3.def                       |    2 +-
 man/netsnmp_mib_api.3.def                          |    3 +-
 man/netsnmp_pdu_api.3.def                          |    3 +-
 man/netsnmp_sess_api.3.def                         |    3 +-
 man/netsnmp_session_api.3.def                      |    3 +-
 man/netsnmp_varbind_api.3.def                      |    6 +-
 man/snmp_async_send.3                              |    1 -
 man/snmp_config.5.def                              |   33 +-
 man/snmp_sess_synch_response.3                     |    1 -
 man/snmp_synch_response.3                          |    1 -
 man/snmpcmd.1.def                                  |    2 +-
 man/snmpd.conf.5.def                               |    6 +-
 man/snmpd.examples.5.def                           |    2 +-
 man/snmpdelta.1.def                                |    2 +-
 man/snmpdf.1.def                                   |   12 +-
 man/snmpgetnext.1.def                              |    2 +-
 man/snmpnetstat.1.def                              |  100 +-
 man/snmpstatus.1.def                               |    2 +-
 man/snmptable.1.def                                |   11 +-
 man/snmptest.1.def                                 |    2 +-
 man/snmptranslate.1.def                            |    5 +-
 man/snmptrapd.8.def                                |   31 +-
 man/snmptrapd.conf.5.def                           |   70 +-
 man/snmpwalk.1.def                                 |    2 +-
 mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt           |  166 +
 mibs/IANA-LANGUAGE-MIB.txt                         |  126 +
 mibs/IANA-RTPROTO-MIB.txt                          |   95 +
 mibs/IANAifType-MIB.txt                            |  646 ++++
 mibs/Makefile.in                                   |    1 +
 mibs/RFC-1215.txt                                  |   38 +
 mibs/UCD-SNMP-MIB.txt                              |   22 +-
 mibs/ianalist                                      |    6 +-
 mibs/makehtml.pl                                   |   26 +-
 mibs/miblist.txt                                   |   51 +
 mibs/nodemap                                       |    2 +-
 mibs/rfclist                                       |   24 +-
 net-snmp-config.in                                 |    4 +-
 perl/ASN/ASN.pm                                    |    2 +-
 perl/AnyData_SNMP/Storage.pm                       |    2 +-
 perl/OID/OID.pm                                    |    2 +-
 perl/SNMP/SNMP.pm                                  |    4 +-
 perl/SNMP/SNMP.xs                                  |   34 +-
 perl/SNMP/t/dump-session.t                         |   29 +
 perl/SNMP/t/snmptest.cmd                           |    3 -
 perl/TrapReceiver/TrapReceiver.pm                  |    2 +-
 perl/TrapReceiver/TrapReceiver.xs                  |   10 +-
 perl/TrapReceiver/const-c.inc                      |  146 -
 perl/TrapReceiver/const-xs.inc                     |   90 -
 perl/agent/Support/Support.pm                      |    2 +-
 perl/agent/agent.pm                                |    2 +-
 perl/agent/default_store/default_store.pm          |    2 +-
 perl/default_store/default_store.pm                |    2 +-
 python/netsnmp/client_intf.c                       |   80 +-
 snmplib/Makefile.depend                            |  522 +--
 snmplib/asn1.c                                     |   13 +-
 snmplib/container_binary_array.c                   |   18 +
 snmplib/dir_utils.c                                |    9 +-
 snmplib/inet_ntop.c                                |    2 +-
 snmplib/inet_ntop.h                                |    4 +-
 snmplib/inet_pton.c                                |    2 +-
 snmplib/inet_pton.h                                |    4 +-
 snmplib/keytools.c                                 |   23 +-
 snmplib/large_fd_set.c                             |   34 +-
 snmplib/lcd_time.c                                 |    6 +
 snmplib/md5.c                                      |    2 +-
 snmplib/mib.c                                      |  458 +--
 snmplib/parse.c                                    |   19 +-
 snmplib/read_config.c                              |   33 +-
 snmplib/scapi.c                                    |   10 +-
 snmplib/snmp_alarm.c                               |    4 +-
 snmplib/snmp_api.c                                 |  155 +-
 snmplib/snmp_client.c                              |    5 +
 snmplib/snmp_parse_args.c                          |   13 +-
 snmplib/snmp_transport.c                           |   25 +-
 snmplib/snmpksm.c                                  |   94 +-
 snmplib/snmptsm.c                                  |   10 +-
 snmplib/snmpusm.c                                  |   18 +-
 snmplib/strlcat.c                                  |    2 +-
 snmplib/strtoull.c                                 |    4 +
 snmplib/system.c                                   |   43 +-
 snmplib/tools.c                                    |   50 +-
 snmplib/transports/snmpDTLSUDPDomain.c             |    4 +-
 snmplib/transports/snmpIPXDomain.c                 |    4 +-
 snmplib/transports/snmpIPv4BaseDomain.c            |    2 +-
 snmplib/transports/snmpIPv6BaseDomain.c            |   91 +-
 snmplib/transports/snmpTCPDomain.c                 |    8 +-
 snmplib/transports/snmpTCPIPv6Domain.c             |   10 +-
 snmplib/transports/snmpTLSTCPDomain.c              |    4 +-
 snmplib/transports/snmpUDPBaseDomain.c             |  207 +-
 snmplib/transports/snmpUDPDomain.c                 |    7 +-
 snmplib/transports/snmpUDPIPv4BaseDomain.c         |   32 +-
 snmplib/transports/snmpUDPIPv6Domain.c             |   25 +-
 snmplib/transports/snmpUnixDomain.c                |    2 +-
 snmplib/winservice.c                               |    2 +
 testing/Makefile.in                                |    2 +-
 testing/RUNFULLTESTS                               |    5 +-
 testing/RUNTESTS                                   |   18 +-
 testing/failed_tests                               |    1 -
 testing/fulltests/default/Sv3usmconfigbase         |    8 +-
 .../fulltests/default/T027snmpv3Defaults_simple    |    1 +
 testing/fulltests/default/T060trapdperl_simple     |    6 +-
 .../fulltests/default/T065agentextend_sh_simple    |   65 +
 testing/fulltests/default/T065agentextend_simple   |    2 +-
 testing/fulltests/default/T066pass_simple          |    4 +-
 testing/fulltests/default/T067passpersist_simple   |    4 +-
 testing/fulltests/default/T068execfix_simple       |   72 +
 testing/fulltests/default/T071com2sec6_simple      |    4 +-
 testing/fulltests/default/T072com2secunix_simple   |    2 +-
 testing/fulltests/default/T115agentxperl_simple    |    2 +-
 testing/fulltests/default/T120proxyget_simple      |    2 +-
 testing/fulltests/default/T121proxyset_simple      |    2 +-
 testing/fulltests/default/T122proxysetfail_simple  |    2 +-
 testing/fulltests/default/T160snmpnetstat_simple   |   16 +-
 .../fulltests/default/T161snmpTargetAddr_simple    |  142 +
 .../fulltests/default/T200snmpv2cwalkall_simple    |    4 +-
 testing/fulltests/support/clib_build               |   12 +
 testing/fulltests/support/simple_TESTCONF.sh       |    4 +
 testing/fulltests/support/simple_eval_tools.sh     |   49 +-
 .../unit-tests/T005table_dataset_cagentlib.c       |    4 +
 testing/fulltests/unit-tests/T008asn1_clib.c       |  152 +-
 .../fulltests/unit-tests/T014gethostbyaddr_clib.c  |   66 +-
 .../fulltests/unit-tests/T016read_config_clib.c    |    4 +-
 .../T020netsnmp_sprint_realloc_objid_tree_clib.c   |   82 +
 .../T021binary_array_oid_duplicates_clib.c         |   72 +
 .../T021netsnmp_sprint_realloc_no_type_clib.c      |   51 +
 win32/Configure                                    |  337 +-
 win32/Makefile-apps.in                             |    1 -
 win32/MgmtApi-winExtDLL.h                          |   77 -
 win32/build.pl                                     |  401 +--
 win32/libagent/Makefile.in                         |    7 +
 win32/libagent/libagent.dsp                        |    4 +
 win32/libsnmp_dll/Makefile.in                      |    1 -
 win32/mib_module_includes.h                        |    3 +
 win32/mib_module_inits.h                           |    3 +
 win32/mib_module_shutdown.h                        |    4 +
 win32/net-snmp/net-snmp-config.h                   |   30 +-
 win32/net-snmp/net-snmp-config.h.in                |   30 +-
 win32/netsnmpmibs/Makefile.in                      |    7 +
 win32/netsnmpmibs/netsnmpmibs.dsp                  |    4 +
 win32/snmpd/Makefile.in                            |    1 -
 win32/snmpnetstat/Makefile.in                      |   23 +-
 win32/snmpnetstat/snmpnetstat.dsp                  |   10 +-
 win32/snmptrapd/Makefile.in                        |    1 -
 win32/transports/snmp_transport_inits.h            |    1 +
 384 files changed, 17929 insertions(+), 5588 deletions(-)

diff --git a/.gitignore b/.gitignore
index 9cfb7a3..df174ed 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+*~
 *.bak
 *.bs
 *.ft
@@ -65,6 +66,7 @@ include/net-snmp/library/snmpv3-security-includes.h
 include/net-snmp/net-snmp-config.h
 libtool
 local/snmpcheck
+local/snmpconf
 Makefile
 man/*.[1358]
 man/default_store.3.h
diff --git a/CHANGES b/CHANGES
index a8de7e1..8922f39 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3,12 +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.7.2.1 *
+*5.7.3*
+    snmplib:
+      - Fixed crash when MD5 hash is not supported by OpenSSL.
+      - Fixed parsing of sequences. Don't overwrite 'data' variable, it's
+	used when parsing bulk responses.
+      - [BUG 1267 ]: snmplib: register_mib_context() fix for read-only
+	variables   This is a slightly modified version of a patch from
+	Harsha Shivanna.
+
+    snmp:
+      - Usm-dh-objects-mib: Avoid triggering an assert statement in
+	netsnmp_ready_monotonic() The cache timeout for
+	snmp-usm-dh-objects-mib is -1. Any cache timeout value < 0 disables
+	caching. However, strictly negative values trigger the assert
+	statement in netsnmp_ready_monotonic(). Avoid triggering that
+	assert statement.
+      - Fixed monitoring based on non-delta trigger.   snmpd crashed wit
+	following snmpd.conf: monitor -s -D -r 10 -e LOGMATCH -o
+	logMatchCurrentCount "Log Match" != logMatchCurrentCount logmatch
+	LoginFailure1 /var/log/secure 10 su: .*fail.* The reason was
+	unitialized variable sysUT_var in mteTrigger_run(), it was filled
+	only if the trigger was delta-valued, while its value was used for
+	all triggers. With this patch, sysUT_var is filled for all code
+	branches where it is needed.
+
     snmpd:
+      - Add a missing function declaration
+      - Added btrfs support to hrFSTable
+      - Correct the size of of the EXAMPLEIPADDRESS value on L64 hosts
+      - Fixed crash in UCD-SNMP-MIB::extTable snmpd crashed when the
+	command to execute had no arguments, i.e. extend->args was NULL.
+      - Fixed value of UCD-SNMP-MIB::extCommand to contain full command
+	line. MIB description of UCD-SNMP-MIB::extCommand suggests it
+	should contail full command line. Also in Net-SNMP 5.3.2.2, whole
+	command line was shown.
+      - Make it possible to use NUL characters in the indices for
+	snmpTargetAddrTable
+      - PATCH 2472: from Sunil: don't use HBKT as heartbeat interval in
+	SCTP-MIB::sctpAssocTable.
+      - Remove some unused includes
+      - Show Linux kernel threads in hrSWRunTable.
+      - Use 0 for the ignored numvars argument to netsnmp_register_mib The
+	numvars argument of netsnmp_register_mib is ignored if the var
+	argument is NULL. In order to unify this use of it with all other
+	ones, change it from 1 to 0
       - SECURITY: a denial of service attack vector was discovered on
         the linux implementation of the ICMP-MIB.  This release fixes
         this bug and all users are encouraged to update their SNMP
         agent if they make use of the ICMP-MIB table objects.
+      - PATCH: 1275: from Viliam Púčik: fixed Perl trap handler when
+	processing trap with empty community string.
+
+    snmpd, snmptrapd and apps:
+      - Make ENV_SEPARATOR_CHAR configurable
+
+    snmptrapd:
+
+    apps:
+      - Stop agentxtrap from accessing the persistent configuration This is
+	needed to prevent moaning about not beeing allowed to write those
+	files due to bad permissions.
+      - Stop using snmp_perror when logging after functions that don't set
+	snmp_errno.
+
+    building:
+      - Make the -without options to rpmbuild work
+      - Avoid duplicate and trailing spaces in the dependency files.
+
+    documentation:
+      - From "Eric S. Raymond": Correct man page markup problem Ambiguous
+	or invalid backslash.  This doesn't cause groff a problem. but it
+	confuses doclifter and may confuse older troff implementations.
+
+    perl:
+      - BUG: 2402: Add support for SNMPv3 traps
+
+    python:
+      - Fixed IPADDRESS size on 64bit systems.
+      - Fixed returning of empty strings. Varbind type (SNMP_NOSUCHOBJECT
+	etc.) should be used to detect errors instead of length of the
+	variable - it can be empty string.
+      - [PATCH 1239]: Fix memory leak
+
+    testing:
+      - Make sure Test::Harness is of at least version 1.21 Test::Harness
+	1.21 is the first version that implements TAP v12 which allows
+	putting the header (1..N) after the tests and since our tests
+	utilize that we should make sure that the test runner supports it.
+
+    AIX:
+      - Make tcp-mib build
+      - Make udp-mib build
+
+    Linux:
+      - BUG: 2238: Add libnl3 support
+      - RESOURCES-MIB, hrSWRun table: Parse /proc/<pid>/stat correctly on
+	Linux This issue was reported by Vincent Bernat
+	<vincent.bernat at dailymotion.com>. See also
+	http://sourceforge.net/p/net-snmp/patches/1257/.
+
+    Win32:
+      - Modified patch from Bart Van Assche to improve cygwin building
+      - Perl: BUG: 2488: Avoid "Free to wrong pool" error
+      - Perl: BUG: 2488: Avoid "Free to wrong pool" error" This reverts
+	commit b2725964bde921b6285e3a59a512552cae0a0ca5.
+
+    Windows:
+      - Add multihoming support On Windows Vista / Windows Server 2008 and
+	later it is possible to add multihoming support by using the
+	IP_PKTINFO socket option. Conflicts:
+	snmplib/transports/snmpUDPBaseDomain.c
+      - Make winExtDLL work on 64-bit Windows systems
+      - Port batch build infrastructure to Visual Studio 2010 and later
+	From Visual Studio 2010 on it is no longer possible to specify
+	include or library directories globally - these have to be
+	specified per project. Hence two additional menu entries in
+	build.bat that allow to specify these directories.
+      - Ported ucd-snmp/dlmod to MinGW / MSVC
+
+    MinGW:
+      - Port T005table_dataset_cagentlib.c to MinGW
+
+    unspecified:
+      - Added simfs (OpenVZ filesystem) to hrStorageTable and hrFSTable.
+      - Upport new MIB structures and MFD rewrites under Darwin
+      - [BUG 2470]: Accept 65535 as a valid IPv6 port number
+      - [BUG 2476]: snmpd fails to start on AIX On an AIX system there is
+	no <kvm.h> header file nor do the /dev/dmem or /dev/drum devices
+	exist and hence DMEM_LOC is not defined. Avoid that init_kmem()
+	fails in that case.
+      - [BUG 2568]: Avoid that file descriptors above FD_SETSIZE trigger
+	abort()
 
 *5.7.2*
 
diff --git a/COPYING b/COPYING
index d368331..3eef440 100644
--- a/COPYING
+++ b/COPYING
@@ -135,7 +135,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 ---- Part 5: Sparta, Inc copyright notice (BSD) -----
 
-Copyright (c) 2003-2012, Sparta, Inc
+Copyright (c) 2003-2013, Sparta, Inc
 All rights reserved.
  
 Redistribution and use in source and binary forms, with or without
@@ -292,3 +292,36 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
 USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 DAMAGE.
+
+---- Part 10: IETF copyright notice (BSD) -----
+
+Copyright (c) 2013 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.
diff --git a/ChangeLog b/ChangeLog
index 1592a84..04219c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,38 +2,3437 @@
 
 ----------------------------------------------------------------------
 
-Changes: V5.7.2 -> V5.7.2.1
+Changes: V5.7.3.rc3 -> V5.7.3
 
-commit d8f9d815aeffae7894d44e6a8861acfbd1f999ce
+commit cc3216b6587bfd263adf9b0ff12cd9a59e7d66da
 Author: Wes Hardaker <hardaker at users.sourceforge.net>
-Date:   Wed Feb 19 16:34:54 2014 -0800
+Date:   Mon Dec 8 12:21:49 2014 -0800
 
-    make depend for 5.7.2.1
+    make depend for 5.7.3
 
-commit f518e7d10ceeaf2db028ecba5c81a8675d6122e2
+commit d21c3a2258092cf6de07370f75632a0e8e51529e
 Author: Wes Hardaker <hardaker at users.sourceforge.net>
-Date:   Wed Feb 19 15:46:09 2014 -0800
+Date:   Mon Dec 8 11:17:44 2014 -0800
 
-    Version number update: 5.7.2.1
+    V5-7-patches out of Release Candidate
 
-commit d2cb34e64bfd007fab44ad0c209ab102822470f0
+commit f5174f209ef0b51b1c2fd88713c3dae7b6db3659
 Author: Wes Hardaker <hardaker at users.sourceforge.net>
-Date:   Wed Feb 19 15:43:22 2014 -0800
+Date:   Mon Dec 8 11:17:40 2014 -0800
 
-    a shortened makerelease script for this release
+    Version number update: 5.7.3
 
-commit 236c474e9a185fa58e3b2bf805c6f8063e158702
+commit 5a10878e5053d06f7ad1a353297e91bd267d0915
 Author: Wes Hardaker <hardaker at users.sourceforge.net>
-Date:   Wed Feb 19 15:26:53 2014 -0800
+Date:   Mon Dec 8 11:16:27 2014 -0800
 
-    announcement information about 5.7.2.1
+    use the agent with gpg
 
-commit 8407b6ce46ca7159b3c816d1024e20a53f9a1c6c
+commit a68747ca8a4c2922581b7b6a9a3467a2a7776ab7
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Mon Dec 8 10:56:25 2014 -0800
+
+    Another cygwin build improvement patch from Bart Van Assche
+
+commit 30a2a088e76321e253f2603e058f2faf869bf150
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Mon Dec 8 10:56:09 2014 -0800
+
+    Another cygwin build improvement patch from Bart Van Assche
+
+commit 425cffcb2f322a50e4f80990667d93ad0bf11a26
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Mon Dec 8 10:26:19 2014 -0800
+
+    CHANGES: Patch from Bart Van Assche to improve cygwin building
+
+commit 3c80a42d7d997f5ff6ca14ca4e013d3a5266cc4f
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Mon Dec 8 10:25:14 2014 -0800
+
+    CHANGES: Modified patch from Bart Van Assche to improve cygwin building
+
+commit add1341c9ca33fea07221914ca2791e6ab7b1caa
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Nov 7 06:47:09 2014 +0100
+
+    snmplib/system.c: make the test for return code from uname conform to POSIX.
+
+----------------------------------------------------------------------
+
+Changes: V5.7.3.rc1 -> V5.7.3.rc3
+(there was no official rc2)
+
+commit e69ac8728987b33852c5007667015a6d23cbe85b
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Mon Nov 10 11:57:58 2014 -0800
+
+    make depend for 5.7.3.rc3
+
+commit f6eb2013fd3db444df670b956010e77c0fc2b1d2
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Mon Nov 10 11:30:01 2014 -0800
+
+    Release Candidate for V5-7-patches
+
+commit 1165717bea711b0798327085f31ac3dbc577b2fb
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Mon Nov 10 11:29:58 2014 -0800
+
+    Version number update: 5.7.3.rc3
+
+commit de0ebcf027accd21e642436d91074484f7ce62d8
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Fri Nov 7 16:21:52 2014 -0800
+
+    make depend for 5.7.3.rc2
+
+commit 6b43b9b9ae3e17fc2747dc522bf9a0c4a8025964
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Fri Nov 7 15:47:10 2014 -0800
+
+    Release Candidate for V5-7-patches
+
+commit 01dbb30b7dd5fccca6950a50a09d5c0b0d9862f6
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Fri Nov 7 15:47:05 2014 -0800
+
+    Version number update: 5.7.3.rc2
+
+commit a9307c82589ff6895341a5a03e5e0b4358350cb2
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Nov 7 06:51:34 2014 +0100
+
+    snmplib/system.c: make the test for return code from uname conform to POSIX.
+
+commit bd86390cf1300683e5ffbe1922a523c7cf211b0f
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Sep 28 20:08:38 2014 +0200
+
+    T065agentextend_sh_simple: Add a new regression test
+
+----------------------------------------------------------------------
+
+Changes: V5.7.3.pre5 -> V5.7.3.rc1
+
+commit 8fc7514b59dc46b8f3e36c81a92af008dc8dc188
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Wed Oct 1 09:59:26 2014 -0700
+
+    make depend for 5.7.3.rc1
+
+commit 3ea514423d9373af77cbc4b8336b170143864389
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Tue Sep 30 23:12:40 2014 -0700
+
+    Release Candidate for V5-7-patches
+
+commit abb7f2eec173c8d262bf6ef1b7deb5b70839d15f
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Tue Sep 30 23:12:39 2014 -0700
+
+    Version number update: 5.7.3.rc1
+
+commit bcaab48d9d498361fdd451652773b3b956c7f10c
+Author: Robert Story <rstory at localhost>
+Date:   Thu Sep 25 09:36:00 2014 -0400
+
+    remove bad assert check
+
+commit 5d1ecf6d1591a53e711c5feea158d10dd90fab3b
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Mon Sep 1 14:46:50 2014 +0200
+
+    CHANGES: MinGW: Port T005table_dataset_cagentlib.c to MinGW
+
+commit af8c17e6482cb55206c5027098366f60ad8f7cc7
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Mon Sep 1 13:24:18 2014 +0200
+
+    CHANGES: BUG: 2568: Avoid that file descriptors above FD_SETSIZE trigger abort()
+
+commit 4224cabcb112d0d437f9ca9f4d3430501d1c8750
+Author: Bill Fenner <fenner at gmail.com>
+Date:   Tue Jul 22 06:49:28 2014 -0700
+
+    When enlarging a large_fd_set, use FD_ZERO if possible
+    
+    The most common case of creating a large_fd_set on UNIX
+    is to create it with size zero, and then immediately enlarge
+    it to size FD_SETSIZE.  Instead of looping and calling
+    FD_CLR(), we can optimize this common case with the OS's
+    FD_ZERO.
+
+commit 3524a92f227eb3e736908b1f1f525da2dc949d22
+Author: Bart Van Assche <bvassche at users.sourceforge.net>
+Date:   Sat Jan 23 17:42:41 2010 +0000
+
+    Fixed a Solaris-specific compiler warning.
+    
+    git-svn-id: file:///home/hardaker/lib/sf-bkups/net-snmp-convert-svnrepo/trunk@18029 06827809-a52a-0410-b366-d66718629ded
+
+commit 954ea4d70840aa5f753a06e5df7652b258d92042
+Author: Dave Shield <dts12 at users.sourceforge.net>
+Date:   Mon Jun 21 08:01:43 2010 +0000
+
+    Ensure that fdset structure is resized sufficiently
+    to accomodate the specified socket ID.
+    Problem reported by Shiyalei.
+    
+    git-svn-id: file:///home/hardaker/lib/sf-bkups/net-snmp-convert-svnrepo/trunk@19066 06827809-a52a-0410-b366-d66718629ded
+
+commit 3da0c378b5cb1bbf35d05a6212a483abda84a201
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Sep 1 08:59:04 2014 +0200
+
+    Fix commit 7f4a7b891332899cea26e95be0337aae01648742: dont mix code and declarations.
+
+commit 0837b21e798a9856c0a9f438ec44a83bed1f8536
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Fri Aug 29 08:18:20 2014 +0200
+
+    Empty initializers are (sadly) not part of C.
+    Stop using them.
+
+commit 5e4f6e3f43035a689c9fa289027eed60a22dbfaf
+Author: Bill Fenner <fenner at gmail.com>
+Date:   Thu Aug 28 12:12:21 2014 -0400
+
+    Add a debug message when skipping a key
+
+commit e5706150c4532d7fc1832718568bb50bb0ffc01f
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Thu Jul 31 15:44:31 2014 +0200
+
+    Added test for sprint_realloc_variable with -OQ cmdline argument.
+
+commit 7f4a7b891332899cea26e95be0337aae01648742
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Thu Jul 31 13:46:49 2014 +0200
+
+    Added checks for printing variables with wrong types.
+    
+    When -OQ command line argument is used, variable formatter preffers the type
+    of the varible parsed from a MIB file instead of checking type of the variable
+    as parsed from SNMP message.
+    
+    This can lead to crashes when incoming packets contains a variable with
+    NULL type, while the MIB says the variable should be non-NULL, like Integer.
+    The formatter then tries to interpret the NULL (from packet) as Integer (from
+    MIB file).
+
+commit 9c4ddca96082c139cfce928eea3cfe793d34f5c2
+Author: Jeff Gehlbach <jeffg at opennms.org>
+Date:   Thu Jul 31 11:52:18 2014 -0400
+
+    Add a scalar object containing the number of processors seen by the agent. Placed this in the systemStats group for lack of an obviously better location. Updated UCD-SNMP-MIB accordingly.
+    
+    Signed-off-by: Niels Baggesen <nba at users.sourceforge.net>
+
+commit 664ed943f63dfe9393e959840ecd23c31c9d8f89
+Author: Bill Fenner <fenner at gmail.com>
+Date:   Wed Aug 27 16:02:57 2014 -0400
+
+    Handle duplicates in a binary_array container
+    
+    The CONTAINER_KEY_ALLOW_DUPLICATES setting is fundamentally flawed;
+    it really effectively meant "I promise I won't insert duplicates
+    so don't check at insert time".  However, the ip-forward-mib
+    sets this flag but relies on the duplicate prevention at insert
+    time under certain scenarios (e.g., multiple attachments to the
+    same subnet on MacOS), resulting in a loop in ip-forward-mib
+    in these scenarios.  So, now it means "check for duplicates at
+    getnext time" - the binary search will find an arbitrary one
+    of the entries with the same key, and when we've incremented
+    we have to check whether or not we've actually incremented past
+    any duplicates.  This costs an extra key compare per getnext.
+    
+    If there's a scenario in the future where a MIB implementation
+    can really guarantee that it isn't inserting duplicates, we
+    might want to add a "CONTAINER_KEY_I_PROMISE_I_WONT_INSERT_DUPLICATES",
+    that disables the insertion check but doesn't perform the getnext
+    check.
+
+commit f82d2d63493f4079c167ba36b203e49cda3bde8d
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Aug 18 21:55:04 2014 +0200
+
+    Fix for FreeBSD9 losing mib-modules list because of missing NL in sed input.
+
+commit 52b072bcff32e3512fbf956b72d1a353e50a962b
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Aug 18 21:53:38 2014 +0200
+
+    Updates for BFD mibs.
+
+commit 03db67b322d76d717be17a87e777c91dd0fdd3ac
+Author: Bill Fenner <fenner at gmail.com>
+Date:   Tue Aug 12 23:55:07 2014 -0400
+
+    If sdl_alen is too long for the static buffer, call it incomplete instead of overrunning the buffer
+
+commit 8ae78da391d5b6b61cc2516eb1a6520b0dabb6bf
+Author: Bill Fenner <fenner at gmail.com>
+Date:   Tue Aug 12 22:55:45 2014 -0400
+
+    Use vm_region_64 on 64-bit arch; cache memory for longer
+    
+    This is a port of the Apple patches at
+    http://www.opensource.apple.com/source/net_snmp/net_snmp-140.1/patches/darwin64.patch
+    1. Use vm_region_64 instead of vm_region on __ppc64__ or __x86_64__
+    2. Use 300 second timeout for the cache.
+    
+    This comment about the code being incredibly expensive is
+    very true: on a 1.7 GHz i7 with 8 GB of RAM (admittedly a
+    small machine) it took 17 seconds to calculate and
+    return HOST-RESOURCES-MIB::hrMemorySize.0.  Most SNMP
+    clients would give up long before getting this answer.
+
+commit 613e93704ba95f3c6440114eb73bf09f7775560e
+Author: Bill Fenner <fenner at gmail.com>
+Date:   Tue Aug 12 22:34:06 2014 -0400
+
+    darwin13 also uses kernel_sysctl
+
+commit c13dd97d7bdde7302d002787eef03d772f29bcd4
+Author: Bill Fenner <fenner at gmail.com>
+Date:   Tue Aug 12 12:30:23 2014 -0700
+
+    Use the right header guard.
+    
+    Believe it or not, clang found this detail with -Wheader-guard.
+
+commit d5d40302b0ab340e211ad76d7f195b807f387ef3
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Mon Aug 11 12:33:50 2014 -0700
+
+    update to new key ID
+
+----------------------------------------------------------------------
+
+Changes: V5.7.3.pre4 -> V5.7.3.pre5
+
+commit f3f371b276d265b455fc490fce1947dadf89e9c2
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Fri Aug 8 19:49:06 2014 -0700
+
+    make depend for 5.7.3.pre5
+
+commit 418132f43cc43231966a8b9672c626f60b991039
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Fri Aug 8 14:24:52 2014 -0700
+
+    fix the run-autoconf program
+
+commit 7db795949075efb489373f51f706636fe54a9835
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Fri Aug 8 14:24:52 2014 -0700
+
+    fix the run-autoconf program
+
+commit 78f1ef816ddad08e7d7c9e1b11e4b4ab26f6e4b0
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Fri Aug 8 13:28:47 2014 -0700
+
+    used the right autoconf
+
+commit 1eaeac801a3625b72b09c7da58038409cd8dc681
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Fri Aug 8 13:26:11 2014 -0700
+
+    Version number update: 5.7.3.pre5
+
+commit 7ecfd3ede19e9c2218c9bf5959c095ce9fa6c8ab
+Author: Brian Sipos <bsiposrkf at users.sourceforge.net>
+Date:   Wed Aug 6 10:30:54 2014 -0700
+
+    Fix detection of sha224 and sha384, patch from Brian Sipos
+    
+    https://sourceforge.net/p/net-snmp/bugs/2564/
+    
+    Luckily nobody's needed to build using an OpenSSL version
+    that doesn't support sha224 or sha384, since the inversion
+    of the test here would try to use sha224/sha384 support only
+    on OpenSSL versions that don't support them!
+
+commit a93991eaf53b199b19c582b630da25158300a9d1
+Author: Robert Story <rstory at localhost>
+Date:   Fri Aug 1 10:07:45 2014 -0400
+
+    fix #2482 snmp response: Too long
+
+commit 9f41d30b09e7c85b8268103ca320ac6cc32d5b04
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Sat Jul 26 08:28:43 2014 +0200
+
+    Fix bug 2546: netsnmp_tdomain_transport_full uses wrong port for snmptrap + udp6
+
+commit db1f217541e00b53813d94f6befb9a42d4838e95
+Author: Jeff Gehlbach <jeffg at opennms.org>
+Date:   Fri Jul 25 16:11:23 2014 -0400
+
+    Fix bug 2562: Windows x64 build broken on 5.7.3.pre4
+
+commit 9741f08e75b4162bb3c8b449279f182d949da373
+Author: Bill Fenner <fenner at gmail.com>
+Date:   Thu Jul 24 08:10:40 2014 -0400
+
+    Use the standard expr ":" syntax
+
+----------------------------------------------------------------------
+
+Changes: V5.7.3.pre3 -> V5.7.3.pre4
+
+commit 864abb5ba1eb324e423157db5fb1723f855973b2
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Wed Jul 23 15:07:41 2014 -0700
+
+    make depend for 5.7.3.pre4
+
+commit 5fc8f99c9f77ddadeeacedae7f06fea1767d4a9f
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Wed Jul 23 15:02:19 2014 -0700
+
+    fix C++ style comment
+
+commit 54a4a90a5529ea58add9e6af6a7e8ad065440828
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Wed Jul 23 14:49:41 2014 -0700
+
+    Version number update: 5.7.3.pre4
+
+commit c0d66826b71f05403f36c7f8234ff8f7ecbd1590
+Author: Bill Fenner <fenner at gmail.com>
+Date:   Tue Jul 22 06:49:28 2014 -0700
+
+    When enlarging a large_fd_set, use FD_ZERO if possible
+    
+    The most common case of creating a large_fd_set on UNIX
+    is to create it with size zero, and then immediately enlarge
+    it to size FD_SETSIZE.  Instead of looping and calling
+    FD_CLR(), we can optimize this common case with the OS's
+    FD_ZERO.
+
+commit dcad31aeb442369a6fb52f4dc7d4f781bc56006c
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu Jul 17 23:40:13 2014 +0200
+
+    Solaris does not like "grep -E" or "if !".
+    Propagate configures EGREP to man/Makefile.in and also used configured SED.
+
+commit a51cbedf7d1d424342ab5ca3a4b67217a364409a
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Tue Jul 15 21:45:54 2014 +0200
+
+    snmpnetstat/if.c: properly detect snmp exceptions
+
+commit eee92519f38e937f227bea7701ddb1157c8bcccc
+Author: Bill Fenner <fenner at gmail.com>
+Date:   Tue Jul 15 07:27:18 2014 -0700
+
+    Close pipes when freeing config and kill child process on error
+    
+    When freeing the config, close the pipes corresponding to that
+    config, so they don't get leaked.  Also, if we have an error,
+    send a SIGKILL to the child process in case it is blocked and
+    won't die just because we closed the pipes to it.
+
+commit 8431f913554e0cccc48bedce1fd4a8a288b6c27d
+Author: Bill Fenner <fenner at gmail.com>
+Date:   Tue Jul 15 07:19:33 2014 -0700
+
+    If the asp lookup returns NULL, don't try to use it
+    
+    If there is no corresponding asp, we set the result properly
+    but still fall through and attempt to use it.  Instead, just
+    continue.
+
+commit 146fa384d8b05e1e5a2c67f88d0eca0a304fa1f0
+Author: Bill Fenner <fenner at gmail.com>
+Date:   Mon Jul 14 15:26:14 2014 -0700
+
+    Fix dependencies for auto-generated man pages
+    
+    Also make sure that the auto-generated .so files are listed
+    in the right Makefile variables, and update the variables
+    to include the ones that had been left out already.
+
+commit 4431728cf7a0950aed293d48c02e69000f5b83e8
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Jul 13 03:07:21 2014 -0700
+
+    AIX: Fix more compiler warnings
+    
+    Avoid that the compiler complains about casting away const, about
+    unused variables or functions, about missing function prototypes
+    and also avoid that the compiler complains that the type of the
+    third argument of mntctl() is wrong.
+
+commit 42a65f11e3ed56963f78a5c1561edd67658ccd00
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Jul 13 09:47:26 2014 +0200
+
+    Remove C99 length specifier 'z' and use a cast instead
+    
+    See also commit b4eab11139eb122c9ad3c13ab8b9453e04e46842.
+
+commit 35d0f59cdd8894b8fbbad65370b5e301e377a37f
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Jul 11 21:26:33 2014 +0200
+
+    Updated DOCS-IF-MIB reference
+
+commit 7a4d2ea2b3e163fdd98f067ae440faa3152c80c6
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Jul 11 21:25:27 2014 +0200
+
+    Updated IANA mibs
+
+commit 01b3b6646413c14a050742726b97cf308b8fe09b
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Jul 9 23:51:27 2014 +0200
+
+    Add RFC 7257 vpls mibs
+
+commit b0be1d8ad2ccbcaa29ffc7cf884d02438c4c1665
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Jul 9 23:50:21 2014 +0200
+
+    adjust debug token for netsnmp_sockaddr_in6_2
+
+commit 9920e9e767b10f029ab4b020e8259676d1a32b2f
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Tue Jul 8 10:25:22 2014 +0200
+
+    AIX: Suppress a configure warning
+    
+    Avoid that the 'sort' command complains during the configure process
+    that its input is not terminated by a newline. See also commit
+    a63e381d9c1c9c87210bf2b022e3d6ac71d27a7e.
+
+commit b4eab11139eb122c9ad3c13ab8b9453e04e46842
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Mon Jul 7 14:04:45 2014 -0700
+
+    AIX: Fix a few compiler warnings
+    
+    Avoid that the following compiler warnings are reported:
+    - Assignment discards const.
+    - Unused local variable.
+    - Mismatch between format string and argument list.
+    
+    Also correct the indentation of two Solaris-specific code statements.
+
+commit 0dd2783b747fb96d74978e11c82a504c0df1d555
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Jul 6 11:12:30 2014 +0200
+
+    HP UX, CPU statistics: Fix an invalid pointer dereference
+    
+    See also commit 0034581deb3e676d328824c87637aaca31850c6a.
+
+commit dbd593132f719cc3d9bb5017ec8bc5c8cbb063b7
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu Jul 3 23:23:29 2014 +0200
+
+    T071com2sec6_simple: use private host to check ipv6 address resolution to make sure we get the expected result
+
+commit 0034581deb3e676d328824c87637aaca31850c6a
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Jun 30 22:08:34 2014 +0200
+
+    BUG #a2551: fix non-sequential cpu numbers on HP-UX.
+    Thanks to Dave Olker.
+
+commit b0f49ba21fb810efcb0992f01c4fc5fd30cf69af
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu Jun 26 21:42:48 2014 +0200
+
+    cpu_pstat.c: fix missing break(s) in switch statement
+
+commit a63e381d9c1c9c87210bf2b022e3d6ac71d27a7e
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Jun 20 10:57:39 2014 +0200
+
+    Recent patch from Bart (Display module names sorted) make configure lose all module names on Solaris 8 and 10.
+    This changes the way the sorting is done.
+
+commit 60cf6a06ff73ae7d4f2454f2ef40c56fcd394bfa
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Jun 18 22:19:32 2014 +0200
+
+    make test: bail out if netstat not found.
+
+commit c10f2acbfcc3834cd938641dc1a2c72aca7f7845
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Tue Jun 10 16:06:59 2014 +0200
+
+    Fix stupid bug in pkg-ng patch
+
+commit e2da5489c3bb829762604c9d41f08cb3aedfd8a6
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Jun 2 15:41:56 2014 +0200
+
+    PATCH #a1283: Recognize Oracle ACFS file system (Thanks John Haxby)
+
+commit 54c2cc2655c1b6c5485d99441aed2ac169eee5f9
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Jun 2 15:26:00 2014 +0200
+
+    Install SNMP-TSM-MIB and SNMP-TLS-TM-MIB
+
+commit ce3091cbc48bc405c6eb1af7ddaeb370ed786471
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Jun 2 15:23:24 2014 +0200
+
+    BUG #a2537: Support *BSD pkg-ng
+
+commit 49e4e49b12aae0d8f7572839365d46cf932bfec9
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Jun 2 15:18:46 2014 +0200
+
+    Fix FreeBSD system define chain
+
+commit 3c5e7124b35fd6aca4284eac365d74b69810785a
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Jun 1 11:27:25 2014 +0200
+
+    CHANGES: BUG: 1267 snmplib: register_mib_context() fix for read-only variables
+    
+    This is a slightly modified version of a patch from Harsha Shivanna.
+
+commit 56ecc433b09e985f1fdd786aae60b061ffac0382
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Jun 1 11:12:47 2014 +0200
+
+    agent/mibgroup/ucd-snmp/lmsensorsMib.c: Fix compiler warnings
+
+commit c9cf8fd869f3791a58a71b8a63f5d61d67291fae
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Jun 1 10:09:28 2014 +0200
+
+    configure: Display modules names sorted
+
+commit 27a16054d656eb10abd032dbac68ebbc26c76007
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Jun 1 09:22:52 2014 +0200
+
+    agent/mibgroup/ip-mib/data_access/defaultrouter_linux: Rework netlink buffer alignment
+    
+    Based on a patch from Joshua Hoke. See also
+    https://sourceforge.net/p/net-snmp/bugs/2547/.
+
+commit bd13f004f6dc16dbe56ea5381662495745d937e1
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat May 31 20:16:20 2014 +0200
+
+    Windows: 64-bit fix for build-binary.pl
+
+commit 1fa4da1c6cf967606333f7e77e408b7f51ef6256
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Fri May 30 17:42:07 2014 +0200
+
+    Windows: Suppress Visual Studio 2013 warnings about strtoull()
+
+commit b31aede9c8b63461b5092e16d626a676b172f8aa
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu May 22 23:05:19 2014 +0200
+
+    PATCH #1277: Fix ifspeed for Solaris zones. Thanks to lijo
+
+commit 869f785541a1ea3b4278145867b152bec50d3eb0
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Wed Apr 30 14:52:31 2014 +0200
+
+    winExtDLL: Translate SnmpExtensionQuery() PDU type correctly
+
+commit e0107c26b3a0e30ae83235bb225feb78a1a15638
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Wed Apr 30 15:38:55 2014 +0200
+
+    Windows: Silence a compiler warning
+
+commit 3a9f875423ccaa8baee7e164bb8a75dd8e0b7343
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Tue May 6 06:27:10 2014 +0200
+
+    PATCH #1279: Modified patch from Mohan for coredump after calling
+    free with a bad regex.
+
+commit 51302ba57285d4d47992ed15a460580112a3e924
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Tue May 6 06:21:24 2014 +0200
+
+    BUG #2521: AIX: dont die when CPU is dynamically added to system.
+
+commit 131c93ba92e46dddec4eb3a8208ab5a3c1026508
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Tue May 6 06:20:28 2014 +0200
+
+    Complain about -D option if debugging is disabled.
+
+commit 96a7a6a86895fdbf891799e3769b27a7e54af084
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Tue May 6 06:19:42 2014 +0200
+
+    snmptrapd.8: add some missing format tokens to man page.
+
+commit 80be907be9f4f1df6a1470feafaa916b9c9c4991
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Sun Apr 27 15:25:30 2014 +0200
+
+    Fix bug 2313 for cross compilation.
+
+commit 9ae5981530fd2bdd9f2a5c86b7d6994b873033d7
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Sat Apr 26 22:36:26 2014 +0200
+
+    Prepare for FreeBSD 11 and 12
+
+commit e32f70b12f57d26d69d491f1c742b0132aca7660
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Sat Apr 26 21:42:21 2014 +0200
+
+    Fix a couple of struct sizes to better match declaration.
+
+commit 7cc2deb5d915d2572328317d3701d35d861d3d92
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Sat Apr 26 21:34:26 2014 +0200
+
+    Use inet_pton onplace of inet_aton to help portability.
+
+commit a087fc9f164023de414b09bfd3747c72f1bca07f
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Sat Apr 26 21:30:54 2014 +0200
+
+    Update to current IANA-ADDRESS-FAMILY-NUMBERS-MIB and current RFCs.
+
+commit 857037a8d2457ac9aa2a52510957647971a46634
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Sat Apr 26 21:28:00 2014 +0200
+
+    Prepare for FreeBSD 11 and 12.
+
+commit b99308417d4be7e139f6103d44f11b55433a6bf1
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Sun Mar 16 08:04:15 2014 +0100
+
+    Better documentation for trap logging formats.
+
+commit a6e4eb26f5c04d15761ceaf924580e0c40f72dfe
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Mar 9 08:46:57 2014 +0100
+
+    swrun_*: Simplify commit da00ba1
+
+commit 37af7923b832f2ec80837fa28edcac8eb0c7e8ea
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Mar 9 08:34:12 2014 +0100
+
+    swrun_*: Restore buffer overflow prevention code that was removed in da00ba1
+
+commit f436ce28fda3edc7010cd86ecf3c386c5af52196
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Sat Mar 8 14:07:57 2014 +0100
+
+    util_func: fix skipping of digits which would run one too far
+
+commit da00ba142d6b504255889f09eb9f7d222ef40ada
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Sat Mar 8 14:04:19 2014 +0100
+
+    swrun_*: snprint may have set a too long string length. Fix it if needed.
+
+commit 3b202eb05ec4e5f6f8f54bc8acb437373e6b5d03
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Sat Mar 8 14:02:18 2014 +0100
+
+    swinst_apt: ensure room for string terminator
+
+commit 8a66814edad5a28fdbc8645fb0e14459bf915da0
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Sat Mar 8 14:00:28 2014 +0100
+
+    mta_sendmail: isspace cannot take a char argument
+
+commit 3e734fb3bddf11b99b6ba7ddcb30ae932d8ba3b1
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Sat Mar 8 13:58:07 2014 +0100
+
+    expExpressionConf, expValue: isspace cannot take a char argument.
+
+commit 76e8d6d100320629d8a23be4b0128619600c919d
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Thu Mar 6 09:21:51 2014 +0100
+
+    CHANGES: snmpd: PATCH: 1275: from Viliam Púčik: fixed Perl trap handler when processing trap with empty community string.
+
+commit 5d06a5fbb5ed3ca2b5820e8ef2d5b5b88b9d7df8
+Author: Bill Fenner <fenner at gmail.com>
+Date:   Mon Feb 3 11:58:03 2014 -0800
+
+    Allow the nodemap to contain multiple nodes for mibs like IF-MIB
+    
+    In the IF-MIB, "interfaces" and "ifMIBObjects" both contain
+    significant subtrees.  Allow nodemap to contain a comma-separated
+    list of nodes, to handle MIBs like this.
+
+----------------------------------------------------------------------
+
+Changes: V5.7.3.pre2 -> V5.7.3.pre3
+
+commit 54166cf6c7a98bf8e5d0dbabf9b5e5a255c4c421
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Tue Feb 25 12:45:14 2014 -0800
+
+    make depend for 5.7.3.pre3
+
+commit 3d4e3a66bd097e3720fe5de2f2e05741b3306305
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Tue Feb 25 11:42:15 2014 -0800
+
+    Version number update: 5.7.3.pre3
+
+commit a1fd64716f6794c55c34d77e618210238a73bfa1
 Author: Wes Hardaker <hardaker at users.sourceforge.net>
 Date:   Wed Feb 19 15:21:57 2014 -0800
 
     bug fix from fenner: fix ICMP mib table handling on linux
 
+
+----------------------------------------------------------------------
+
+Changes: V5.7.3.pre1 -> V5.7.3.pre2
+
+commit bf0a1c37d8b8c644e837041d090aabe8fd8131e8
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Tue Feb 25 07:49:04 2014 -0800
+
+    make depend for 5.7.3.pre2
+
+commit decfd8d79b54d298ded97439efb710e8f6ba524c
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Tue Feb 25 07:33:52 2014 -0800
+
+    Version number update: 5.7.3.pre2
+
+commit 8aeccef39bbaeb8b8025a68ec4761bc82ec9aeaa
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Tue Feb 25 07:27:47 2014 -0800
+
+    NEWS: snmpd: patch 2525: from Ryan Steinmetz: Fix argument length parsing of the host resources mib
+
+commit b222e7a3eef59cbb68a453476cb364342c74e640
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Feb 19 22:26:08 2014 +0100
+
+    Fix speling error
+
+commit f8fcb3bc38188ccbe9bacee58d6fd2b983d09927
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Feb 19 22:24:26 2014 +0100
+
+    Fix speling error
+
+commit d214d70c4524e62fccaf1083abc5ba1a439a463e
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Feb 19 22:21:55 2014 +0100
+
+    snmpstatus: detect SNMP exception responses.
+
+commit bf75ec66965d157cb0442f7dff5656f99cd70635
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Feb 19 22:20:05 2014 +0100
+
+    Fix test for com2sec6 access.
+
+commit 6567a37fa301b8fa1b68009d5a0b3a3cbfb9e8f1
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Feb 17 21:49:13 2014 +0100
+
+    testing/Makefile.in: make sure '$' survives for perl test.
+
+commit 05b551bc331185eda1c081d3138d0ac625b07d6a
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Feb 17 21:36:48 2014 +0100
+
+    Fix some man page spellings.
+
+commit 8b0555d95cbc238cbe9836439b88070c80a9ca5e
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Feb 17 21:35:28 2014 +0100
+
+    snmpnetstat: fix call of memcpy with overlapping areas.
+
+commit 3c6a7a6c947424824e724e294483a7ecd70d9d41
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Feb 17 21:33:47 2014 +0100
+
+    route_ioctl.c: set proper mask before SIOCDELRT.
+
+commit f99ef5cef203ea378553a2ab4925fcd869e7f5a3
+Author: Bill Fenner <fenner at gmail.com>
+Date:   Tue Feb 11 08:47:51 2014 -0800
+
+    David Jarvie's patch for bug 2507
+
+commit d70f2e91e2c7258e768e32b683d814a941564ac1
+Author: Bill Fenner <fenner at gmail.com>
+Date:   Mon Feb 3 11:58:03 2014 -0800
+
+    Allow the nodemap to contain multiple nodes for mibs like IF-MIB
+    
+    In the IF-MIB, "interfaces" and "ifMIBObjects" both contain
+    significant subtrees.  Allow nodemap to contain a comma-separated
+    list of nodes, to handle MIBs like this.
+
+commit 98781ae3da43b7b1583ecde3e21bb6525a2c0b80
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Jan 27 22:24:18 2014 +0100
+
+    route_ioctl.c: Fix setting the netmask when creating route through
+    inetCidrRouteTable and ipCidrRouteTable.
+
+commit 2e94777693f1853479ded670be307ece7138feb5
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Jan 27 22:13:05 2014 +0100
+
+    Fix compile for Solaris without IPv6.
+
+commit 8f6991a2114fd21ba5519ee9576beb082f603dec
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu Jan 23 16:30:46 2014 +0100
+
+    snmpnetstat: search ifName and ifAlias when looking for interface
+    name from -CI option.
+
+commit 4a360104659c169ce232256e138d938d94e435f9
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu Jan 23 16:28:32 2014 +0100
+
+    logmatch: fix out-of-bounds access. Thanks to gcc or clang
+    with -fsanitize=address (recommended!)
+
+commit eef2f64b46357b353c79504bc593535ebe7421e7
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu Jan 23 16:27:07 2014 +0100
+
+    cpu_linux: support systems with more than 100 cpus.
+
+commit 3bd683c96d6a8864fbd8078574aee8cd431ce302
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Jan 15 18:36:01 2014 +0100
+
+    Update options lists in manual pages and commands help.
+
+commit a5efe8df17ddc4f6693c7da9a52c401f4db2be63
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Jan 15 18:28:24 2014 +0100
+
+    test T027: make sure it works also when configured with --with-default-snmp-version != 3.
+
+commit 57d1082900f9ac931444316a6f95f19eda069074
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Jan 15 18:26:24 2014 +0100
+
+    cpu_linux: remove redundant casts.
+
+commit 9f4c572614091404decba0d4ef1a4cbaf9fc5bd2
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Thu Jan 9 13:35:27 2014 +0100
+
+    CHANGES: snmpd: Fixed monitoring based on non-delta trigger.
+    
+    snmpd crashed wit following snmpd.conf:
+        monitor -s -D -r 10 -e LOGMATCH -o logMatchCurrentCount "Log Match" != logMatchCurrentCount
+        logmatch LoginFailure1 /var/log/secure 10 su: .*fail.*
+    
+    The reason was unitialized variable sysUT_var in mteTrigger_run(), it was
+    filled only if the trigger was delta-valued, while its value was used for all
+    triggers.
+    
+    With this patch, sysUT_var is filled for all code branches where it is needed.
+
+commit c7512afe5643ecaae9745ac199b839c3aad8457b
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Sun Dec 29 17:34:51 2013 +0100
+
+    Regenerate dependencies
+
+commit c91f840d83981f660b75274dbcc387cb5c5f99af
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Sun Dec 29 17:29:26 2013 +0100
+
+    Regenerate dependencies
+
+commit 2dd7dba76d1d0b4f866834e0fd60148c281a153c
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Sun Dec 29 17:25:05 2013 +0100
+
+    Regenerate dependencies
+
+commit 591431f7991f83d2385adbc5a22c4a89576bc313
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Sun Dec 29 17:21:56 2013 +0100
+
+    Regenerate configure using the right autoconf version
+
+commit 85bb4b5c9f4896876715cb1f14f4f1b582d223bd
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Sun Dec 29 17:12:03 2013 +0100
+
+    Regenerate dependencies
+
+commit d255ca426d1e3d4bc48b8f3db937435788934c42
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Sun Dec 29 12:35:30 2013 +0100
+
+    CHANGES: building: Avoid duplicate and trailing spaces in the dependency files.
+
+commit d15cd2b9743cccb502deafd143ade0aa90cf31e4
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Sep 21 09:05:13 2013 +0200
+
+    MinGW: Build fix
+    
+    Apparently with recent MinGW header files <winsock2.h> should be
+    included instead of <winsock.h>. Modify <net-snmp/types.h> accordingly.
+
+commit 7ba23e57076499ef8eeb23885383473ccf447365
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Dec 15 10:58:25 2013 +0100
+
+    Win32: batch build: Check whether Perl architecture matches target architecture
+    
+    Building the Perl modules fails in a subtle way if e.g. a 32-bit Perl
+    interpreter is present in %PATH% and a 64-bit C compiler or vice versa.
+    Hence check whether Perl interpreter and C compiler target architecture
+    match before starting a build.
+
+commit 6b706c53d4cf751e495aab66fe39fd51c32ce930
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Dec 15 10:06:21 2013 +0100
+
+    Win32: Visual Studio 2013 build fix
+    
+    Apparently Visual Studio 2013 does not support goto <typedef name>.
+    Hence rename the UINT label. For consistency reasons, also rename
+    the OCT label.
+
+commit 13c8590e38269a9265ead5c85f05c8894e86d84c
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Dec 15 09:31:44 2013 +0100
+
+    Remove the NETSNMP_DONTWAIT / NETSNMP_NOSIGNAL aliases for sendto/sendmsg flags
+    
+    Note: this patch is a more elaborate version of the V5-7-patches commit
+    89a504fe331e09a54f6b01c2877cf022900705a8 (2011-12-19).
+
+commit e0ead2d54ebf43533e562c3402e12188cfdc079e
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Dec 14 18:54:01 2013 +0100
+
+    win32/build.pl: Add support for the Visual Studio 2013 command-line environment
+
+commit 8886095a99090293b06a0719e7b868f1edc14933
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Dec 14 18:29:01 2013 +0100
+
+    libagent: Win32 build fix (see also commit 01723c6)
+
+commit 5f32b4aaa8bcd22eba9c649223fe080d5479bc8e
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Dec 14 17:17:30 2013 +0100
+
+    include/net-snmp/library/snmpUDPBaseDomain.h: Add a missing declaration
+
+----------------------------------------------------------------------
+
+Changes: V5.7.2 -> V5.7.3.pre1
+
+commit d0117adee84efcb58a5e4183f7d7cc6e700f0264
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Thu Dec 5 23:33:51 2013 -0800
+
+    make depend for 5.7.3.pre1
+
+commit b1dbda8bbcca82377664dca9cb6bb06f9ce637a2
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Thu Dec 5 23:33:37 2013 -0800
+
+    Replace // comments with /* comments
+
+commit 9ee396cec1811512fbcb24490b3be0b970f69ffb
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Thu Dec 5 23:06:13 2013 -0800
+
+    Version number update: 5.7.3.pre1
+
+commit 6c392fed6cd5d7a32ed10c8170aed851cee77985
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Thu Dec 5 23:04:25 2013 -0800
+
+    increment the revision
+
+commit f5403e7567eb071bed8dadba38a2cda60332b8fc
+Author: Bill Fenner <fenner at gmail.com>
+Date:   Sun Dec 1 18:24:12 2013 -0800
+
+    Don't set the ifindex when sending a normal reply.
+    
+    Setting the ifindex in the IP_PKTINFO results in setting
+    the source address too (ignoring the source address that
+    we also supply).  The sequence here is that we send with
+    no interface specified but the request's destination
+    specified as our source.  If we get EINVAL, it's because
+    the request's destination was a broadcast address which
+    is an invalid source address, so we try again with the
+    incoming interface's if_index and specify the source
+    as INADDR_ANY.
+    
+    If we supply the ifindex in the first call, a reply from
+    a multi-homed agent may come from a different source address
+    than the request was sent to, potentially confusing a manager.
+    This bug was first introduced in SVN r17855 and was fixed
+    in SVN r19767; also see the mailing list thread
+    http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTim37H7M7Ba010Lmdk1YGYKwPTkDyRKoDr76uqDT%40mail.gmail.com&forum_name=net-snmp-coders
+
+commit 144a13208b4fa6f0a1cd971f41a7279716b27eee
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Nov 29 08:07:28 2013 +0100
+
+    snmpnetstat: fixing the stats output broke the conn output :-(. Fixed.
+
+commit f4e5ee6f39630b73f8ad9946c990e9690580d7cf
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Wed Nov 27 01:12:00 2013 +0100
+
+    CHANGES: testing: Add tests for asn_realloc_rbuild_*int* and tests for opaque unsigned 64-bit types.
+
+commit 20e4b37932a9e9cc56b360a236e9d8180793a297
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Wed Nov 27 00:54:58 2013 +0100
+
+    CHANGES: snmplib: Correct the type check for opaque variables when decoding counter64 values.
+    
+    Thanks to rkj at softhome.net for reporting this issue.
+
+commit 6e76cbbb2a0783f22f58fb7d323e9f7217cc604a
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Wed Nov 27 01:01:04 2013 +0100
+
+    CHANGES: snmplib: Avoid failure to trigger sign extension due to overlong types
+    
+    In asn_realloc_rbuild_signed_int64 the algorithm assumes that shifting
+    values greater than 0x7fffffff right is an arithmetic shift that will
+    shift in 1's. On hosts where long is more than 32 bits the use of long
+    for 'low' and 'high' makes this assumption false.
+    
+    Thanks to rkj at softhome.net for reporting this issue.
+
+commit 4a4b78e63dd688892b7399b584e26e047d367501
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Nov 27 22:16:44 2013 +0100
+
+    Additional fix for darwin13
+
+commit 91bd5d4c5f41b54c46242883db92aa4e49455294
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Nov 27 22:13:03 2013 +0100
+
+    snmpnetstat: fix truncated statistics when using -v1
+
+commit 0cb14d4e5c39a07c78474881e6c73fa617507bdb
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Nov 27 22:06:58 2013 +0100
+
+    snmpnetstat: fix statistics for ipv6
+
+commit 2d4defe77bdebbbc1a773eb8d48498b6f2558f23
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Tue Nov 5 06:49:35 2013 +0100
+
+    CHANGES: snmpd: Use 0 for the ignored numvars argument to netsnmp_register_mib
+    
+    The numvars argument of netsnmp_register_mib is ignored if the var
+    argument is NULL. In order to unify this use of it with all other ones,
+    change it from 1 to 0
+
+commit b9933e6183b1715c90d7cf6dfac1891000796bce
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Fri Nov 22 23:04:08 2013 +0100
+
+    CHANGES: snmpd: Remove some unused includes
+
+commit a78307038bf0b4859e11bd86ca3049c339abe126
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Sat Nov 23 09:49:01 2013 +0100
+
+    CHANGES: snmpd: Add a missing function declaration
+
+commit d8d6078b3e65b5ba131df842d92c7743737ff955
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Tue Nov 19 08:06:34 2013 +0100
+
+    CHANGES: snmplib: Mark register_signal and unregister_signal as unused.
+
+commit bf083f5b69ccb95ff70e2a28a7c64fec7d7e422e
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Nov 18 22:41:28 2013 +0100
+
+    Patch a1270: man page fixups (thnks Aleksandrs Saveljevs)
+
+commit 62a634ce671c38ade97917077039e34ae3d92734
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Nov 3 16:02:39 2013 -0800
+
+    Win32: Unbreak the build (see also commit 253f90743)
+
+commit a813b5111255f75fef6944cedd648dbf8c34a9ad
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Mon Nov 11 17:54:44 2013 +0100
+
+    Win32: perl: Avoid transport initialization failure in Perl SNMP agents
+    
+    Avoid that the followingn message is printed during startup of a Perl SNMP
+    agent:
+    
+    netsnmp_assert s != (-1) failed ..\..\snmplib\transports\snmpUDPBaseDomain.c:484
+    
+    See also commit 36a7de7230fbbbb52cc37cbbed281eb559404be9.
+
+commit a2a3a1aa67ff38daa8f139518abb3548475ed591
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Nov 8 22:32:29 2013 +0100
+
+    snmpnetstat: fix usage message to be closer to reality. Fix handling of -Cp and -Cf options with new tables.
+
+commit 7277400102dfca921eac0bd9cef86b32f598003d
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Nov 8 22:30:14 2013 +0100
+
+    Clean up snmpnetstat man page, removing some left over cruft man
+    original bsd netstat page.
+
+commit eb0379db3853fad138f92f4792a8034177d9629a
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Nov 4 22:09:55 2013 +0100
+
+    Fix length of default router adddress using sysctl.
+
+commit 8fa46f29613c1792c4a14432944273b6d74e3f3c
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Nov 4 22:07:56 2013 +0100
+
+    Fix handling of command names with blanks on Linux.
+
+commit 6fcb381dcd460b79556339eb36fbe579bf49dc03
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Nov 4 22:05:56 2013 +0100
+
+    Add LISP-MIB to rfclist.
+
+commit 1c5104741070219f13800d76afd57a0d636c243b
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Nov 4 21:54:36 2013 +0100
+
+    Fix paging statistics for OpenBSD 5.4
+
+commit 2f57b804e83b8f89b8969637f83d8886010838ff
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Oct 30 21:35:33 2013 +0100
+
+    Add darwin13 support file
+
+commit 823d51f79b84e13593e5b1ac9b407634c54346f4
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Oct 21 20:49:53 2013 +0200
+
+    Fix make install in man directory for Solaris caused by VPATH oddity.
+
+commit c575204a02059199428ce135bc12ecb385e36763
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Oct 21 20:47:31 2013 +0200
+
+    Change an occurrenceof sprintf to snprintf.
+
+commit a2bda994019280278beded7917c877fcb448873d
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Oct 21 20:46:30 2013 +0200
+
+    Better wording for statistic entry.
+
+commit 6644b05d3cf34123ceda74b7b84f16944359e7ca
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Oct 21 20:45:15 2013 +0200
+
+    Fix warnings for libnl1.
+
+commit 940816e019171a0414ee00a46cda4ce60bc01f71
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Oct 5 11:05:12 2013 +0200
+
+    CHANGES: snmplib: PATCH: 1265: Fix a buffer overflow in dump_realloc_oid_to_inetaddress()
+
+commit 0992ecf8fc5d87837006d4bc3a8681e5736e3573
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu Oct 17 07:16:23 2013 +0200
+
+    pass_persist: zap possible CR at end of line.
+
+commit eb88e024b4c267994de40401e8b7d77e32dec6cf
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Tue Oct 15 21:33:56 2013 +0200
+
+    Maintain byte order for IPv6 port numbers in transport data (problem surfaced in snmpTargetAddrEntry)
+
+commit f2e57b8e638a1fcdc85fd0fd2f6552a33fcab3f8
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Tue Oct 15 21:17:21 2013 +0200
+
+    snmpnetstat: better handling of snmp exceptions.
+
+commit e0280294e7e6bebd62fbab9928b1b5f01b735e72
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Tue Oct 15 21:15:39 2013 +0200
+
+    Fix DISPLAY-HINT for negative values and hint "d-n".
+
+commit 1abb5a094d27514b8147b1128db2cddcb1703bb8
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Fri Nov 2 14:45:42 2012 +0100
+
+    Use NETSNMP_PRIz to print size_t values in _sess_read
+
+commit acb72589acb3018e443f5e3f654dd03f7c26316a
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Tue Oct 1 18:41:51 2013 +0200
+
+    Add forgotten icmpOutEchos to icmpMsgTable.
+
+commit 253f907439151023a92a3ac43a9f317e3a4e17fa
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Sep 30 22:13:43 2013 +0200
+
+    Solaris: support icmpMsgStatsTable
+
+commit 6ee91f06b5bd0e0cbd2b69f3dae0bf6141cc9556
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Sep 30 06:59:10 2013 +0200
+
+    Solaris support for IP-FORWARD-MIB
+
+commit 4ebdf3fb0445f9067ecb38394c2df2bd3b738182
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Sep 30 06:54:28 2013 +0200
+
+    Properly handle the 'b' display hint.
+
+commit 7f2edbf68348cabeaf995aaba1b2a7893d18c5e7
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Fri Aug 30 08:50:09 2013 +0200
+
+    Remove some commented out defines
+
+commit 435ee1f4023cb002245c3a56dbeaba37a3d3edbe
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Sat Sep 28 14:26:10 2013 +0200
+
+    Patch a1259 (bug a2456): problems with ipCidrRouteTable on 64-bit bigendian machines. Thanks to Christopher Wu.
+
+commit 9a6f566392a3cf12dab488a76d69fc873dbec2ac
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Aug 25 10:18:53 2013 +0200
+
+    CHANGES: snmplib: Rename memdup() into netsnmp_memdup()
+    
+    Rename the function memdup() defined in libnetsnmp.so into
+    netsnmp_memdup(). This avoids conflicts with memdup() functions
+    defined in other libraries that define a function with the same
+    name. As an example, if WINS name resolution has been enabled via
+    /etc/nsswitch.conf then performing a host name lookup can trigger
+    a crash in the SAMBA WINS name lookup library because calls to
+    memdup() from that library get redirected to the incompatible
+    Net-SNMP memdup() function. See also
+    https://bugzilla.redhat.com/show_bug.cgi?id=1000780 for the details.
+    This patch intentionally changes the Net-SNMP ABI.
+
+commit 3dde41998625fe0e24119a2e1f4509ba3ba2fd9a
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Thu Sep 5 20:27:22 2013 +0200
+
+    CHANGES: Linux: BUG: 2238: Add libnl3 support
+
+commit a37957bee9f79db19bba93f11faa037921d6e584
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Sep 23 22:24:15 2013 +0200
+
+    route_sysctl.c: Fix for linklocal routes on FreeBSD 10
+
+commit d9a7f9fc679455b0fa328fbae67ec2ee2906b94b
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Sep 22 19:42:51 2013 +0200
+
+    win32/dist/build-binary.pl: Automate building the installer
+
+commit eb1a1641500d6bcf39f9b847a2c06c9eda0c88c4
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Sep 22 19:32:31 2013 +0200
+
+    win32/dist/installer/net-snmp.nsi: Make it possible to build an installer without administrative privileges
+
+commit a9777ec9afb37ca6442166079bd5b2e0349be3e3
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Sep 22 18:35:55 2013 +0200
+
+    win32/dist/installer/net-snmp.nsi: Fix OpenSSL version check
+
+commit 5cb2cc7ab20b290a6c74585f985f9c912cdec8ce
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Sep 22 10:25:00 2013 +0200
+
+    win32/dist/installer/net-snmp.nsi: Remove MSVC redistributable files from the installer
+
+commit 178120061ece48ccd97a3ae36b880da6b1095207
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Sep 22 09:50:18 2013 +0200
+
+    win32/dist/build-binary.bat: Generalize
+
+commit 85a1c5026f10ff143f437f003894a6c4aa187a96
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Sep 22 18:43:05 2013 +0200
+
+    win32/dist/build-binary.pl: Fix x64 detection
+
+commit a0c2a7ab42997433e707c10f8acf61f912442f70
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Sep 22 17:28:54 2013 +0200
+
+    win32/dist/build-binary.pl: Examine two locations for MinGW bin dir
+
+commit cf1006e67f9c77fbda94d4521e78f0098c8a0e19
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Sep 22 10:11:13 2013 +0200
+
+    win32/dist/build-binary.pl: Fix SSL build
+
+commit b47f136bea8ef5468a20d9452b12318db6c349eb
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Sep 22 17:05:37 2013 +0200
+
+    win32/dist/build-binary.pl: Add WSDK support
+
+commit 0e18a206aaa490fdeb2c70a0e6e52c91eb5f3ed9
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Sep 22 09:48:06 2013 +0200
+
+    win32/dist/build-binary.pl: Reduce code duplication
+
+commit 85df02b836320cc45e5d2db45483bc508631446c
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Sep 22 10:02:21 2013 +0200
+
+    win32/Configure: Fix build without OpenSSL
+
+commit 3f9adb987b5bf5d2d095cfd6ea2da9cd81d1bec4
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Sep 22 09:15:41 2013 +0200
+
+    snmplib/transports/snmpUDPBaseDomain.c: Win32 build fix
+
+commit a6e1851fbe747cf15ed075807781ce89a34e96c2
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Sep 21 19:55:02 2013 +0200
+
+    Restore "CHANGES: Win32: perl: BUG: 2488: Avoid "Free to wrong pool" error"
+    
+    This reverts commit b2725964bde921b6285e3a59a512552cae0a0ca5.
+
+commit b2725964bde921b6285e3a59a512552cae0a0ca5
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Sep 21 19:49:58 2013 +0200
+
+    Revert "CHANGES: Win32: perl: BUG: 2488: Avoid "Free to wrong pool" error"
+    
+    This patch is not appropriate for the v5.4 branch.
+
+commit 6453717f6ac665bf532744a86cdb898aaf83d6bf
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Sep 21 19:34:25 2013 +0200
+
+    Add reproducer for bug 2488
+
+commit 0d0a4629702eb9f9fe9956c1bac4b445610ff3c7
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Aug 31 17:21:22 2013 +0200
+
+    Simplify snmpTargetAddr_rowStatusCheck()
+
+commit 4b87e3cb4d3679ab60c353ba4ff301f6842b84bc
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Sep 21 16:37:09 2013 +0200
+
+    testing/fulltests/default/T068execfix_simple: Simplify
+
+commit 65c88e2ecf5de9365c83c46ef3bb4cd89cdc44e8
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Sep 15 11:11:43 2013 +0200
+
+    CHANGES: Win32: perl: BUG: 2488: Avoid "Free to wrong pool" error
+
+commit 1a4855da4b1dd693a2b0377b91e9c33e3c7f2a4d
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Sep 21 17:11:45 2013 +0200
+
+    CHANGES: perl: BUG: 2402: Add support for SNMPv3 traps
+
+commit 3d0515693f6a0d29d39dd0c868d378c74bc4f87c
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Sep 21 09:16:33 2013 +0200
+
+    testing/fulltests/default/T068execfix_simple: Port to MinGW and FreeBSD
+
+commit 5b6e431d9f663a3c327d71dac95392cfd86b3291
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Sep 21 09:03:59 2013 +0200
+
+    agent/mibgroup/ucd-snmp/extensible.c: Fix compiler warnings
+
+commit 9f2e8fc8d9a26f57ab089aba3d1ae26b3e8f2d54
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Tue Sep 17 22:30:38 2013 +0200
+
+    Fix dependency for FreeBSD10
+
+commit a506efdd1db824a9eeee03d0021c90faf3b62924
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Tue Sep 17 22:29:34 2013 +0200
+
+    snmpdf man page: fix formatting of -Ch/-CH options
+
+commit a2e97bebfc52170f9ec1036d24aa84f59cf2e508
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Tue Sep 17 22:27:49 2013 +0200
+
+    Update the BSD multi-cpu counters code to work without configure help.
+
+commit c85d64d54b06879a3a691dadffc03bfb1f59096d
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Tue Sep 17 06:37:18 2013 +0200
+
+    Only test the execfix configuration directive if it is enabled
+
+commit ed8b697cea0679de7be5b3f5d469134e1cdaed56
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Sep 7 10:27:02 2013 +0200
+
+    m4/ac_add_search_path.m4: Fix a comment
+
+commit f779c5e9467885852f16c5541a380111f9ead061
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Sep 7 20:28:29 2013 +0200
+
+    agent/mibgroup/host/data_access/swinst_apt.c: Fix compiler warnings
+    
+    Remove the unused variable 'rc' and fix a format string.
+
+commit c6439627d09f503fdc8cfa32d884e83473831754
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Tue Mar 8 00:13:05 2011 +0000
+
+    allow for v2c SET support testing
+    
+    git-svn-id: file:///home/hardaker/lib/sf-bkups/net-snmp-convert-svnrepo/trunk@20084 06827809-a52a-0410-b366-d66718629ded
+
+commit 5cbd54341a2a79bf8537377d11372483f08647ad
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Sep 14 14:28:21 2013 +0200
+
+    regression tests: Add a test for the execfix configuration directive
+
+commit 1c756349e4d31d39ec2fc53c6440ae53b3b03df0
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Sep 7 20:28:56 2013 +0200
+
+    snmpd: ucd-snmp: Fix a potential crash in fixExecError()
+    
+    Do not interpret a command specified via the execfix configuration
+    directive as a printf() format string.
+
+commit 8b140d0965e11f5921768bf05d0c2b1941c0d335
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Aug 31 17:10:55 2013 +0200
+
+    SNMP-TARGET-MIB: Declare local variables at file scope static
+    
+    Also, declare those variables const that are not modified.
+
+commit 7b82c61e753e157c4b8698219006f2f83df52801
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Aug 31 16:51:15 2013 +0200
+
+    SNMP-TARGET-MIB: Eliminate two superfluous casts
+
+commit dbcf47dd4fe5262ad0fad7c97745209589540c40
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Wed Sep 11 10:21:32 2013 +0200
+
+    Reword the includeFile search process to fit the implementation.
+
+commit 85073085d67ed66ab74611c8e5f810192491ba68
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Sep 9 22:26:23 2013 +0200
+
+    Patch a1263: Make database name configurable for trapd sql logging.
+    Thanks to Robin Sonefors.
+
+commit 7e7258ef8b32f974048f3fd098a9da526da2e613
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Sep 9 22:17:15 2013 +0200
+
+    Patch a1262: Fix memory error caused by confusing size of pointer
+    with siuze of pointed area. Thanks to Robin Sonefors.
+
+commit 586e07b8de51b05400d582facd91d4410dd37703
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Aug 31 17:09:59 2013 +0200
+
+    snmpd: Constify a few arguments of MIB registration functions
+    
+    Note: this patch does not change the ABI.
+
+commit 44c3671dd93fe0f08299e61d0a422fd072b490e6
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Sep 8 07:35:46 2013 +0200
+
+    Run autoreconf
+
+commit 62dadefa1b2688c02792e9fd2d3fc31c79ed11c3
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Sep 6 11:54:13 2013 +0200
+
+    swrun_darwin: Fix buffer overrun when collecting hrSWRunParameters
+
+commit 1e0526f85ed61567ca6ea53b566c772992111c9e
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Sep 4 22:30:40 2013 +0200
+
+    Add a couple of contributors to README
+
+commit edc608ebd5d0219863bc5f656d177b1d561048c2
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Sep 4 21:59:18 2013 +0200
+
+    Fix a printf format warning.
+
+commit fb24f733cb316c35ccfdc59f487b65e0cd974c68
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Sep 4 21:54:27 2013 +0200
+
+    snmpnetstat: Indent ICMP histogram for readability.
+
+commit f7943a5d58a6f953c79fb55ab897c849228edb8a
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Sep 4 21:45:19 2013 +0200
+
+    Recognize zfs file systems
+
+commit ab4370baf5ccc146f8d1c839bb0f419ee37e71c2
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Sep 2 21:21:25 2013 +0200
+
+    Patch a1261 (Bill Fenner): Fix crash when mib-indexes are not all readable
+
+commit c6caa3007f60f6cdeaa134152758645a73a7fe64
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Sep 2 19:39:14 2013 +0200
+
+    snmpnetstat: Proper tests for v2/v3 exception results (Bug a2477)
+
+commit 39420bd40b7a1ba720a9cbb92264d3f9cc0a7e2f
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Aug 21 22:08:41 2013 +0200
+
+    PATCH a1260: Support multi-cpu usage for Free/Net/Open-BSD.
+    Thanks to Pablo Carboni for first stab at this.
+
+commit 62305cd028d8abf430121e9008acc8f0d1871e1c
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Aug 21 22:08:41 2013 +0200
+
+    PATCH a1260: Support multi-cpu usage for Free/Net/Open-BSD.
+    Thanks to Pablo Carboni for first stab at this.
+
+commit cc2fe6bde6a3c28b3c1ad165c9ba3fc1d583c253
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Aug 25 08:23:43 2013 +0200
+
+    IP-MIB: Fix Doxygen header of netsnmp_ipaddress_ipv4_prefix_len()
+
+commit 96302af7fc3108c208227432f0f0b75f3e7b906d
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Wed Aug 28 10:59:05 2013 +0200
+
+    Correct conversion factor from microseconds to centiseconds.
+
+commit e8cf766e083834af7fdfed877dbe8810bf00a4ea
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Aug 19 22:17:11 2013 +0200
+
+    Fix netsnmp_ipaddress_ipv4_prefix_len to take an argument in network byte order as dokumentet
+
+commit a0c59a3b458e8a8dfb059a62792d25a4c5c9fc9e
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Aug 19 22:14:15 2013 +0200
+
+    Fix netsnmp_ipaddress_ipv4_prefix_len to take an argument in network byte order as dokumentet
+
+commit 66b9bfba4eae84944abf4e6d074894acd0513c6b
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Aug 19 22:12:57 2013 +0200
+
+    Fix netsnmp_ipaddress_ipv4_prefix_len to take an argument in network byte order as dokumentet
+
+commit ec96b35d5060c09b9f53d4dec73fb7965c2ac145
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Aug 19 22:11:36 2013 +0200
+
+    Fix netsnmp_ipaddress_ipv4_prefix_len to take an argument in network byte order as dokumentet
+
+commit b27b47b5798469e9ab5bd4b51ac39d43fcd95608
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Sat Aug 17 10:12:14 2013 +0200
+
+    CHANGES: testing: Make sure Test::Harness is of at least version 1.21
+    
+    Test::Harness 1.21 is the first version that implements TAP v12 which allows
+    putting the header (1..N) after the tests and since our tests utilize that
+    we should make sure that the test runner supports it.
+
+commit 14f8d4ad6f06d09d87096dd68137a125a039c562
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Jun 29 17:42:54 2013 +0200
+
+    CHANGES: AIX: Make udp-mib build
+
+commit 38d77c7c20a3e7979c09c5144f86934ed46540dc
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Jun 29 17:39:38 2013 +0200
+
+    CHANGES: AIX: Make tcp-mib build
+
+commit 58fd23b7110c93ee496ffafe868539c2af8543bd
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Fri Aug 16 10:39:03 2013 +0200
+
+    Win32: Build fix: Export skip_white_const(), skip_not_white_const() and read_config_read_octet_string_const()
+
+commit 0ab9cd1655d46f968dc12bd6714ac17b9bce5e71
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Fri Aug 16 08:28:08 2013 +0200
+
+    CHANGES: snmp-usm-dh-objects-mib: Avoid triggering an assert statement in netsnmp_ready_monotonic()
+    
+    The cache timeout for snmp-usm-dh-objects-mib is -1. Any cache timeout
+    value < 0 disables caching. However, strictly negative values trigger
+    the assert statement in netsnmp_ready_monotonic(). Avoid triggering that
+    assert statement.
+
+commit 1fa584b222c56724378f5c85993eeee6515260ab
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Fri Aug 16 10:02:47 2013 +0200
+
+    CHANGES: snmplib: Fix NETSNMP_FD_SET_BYTES()
+    
+    This patch avoids that unit test T009large_fd_set_clib crashes on AIX.
+
+commit 95ac190b526dba5205637411a892b52b9ed6b94c
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Jul 21 17:16:42 2013 +0200
+
+    CHANGES: BUG: 2476: snmpd fails to start on AIX
+    
+    On an AIX system there is no <kvm.h> header file nor do the /dev/dmem
+    or /dev/drum devices exist and hence DMEM_LOC is not defined. Avoid
+    that init_kmem() fails in that case.
+
+commit 50481b769e29fc5ce6b1e40ce568185bb0898458
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Fri Aug 16 07:22:02 2013 +0200
+
+    snmpd: Refactor init_kmem()
+    
+    This patch does not change any functionality.
+
+commit cd7ef7be391035d9df05edc6ac9e6f3519b46f8b
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Wed Aug 14 23:38:21 2013 +0200
+
+    CHANGES: snmplib: Be more robust if clock_gettime fails.
+    
+    On RHEL3 it seems clock_gettime(CLOCK_MONOTONIC, ) always returns EINVAL but
+    it works for the other clocks.
+    
+    Further, the old code which returned a constant { 0, 0 } caused the test suite
+    to get stuck in a loop if no response arrived - thus this code have the
+    advantage of working less bad.
+
+commit 9d71feea271f91cc9b7adee6613af19eba7ec6cd
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Wed Aug 14 15:56:56 2013 +0200
+
+    Fixed return value on error.
+
+commit 9621f4cdc5a19cee4e11bf27094abf3339ddc30e
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Wed Aug 14 15:48:39 2013 +0200
+
+    Removing useless check, entry->d_name is array and can't be NULL.
+
+commit e41c2f574c25d8dd273f2406eeeac19bc2ae16db
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Mon Aug 12 14:30:51 2013 +0200
+
+    CHANGES: snmplib: Fixed parsing of sequences.
+    
+    Don't overwrite 'data' variable, it's used when parsing bulk responses.
+
+commit 390303059fbd98b1ee7621ddd4ad4c11d100fff9
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Sun Jul 28 21:28:14 2013 +0200
+
+    Revert 78dac6e37943d1ad99841898806ea60b0eede636 and resolve a2478 in a way that avoids truncating snmpTargetAddrTimeout.
+
+commit e59d5db6d6e72d134591bbaaa6faa59b29338191
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Sun Jul 28 21:17:58 2013 +0200
+
+    Check that the timeout value is in range.
+
+commit 4ecb36a7aba3ab0efa89351650ce053ebcf48b6a
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Mon Jul 29 21:54:25 2013 +0200
+
+    Check that snmpTargetAddrTimeout handles setting properly
+
+commit 1ae85b672eb07d0c01a54e06d3ddd4f4dc58ff2e
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Sun Jul 28 10:43:17 2013 +0200
+
+    Add some more tests for snmpTargetAddr
+    (cherry picked from commit 6e13ebb85e44049846eae7f60e050375f9acf58e)
+    Sanitized
+
+commit 6a5a047cbc11d62df04a9666908f7652b217c1aa
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Thu Aug 1 23:19:34 2013 +0200
+
+    Reinstate the check for creation of entries with embedded NUL's in the name
+
+commit 533bb80a5a4305b35dbb797444bd596d7d59951c
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Thu Aug 1 22:55:45 2013 +0200
+
+    Sanitize.
+    
+    Change to use SNMPv3 since that is writeable in V5-6-patches.
+    Change to check values on index 'A'
+    Remove the check for embedded NUL in indices.
+
+commit b24bf46220aaaf5794e940f5d4673db71339f9c0
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Sat Jul 20 12:39:59 2013 +0200
+
+    Add tests for snmpTargetAddr
+    (cherry picked from commit 71f319cd23445c6e22a60a1a85f31c2b6904b3fb)
+
+commit 6e13ebb85e44049846eae7f60e050375f9acf58e
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Sun Jul 28 10:43:17 2013 +0200
+
+    Add some more tests for snmpTargetAddr
+
+commit 0769f420d8f427993b1340fdb7ecb3bc049d3f6c
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Thu Jul 25 08:15:32 2013 +0200
+
+    First shot on handling certificates with embedded nul characters
+
+commit d833b0c8be509bfa3b8001ae6f552289ce9567d0
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Sat Jul 20 12:41:40 2013 +0200
+
+    CHANGES: snmpd: Make it possible to use NUL characters in the indices for snmpTargetAddrTable
+
+commit 71f319cd23445c6e22a60a1a85f31c2b6904b3fb
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Sat Jul 20 12:39:59 2013 +0200
+
+    Add tests for snmpTargetAddr
+
+commit ea39e3676665b7e8cc5dfeb5bbbcd0ad434ad912
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Thu Jul 18 01:36:26 2013 +0200
+
+    CHANGES: snmplib: Make the data argument to read_config_save_octet_string accept constant values
+
+commit 78dac6e37943d1ad99841898806ea60b0eede636
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Mon Jul 22 12:39:00 2013 -0700
+
+    fix bug number #a2478: fix mib representation of timeout values
+
+commit a7e3bc8ddbe387ebf6f3f6b050e2992956bd2e61
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu Jul 11 20:14:47 2013 +0200
+
+    Fixes for memory statistics from *BSD
+
+commit 9dbe12403ceaafe617f7d49993316a249fcbb99a
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu Jul 11 20:13:36 2013 +0200
+
+    Fix a missing newfile in a debug message
+
+commit 041deedf81537bc6169298753f9dca3f6cd61a35
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu Jul 11 20:12:12 2013 +0200
+
+    Make sure we don't make IPv6 mask longer then 128
+
+commit c67c78940339faeab42b1b1a0a6be6cd6dfe2e22
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu Jul 11 20:06:31 2013 +0200
+
+    Implament ipAddressTable for *BSD
+
+commit b181e43a6d1f567bfd10717a77df1848e3bb0f43
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu Jul 11 20:05:08 2013 +0200
+
+    Mark OS threads as such.
+
+commit e36a5cc5f20272afff4228e7e4391dd5e6c063b3
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu Jul 11 20:03:36 2013 +0200
+
+    Fic some man page cross references
+
+commit ecf8682d864d2f08525078543858d361b3adca5c
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Wed Jul 10 10:47:33 2013 +0200
+
+    Lower importance of debugging messages, they spam syslog.
+
+commit ef963063de49485bd91c129e053f06d0744483e1
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Thu Jul 4 11:34:25 2013 +0200
+
+    Fixed size of netlink message.
+    
+    Preventing kernel to log 'netlink: 12 bytes leftover after parsing attributes.' message.
+
+commit 2e0d1087313b0fa083e2b1ca4895fbf248d63ca9
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Thu Jul 4 22:04:12 2013 +0200
+
+    Run autoreconf
+
+commit c7fba78e1225254a0f65605f381aedd7d8a212ca
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Thu Jul 4 21:47:09 2013 +0200
+
+    Run autoreconf
+
+commit 571bd407f8be9c94cc552d4d3b7f5b6b0984d237
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Thu Jul 4 21:39:59 2013 +0200
+
+    Run autoreconf
+
+commit 8aa50edba7a2d966d8dfc7ff4d7c78efdde8c5bd
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Thu Jul 4 08:53:56 2013 +0200
+
+    Use AC_LINK_IFELSE instead of AC_TRY_LINK as the latter is deprecated
+
+commit 59c6ae34625ee04ace3824ec404613e0b51dc1b0
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Tue Jul 2 17:40:54 2013 +0200
+
+    Use the cpp and linker flags from mysql_config when checking for mysql headers.
+
+commit f89cfcafdae21fab50a70bddf158ffd9e4e001d2
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Tue Jul 2 17:39:25 2013 +0200
+
+    Use the output of mysql_config --include instread of the output of mysql_config --cflags ito find include files.
+    
+    According to the mysql_config man page, --include is recommended for greater
+    portability since --cflags might contain compiler flags for the compiler that
+    was used to build libmysqlclient which might clash with the ones used to
+    build the application.
+
+commit 68a6a1ca6dc4ca8901bacab598326af73b444654
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Tue Jul 2 17:30:29 2013 +0200
+
+    Only check for mysql/mysql.h once. Remove HAVE_MYSQL_MYSQL_H since nothing uses it.
+
+commit ad87bb608b305567a3c5eaf046b7c98ea3e4bdd5
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Thu Jul 4 11:30:04 2013 +0200
+
+    CHANGES: snmpd: PATCH 2472: from Sunil: don't use HBKT as heartbeat interval in SCTP-MIB::sctpAssocTable.
+
+commit 4c4a4281fd5b2c6156c5120f9a2e8b708f466ccd
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Thu Jul 4 11:08:48 2013 +0200
+
+    includeDir is not predictable with relative paths
+
+commit 79e8dd2a372a20ee97de1c7107b59ad4aaf89a36
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Thu Jul 4 10:47:29 2013 +0200
+
+    Update configuration documentation with includeFile and includeDir.
+
+commit e0e804482bec70f4c416a35fcb323a4169965c5f
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Wed Jul 3 15:08:14 2013 +0200
+
+    CHANGES: BUG: 2470: Accept 65535 as a valid IPv6 port number
+
+commit dd332a035e853c72a832748469bab7b882e27b7c
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Tue Jul 2 07:00:51 2013 +0200
+
+    BUG a#2463: Fix configure to respect data from mysql_config.
+
+commit 408cc9732c346111fc1fda23e136d60883cdb7e4
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Mon Jul 1 14:25:41 2013 +0200
+
+    CHANGES: python: correctly report error when parsing malformed OID.
+
+commit 9a2bfc8f95d6e926dcbf16ff44b53b27e38c8437
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Mon Jul 1 13:54:38 2013 +0200
+
+    CHANGES: python: Fixed returning of empty strings.
+    
+    Varbind type (SNMP_NOSUCHOBJECT etc.) should be used to detect errors instead of length of the variable - it can be empty string.
+
+commit 1a0f07574a80d1d6a6788caeb391a1d2fef95710
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Fri Jun 28 10:37:46 2013 +0200
+
+    CHANGES: snmpd: show Linux kernel threads in hrSWRunTable.
+
+commit 2659c0f6bd86f0171869d34ff8a7d48194ea4b31
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Tue May 21 09:13:41 2013 +0200
+
+    CHANGES: snmpd: Added btrfs support to hrFSTable
+
+commit a84039d0a1d6f550b473d295921010d80e18d83f
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Tue Jun 25 14:55:26 2013 +0200
+
+    snmp_strcat: dont test *buf before we have tried realloc
+
+commit 5553ef4362d524a088b519e13556158e5d625ec4
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Sun Jun 3 02:48:06 2012 +0200
+
+    CHANGES: snmplib: Do not printf("%s", NULL) as that is undefined behaviour.
+
+commit 89416e79f5c50568e99c07fab06a9ae9f976bbef
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Mon Jun 24 22:22:03 2013 +0200
+
+    BUG: A2441: Correct comment
+
+commit 1a3ae6477b8163a1b43b834abb30b1f03145ab62
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Jun 22 20:27:34 2013 +0200
+
+    CHANGES: HOST-RESOURCES-MIB, hrSWRun table: Parse /proc/<pid>/stat correctly on Linux
+    
+    This issue was reported by Vincent Bernat <vincent.bernat at dailymotion.com>.
+    See also http://sourceforge.net/p/net-snmp/patches/1257/.
+
+commit f92ffe917a300c41ebe07e24c6418855e759f938
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Jun 22 19:37:03 2013 +0200
+
+    snmptrapd: Fix a double free in an error path
+    
+    Detected by Coverity. See also http://sourceforge.net/p/net-snmp/patches/1251/.
+
+commit c5f3a1d8bb5804799b602d2769b031d6faf5f0ed
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Jun 22 17:51:43 2013 +0200
+
+    snmplib: hex_to_binary2(): Return -1 if memory allocation fails
+
+commit f8f08e1d6d3ec8194fabd6ab002ab917afba91a3
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Jun 22 17:13:01 2013 +0200
+
+    snmplib: Simplify the code for deleting a request from the request list
+    
+    The goal is (hopefully) that the new implementation does not confuse
+    Coverity anymore. See also http://sourceforge.net/p/net-snmp/patches/1251/.
+
+commit ef6d5c7a0313247a6c9473261777e963f7a49529
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Jun 22 14:48:22 2013 +0200
+
+    CHANGES: snmplib: snmp_strcat(): Check *buf before using it
+    
+    Detected by Coverity. See also http://sourceforge.net/p/net-snmp/patches/1251/.
+
+commit 2566b83ebeb0e34eea907928c54c2b4e74ff37f8
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Jun 22 14:23:33 2013 +0200
+
+    hrSWInstalled table: Check stat() return value (2/2)
+    
+    Detected by Coverity. See also http://sourceforge.net/p/net-snmp/patches/1251/.
+
+commit 49cfe4d840c58e1202fa271fbe760bd7526a83a8
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Jun 22 14:23:03 2013 +0200
+
+    hrSWInstalled table: Check stat() return value (1/2)
+    
+    Detected by Coverity. See also http://sourceforge.net/p/net-snmp/patches/1251/.
+
+commit 5df5462639f243d5929fa9ba14d20b3711f7cace
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Jun 22 14:21:18 2013 +0200
+
+    ucd-snmp: find_device(): Remove an unused variable
+    
+    Detected by Coverity. See also http://sourceforge.net/p/net-snmp/patches/1251/
+
+commit 13ce1996a82e0b458b26ae39abf2012db59c8a55
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Jun 22 14:20:15 2013 +0200
+
+    CHANGES: snmplib: _insert_nsfile(): Check stat() return value
+    
+    Detected by Coverity. See also http://sourceforge.net/p/net-snmp/patches/1251/.
+
+commit 81a0d859163f8d54908525b52243295d7b414550
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Jun 22 14:07:37 2013 +0200
+
+    CHANGES: snmplib: Fix a bad free()
+    
+    Detected by Coverity. See also http://sourceforge.net/p/net-snmp/patches/1251/.
+
+commit d34c83e9342419aeecff5ffd7deab83987dbebca
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Jun 22 14:00:39 2013 +0200
+
+    etherlike-mib, rmon-mib: Fix malloc(...) < 0 tests
+    
+    Detected by Coverity. See also http://sourceforge.net/p/net-snmp/patches/1251/.
+
+commit 43c440176b3e4f9ce995e482ec6975ba0c859bf3
+Author: Michael Shcwarcz <Michael.Shcwarcz at compass-eos.com>
+Date:   Sat Jun 22 12:46:04 2013 +0200
+
+    CHANGES: snmptrapd: Fix a double free at exit
+    
+    A quote from a message from Michael Shcwarcz:
+    
+    I am running net-snmp 5.7.2 and it looks like there is a double
+    free problem in snmptrapd, in free_trapd_address() and
+    parse_trapd_address(). I get a SIGABORT on the second SIGHUP
+    (looks like it does a double free on the first SIGHUP and on
+    the second it crashes).
+    
+    I have this snmptrapd.conf configuration:
+      snmpTrapdAddr udp:162,udp6:162
+      authCommunity log,execute,net public
+    
+    And this is the back-trace from gdb:
+    *** glibc detected *** /opt/compass/bin/snmptrapd: free(): invalid next size (fast): 0x080c17a8 ***
+    ======= Backtrace: =========
+    /lib/libc.so.6[0xf7204845]
+    /lib/libc.so.6(cfree+0x9c)[0xf72066ec]
+    /opt/compass/bin/snmptrapd(free_trapd_address+0x2a)[0x804a6ba]
+    /usr/lib/libnetsnmp.so.30(free_config+0x32)[0xf74ae4c2]
+    /opt/compass/bin/snmptrapd[0x804a557]
+    /opt/compass/bin/snmptrapd[0x804bfa9]
+    /lib/libc.so.6(__libc_start_main+0xe5)[0xf71b0455]
+    
+    I have a patch that fixes this issue, here is the diff:
+    @@ -446,6 +446,7 @@ free_trapd_address(void)
+    {
+         if (default_port != ddefault_port) {
+            free(default_port);
+    +       default_port = ddefault_port;
+         }
+    }
+
+commit 2db5485fc1ccce39efa69a377bb8d6f6231eb0b2
+Author: Eric S. Raymond <esr at thyrsus.com>
+Date:   Fri Jun 21 10:47:32 2013 +0200
+
+    CHANGES: documentation: from "Eric S. Raymond": Correct man page markup problem
+    Ambiguous or invalid backslash.  This doesn't cause groff a problem.
+    but it confuses doclifter and may confuse older troff implementations.
+
+commit d6771464f16dc6fe64dd24c08af4be725885adad
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Tue Jun 18 23:45:28 2013 +0200
+
+    CHANGES: apps: Stop agentxtrap from accessing the persistent configuration
+    This is needed to prevent moaning about not beeing allowed to write those
+    files due to bad permissions.
+
+commit 14ac5d5d2c4d9f3a799d401cc1e403a8a292d425
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Jun 12 22:37:23 2013 +0200
+
+    Darwin fixes: UDP and TCP tables, memory data, and some error checking.
+
+commit babd31d1049e233c454f1cbd88bba75f2f40781e
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Jun 12 22:25:19 2013 +0200
+
+    Fix some man pages references to other pages
+
+commit bdefce06a1ea1c1430802714fc837b558e1a675a
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Jun 12 22:23:57 2013 +0200
+
+    Updated ENTITY-MIB in rfc 6933
+
+commit df863a5348aabf71bbca7bfefcf8beb8bb9e7762
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Jun 12 22:17:46 2013 +0200
+
+    Fix Bug #2427: Cannot resolve IPv6 only hostnames, by accepting a list
+    of transport domains.
+
+commit da1fef382591ff45dc92eb3b95a6bfeff9ecfa4f
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Tue May 21 09:13:41 2013 +0200
+
+    CHANGES: snmpd: Added btrfs support to hrFSTable
+
+commit 931c87a05f5f66289613fed77ac78844b61cb79f
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed May 15 20:18:14 2013 +0200
+
+    BUG 2458: Fix missing initialization of auto_nlist structure (Thanks Ryan Steinmetz)
+
+commit 9104e2a3f195506a47733983d8cba38ed592a988
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed May 15 20:13:05 2013 +0200
+
+    PATCH 1253: Fix parsing of DEFVAL BITS (Thanks Mike)
+
+commit 855e54e345c55ea22b7e7ac12a249d7409fbb309
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed May 15 20:11:29 2013 +0200
+
+    rfclist: add RFC 6945
+
+commit 36527cd8cca650713c85e0328c0c2a1cd095c358
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun May 12 10:04:08 2013 +0200
+
+    Windows, Visual Studio: Unbreak compilation with the Windows XP Platform SDK
+    
+    This was reported by Wim Devos
+
+commit 517a5512102d339489c9a70ea8d087a0e10035a9
+Author: Wim Devos <Wim.Devos at meucci-solutions.com>
+Date:   Sun May 12 09:40:53 2013 +0200
+
+    Windows: Unbreak the Visual Studio build
+    
+    "static NETSNMP_INLINE" triggers the error message "error C2159: more
+    than one storage class specified", so use NETSNMP_STATIC_INLINE instead.
+
+commit 4df02f967d0b9d16ca12b58215e9835bc9f391ca
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Sat May 4 14:54:48 2013 +0200
+
+    Remove compiler warning about missing prototype
+
+commit 18dafa58d8121961b058d6d416707df1d6a042ac
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Sat May 4 14:53:10 2013 +0200
+
+    Remove one copy of the linux_states array. Make the whole thing const.
+
+commit 02ad81ea2de2d4687794057e2e8104a65239254d
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Fri May 3 08:08:01 2013 +0200
+
+    Revert the functional changes from 'Fix mixing of code and declarations'[1]
+    in order to not use variables before they are set and not increase the
+    probability for memory leaks.
+    
+    1) rev eefc25ca6705a2d1a8f5216076f439e0d3e3ef76
+
+commit 4fd0525d6a65acfea3d7b431c97893dc47927da8
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu May 2 22:45:51 2013 +0200
+
+    autoconf
+
+commit 55ddd8295ae65e47f220f4807794fbac9b69f0fa
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu May 2 22:20:46 2013 +0200
+
+    testing: Document why we skip tests
+
+commit eefc25ca6705a2d1a8f5216076f439e0d3e3ef76
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu May 2 22:13:42 2013 +0200
+
+    Fix mixing of code and declarations.
+
+commit b94b734dd353bcf793c8b65a273a1387bfd256ea
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu May 2 22:12:11 2013 +0200
+
+    Darwin: support 64-bit counters for diskio table
+
+commit 8d841c1d9b1b4eec264d682ac126032aa08f2e82
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu May 2 22:09:17 2013 +0200
+
+    CHANGES: Support new MIB structures and MFD rewrites under Darwin
+
+commit 27640fcfb20526bef2f6eb40c2a54566dfc6c4c6
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Sat Apr 27 10:58:29 2013 +0200
+
+    CHANGES: snmpd: Correct the size of of the EXAMPLEIPADDRESS value on L64 hosts
+
+commit ebbe2a3990ef6dcbdcb99a39add465398354c34c
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Tue Apr 23 07:25:21 2013 +0200
+
+    building: Make --enable-minimalist compilation work again
+
+commit 4bd7d73b1fe60bb536bf39eb4a38596e8965c3f3
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Apr 22 22:25:38 2013 +0200
+
+    typecast to silence warning for format
+
+commit db071d0a6f487421769b69f22ccf09cc242d9454
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Apr 22 22:23:52 2013 +0200
+
+    Only declare HRP_maxnames when needed
+
+commit faf00ce3b0feb4d37fabef6d4135e36803b00379
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Apr 22 22:22:24 2013 +0200
+
+    ip.c: fix inconsistens declarations of ip_module_oid_len
+
+commit 7f6b59533cdfa06450aee41570223b1cdd2ca6b8
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Apr 22 22:19:44 2013 +0200
+
+    Recover from failures in libpci
+
+commit 40938a62619590b4ea071ae85baa2f42a0b7fcb2
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Mon Apr 22 15:00:00 2013 +0200
+
+    Check if 'asn_parse_* ' actually succeeded.
+    
+    If not, discard the packet instead of using wrong data.
+
+commit aa4fb949012d7c022a436992ac203c065fd7420a
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Mon Apr 22 14:58:41 2013 +0200
+
+    Integer values encoded in BER must have at least one character.
+    
+    If asn_length == 0, we would read the first byte of the next varbind on next line:
+        if (*bufp & 0x80)
+    -> reading past the buffer if there is no such variable -> sigsegv.
+
+commit f6eed6e2384cbf857768f0ee8c6602eb7cd2f03a
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Mon Apr 22 08:18:54 2013 +0200
+
+    Regenerate configure
+
+commit a587d11fb67fad3af24517a408abc3700565edf5
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Mon Apr 22 08:18:35 2013 +0200
+
+    Regenerate configure
+
+commit ce3c9214128b1cdbebd2975da0f36a55e2584fa0
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Mon Apr 22 08:16:02 2013 +0200
+
+    Report the result of the POSIX shell test, not a constant yes
+
+commit 0c870f74b2e4337b4bf3b7f11f55b12e80df49ff
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Mon Apr 22 08:00:32 2013 +0200
+
+    Change the check of perl shell detection to work with AIX sh as well
+
+commit 5f0819f102d1cde3899d08708c9c126268899318
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Mon Apr 1 07:38:09 2013 +0200
+
+    CHANGES: snmpd: Make update-controlled changes trigger periodic saves. Thanks to Claus Klein for noticing that this was missing.
+
+commit a8ff26883d63861d876985dde89f3891577d6026
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Sun Mar 31 13:33:02 2013 +0200
+
+    snmpd: Make the update handler call any child handlers
+
+commit 2bc62b972a2bd0b91ddd4f7c11d47dbe5bf6ff03
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Sun Mar 31 13:32:29 2013 +0200
+
+    snmpd: Do not leak memory if handler registration fails.
+
+commit ae9148b51b9b02270fddbb74111ba2c02a8ea67c
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Tue Apr 16 22:03:00 2013 +0200
+
+    extend.c: fix missing semicolon and warning
+
+commit 46422d17dfdb416eb24ad7db7453ec473db20820
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Tue Apr 16 13:48:26 2013 +0200
+
+    CHANGES: snmpd: Fixed crash in UCD-SNMP-MIB::extTable
+    
+    snmpd crashed when the command to execute had no arguments, i.e. extend->args was NULL.
+
+commit 8b57bdb0a09472a16d3af69fd2b1374c09e6a3ad
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Apr 8 20:36:35 2013 +0200
+
+    rerun autoheader/autoconf
+
+commit 9a9ea257e6eb47800d34f1a86ec0a2a6e9085f31
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Apr 8 20:35:24 2013 +0200
+
+    rerun autoheader/autoconf
+
+commit 59a3214398bceb22c48d58c0fe9c552b2e1ecb8c
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Apr 8 20:31:49 2013 +0200
+
+    rerun autoheader/autoconf
+
+commit e4d72db11d3fb7a44425097b5ec26b9f917a9c82
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Apr 8 19:14:04 2013 +0200
+
+    snmpksm: handle deprecated krb5_auth_con_get{local,remote}subkey
+
+commit 99ff953673f73614463ace1210c4ac073a1f2a81
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Apr 8 19:05:47 2013 +0200
+
+    snmpksm: fix some const cast warnings
+
+commit cf0d4ef224bad000995370483a5c98dc17839a41
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Apr 5 22:05:33 2013 +0200
+
+    Initialize a couple of variables to please clang
+
+commit 71f59e9e6c98e8dbfab1ffb0d1e468c12e3d92ce
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Apr 5 21:38:44 2013 +0200
+
+    Make sure snmpksm includes com_err.h (wherever it is) to declare error_message
+
+commit 8c01f64728a43656dc3ac5fbefdf8ecec8da1506
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Apr 5 21:13:30 2013 +0200
+
+    Minor fix to inline to allow compilation with clang
+
+commit 2db12f688e1f2eeebb589ec73da82eb897f34bd1
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Mon Mar 18 08:54:49 2013 +0100
+
+    CHANGES: snmpd: Make the local truthvalue handler call any subhandlers it might have. Thanks to Claus Klein for noticing this problem.
+
+commit 90512a32bd1c2be5d17b23f10956278395de3754
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Tue Mar 19 22:28:34 2013 +0100
+
+    Patch 1250 from sthen: include <sys/proc.h> in swrun_kinfo.c for OpenBSD 5.3
+
+commit 39193600ec38deb51379a109648d69e7e9001702
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu Mar 7 21:44:59 2013 +0100
+
+    snmpnetstat: prototype route6pr
+
+commit acce8296dc5b68d212f7404edc2afdb8b02817c0
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu Mar 7 21:39:16 2013 +0100
+
+    clean tabs tp spaces
+
+commit 402bdae96a6d79b3b63b67261b37a847ab4817e3
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu Mar 7 21:37:43 2013 +0100
+
+    snmpnetstat: fall back to ipv4RouteTable (Thanks to fenner)
+
+commit e6917e372a06ddd7761b3103b329bcf696e93a1f
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu Mar 7 21:29:44 2013 +0100
+
+    snmpnetstat: show AS in routing table if available (Thanks to fenner)
+
+commit 9eb8d0f907ed8d78de90dcf6623c33060993f2a0
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu Mar 7 21:28:26 2013 +0100
+
+    snmpnetstat: early detect if we want ipv4 route table (Thanks to fenner)
+
+commit 4083734ef7f4beaf1b9a1325738ba185eb7cc716
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu Mar 7 21:25:53 2013 +0100
+
+    Fix misplaced newlines in error messages
+
+commit 5b0ed3b76f6e4669f238b5c82cd3cc6cb6caa5cd
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Tue Mar 5 17:16:26 2013 +0100
+
+    Unit test T014: Fix a Cygwin build warning
+
+commit 106ad2450f2b78848f292ad03445a97c7f87e6f4
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Tue Mar 5 17:17:05 2013 +0100
+
+    Unit test T014: Initialize variables properly
+
+commit a7dea573485931561051a2019027d7ed09d15565
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Mar 4 22:35:06 2013 +0100
+
+    rfclist: add G998x mibs
+
+commit 4604cf61e7cf6ea64e782f4a3d72d4fb024c1f9b
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Mar 4 22:23:23 2013 +0100
+
+    snmpnetstat -Cs: consistent field widths for statistics. Document
+    snmpnetstat -Css variant.
+
+commit 4aa92157ce55d1e528d7de52491d3eb7020869e7
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Mar 4 22:17:19 2013 +0100
+
+    snmpnetstat.1: remove invalid references to routing statistics output.
+
+commit 751f4a6c7fc89a5cf2b2879f6f915b31466a04b7
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Mar 4 22:14:29 2013 +0100
+
+    snmpnetstat: fall back first to ipCidrRouteTable. Thanks to
+    Bill Fenner for initial patch for this.
+
+commit 93c86e6e1cf301bd269fdffb5e9aaace8aa193f4
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Tue Jan 3 07:21:03 2012 +0100
+
+    Do not leak memory on error
+    
+    If allocation of iinfo fails then table_info is leaked.
+    Deallocate table_info in this case.
+
+commit 36a7de7230fbbbb52cc37cbbed281eb559404be9
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Mon Feb 25 20:40:09 2013 +0100
+
+    CHANGES: Windows: Add multihoming support
+    
+    On Windows Vista / Windows Server 2008 and later it is possible to add
+    multihoming support by using the IP_PKTINFO socket option.
+    
+    Conflicts:
+    	snmplib/transports/snmpUDPBaseDomain.c
+
+commit 7bbabab2362daa6d76ad73033b3f32b2cba7253f
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Fri Feb 22 18:55:47 2013 +0100
+
+    Rework IP_PKTINFO / IP_RECVDSTADDR detection
+    
+    Detect IP_PKTINFO / IP_RECVDSTADDR support during the configure
+    phase instead of repeating the following test in eight different
+    places:
+    
+     #if (defined(linux) && defined(IP_PKTINFO)) \
+         || defined(IP_RECVDSTADDR) && HAVE_STRUCT_MSGHDR_MSG_CONTROL \
+                                    && HAVE_STRUCT_MSGHDR_MSG_FLAGS
+     ...
+     #endif
+    
+    Two side-effects of this patch are:
+    * IP_PKTINFO support is enabled on Cygwin.
+    * setsockopt(IP_RECVDSTADDR) is no longer invoked on Windows when
+      built with Visual Studio or MinGW-gcc.
+
+commit 1a196ad9f1517868b93a6bec93a0cfe1d29e283b
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Feb 23 14:03:29 2013 +0100
+
+    Testing: Make unit test T014 more robust
+
+commit 9be22aaaf8393713fbc39025f702111f50f1e4ea
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Feb 23 11:03:20 2013 +0100
+
+    Windows: Avoid collisions with the Windows Vista or later SDK
+
+commit 0b6bfef2ca9ae9e1c2beafe700100fae5f6f4c1a
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Feb 23 11:20:23 2013 +0100
+
+    inet_ntop() / inet_pton(): Convert prototypes from K&R to ANSI C
+
+commit 2bb51d71eec4e789982c2a741186dce6df238542
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Thu Feb 21 20:59:25 2013 +0100
+
+    Reduce the time needed to run the regression tests (was enlarged by commit b3d5ed87)
+
+commit cf640ccd68e9636805b75079928c7277fa26083b
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Thu Feb 21 11:55:03 2013 +0000
+
+    Unit test T014: Accept "localhost.localdomain" too
+
+commit bda4357375ad299cf1847579e1a1bc3c611895c3
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Thu Feb 21 16:07:41 2013 +0100
+
+    Regression test T060: Escape backslashes passed to CONFIGTRAPD
+
+commit 6b5d784f4d6d000390014d120f15b937362f8c07
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Thu Feb 21 20:33:02 2013 +0100
+
+    Python bindings: Fix a recently introduced compiler warning
+
+commit 6d258efa2accadfccc50d86bd46379745449ca4a
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Thu Feb 21 15:27:19 2013 +0100
+
+    python/netsnmp/client_intf.c: Remove superfluous casts
+
+commit 2c2e1f416393d485f9ac90c87f72065c668b7321
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Thu Feb 21 15:48:34 2013 +0100
+
+    python/netsnmp/client_intf.c: Fix a compiler warning
+
+commit 1bc799de6cab010b25c0c4d3f5155b5fbaf527f0
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Thu Feb 21 20:05:14 2013 +0100
+
+    Python bindings: Fix the out-of-bounds write
+    
+    See also commit 234158b8e84cc204cbac96e6e9be6959635404b8
+
+commit 4f4eaeb920ad15c929c66782cc0a642912cabd06
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Thu Jan 17 12:24:26 2013 +0100
+
+    CHANGES: python: fixed IPADDRESS size on 64bit systems.
+
+commit 486f11ddee9f1c2dd8056449e9031e24b8646872
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Thu Feb 21 10:06:12 2013 +0100
+
+    Added IETF BSD license for MIB files.
+    
+    MIBs included in Net-SNMP taken from IETF Documents are considered
+    Code Components in accordance with the IETF Trust License Policy, as found
+    here:
+    
+    http://trustee.ietf.org/license-info/
+
+commit d24efb04778d870efa2739493949db65f3fdd4f3
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Tue Feb 12 20:44:46 2013 +0100
+
+    Solaris: Fix fetching of large chunks of data (larger than one buffer)
+    This fixes problem with many interfaces, but could also fix other large tables.
+
+commit 45001fd98c729df9ff053627c416ab5f2e4c60f3
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Tue Feb 12 20:39:50 2013 +0100
+
+    Fix bug 2286,2439: Bound buffersize for swrun data on FreeBSD
+
+commit 9bd0413bfbdcd845413c135bbff8771fa7130809
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Mon Feb 11 11:57:01 2013 +0100
+
+    Explicitly enumerate configuration files.
+    
+    The generic conf and local.conf extensions were interpreted as my.snmp.conf and my.other.snmp.local.conf by some customers.
+
+commit 0bdd09889d0811f864df131b844f20b00392062b
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu Feb 7 00:05:03 2013 +0100
+
+    snmp_client.c::netsnmp_query_walk: handle SNMPv2 exception results
+
+commit 864b4aca8dfa480a78b745fae2091edc5373a0c6
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Feb 6 16:00:54 2013 +0100
+
+    snmptrapd: Add -X option to disable AgentX
+
+commit 112f3d4fa536b2c531d0780676198915a1f58179
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Feb 6 15:59:53 2013 +0100
+
+    rfclist: Add RBRIDGE-MIB
+
+commit c0a6549597947f29c36efadb04927ff690189eba
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Jan 30 15:53:15 2013 +0100
+
+    RUNTESTS: don't trap on SIGCHLD. It confuses dash, mksh and maybe other shells.
+    (dash is /bin/sh on Ubuntu)
+
+commit b95ac386e6c2356a1ec29f1c409b2ec3e90159c3
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Tue Jan 29 08:59:01 2013 +0100
+
+    rfclist: add TED-MIB
+
+commit 23bdf6d26f4337d07ea6e9901a7738d1186d16d4
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Tue Jan 29 08:58:07 2013 +0100
+
+    snmpdf: add -CH as alternative to -Ch
+
+commit 40258e9c060aecac6555aedff3e70bde7d2ab846
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Jan 28 17:05:08 2013 +0100
+
+    T072com2secunix_simple: awk string indices start at 1!
+    Fix test to work with mawk (default for Debian/Ubuntu)
+
+commit e37f2b6bdffa7afaa1dc0b8aee565a4da82d6fe4
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Jan 25 16:24:10 2013 +0100
+
+    snmpdf: Add -Ch (human units) option
+
+commit 7a407ad34505ed4dbaa2e84e06a1dbf48c3c77e5
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Jan 25 15:28:43 2013 +0100
+
+    snmpdf: Handle SNMP (v2c/v3) exceptions
+
+commit c739cb3875fb5d4cad4138661cc0a4171384c341
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Jan 25 10:14:02 2013 +0100
+
+    Apply patch#1246: Fix passing a SET of a string to not cut it at
+    four characters to a pass/pass_persist helper.
+
+commit 234158b8e84cc204cbac96e6e9be6959635404b8
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Thu Jan 17 12:24:26 2013 +0100
+
+    CHANGES: python: fixed IPADDRESS size on 64bit systems.
+
+commit 9e0a0e35d8d1b36fa47cec938d6c874de0071bb6
+Author: Dave Shield <D.T.Shield at liverpool.ac.uk>
+Date:   Wed Jan 9 22:37:47 2013 +0000
+
+    CHANGES: python: PATCHES: 1239: Fix memory leak
+
+commit 55605ee3452aef5aabe4ed15a83374a97728e64a
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Wed Jan 9 09:26:56 2013 +0100
+
+    Fixed memory leak on failed realloc.
+
+commit a32ca93a9b91674a8c1e89e1a383a76136b8ac38
+Author: Dave Shield <D.T.Shield at liverpool.ac.uk>
+Date:   Tue Jan 8 16:42:54 2013 +0000
+
+    CHANGES: snmpd: PATCHES: 1240: Fix deallocation of integer indexes
+
+commit 87681f0fb285a021636e06a6f2351d76409eebc8
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Jan 5 15:06:12 2013 +0100
+
+    Avoid using "local" since Solaris' /bin/sh does not understand it
+
+commit 59b4d40f3970ba82f3df2a399971254b04827443
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Fri Jan 4 18:00:53 2013 +0100
+
+    CHANGES: Windows: Make winExtDLL work on 64-bit Windows systems
+
+commit 39597106038f6e1c5ed49b3fce0021a6c59ec1fe
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Fri Jan 4 18:05:38 2013 +0100
+
+    winExtDLL: Add more debugging
+
+commit 85ce9062911d31b42e0c1e135abd3bda813e3003
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Fri Jan 4 18:02:30 2013 +0100
+
+    winExtDLL: Invoke SnmpExtensionClose() before unloading an extension agent
+
+commit 7e031229543579d37b006296e2f445482d0512cb
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Jan 5 13:04:02 2013 +0100
+
+    winExtDLL: Remove source file win32/MgmtApi-winExtDLL.h
+
+commit 2e89624e55e73557862594f1f525f9dffc827986
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Jan 4 22:26:47 2013 +0100
+
+    Solaris /bin/sh does not understand 'local' builtin.
+
+commit 6257dea4827e85c7af845ae9cded48d44aa7bb3d
+Author: Jan Pokornテス <jpokorny at redhat.com>
+Date:   Thu Dec 20 14:45:45 2012 +0100
+
+    Fix comment typos in example.c
+    
+    Patch from Pokornテス <jpokorny at redhat.com>
+
+commit 9dfc44c91d7a29a4c43f779085dde34c5fe6d5ab
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Thu Jan 3 10:30:27 2013 +0100
+
+    MinGW, test harness: Fix a log message
+
+commit 1d099c7b919ef25efa03c14aa77ccbec8e5bb009
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Thu Jan 3 10:24:48 2013 +0100
+
+    apps/agentxtrap.c, Windows: Fix usage text
+
+commit f021e6fd4bc2acb6ffac339d3f38e4c15bb5bd7d
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Tue Jan 1 17:53:16 2013 +0100
+
+    MinGW: Update test harness. Installation of pslist.exe is now required.
+
+commit 4bc3c0547e0b33eea71f3c1a09efdd5969d7e278
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Mon Dec 31 17:24:33 2012 +0100
+
+    ucd-snmp/dlmod: Enable in MSVC batch build
+
+commit e9efb20095468e64157b84f18b6ccd991e1082e3
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Tue Jan 1 15:04:37 2013 +0100
+
+    Windows: Link with snmpapi.lib and mgmtapi.lib even if not using the platform SDK
+
+commit 900aae8ea693fb840d57526fb671d215f865bedb
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Tue Jan 1 01:33:01 2013 -0800
+
+    ucd-snmp/dlmod: Fix an MSVC compiler warning
+
+commit 363e3fa1a43ca6223fe3b0808e66295b3d9386b8
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Tue Jan 1 01:27:42 2013 -0800
+
+    ucd-snmp/dlmod: Add dlmod.c to MSVC project
+
+commit e3542c04a84617857688ab8e8718cdc4c6a68cf5
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Tue Jan 1 09:14:33 2013 +0100
+
+    ucd-snmp/dlmod: Remove more superfluous casts
+
+commit 1e3b0ae2b02cf1faccad4896bc3bdbea1db4a68f
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Mon Dec 31 13:19:36 2012 +0100
+
+    CHANGES: Windows: Ported ucd-snmp/dlmod to MinGW / MSVC
+
+commit 986fb9b85e1383b81eaea40d2cb7c14492ddbdac
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Mon Dec 31 12:32:56 2012 +0100
+
+    MinGW: Avoid confusion between MinGW's kill.exe and the SysInternals pskill.exe (backport commit 9b427b353f1ceb8fe87e6fc8ed3b6cfab3ce7f20)
+
+commit 798b73cf59e3687f65bd54a7a8ac29fe2498c69f
+Author: Bart Van Assche <bvassche at users.sourceforge.net>
+Date:   Thu Dec 17 13:05:53 2009 +0000
+
+    Unbreak the MinGW build for the 5.4 branch - timeradd() is not ANSI C
+    
+    Remove DIFFTIMEVAL() because it's buggy: in "diff.tv_usec > 1000000L" the ">"
+    should have been ">=" instead.
+    
+    This is a partial backport of commit 858509c9e1998f6d26e90cb622e4b17eb2488a4f.
+
+commit 1e556cc7740c06367ff3361aa96bf45339c2e8a2
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Dec 30 17:59:44 2012 +0100
+
+    ucd-snmp/dlmod: Remove superfluous casts
+
+commit 51dfa6e67fd8487b8882c1632e811195d9496e41
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Dec 30 10:42:16 2012 +0100
+
+    ucd-snmp/dlmod: Mention library path in error messages
+
+commit 02a357d6b9538a48896368900bbb593dbb4dc374
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Dec 30 10:40:55 2012 +0100
+
+    ucd-snmp/dlmod: Remove a superfluous initializer
+
+commit ef748845b14c095049ed54803ea74cf457efd189
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Dec 30 09:57:38 2012 +0100
+
+    CHANGES: Windows: Fix environment separator in snmpd/snmptrapd/snmptranslate help text. Reported by Jason McCollum <jmccollum at comtechefdata.com>.
+
+commit bc0abae55dd867dbbf4e42e67a36234088c93771
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Wed Jan 2 09:25:33 2013 -0800
+
+    copyright update
+
+commit 4086af95b298f1cf130d08deb7e090058b321af9
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu Dec 20 07:37:14 2012 +0100
+
+    Fix the MIB names to actually work
+
+commit 795274fc21e1ba03efbe9b6042c6a3513d89debf
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu Dec 20 07:24:47 2012 +0100
+
+    Clean up and value checking for ipDefaultTTL, ipv6IpDefaultHopLimit
+
+commit 439d50c679e9f09b106bfdf64f8cc766419e1344
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Thu Dec 20 07:24:16 2012 +0100
+
+    Fix icmpMsgStatsTable for Solaris
+
+commit 007a7d24bc5f279392fd0ec4361477cd8f14e5af
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Dec 19 22:14:06 2012 +0100
+
+    git ignore tilde files
+
+commit aff02f24e198a29231273d494820dd6e354155ca
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Dec 17 22:44:18 2012 +0100
+
+    Running autoheader/autoconf
+
+commit 9cfd680f2f2f45cf76cd4216693b862faa27cbc1
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Dec 17 22:42:00 2012 +0100
+
+    Config check for BSD udpstat.udps_ipackets
+
+commit 53c2fdd5b66021144ad26539b53be9c1593b4884
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Dec 17 22:27:03 2012 +0100
+
+    Add SD support for ip-forward-mib
+
+commit ca7b17a41d4d16bd27aacf92116bea3562eeea36
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Mon Dec 17 12:40:32 2012 +0100
+
+    CHANGES: snmpd: use cache for dskTable to speed it up.
+    
+    UCD-SNMP::dskTable was slow on NFS mounts. Now it uses fsys cache
+    to reload mounts every 5 seconds.
+
+commit 0b718184e070d2574c09b18f568950a8c9ff7659
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Sun Dec 16 20:57:29 2012 +0100
+
+    CHANGES: apps: Stop using snmp_perror when logging after functions that don't set snmp_errno.
+
+commit 7edce0c311a7dd5428e0edb701dabe9dc79d0967
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Sat Dec 15 12:40:10 2012 +0100
+
+    CHANGES: building: Make the -without options to rpmbuild work
+
+commit c6037548fb4b47996330fe1bc1e8265acea5dd54
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Dec 10 00:41:42 2012 +0100
+
+    The proper router files for BSD
+
+commit 2b359e450986bb8744bbff21e0cab493acacea98
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Sun Dec 9 23:02:02 2012 +0100
+
+    Support for ipSystemStatsTable for *BSD. Most of the code by Garrett
+    Cooper. Partially funded by Cisco Ironport.
+
+commit 9a044128e8b331796221166358769eb0535dfc1f
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Sun Dec 9 22:36:21 2012 +0100
+
+    Support for ipNetToMediaTable for *BSD. Most of the code by Garrett Cooper.
+    Partially funded by Cisco Ironport.
+
+commit f9cb298dd20ef6d4bc683ce067f2330737be4e09
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Sun Dec 9 22:17:22 2012 +0100
+
+    Support for ipDefaultRouterTable for *BSD. Most of the code by Garrett
+    Cooper. Partially funded by Cisco Ironport.
+
+commit 1dee41562c54e0b54b301a37838b3ba6509dcc38
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Sun Dec 9 21:54:14 2012 +0100
+
+    Support for ipSystemStatsTable for *BSD. Most of the code by Garrett Cooper.
+    Partially funded by Cisco Ironport.
+
+commit 3dbabc97068b6c690b3fdf97b5ab3ae0d9eab28c
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Sun Dec 9 21:47:45 2012 +0100
+
+    Change some debug output into error logging. Failure to expand 32 to 64
+    IS an error.
+
+commit 907360e09fff3390d6269f8cb4740bdbcd958166
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Sun Dec 9 21:45:44 2012 +0100
+
+    Fix some labels for netstat icmp output.
+
+commit 9f2f05405c7bb499ebe0839b0d79ba25c61c0f55
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Dec 7 09:49:51 2012 +0100
+
+    Running autoconf
+
+commit d27f36452583d291f255ef090e2aeaeaf39a9e0e
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Dec 7 09:49:02 2012 +0100
+
+    Running autoconf
+
+commit 56352c2ebe9541f6abf9d2b9ebc4705d818d89b8
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Dec 7 09:48:21 2012 +0100
+
+    Running autoconf
+
+commit 397923e0aae1385a0af3a803e60ebe8124f961d2
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Dec 7 09:26:21 2012 +0100
+
+    Fixes for configure of ksm module. Previously ksm had to be the
+    first security module in list to be included.
+
+commit 430d10d296b8d8c98a3aafd27a8c6ff4f6408114
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Dec 7 09:24:39 2012 +0100
+
+    Fix speling which has prevented ksm module from compiling for many years :-(
+    Also some fixes to support Heimdal Kerberos. This supports Free/NetBSD.
+
+commit bff832ab248e08628be46ebf76111911e7f39e52
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Dec 7 09:17:22 2012 +0100
+
+    Adapt for longer lines from /proc/net/tcp6. And issue an error if
+    it happens to fail again. Patch from bug #2425 (Thanks Zhixu Liu)
+
+commit 9687e4d50781ba0168416f15c4f2d9fc8371050a
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Dec 7 09:15:48 2012 +0100
+
+    icmp support files for *BSD (exceptNetBSD)
+
+commit f215ba1e37a8c3e076958efd83c0f5d393a14c22
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Dec 7 09:13:24 2012 +0100
+
+    Support for icmpStatsTable/icmpMsgStatsTable for *BSD and Solaris
+
+commit a7b7c3c0c3be3f6cf2d09f6470d3fa086153d036
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Nov 30 15:35:33 2012 +0100
+
+    Shuffle in preparation for broader support for icmpStats/icmpMsgStats
+
+commit bd296ac18423503eda8effeb86afb19e00143889
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Nov 30 15:34:52 2012 +0100
+
+    Shuffle in preparation for broader support for icmpStats/icmpMsgStats
+
+commit 2e23ea0f293bb8e9ceaf5636db7b7d07f6d62c7a
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Tue Nov 20 23:33:58 2012 +0100
+
+    Add missing ssIORawSent/received for Solaris.
+
+commit 59eebc41a9435811073fec50d76dd6aef9dd58a7
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Tue Nov 20 23:32:53 2012 +0100
+
+    Add some error checking to gittools
+
+commit 80b18375826653626c2d70451c2b54a1c50a3ce6
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Tue Nov 13 13:55:47 2012 +0100
+
+    Remember to init the systemstats provider
+
+commit 743cb66718904979f55895472501584c30c66f10
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Mon Nov 12 15:49:15 2012 +0100
+
+    Fixed crash when MD5 and/or SHA-1 hash is not supported by OpenSSL.
+
+commit 1898cfc71bdb3f4a1685c6d21b54dd1a3482591c
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Nov 12 15:48:15 2012 +0100
+
+    OpenBSD 5.2 support.
+
+commit dd53ffbafeb31cde616a89949e70e3d5fe0cc1b3
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Mon Nov 12 15:46:43 2012 +0100
+
+    Fall back to SHA-1 if MD5 is not available.
+    
+    On paranoid systems where MD5 is disabled use SHA-1 instead of MD5 and don't crash.
+
+commit ea8f74c81f82c105b9fc01965adce14b0d8186da
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Nov 12 15:46:34 2012 +0100
+
+    Fix NetBSD memory data typing
+
+commit dde3a35baaeb683cf1441a16a15441f8b456c520
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Mon Nov 12 15:45:27 2012 +0100
+
+    CHANGES: snmplib: Fixed crash when MD5 hash is not supported by OpenSSL.
+
+commit b77b67d8d629f785639e402fa4fbee6ccfe18fa5
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Nov 12 15:44:49 2012 +0100
+
+    Kernel processes in DragonFly, and fixed cpu usage data
+
+commit d6c62012c8082fc886f747e0e2c9bb8a6c66c663
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Nov 12 15:41:55 2012 +0100
+
+    Diskio for OpenBSD, and some clean-up for FreeBSD/DragonFly
+
+commit 4a5e0f4c95fb6cd123a4901787376e447d332c02
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Tue Oct 9 14:23:48 2012 +0200
+
+    CHANGES: added simfs (OpenVZ filesystem) to hrStorageTable and hrFSTable.
+
+commit 2a0cd35acf3325a6fdc0a10423f54cb8b5ce522b
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Thu Sep 13 15:25:52 2012 +0200
+
+    CHANGES: snmpd: fixed infinite loop when SIGTEM arrives in middle of internal query processing.
+    
+    When snmpd starts internal query, e.g. for 'monitor' config options, it calls
+    netsnmp_query_walk(). This function loops until either error occurs or the
+    internal request is processed. And if SIGTERM comes to this loop, the request
+    is not marked as failed.
+    
+    Patch originally from Masahiro Matsuya, mmatsuya [at] redhat.com
+
+commit bc449c0f85ae9fa08ac4fce67282f48eb7ab1984
+Author: Jan Safranek <jsafranek at users.sourceforge.net>
+Date:   Mon Sep 10 13:25:38 2012 +0200
+
+    CHANGES: snmpd: fixed value of UCD-SNMP-MIB::extCommand to contain full command line.
+    
+    MIB description of UCD-SNMP-MIB::extCommand suggests it should contail full command line.
+    Also in Net-SNMP 5.3.2.2, whole command line was shown.
+
+commit a3978f2cc2056c97a4c3f338f709a20291aed472
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Nov 12 06:48:37 2012 +0100
+
+    Proper handling of configure-generated snmpconf
+
+commit 0f46992924de5a4ab0763a8d44a1cece4a991d80
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Nov 5 21:16:37 2012 +0100
+
+    Patch for OpenBSD 5.2 (Patch 3559420)
+
+commit 9ed0b2e0ac0c8e549b8f9a5845e9d1faacab73c5
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Nov 5 20:08:41 2012 +0100
+
+    rfc6779
+
+commit aef76ca0cba2ca56f6aa1db5c5b58a54939f389b
+Author: qqshka <qqshka at users.sourceforge.net>
+Date:   Wed Oct 31 20:00:04 2012 +0100
+
+    AgentX, IPX: Restore default port (bug #3582283).
+    
+    This reverts commit 7b9e03441c3dc3a07670ed01f5d04791a82c750c.
+
+commit d7d98e5aa9ee8ca7918b7675043d479cf77b83c4
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Thu Sep 1 10:33:06 2011 +0200
+
+    .gitignore: Add local/snmpconf
+
+commit 71d83ba4117a2cfb7874e91832e45973da42ee98
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Thu Sep 1 10:34:30 2011 +0200
+
+    Win32, MSVC: Make build.bat work again now that ENV_SEPARATOR is configurable
+
+commit 5e500082728f453595f5024d241208c51f08d22c
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Mon Oct 29 18:12:41 2012 +0100
+
+    README.win32: Remove reference to the no longer supported Cygwin compiler option --mno-cygwin
+
+commit 1a36dee165b8bd7df3ef694b7c3f2621a5449daa
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Tue Aug 30 20:54:00 2011 +0200
+
+    CHANGES: snmpd, snmptrapd and apps: Make ENV_SEPARATOR_CHAR configurable
+
+commit 0e1ca45a6f8d8acf44aa21a009a9e51192e84783
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Oct 28 10:11:22 2012 -0700
+
+    snmpnetstat: Fix MSVC compiler warnings
+
+commit 4a6d0378a3916571ce7604c4a3d54a8c96a8f807
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Oct 28 09:54:12 2012 -0700
+
+    Windows: Visual Studio 6 build fix for strlcat()
+
+commit 41b48a6370952bf4b12d34fb05ec55fb0702e8cf
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Oct 28 14:37:52 2012 +0100
+
+    Windows: Make snmpnetstat build again
+
+commit 2451f826479881a4926fcf88855f582585eb813b
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Oct 28 10:23:17 2012 +0100
+
+    win32/build.pl: Reduce code redundancy
+
+commit 6e99388683a6c854035f042a9d07c0723117e8a6
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sun Oct 28 09:41:20 2012 +0100
+
+    Windows, batch build: Remove the obsolete variable "SSL"
+
+commit 7544adc5a1c76889e4a9ed51e96d22d02fd5695e
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Wed Aug 22 15:35:04 2012 +0000
+
+    NEWS: Windows: Port batch build infrastructure to Visual Studio 2010 and later
+    
+    From Visual Studio 2010 on it is no longer possible to specify
+    include or library directories globally - these have to be specified
+    per project. Hence two additional menu entries in build.bat that
+    allow to specify these directories.
+
+commit 1b8a79c1c2eb13f8b207c12aa6e71a29ff00396f
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Wed Aug 22 19:10:07 2012 +0000
+
+    win32/Configure: Factor out common code
+
+commit 2af7a73b0ca8cdbd36a7f19dd8e55764c8498552
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Sat Oct 27 18:27:42 2012 +0200
+
+    Windows: Make snmpnetstat build again (see also commit aa5912b8986cde74090ba15be196426309a1e1f0)
+
+commit fa98b4cbd6dc15aa926166eef04d5bc8dfbaaad6
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Oct 26 07:56:06 2012 +0200
+
+    Cope with additional statistics in /proc/net/sctp/snmp in RH6
+
+commit 54290bede338164ca65a3eed224fa5040d7dd857
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Fri Oct 26 07:50:11 2012 +0200
+
+    Better cleanup of "exec" config to avoid crash during reload of config
+
+commit 82aa246671194f04be52c621e9f83d0fabd24fa5
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Oct 24 15:30:11 2012 +0200
+
+    Don't mix code and declarations!
+
+commit 4e9ea845592fff8b2aae5d318dcabf41f9570632
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Oct 24 15:25:35 2012 +0200
+
+    Don't mix code and declarations!
+
+commit 21d5c6785e916b5101440ed1a4f71b41ba2eb809
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Oct 24 09:27:23 2012 +0200
+
+    Remember to free the description (if saved) during unload_all_mibs
+    (patch 3565922)
+
+commit 2b9940ca56fc8d3d610efd2eba9ae4ebb741e671
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Wed Oct 24 06:41:46 2012 +0200
+
+    Clean up diskio config before reloading.
+
+commit f7768fb643be282d635289b57f88a07d070487b0
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Tue Oct 23 11:48:31 2012 +0200
+
+    apps/snmpnetstat/inetx.c: Eliminate dead code (see also commit aa5912b8)
+
+commit 64c56f27c5ed432ce8de44e2579ca0c806a517ea
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Wed Aug 22 17:45:19 2012 +0000
+
+    build.pl: Eliminate a temporary variable
+
+commit 30a5d013a80e9fd50b8fd0f70ffd96ff26b6e454
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Oct 22 20:29:09 2012 +0200
+
+    Update to current IANA version
+
+commit f40d440689067ef6c4da7ddadfb373a452197fbd
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Mon Oct 22 19:47:06 2012 +0200
+
+    win32/Configure: Strip trailing whitespace
+
+commit d34e057779cb32e94324089dc4625638309cfe89
+Author: Bart Van Assche <bvanassche at acm.org>
+Date:   Mon Oct 22 18:36:59 2012 +0200
+
+    win32/build.pl: Strip trailing whitespace
+
+commit 30daef1860397f045c4055cd61d663d290dd47f2
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Oct 22 18:32:38 2012 +0200
+
+    Fix MSYS kill/pskill confusion
+
+commit 14be9132b91158b05120710b1ff6a4b2accc531d
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Oct 22 18:10:44 2012 +0200
+
+    Fix net0/netx confusion
+
+commit 8107a6352df2478660994ef103d52801a6607cc9
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Oct 22 17:03:47 2012 +0200
+
+    Fix speling errors
+
+commit aa5912b8986cde74090ba15be196426309a1e1f0
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Oct 22 16:58:50 2012 +0200
+
+    Implement the modern IP version agnostic table in snmpnetstat.
+    If the modern table is not available (or the -CL option is used)
+    fall back to the legacy tables.
+
+commit 1a34d2249ef0d2215e5886f9b3c97ecfa7eb5190
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Oct 22 16:39:41 2012 +0200
+
+    Pick up ifDescr from ifXTable when available, and use that as the name.
+    Very useful if pci-utils were avalable when compiling the agent as the
+    name otherwise will be the very obscure chip name
+
+commit b4caf543cff7dba8f9acca2b9ea88c9b79dc39ee
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Oct 22 16:32:12 2012 +0200
+
+    Pick up HC octets and McastOctets from /proc/net/netstat of current RHEL6
+    and Fedora kernels.
+
+commit c655fce784532a523f7db582d0cd07dee4ad7ac5
+Author: Niels Baggesen <nba at users.sourceforge.net>
+Date:   Mon Oct 22 16:25:59 2012 +0200
+
+    Try to better classify Linux kernel threads as hrSWRunType=Os
+
+commit e1a8c95ca55f569585c88e174a43f6d4129c439d
+Author: Magnus Fromreide <magfr at lysator.liu.se>
+Date:   Sat Oct 20 09:59:41 2012 +0200
+
+    Correct the nesting order of the doxygen end section comment and the feature removal endif.
+
+commit f67adf2a37a8c182eacbcfe52d5b789191a65929
+Author: Wes Hardaker <hardaker at users.sourceforge.net>
+Date:   Tue Oct 9 16:32:47 2012 -0700
+
+    remove release requirements
+
+commit 3e54330393ccc86525ed6fb9a0fc19c068306610
+Author: Jan Safranek <jsafrane at redhat.com>
+Date:   Tue Oct 9 06:34:10 2012 -0700
+
+    fix double-negative typo
+    
+    Signed-off-by: Wes Hardaker <hardaker at users.sourceforge.net>
+
 ----------------------------------------------------------------------
 
 Changes: V5.7.2.rc3 -> V5.7.2
@@ -16091,7 +19490,7 @@ Changes: V5.7.pre1 -> V5.7.1.pre2
 
 2011-06-09  Niels Baggesen <nba at users.sourceforge.net>
 
-   *  snmplib/cert_util.c: Include stdॆअआॆअ�ib.h to make dmalloc happy
+   *  snmplib/cert_util.c: Include std爭����、����爭����、����爭����、����爭����、����爭����、��������b.h to make dmalloc happy
       git-svn-id:
 
 
@@ -26886,7 +30285,7 @@ Changes: V5.7.pre2 -> V5.7.rc1
 
    * snmplib/cert_util.c:
 
-   Include stdॆअआॆअ�ib.h to make dmalloc happy
+   Include std爭����、����爭����、����爭����、����爭����、����爭����、��������b.h to make dmalloc happy
 
 2011-06-09 14:35  rstory
 
@@ -46722,7 +50121,7 @@ Changes: V5.6.rc2 -> V5.6.rc3
 
    * agent/mibgroup/ip-mib/data_access/systemstats_common.c:
 
-   CHANGES: snmpd: from "Marcus Rॆअआॆअ�ckert": fix possible crash when
+   CHANGES: snmpd: from "Marcus R爭����、����爭����、����爭����、����爭����、����爭����、����枋kert": fix possible crash when
    64-bit counters in ipSystemStatsTable get bigger than 2^32
 
 2009-08-03 19:27  magfr
@@ -60315,7 +63714,7 @@ Changes: V5.5.pre3 -> V5.5.rc1
 
    * agent/mibgroup/ip-mib/data_access/systemstats_common.c:
 
-   CHANGES: snmpd: from "Marcus Rॆअआॆअ�ckert": fix possible crash when
+   CHANGES: snmpd: from "Marcus R爭����、����爭����、����爭����、����爭����、����爭����、����枋kert": fix possible crash when
    64-bit counters in ipSystemStatsTable get bigger than 2^32
 
 2009-08-03 19:27  magfr
@@ -62775,14 +66174,14 @@ Changes: V5.4 -> V5.5.pre1
    * snmplib/snmpUDPDomain.c:
 
    Fix src/dst confusion
-   Patch provided by Krzysztof Olॆअइ�dzki
+   Patch provided by Krzysztof Ol爭����、����爭����、����爭����、����囘zki
 
 2009-01-28 09:29  dts12
 
    * agent/mibgroup/smux/smux.c:
 
    CHANGES: Fix two bugs with smux password support.
-   Patch supplied by Krzysztof Olॆअइ�dzki
+   Patch supplied by Krzysztof Ol爭����、����爭����、����爭����、����囘zki
 
 2009-01-23 14:53  jsafranek
 
@@ -76695,7 +80094,7 @@ Changes: V5.3 -> V5.4.pre1
 
    * agent/mibgroup/ip-mib/data_access/ipaddress_linux.c:
 
-   Handle full-length IPv6 addresses.  Fix supplied by Radek Vokॆअआॆअ�l
+   Handle full-length IPv6 addresses.  Fix supplied by Radek Vok爭����、����爭����、����爭����、����爭����、����爭����、����〕
 
 2006-01-30 01:52  dts12
 
@@ -76742,7 +80141,7 @@ Changes: V5.3 -> V5.4.pre1
 , snmplib/snmp_api.c, perl/SNMP/SNMP.pm:
 
    Handle non-increasing OIDs during a (perl) bulkwalk.
-   Patch #1364650 from Ole Bjॆअआॆअ�rn Hessen
+   Patch #1364650 from Ole Bj爭����、����爭����、����爭����、����爭����、����爭����、����嗷n Hessen
 
 2006-01-27 03:07  dts12
 
@@ -92481,7 +95880,7 @@ Changes: V5.1 -> V5.2
 
    * agent/mibgroup/ucd-snmp/disk.c:
 
-   fix float calc in var_extensible_disk per Harald Straॆआ�berger <hs at syslog.at>
+   fix float calc in var_extensible_disk per Harald Stra爭����、����爭����、����ッerger <hs at syslog.at>
 
 2004-08-31 14:02  hardaker
 
@@ -95068,7 +98467,7 @@ Changes: V5.1 -> V5.2
    * configure.in, configure:
 
    Fix handling of --enable-local-smux option
-   (Patch #949808 from Erik ॆअइnggॆआ�rd)
+   (Patch #949808 from Erik 爭����、����爭����、����爭����、����ngg爭����、����爭����、����脚d)
 
 2004-06-18 06:46  dts12
 
@@ -126034,7 +129433,7 @@ Changes: V5.0.9 -> V5.1
    * agent/mibgroup/host/: hr_swrun.c (V4-2-patches.5), hr_swrun.c
 :
 
-   Fix Linux file descriptor leak (reported by Oliver Fॆआ�nger)
+   Fix Linux file descriptor leak (reported by Oliver F爭����、����爭����、����穫ger)
    
 2001-03-14 05:22  jbpn
 
@@ -130559,7 +133958,7 @@ Changes: V5.0.9 -> V5.1
 
    * agent/mibgroup/ucd-snmp/memory.c:
 
-   - (memory.c): Patch from Ragnar Kjॆआऐrstad:
+   - (memory.c): Patch from Ragnar Kj爭����、����爭����、����爭����、����rstad:
      - fixed linux problem: wrong params getting returned.
    
 2000-05-25 05:38  mslifcak
@@ -132339,7 +135738,7 @@ Changes: V5.0.9 -> V5.1
 
    - (configure* ucd-snmp/vmstat_solaris2.c):
      - Provide missing 'getpagesize' routine for Solaris 2.4
-       (Thanks to Ragnar Kjॆआऐrstad)
+       (Thanks to Ragnar Kj爭����、����爭����、����爭����、����rstad)
    
 2000-02-16 20:17  mslifcak
 
@@ -139667,7 +143066,7 @@ Changes: V5.0.9 -> V5.1
      loadave.c, memory_solaris2.c, pass.c, pass_persist.c, proc.c,
      versioninfo.c, alarm.c, event.c, Makefile.in, parse.c, snmp.c,
      snmp_debug.c, snmp_logging.c, snmp_logging.h): Patch from Ragnar
-     Kjॆआऐrstad:
+     Kj爭����、����爭����、����爭����、����rstad:
      - do file, stderr, and syslog support.
    
 1999-07-15 08:45  hardaker
@@ -139810,7 +143209,7 @@ Changes: V5.0.9 -> V5.1
 
    * agent/snmpd.c:
 
-   - (snmpd.c): Patch from Ragnar Kjॆआऐrstad:
+   - (snmpd.c): Patch from Ragnar Kj爭����、����爭����、����爭����、����rstad:
      - Add options for switching to a given uid and gid.
    
 1999-07-08 15:16  hardaker
@@ -156579,7 +159978,7 @@ Changes: V5.0.7 -> V5.0.8
 
    * snmplib/mib.c:
 
-   Fix a C precedence botch-up, thanks to Fabr५���cio Las Casas <Fabricio at atan.com.br>
+   Fix a C precedence botch-up, thanks to Fabr爭����、����、死′cio Las Casas <Fabricio at atan.com.br>
    
 2003-02-26 14:14  nba
 
@@ -173362,7 +176761,7 @@ Changes: V4.2 -> V5.0
 
    * agent/mibgroup/host/: hr_swrun.c (V4-2-patches.5), hr_swrun.c:
 
-   Fix Linux file descriptor leak (reported by Oliver Fॆआ�nger)
+   Fix Linux file descriptor leak (reported by Oliver F爭����、����爭����、����穫ger)
    
 2001-03-14 05:22  jbpn
 
@@ -177607,7 +181006,7 @@ Changes: V4.2 -> V4.2.1
 
    * agent/mibgroup/host/hr_swrun.c:
 
-   Fix Linux file descriptor leak (reported by Oliver Fॆआ�nger)
+   Fix Linux file descriptor leak (reported by Oliver F爭����、����爭����、����穫ger)
    
 2001-03-13 13:20  hardaker
 
@@ -180853,7 +184252,7 @@ Changes: V4.1.2 -> V4.2
 	
 2000-05-25 10:07  hardaker
 
-	- (memory.c): Patch from Ragnar Kjॆआऐrstad:
+	- (memory.c): Patch from Ragnar Kj爭����、����爭����、����爭����、����rstad:
 	  - fixed linux problem: wrong params getting returned.
 	
 2000-05-25 05:38  mslifcak
@@ -182042,7 +185441,7 @@ Changes: V4.1.2 -> V4.2
 
 	- (configure* ucd-snmp/vmstat_solaris2.c):
 	  - Provide missing 'getpagesize' routine for Solaris 2.4
-	    (Thanks to Ragnar Kjॆआऐrstad)
+	    (Thanks to Ragnar Kj爭����、����爭����、����爭����、����rstad)
 	
 2000-02-16 20:17  mslifcak
 
@@ -187376,7 +190775,7 @@ hardaker  8 Jul 99 15:16:35
     - (snmpdelta.c, int64.c, int64.h): minimal c64 support for snmpdelta. Untested.
 
 hardaker  8 Jul 99 16:02:58
-    - (snmpd.c): Patch from Ragnar Kjॆआऐrstad:
+    - (snmpd.c): Patch from Ragnar Kj爭����、����爭����、����爭����、����rstad:
       - Add options for switching to a given uid and gid.
 
 daves  9 Jul 99 01:49:49
@@ -187423,7 +190822,7 @@ hardaker 20 Jul 99 14:02:26
       loadave.c, memory_solaris2.c, pass.c, pass_persist.c, proc.c,
       versioninfo.c, alarm.c, event.c, Makefile.in, parse.c, snmp.c,
       snmp_debug.c, snmp_logging.c, snmp_logging.h): Patch from Ragnar
-      Kjॆआऐrstad:
+      Kj爭����、����爭����、����爭����、����rstad:
       - do file, stderr, and syslog support.
 
 hardaker 20 Jul 99 17:06:53
diff --git a/FAQ b/FAQ
index 7cabe2e..2844d33 100644
--- a/FAQ
+++ b/FAQ
@@ -1,7 +1,7 @@
       Frequently Asked Questions (FAQ) for the UCD/Net-SNMP package
       =============================================================
 		       FAQ Author: Dave Shield
-			Net-SNMP Version: 5.7.2.1
+			Net-SNMP Version: 5.7.3
 	    Net-SNMP/UCD-SNMP Project Leader: Wes Hardaker
 	     Email: net-snmp-coders at lists.sourceforge.net
 
diff --git a/Makefile.in b/Makefile.in
index 4d00168..cfcdf73 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -20,7 +20,8 @@ INCLUDESUBDIR=system
 INCLUDESUBDIRHEADERS= aix.h bsd.h bsdi3.h bsdi4.h bsdi.h cygwin.h \
 	darwin.h darwin7.h darwin8.h darwin9.h darwin10.h dragonfly.h dynix.h \
 	freebsd2.h freebsd3.h freebsd4.h freebsd5.h freebsd6.h \
-	freebsd7.h freebsd8.h freebsd9.h freebsd10.h freebsd.h \
+	freebsd7.h freebsd8.h freebsd9.h freebsd10.h freebsd11.h \
+	freebsd12.h freebsd.h \
         generic.h \
 	hpux.h irix.h linux.h mingw32.h mips.h netbsd.h osf5.h \
 	openbsd.h openbsd5.h openbsd4.h \
@@ -284,7 +285,8 @@ configclean: makefileclean
 		agent/mibgroup/mib_module_includes.h 	\
 		agent/mibgroup/mib_module_inits.h 	\
 		agent/mibgroup/mib_module_shutdown.h 	\
-		agent/mibgroup/mib_module_dot_conf.h
+		agent/mibgroup/mib_module_dot_conf.h    \
+		local/snmpconf
 	rm -rf mk
 	rm -f *.core
 
diff --git a/Makefile.top b/Makefile.top
index 862fb94..503f61e 100644
--- a/Makefile.top
+++ b/Makefile.top
@@ -46,6 +46,7 @@ AUTOHEADER	= @AUTOHEADER@
 PERL            = @PERLPROG@
 PYTHON          = @PYTHONPROG@
 FIND            = @FIND@
+EGREP           = @EGREP@
 
 #
 # Compiler arguments
@@ -81,7 +82,7 @@ LINKCC	        = @LINKCC@
 #
 LIBCURRENT  = 30
 LIBAGE      = 0
-LIBREVISION = 2
+LIBREVISION = 3
 
 LIB_LD_CMD      = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o
 LIB_EXTENSION   = la
@@ -116,5 +117,5 @@ TOP_INCLUDES            = $(@TOP_INCLUDES@)
 SNMPLIB_INCLUDES        = $(@SNMPLIB_INCLUDES@)
 AGENT_INCLUDES          = $(@AGENT_INCLUDES@)
 HELPER_INCLUDES         = $(@HELPER_INCLUDES@)
-MIBGROUP_INCLUDES       = $(@MIBGROUP_INCLUDES@)
+MIBGROUP_INCLUDES       = $(@MIBGROUP_INCLUDES@) @EXTERNAL_MIBGROUP_INCLUDES@
 
diff --git a/NEWS b/NEWS
index afde3b2..dbd3700 100644
--- a/NEWS
+++ b/NEWS
@@ -3,13 +3,29 @@ 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.7.2.1*
-    snmpd:
+*5.7.3*
+    Many many bug fixes and minor improvements
+
+    snmpd, snmptrapd and apps:
+      - Patch 2525: from Ryan Steinmetz: Fix argument length parsing of the
+	host resources mib
+      - Make ENV_SEPARATOR_CHAR configurable
       - SECURITY: a denial of service attack vector was discovered on
         the linux implementation of the ICMP-MIB.  This release fixes
         this bug and all users are encouraged to update their SNMP
         agent if they make use of the ICMP-MIB table objects.
 
+    perl:
+      - BUG: 2402: Add support for SNMPv3 traps
+
+    Windows:
+      - Port batch build infrastructure to Visual Studio 2010 and later
+	From Visual Studio 2010 on it is no longer possible to specify
+	include or library directories globally - these have to be
+	specified per project. Hence two additional menu entries in
+	build.bat that allow to specify these directories.
+      - Patch from Bart Van Assche to improve cygwin building
+
 *5.7.2*
     snmp:
       - BUG: 3526549: CVE-2012-2141 Array index error leading to crash
diff --git a/README b/README
index d0e4d19..86600bc 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-	       README file for net-snmp Version: 5.7.2.1
+	       README file for net-snmp Version: 5.7.3
 
 DISCLAIMER
 
@@ -352,6 +352,9 @@ THANKS
     Anders Persson <apersson at users.sourceforge.net>
     Rojer <rojer at users.sourceforge.net>
     Bart Van Assche <bart.vanassche at gmail.com>
+    Pablo Carboni <pcarboni at users.sourceforge.net>
+    Bill Fenner <fenner at gmail.com>
+    Brian Sipos <bsiposrkf at users.sourceforge.net>
 
   We've probably forgotten people on this list.  Let us know if you've
   contributed code and we've left you out.
diff --git a/README.win32 b/README.win32
index 0f4cb9e..e49243b 100644
--- a/README.win32
+++ b/README.win32
@@ -1025,9 +1025,7 @@ 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 
-Cygwin dlls can be eliminated with the --mno-cygwin compiler flag, which uses
-MinGW to compile a native Windows binary, but the benefit of the POSIX emulation
-is lost. The Cygwin tool chain and documentation can be found at:
+The Cygwin tool chain and documentation can be found at:
 
 http://sources.redhat.com/cygwin/
 
@@ -1057,6 +1055,7 @@ 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 \
diff --git a/acconfig.h b/acconfig.h
index d7a829b..12f85c6 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -27,15 +27,6 @@
  */
 #ifndef NETSNMP_NO_AUTOCONF_DEFINITIONS
 
-
-#if defined (WIN32) || defined (mingw32) || defined (cygwin)
-#define ENV_SEPARATOR ";"
-#define ENV_SEPARATOR_CHAR ';'
-#else
-#define ENV_SEPARATOR ":"
-#define ENV_SEPARATOR_CHAR ':'
-#endif
-
 /* definitions added by configure on-the-fly */
 @TOP@
 @BOTTOM@
diff --git a/agent/Makefile.depend b/agent/Makefile.depend
index 9a1320b..5798d11 100644
--- a/agent/Makefile.depend
+++ b/agent/Makefile.depend
@@ -6,8 +6,8 @@
 ./agent_handler.lo: ../include/net-snmp/system/generic.h
 ./agent_handler.lo: ../include/net-snmp/net-snmp-features.h
 ./agent_handler.lo: ../include/net-snmp/net-snmp-includes.h
-./agent_handler.lo:  ../include/net-snmp/definitions.h
-./agent_handler.lo: ../include/net-snmp/types.h 
+./agent_handler.lo: ../include/net-snmp/definitions.h
+./agent_handler.lo: ../include/net-snmp/types.h
 ./agent_handler.lo: ../include/net-snmp/library/oid.h
 ./agent_handler.lo: ../include/net-snmp/library/types.h
 ./agent_handler.lo: ../include/net-snmp/library/snmp_api.h
@@ -31,6 +31,7 @@
 ./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/ucd_compat.h
 ./agent_handler.lo: ../include/net-snmp/library/mib.h
@@ -114,8 +115,8 @@
 ./agent_index.lo: ../include/net-snmp/net-snmp-config.h
 ./agent_index.lo: ../include/net-snmp/net-snmp-features.h
 ./agent_index.lo: ../include/net-snmp/net-snmp-includes.h
-./agent_index.lo:  ../include/net-snmp/definitions.h
-./agent_index.lo: ../include/net-snmp/types.h 
+./agent_index.lo: ../include/net-snmp/definitions.h
+./agent_index.lo: ../include/net-snmp/types.h
 ./agent_index.lo: ../include/net-snmp/library/oid.h
 ./agent_index.lo: ../include/net-snmp/library/types.h
 ./agent_index.lo: ../include/net-snmp/library/snmp_api.h
@@ -139,6 +140,7 @@
 ./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/ucd_compat.h
 ./agent_index.lo: ../include/net-snmp/library/mib.h
@@ -220,184 +222,13 @@
 ./agent_index.lo: ../include/net-snmp/agent/snmp_get_statistic.h
 ./agent_index.lo: ../include/net-snmp/agent/agent_callbacks.h
 ./agent_index.lo: ../include/net-snmp/agent/agent_index.h snmpd.h
-./agent_index.lo: mibgroup/struct.h ../agent/mibgroup/mib_module_includes.h
-./agent_index.lo: mibgroup/examples/example.h mibgroup/testhandler.h
-./agent_index.lo: mibgroup/host/hrh_storage.h mibgroup/host/hrh_filesys.h
-./agent_index.lo: mibgroup/host/hrSWInstalledTable.h
-./agent_index.lo: mibgroup/host/hrSWRunTable.h mibgroup/host/hr_system.h
-./agent_index.lo: mibgroup/host/hr_device.h mibgroup/host/hr_other.h
-./agent_index.lo: mibgroup/host/hr_proc.h mibgroup/host/hr_network.h
-./agent_index.lo: mibgroup/host/hr_print.h mibgroup/host/hr_disk.h
-./agent_index.lo: mibgroup/host/hr_partition.h mibgroup/examples/scalar_int.h
-./agent_index.lo: mibgroup/examples/watched.h mibgroup/examples/data_set.h
-./agent_index.lo: mibgroup/examples/delayed_instance.h
-./agent_index.lo: mibgroup/tsm-mib/snmpTsmConfigurationUsePrefix.h
-./agent_index.lo: mibgroup/Rmon/rows.h mibgroup/Rmon/agutil.h
-./agent_index.lo: mibgroup/Rmon/statistics.h mibgroup/Rmon/alarmTable.h
-./agent_index.lo: mibgroup/Rmon/history.h mibgroup/Rmon/event.h
-./agent_index.lo: mibgroup/host/data_access/swinst.h
-./agent_index.lo: mibgroup/host/data_access/swrun.h
-./agent_index.lo: mibgroup/host/hrSWRunPerfTable.h
-./agent_index.lo: mibgroup/tlstm-mib/snmpTlstmSession/snmpTlstmSession.h
-./agent_index.lo: mibgroup/tlstm-mib/snmpTlstmAddrTable/snmpTlstmAddrTable.h
-./agent_index.lo: mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.h
-./agent_index.lo: mibgroup/tlstm-mib/snmpTlstmParamsTable/snmpTlstmParamsTable.h
-./agent_index.lo: mibgroup/tsm-mib/snmpTsmStats/snmpTsmStats.h
-./agent_index.lo: mibgroup/disman/event/mteScalars.h
-./agent_index.lo: mibgroup/disman/event/mteTrigger.h
-./agent_index.lo: mibgroup/disman/event/mteTriggerTable.h
-./agent_index.lo: mibgroup/disman/event/mteTriggerDeltaTable.h
-./agent_index.lo: mibgroup/disman/event/mteTriggerExistenceTable.h
-./agent_index.lo: mibgroup/disman/event/mteTriggerBooleanTable.h
-./agent_index.lo: mibgroup/disman/event/mteTriggerThresholdTable.h
-./agent_index.lo: mibgroup/disman/event/mteTriggerConf.h
-./agent_index.lo: mibgroup/disman/event/mteEvent.h
-./agent_index.lo: ../agent/mibgroup/disman/event/mteTrigger.h
-./agent_index.lo: mibgroup/disman/event/mteEventTable.h
-./agent_index.lo: mibgroup/disman/event/mteEventSetTable.h
-./agent_index.lo: mibgroup/disman/event/mteEventNotificationTable.h
-./agent_index.lo: mibgroup/disman/event/mteEventConf.h
-./agent_index.lo: mibgroup/disman/event/mteObjects.h
-./agent_index.lo: mibgroup/disman/event/mteObjectsTable.h
-./agent_index.lo: mibgroup/disman/event/mteObjectsConf.h
-./agent_index.lo: mibgroup/snmpv3/snmpMPDStats_5_5.h
-./agent_index.lo: mibgroup/snmpv3/usmStats_5_5.h mibgroup/snmpv3/snmpEngine.h
-./agent_index.lo: mibgroup/snmpv3/usmUser.h mibgroup/mibII/snmp_mib_5_5.h
-./agent_index.lo: mibgroup/mibII/system_mib.h mibgroup/mibII/sysORTable.h
-./agent_index.lo: mibgroup/mibII/at.h mibgroup/mibII/ip.h
-./agent_index.lo: mibgroup/mibII/var_route.h mibgroup/mibII/route_write.h
-./agent_index.lo: mibgroup/mibII/at.h mibgroup/mibII/tcp.h
-./agent_index.lo: mibgroup/mibII/icmp.h mibgroup/mibII/udp.h
-./agent_index.lo: mibgroup/mibII/vacm_vars.h mibgroup/mibII/setSerialNo.h
-./agent_index.lo: mibgroup/mibII/ipv6.h mibgroup/ucd-snmp/disk_hw.h
-./agent_index.lo: ../agent/mibgroup/mibdefs.h mibgroup/ucd-snmp/proc.h
-./agent_index.lo: mibgroup/ucd-snmp/versioninfo.h mibgroup/ucd-snmp/pass.h
-./agent_index.lo: mibgroup/ucd-snmp/pass_persist.h
-./agent_index.lo: mibgroup/ucd-snmp/loadave.h mibgroup/agent/extend.h
-./agent_index.lo: mibgroup/ucd-snmp/errormib.h mibgroup/ucd-snmp/file.h
-./agent_index.lo: mibgroup/ucd-snmp/dlmod.h mibgroup/ucd-snmp/proxy.h
-./agent_index.lo: mibgroup/ucd-snmp/logmatch.h mibgroup/ucd-snmp/memory.h
-./agent_index.lo: mibgroup/ucd-snmp/vmstat.h
-./agent_index.lo: mibgroup/notification/snmpNotifyTable.h
-./agent_index.lo: mibgroup/notification/snmpNotifyFilterProfileTable.h
-./agent_index.lo: mibgroup/notification-log-mib/notification_log.h
-./agent_index.lo: mibgroup/target/target_counters_5_5.h
-./agent_index.lo: mibgroup/target/snmpTargetAddrEntry.h
-./agent_index.lo: mibgroup/target/snmpTargetParamsEntry.h
-./agent_index.lo: mibgroup/agent/nsTransactionTable.h
-./agent_index.lo: mibgroup/agent/nsModuleTable.h mibgroup/agent/nsDebug.h
-./agent_index.lo: mibgroup/agent/nsCache.h mibgroup/agent/nsLogging.h
-./agent_index.lo: mibgroup/agent/nsVacmAccessTable.h
-./agent_index.lo: mibgroup/disman/schedule/schedCore.h
-./agent_index.lo: mibgroup/disman/schedule/schedConf.h
-./agent_index.lo: mibgroup/disman/schedule/schedTable.h
-./agent_index.lo: mibgroup/utilities/override.h
-./agent_index.lo: mibgroup/hardware/memory/hw_mem.h
-./agent_index.lo: mibgroup/hardware/fsys/hw_fsys.h
-./agent_index.lo: mibgroup/hardware/cpu/cpu.h
-./agent_index.lo: mibgroup/hardware/cpu/cpu_linux.h
-./agent_index.lo: mibgroup/mibII/var_route.h mibgroup/mibII/tcpTable.h
-./agent_index.lo: mibgroup/mibII/udpTable.h mibgroup/mibII/vacm_context.h
-./agent_index.lo: mibgroup/ip-mib/ip_scalars.h
-./agent_index.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h
-./agent_index.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_constants.h
-./agent_index.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.h
-./agent_index.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h
-./agent_index.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access.h
-./agent_index.lo: mibgroup/if-mib/ifTable/ifTable.h
-./agent_index.lo: ../include/net-snmp/data_access/interface.h
-./agent_index.lo: mibgroup/if-mib/ifTable/ifTable_constants.h
-./agent_index.lo: mibgroup/if-mib/ifTable/ifTable_interface.h
-./agent_index.lo: mibgroup/if-mib/ifTable/ifTable.h
-./agent_index.lo: mibgroup/if-mib/ifTable/ifTable_data_access.h
-./agent_index.lo: mibgroup/if-mib/ifXTable/ifXTable.h
-./agent_index.lo: ../agent/mibgroup/if-mib/ifTable/ifTable.h
-./agent_index.lo: mibgroup/if-mib/ifXTable/ifXTable_constants.h
-./agent_index.lo: mibgroup/if-mib/ifXTable/ifXTable_interface.h
-./agent_index.lo: mibgroup/if-mib/ifXTable/ifXTable.h
-./agent_index.lo: mibgroup/if-mib/ifXTable/ifXTable_data_access.h
-./agent_index.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable.h
-./agent_index.lo: ../include/net-snmp/data_access/ipaddress.h
-./agent_index.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable_constants.h
-./agent_index.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable_interface.h
-./agent_index.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable.h
-./agent_index.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable_data_access.h
-./agent_index.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable.h
-./agent_index.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_constants.h
-./agent_index.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_interface.h
-./agent_index.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable.h
-./agent_index.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_data_access.h
-./agent_index.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable.h
-./agent_index.lo: ../include/net-snmp/data_access/defaultrouter.h
-./agent_index.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_oids.h
-./agent_index.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_enums.h
-./agent_index.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_interface.h
-./agent_index.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable.h
-./agent_index.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_access.h
-./agent_index.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_get.h
-./agent_index.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable.h
-./agent_index.lo: ../include/net-snmp/data_access/arp.h
-./agent_index.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_constants.h
-./agent_index.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_interface.h
-./agent_index.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable.h
-./agent_index.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access.h
-./agent_index.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.h
-./agent_index.lo: ../include/net-snmp/data_access/ipstats.h
-./agent_index.lo: ../include/net-snmp/data_access/systemstats.h
-./agent_index.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_constants.h
-./agent_index.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_interface.h
-./agent_index.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.h
-./agent_index.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access.h
-./agent_index.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable.h
-./agent_index.lo: ../include/net-snmp/data_access/scopezone.h
-./agent_index.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_oids.h
-./agent_index.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_enums.h
-./agent_index.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_interface.h
-./agent_index.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable.h
-./agent_index.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_data_access.h
-./agent_index.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.h
-./agent_index.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_oids.h
-./agent_index.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_enums.h
-./agent_index.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.h
-./agent_index.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.h
-./agent_index.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_access.h
-./agent_index.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.h
-./agent_index.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h
-./agent_index.lo: ../include/net-snmp/data_access/route.h
-./agent_index.lo: ../agent/mibgroup/mibII/route_headers.h
-./agent_index.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_constants.h
-./agent_index.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_interface.h
-./agent_index.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h
-./agent_index.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access.h
-./agent_index.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.h
-./agent_index.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_constants.h
-./agent_index.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface.h
-./agent_index.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.h
-./agent_index.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_data_access.h
-./agent_index.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.h
-./agent_index.lo: ../include/net-snmp/data_access/tcpConn.h
-./agent_index.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_constants.h
-./agent_index.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_interface.h
-./agent_index.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.h
-./agent_index.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access.h
-./agent_index.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.h
-./agent_index.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_constants.h
-./agent_index.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_interface.h
-./agent_index.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.h
-./agent_index.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_data_access.h
-./agent_index.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable.h
-./agent_index.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_constants.h
-./agent_index.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_interface.h
-./agent_index.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable.h
-./agent_index.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_data_access.h
-./agent_index.lo: mibgroup/if-mib/data_access/interface.h
-./agent_index.lo: ../agent/mibgroup/agentx/subagent.h
+./agent_index.lo: mibgroup/struct.h ../agent/mibgroup/agentx/subagent.h
 ./agent_index.lo: ../agent/mibgroup/agentx/client.h
 ./agent_read_config.lo: ../include/net-snmp/net-snmp-config.h
 ./agent_read_config.lo: ../include/net-snmp/net-snmp-features.h
 ./agent_read_config.lo: ../include/net-snmp/net-snmp-includes.h
 ./agent_read_config.lo: ../include/net-snmp/definitions.h
-./agent_read_config.lo: ../include/net-snmp/types.h 
+./agent_read_config.lo: ../include/net-snmp/types.h
 ./agent_read_config.lo: ../include/net-snmp/library/oid.h
 ./agent_read_config.lo: ../include/net-snmp/library/types.h
 ./agent_read_config.lo: ../include/net-snmp/library/snmp_api.h
@@ -421,6 +252,7 @@
 ./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/ucd_compat.h
 ./agent_read_config.lo: ../include/net-snmp/library/mib.h
@@ -507,6 +339,13 @@
 ./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/examples/data_set.h
+./agent_read_config.lo: mibgroup/examples/delayed_instance.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
@@ -515,51 +354,20 @@
 ./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/examples/scalar_int.h
-./agent_read_config.lo: mibgroup/examples/watched.h
-./agent_read_config.lo: mibgroup/examples/data_set.h
-./agent_read_config.lo: mibgroup/examples/delayed_instance.h
 ./agent_read_config.lo: mibgroup/tsm-mib/snmpTsmConfigurationUsePrefix.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/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/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/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/snmpv3/snmpMPDStats_5_5.h
 ./agent_read_config.lo: mibgroup/snmpv3/usmStats_5_5.h
 ./agent_read_config.lo: mibgroup/snmpv3/snmpEngine.h
 ./agent_read_config.lo: mibgroup/snmpv3/usmUser.h
 ./agent_read_config.lo: mibgroup/mibII/snmp_mib_5_5.h
 ./agent_read_config.lo: mibgroup/mibII/system_mib.h
-./agent_read_config.lo: mibgroup/mibII/sysORTable.h mibgroup/mibII/at.h
+./agent_read_config.lo: mibgroup/mibII/sysORTable.h
+./agent_read_config.lo: mibgroup/mibII/vacm_vars.h
+./agent_read_config.lo: mibgroup/mibII/setSerialNo.h mibgroup/mibII/at.h
 ./agent_read_config.lo: mibgroup/mibII/ip.h mibgroup/mibII/var_route.h
 ./agent_read_config.lo: mibgroup/mibII/route_write.h mibgroup/mibII/at.h
 ./agent_read_config.lo: mibgroup/mibII/tcp.h mibgroup/mibII/icmp.h
-./agent_read_config.lo: mibgroup/mibII/udp.h mibgroup/mibII/vacm_vars.h
-./agent_read_config.lo: mibgroup/mibII/setSerialNo.h mibgroup/mibII/ipv6.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/ucd-snmp/versioninfo.h
@@ -581,23 +389,48 @@
 ./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/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/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/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/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/mibII/vacm_context.h
 ./agent_read_config.lo: mibgroup/ip-mib/ip_scalars.h
 ./agent_read_config.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h
 ./agent_read_config.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_constants.h
 ./agent_read_config.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.h
 ./agent_read_config.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h
 ./agent_read_config.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access.h
+./agent_read_config.lo: mibgroup/hardware/memory/hw_mem.h
+./agent_read_config.lo: mibgroup/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
@@ -691,7 +524,7 @@
 ./agent_registry.lo: ../include/net-snmp/net-snmp-features.h
 ./agent_registry.lo: ../include/net-snmp/net-snmp-includes.h
 ./agent_registry.lo: ../include/net-snmp/definitions.h
-./agent_registry.lo: ../include/net-snmp/types.h 
+./agent_registry.lo: ../include/net-snmp/types.h
 ./agent_registry.lo: ../include/net-snmp/library/oid.h
 ./agent_registry.lo: ../include/net-snmp/library/types.h
 ./agent_registry.lo: ../include/net-snmp/library/snmp_api.h
@@ -715,6 +548,7 @@
 ./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/ucd_compat.h
 ./agent_registry.lo: ../include/net-snmp/library/mib.h
@@ -795,186 +629,12 @@
 ./agent_registry.lo: ../include/net-snmp/agent/mfd.h
 ./agent_registry.lo: ../include/net-snmp/agent/snmp_get_statistic.h
 ./agent_registry.lo: ../include/net-snmp/agent/agent_callbacks.h snmpd.h
-./agent_registry.lo: mibgroup/struct.h
-./agent_registry.lo: ../agent/mibgroup/mib_module_includes.h
-./agent_registry.lo: mibgroup/examples/example.h mibgroup/testhandler.h
-./agent_registry.lo: mibgroup/host/hrh_storage.h mibgroup/host/hrh_filesys.h
-./agent_registry.lo: mibgroup/host/hrSWInstalledTable.h
-./agent_registry.lo: mibgroup/host/hrSWRunTable.h mibgroup/host/hr_system.h
-./agent_registry.lo: mibgroup/host/hr_device.h mibgroup/host/hr_other.h
-./agent_registry.lo: mibgroup/host/hr_proc.h mibgroup/host/hr_network.h
-./agent_registry.lo: mibgroup/host/hr_print.h mibgroup/host/hr_disk.h
-./agent_registry.lo: mibgroup/host/hr_partition.h
-./agent_registry.lo: mibgroup/examples/scalar_int.h
-./agent_registry.lo: mibgroup/examples/watched.h mibgroup/examples/data_set.h
-./agent_registry.lo: mibgroup/examples/delayed_instance.h
-./agent_registry.lo: mibgroup/tsm-mib/snmpTsmConfigurationUsePrefix.h
-./agent_registry.lo: mibgroup/Rmon/rows.h mibgroup/Rmon/agutil.h
-./agent_registry.lo: mibgroup/Rmon/statistics.h mibgroup/Rmon/alarmTable.h
-./agent_registry.lo: mibgroup/Rmon/history.h mibgroup/Rmon/event.h
-./agent_registry.lo: mibgroup/host/data_access/swinst.h
-./agent_registry.lo: mibgroup/host/data_access/swrun.h
-./agent_registry.lo: mibgroup/host/hrSWRunPerfTable.h
-./agent_registry.lo: mibgroup/tlstm-mib/snmpTlstmSession/snmpTlstmSession.h
-./agent_registry.lo: mibgroup/tlstm-mib/snmpTlstmAddrTable/snmpTlstmAddrTable.h
-./agent_registry.lo: mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.h
-./agent_registry.lo: mibgroup/tlstm-mib/snmpTlstmParamsTable/snmpTlstmParamsTable.h
-./agent_registry.lo: mibgroup/tsm-mib/snmpTsmStats/snmpTsmStats.h
-./agent_registry.lo: mibgroup/disman/event/mteScalars.h
-./agent_registry.lo: mibgroup/disman/event/mteTrigger.h
-./agent_registry.lo: mibgroup/disman/event/mteTriggerTable.h
-./agent_registry.lo: mibgroup/disman/event/mteTriggerDeltaTable.h
-./agent_registry.lo: mibgroup/disman/event/mteTriggerExistenceTable.h
-./agent_registry.lo: mibgroup/disman/event/mteTriggerBooleanTable.h
-./agent_registry.lo: mibgroup/disman/event/mteTriggerThresholdTable.h
-./agent_registry.lo: mibgroup/disman/event/mteTriggerConf.h
-./agent_registry.lo: mibgroup/disman/event/mteEvent.h
-./agent_registry.lo: ../agent/mibgroup/disman/event/mteTrigger.h
-./agent_registry.lo: mibgroup/disman/event/mteEventTable.h
-./agent_registry.lo: mibgroup/disman/event/mteEventSetTable.h
-./agent_registry.lo: mibgroup/disman/event/mteEventNotificationTable.h
-./agent_registry.lo: mibgroup/disman/event/mteEventConf.h
-./agent_registry.lo: mibgroup/disman/event/mteObjects.h
-./agent_registry.lo: mibgroup/disman/event/mteObjectsTable.h
-./agent_registry.lo: mibgroup/disman/event/mteObjectsConf.h
-./agent_registry.lo: mibgroup/snmpv3/snmpMPDStats_5_5.h
-./agent_registry.lo: mibgroup/snmpv3/usmStats_5_5.h
-./agent_registry.lo: mibgroup/snmpv3/snmpEngine.h mibgroup/snmpv3/usmUser.h
-./agent_registry.lo: mibgroup/mibII/snmp_mib_5_5.h
-./agent_registry.lo: mibgroup/mibII/system_mib.h mibgroup/mibII/sysORTable.h
-./agent_registry.lo: mibgroup/mibII/at.h mibgroup/mibII/ip.h
-./agent_registry.lo: mibgroup/mibII/var_route.h mibgroup/mibII/route_write.h
-./agent_registry.lo: mibgroup/mibII/at.h mibgroup/mibII/tcp.h
-./agent_registry.lo: mibgroup/mibII/icmp.h mibgroup/mibII/udp.h
-./agent_registry.lo: mibgroup/mibII/vacm_vars.h mibgroup/mibII/setSerialNo.h
-./agent_registry.lo: mibgroup/mibII/ipv6.h mibgroup/ucd-snmp/disk_hw.h
-./agent_registry.lo: ../agent/mibgroup/mibdefs.h mibgroup/ucd-snmp/proc.h
-./agent_registry.lo: mibgroup/ucd-snmp/versioninfo.h mibgroup/ucd-snmp/pass.h
-./agent_registry.lo: mibgroup/ucd-snmp/pass_persist.h
-./agent_registry.lo: mibgroup/ucd-snmp/loadave.h mibgroup/agent/extend.h
-./agent_registry.lo: mibgroup/ucd-snmp/errormib.h mibgroup/ucd-snmp/file.h
-./agent_registry.lo: mibgroup/ucd-snmp/dlmod.h mibgroup/ucd-snmp/proxy.h
-./agent_registry.lo: mibgroup/ucd-snmp/logmatch.h mibgroup/ucd-snmp/memory.h
-./agent_registry.lo: mibgroup/ucd-snmp/vmstat.h
-./agent_registry.lo: mibgroup/notification/snmpNotifyTable.h
-./agent_registry.lo: mibgroup/notification/snmpNotifyFilterProfileTable.h
-./agent_registry.lo: mibgroup/notification-log-mib/notification_log.h
-./agent_registry.lo: mibgroup/target/target_counters_5_5.h
-./agent_registry.lo: mibgroup/target/snmpTargetAddrEntry.h
-./agent_registry.lo: mibgroup/target/snmpTargetParamsEntry.h
-./agent_registry.lo: mibgroup/agent/nsTransactionTable.h
-./agent_registry.lo: mibgroup/agent/nsModuleTable.h mibgroup/agent/nsDebug.h
-./agent_registry.lo: mibgroup/agent/nsCache.h mibgroup/agent/nsLogging.h
-./agent_registry.lo: mibgroup/agent/nsVacmAccessTable.h
-./agent_registry.lo: mibgroup/disman/schedule/schedCore.h
-./agent_registry.lo: mibgroup/disman/schedule/schedConf.h
-./agent_registry.lo: mibgroup/disman/schedule/schedTable.h
-./agent_registry.lo: mibgroup/utilities/override.h
-./agent_registry.lo: mibgroup/hardware/memory/hw_mem.h
-./agent_registry.lo: mibgroup/hardware/fsys/hw_fsys.h
-./agent_registry.lo: mibgroup/hardware/cpu/cpu.h
-./agent_registry.lo: mibgroup/hardware/cpu/cpu_linux.h
-./agent_registry.lo: mibgroup/mibII/var_route.h mibgroup/mibII/tcpTable.h
-./agent_registry.lo: mibgroup/mibII/udpTable.h mibgroup/mibII/vacm_context.h
-./agent_registry.lo: mibgroup/ip-mib/ip_scalars.h
-./agent_registry.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h
-./agent_registry.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_constants.h
-./agent_registry.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.h
-./agent_registry.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h
-./agent_registry.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access.h
-./agent_registry.lo: mibgroup/if-mib/ifTable/ifTable.h
-./agent_registry.lo: ../include/net-snmp/data_access/interface.h
-./agent_registry.lo: mibgroup/if-mib/ifTable/ifTable_constants.h
-./agent_registry.lo: mibgroup/if-mib/ifTable/ifTable_interface.h
-./agent_registry.lo: mibgroup/if-mib/ifTable/ifTable.h
-./agent_registry.lo: mibgroup/if-mib/ifTable/ifTable_data_access.h
-./agent_registry.lo: mibgroup/if-mib/ifXTable/ifXTable.h
-./agent_registry.lo: ../agent/mibgroup/if-mib/ifTable/ifTable.h
-./agent_registry.lo: mibgroup/if-mib/ifXTable/ifXTable_constants.h
-./agent_registry.lo: mibgroup/if-mib/ifXTable/ifXTable_interface.h
-./agent_registry.lo: mibgroup/if-mib/ifXTable/ifXTable.h
-./agent_registry.lo: mibgroup/if-mib/ifXTable/ifXTable_data_access.h
-./agent_registry.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable.h
-./agent_registry.lo: ../include/net-snmp/data_access/ipaddress.h
-./agent_registry.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable_constants.h
-./agent_registry.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable_interface.h
-./agent_registry.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable.h
-./agent_registry.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable_data_access.h
-./agent_registry.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable.h
-./agent_registry.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_constants.h
-./agent_registry.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_interface.h
-./agent_registry.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable.h
-./agent_registry.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_data_access.h
-./agent_registry.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable.h
-./agent_registry.lo: ../include/net-snmp/data_access/defaultrouter.h
-./agent_registry.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_oids.h
-./agent_registry.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_enums.h
-./agent_registry.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_interface.h
-./agent_registry.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable.h
-./agent_registry.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_access.h
-./agent_registry.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_get.h
-./agent_registry.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable.h
-./agent_registry.lo: ../include/net-snmp/data_access/arp.h
-./agent_registry.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_constants.h
-./agent_registry.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_interface.h
-./agent_registry.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable.h
-./agent_registry.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access.h
-./agent_registry.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.h
-./agent_registry.lo: ../include/net-snmp/data_access/ipstats.h
-./agent_registry.lo: ../include/net-snmp/data_access/systemstats.h
-./agent_registry.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_constants.h
-./agent_registry.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_interface.h
-./agent_registry.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.h
-./agent_registry.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access.h
-./agent_registry.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable.h
-./agent_registry.lo: ../include/net-snmp/data_access/scopezone.h
-./agent_registry.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_oids.h
-./agent_registry.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_enums.h
-./agent_registry.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_interface.h
-./agent_registry.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable.h
-./agent_registry.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_data_access.h
-./agent_registry.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.h
-./agent_registry.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_oids.h
-./agent_registry.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_enums.h
-./agent_registry.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.h
-./agent_registry.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.h
-./agent_registry.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_access.h
-./agent_registry.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.h
-./agent_registry.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h
-./agent_registry.lo: ../include/net-snmp/data_access/route.h
-./agent_registry.lo: ../agent/mibgroup/mibII/route_headers.h
-./agent_registry.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_constants.h
-./agent_registry.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_interface.h
-./agent_registry.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h
-./agent_registry.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access.h
-./agent_registry.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.h
-./agent_registry.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_constants.h
-./agent_registry.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface.h
-./agent_registry.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.h
-./agent_registry.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_data_access.h
-./agent_registry.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.h
-./agent_registry.lo: ../include/net-snmp/data_access/tcpConn.h
-./agent_registry.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_constants.h
-./agent_registry.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_interface.h
-./agent_registry.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.h
-./agent_registry.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access.h
-./agent_registry.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.h
-./agent_registry.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_constants.h
-./agent_registry.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_interface.h
-./agent_registry.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.h
-./agent_registry.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_data_access.h
-./agent_registry.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable.h
-./agent_registry.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_constants.h
-./agent_registry.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_interface.h
-./agent_registry.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable.h
-./agent_registry.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_data_access.h
-./agent_registry.lo: mibgroup/if-mib/data_access/interface.h
-./agent_registry.lo: ../agent/mibgroup/agentx/subagent.h
+./agent_registry.lo: mibgroup/struct.h ../agent/mibgroup/agentx/subagent.h
 ./agent_registry.lo: ../agent/mibgroup/agentx/client.h
 ./agent_sysORTable.lo: ../include/net-snmp/net-snmp-config.h
 ./agent_sysORTable.lo: ../include/net-snmp/net-snmp-includes.h
 ./agent_sysORTable.lo: ../include/net-snmp/definitions.h
-./agent_sysORTable.lo: ../include/net-snmp/types.h 
+./agent_sysORTable.lo: ../include/net-snmp/types.h
 ./agent_sysORTable.lo: ../include/net-snmp/library/oid.h
 ./agent_sysORTable.lo: ../include/net-snmp/library/types.h
 ./agent_sysORTable.lo: ../include/net-snmp/library/snmp_api.h
@@ -998,6 +658,7 @@
 ./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/ucd_compat.h
 ./agent_sysORTable.lo: ../include/net-snmp/library/mib.h
@@ -1108,6 +769,7 @@
 ./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/ucd_compat.h
 ./agent_trap.lo: ../include/net-snmp/library/mib.h
@@ -1116,7 +778,7 @@
 ./agent_trap.lo: ../include/net-snmp/library/oid_stash.h
 ./agent_trap.lo: ../include/net-snmp/library/snmp_impl.h
 ./agent_trap.lo: ../include/net-snmp/library/snmp.h
-./agent_trap.lo: ../include/net-snmp/library/snmp-tc.h 
+./agent_trap.lo: ../include/net-snmp/library/snmp-tc.h
 ./agent_trap.lo: ../include/net-snmp/library/system.h
 ./agent_trap.lo: ../include/net-snmp/library/tools.h
 ./agent_trap.lo: ../include/net-snmp/library/int64.h
@@ -1195,8 +857,8 @@
 ./mib_modules.lo: ../include/net-snmp/agent/mib_module_config.h
 ./mib_modules.lo: ../include/net-snmp/net-snmp-config.h
 ./mib_modules.lo: ../include/net-snmp/net-snmp-includes.h
-./mib_modules.lo:  ../include/net-snmp/definitions.h
-./mib_modules.lo: ../include/net-snmp/types.h 
+./mib_modules.lo: ../include/net-snmp/definitions.h
+./mib_modules.lo: ../include/net-snmp/types.h
 ./mib_modules.lo: ../include/net-snmp/library/oid.h
 ./mib_modules.lo: ../include/net-snmp/library/types.h
 ./mib_modules.lo: ../include/net-snmp/library/snmp_api.h
@@ -1220,6 +882,7 @@
 ./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/ucd_compat.h
 ./mib_modules.lo: ../include/net-snmp/library/mib.h
@@ -1302,53 +965,29 @@
 ./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/examples/data_set.h
+./mib_modules.lo: mibgroup/examples/delayed_instance.h
 ./mib_modules.lo: mibgroup/host/hrh_storage.h mibgroup/host/hrh_filesys.h
 ./mib_modules.lo: mibgroup/host/hrSWInstalledTable.h
 ./mib_modules.lo: mibgroup/host/hrSWRunTable.h mibgroup/host/hr_system.h
 ./mib_modules.lo: mibgroup/host/hr_device.h mibgroup/host/hr_other.h
 ./mib_modules.lo: mibgroup/host/hr_proc.h mibgroup/host/hr_network.h
 ./mib_modules.lo: mibgroup/host/hr_print.h mibgroup/host/hr_disk.h
-./mib_modules.lo: mibgroup/host/hr_partition.h mibgroup/examples/scalar_int.h
-./mib_modules.lo: mibgroup/examples/watched.h mibgroup/examples/data_set.h
-./mib_modules.lo: mibgroup/examples/delayed_instance.h
+./mib_modules.lo: mibgroup/host/hr_partition.h
 ./mib_modules.lo: mibgroup/tsm-mib/snmpTsmConfigurationUsePrefix.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/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/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/snmpv3/snmpMPDStats_5_5.h
 ./mib_modules.lo: mibgroup/snmpv3/usmStats_5_5.h mibgroup/snmpv3/snmpEngine.h
 ./mib_modules.lo: mibgroup/snmpv3/usmUser.h mibgroup/mibII/snmp_mib_5_5.h
 ./mib_modules.lo: mibgroup/mibII/system_mib.h mibgroup/mibII/sysORTable.h
+./mib_modules.lo: mibgroup/mibII/vacm_vars.h mibgroup/mibII/setSerialNo.h
 ./mib_modules.lo: mibgroup/mibII/at.h mibgroup/mibII/ip.h
 ./mib_modules.lo: mibgroup/mibII/var_route.h mibgroup/mibII/route_write.h
 ./mib_modules.lo: mibgroup/mibII/at.h mibgroup/mibII/tcp.h
 ./mib_modules.lo: mibgroup/mibII/icmp.h mibgroup/mibII/udp.h
-./mib_modules.lo: mibgroup/mibII/vacm_vars.h mibgroup/mibII/setSerialNo.h
 ./mib_modules.lo: mibgroup/mibII/ipv6.h mibgroup/ucd-snmp/disk_hw.h
 ./mib_modules.lo: ../agent/mibgroup/mibdefs.h mibgroup/ucd-snmp/proc.h
 ./mib_modules.lo: mibgroup/ucd-snmp/versioninfo.h mibgroup/ucd-snmp/pass.h
@@ -1368,22 +1007,47 @@
 ./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/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/mibII/var_route.h mibgroup/mibII/tcpTable.h
-./mib_modules.lo: mibgroup/mibII/udpTable.h mibgroup/mibII/vacm_context.h
+./mib_modules.lo: mibgroup/host/data_access/swinst.h
+./mib_modules.lo: mibgroup/host/data_access/swrun.h
+./mib_modules.lo: mibgroup/host/hrSWRunPerfTable.h
+./mib_modules.lo: mibgroup/tlstm-mib/snmpTlstmSession/snmpTlstmSession.h
+./mib_modules.lo: mibgroup/tlstm-mib/snmpTlstmAddrTable/snmpTlstmAddrTable.h
+./mib_modules.lo: mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.h
+./mib_modules.lo: mibgroup/tlstm-mib/snmpTlstmParamsTable/snmpTlstmParamsTable.h
+./mib_modules.lo: mibgroup/tsm-mib/snmpTsmStats/snmpTsmStats.h
+./mib_modules.lo: mibgroup/mibII/vacm_context.h mibgroup/mibII/var_route.h
+./mib_modules.lo: mibgroup/mibII/tcpTable.h mibgroup/mibII/udpTable.h
 ./mib_modules.lo: mibgroup/ip-mib/ip_scalars.h
 ./mib_modules.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h
 ./mib_modules.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_constants.h
 ./mib_modules.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.h
 ./mib_modules.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h
 ./mib_modules.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access.h
+./mib_modules.lo: mibgroup/hardware/memory/hw_mem.h
+./mib_modules.lo: mibgroup/hardware/fsys/hw_fsys.h
+./mib_modules.lo: mibgroup/hardware/cpu/cpu.h
+./mib_modules.lo: mibgroup/hardware/cpu/cpu_linux.h
 ./mib_modules.lo: mibgroup/if-mib/ifTable/ifTable.h
 ./mib_modules.lo: ../include/net-snmp/data_access/interface.h
 ./mib_modules.lo: mibgroup/if-mib/ifTable/ifTable_constants.h
@@ -1476,7 +1140,7 @@
 ./object_monitor.lo: ../include/net-snmp/net-snmp-config.h
 ./object_monitor.lo: ../include/net-snmp/net-snmp-includes.h
 ./object_monitor.lo: ../include/net-snmp/definitions.h
-./object_monitor.lo: ../include/net-snmp/types.h 
+./object_monitor.lo: ../include/net-snmp/types.h
 ./object_monitor.lo: ../include/net-snmp/library/oid.h
 ./object_monitor.lo: ../include/net-snmp/library/types.h
 ./object_monitor.lo: ../include/net-snmp/library/snmp_api.h
@@ -1500,6 +1164,7 @@
 ./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/ucd_compat.h
 ./object_monitor.lo: ../include/net-snmp/library/mib.h
@@ -1583,9 +1248,9 @@
 ./object_monitor.lo: ../include/net-snmp/agent/object_monitor.h
 ./snmp_agent.lo: ../include/net-snmp/net-snmp-config.h
 ./snmp_agent.lo: ../include/net-snmp/net-snmp-features.h
-./snmp_agent.lo: ../include/net-snmp/net-snmp-includes.h 
-./snmp_agent.lo:  ../include/net-snmp/definitions.h
-./snmp_agent.lo: ../include/net-snmp/types.h 
+./snmp_agent.lo: ../include/net-snmp/net-snmp-includes.h
+./snmp_agent.lo: ../include/net-snmp/definitions.h
+./snmp_agent.lo: ../include/net-snmp/types.h
 ./snmp_agent.lo: ../include/net-snmp/library/oid.h
 ./snmp_agent.lo: ../include/net-snmp/library/types.h
 ./snmp_agent.lo: ../include/net-snmp/library/snmp_api.h
@@ -1609,6 +1274,7 @@
 ./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/ucd_compat.h
 ./snmp_agent.lo: ../include/net-snmp/library/mib.h
@@ -1690,11 +1356,10 @@
 ./snmp_agent.lo: ../include/net-snmp/agent/snmp_get_statistic.h snmpd.h
 ./snmp_agent.lo: ../include/net-snmp/agent/mib_modules.h
 ./snmp_agent.lo: ../agent/mibgroup/agentx/protocol.h
-./snmp_agent.lo: ../agent/mibgroup/agentx/master.h
 ./snmp_agent.lo: ../agent/mibgroup/smux/smux.h
 ./snmpd.lo: ../include/net-snmp/net-snmp-config.h
 ./snmpd.lo: ../include/net-snmp/net-snmp-features.h
-./snmpd.lo: ../include/net-snmp/types.h 
+./snmpd.lo: ../include/net-snmp/types.h
 ./snmpd.lo: ../include/net-snmp/library/oid.h
 ./snmpd.lo: ../include/net-snmp/library/types.h
 ./snmpd.lo: ../include/net-snmp/definitions.h
@@ -1704,7 +1369,7 @@
 ./snmpd.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h
 ./snmpd.lo: ../include/net-snmp/output_api.h
 ./snmpd.lo: ../include/net-snmp/library/snmp_debug.h
-./snmpd.lo: ../include/net-snmp/library/snmp_logging.h 
+./snmpd.lo: ../include/net-snmp/library/snmp_logging.h
 ./snmpd.lo: ../include/net-snmp/session_api.h
 ./snmpd.lo: ../include/net-snmp/library/callback.h
 ./snmpd.lo: ../include/net-snmp/library/snmp_transport.h
@@ -1718,6 +1383,7 @@
 ./snmpd.lo: ../include/net-snmp/library/snmpTCPDomain.h
 ./snmpd.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./snmpd.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h
+./snmpd.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./snmpd.lo: ../include/net-snmp/library/snmpIPXDomain.h
 ./snmpd.lo: ../include/net-snmp/library/ucd_compat.h
 ./snmpd.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h
@@ -1725,9 +1391,9 @@
 ./snmpd.lo: ../include/net-snmp/library/oid_stash.h
 ./snmpd.lo: ../include/net-snmp/library/snmp_impl.h
 ./snmpd.lo: ../include/net-snmp/library/snmp.h
-./snmpd.lo: ../include/net-snmp/library/snmp-tc.h 
-./snmpd.lo: ../include/net-snmp/net-snmp-includes.h 
-./snmpd.lo:  ../include/net-snmp/library/getopt.h
+./snmpd.lo: ../include/net-snmp/library/snmp-tc.h
+./snmpd.lo: ../include/net-snmp/net-snmp-includes.h
+./snmpd.lo: ../include/net-snmp/library/getopt.h
 ./snmpd.lo: ../include/net-snmp/utilities.h
 ./snmpd.lo: ../include/net-snmp/library/system.h
 ./snmpd.lo: ../include/net-snmp/library/tools.h
@@ -1799,9 +1465,9 @@
 ./snmpd.lo: ../include/net-snmp/library/large_fd_set.h m2m.h snmpd.h
 ./snmpd.lo: ../include/net-snmp/agent/mib_modules.h mibgroup/smux/smux.h
 ./snmp_perl.lo: ../include/net-snmp/net-snmp-config.h
-./snmp_perl.lo: ../include/net-snmp/net-snmp-includes.h 
+./snmp_perl.lo: ../include/net-snmp/net-snmp-includes.h
 ./snmp_perl.lo: ../include/net-snmp/definitions.h ../include/net-snmp/types.h
-./snmp_perl.lo:  ../include/net-snmp/library/oid.h
+./snmp_perl.lo: ../include/net-snmp/library/oid.h
 ./snmp_perl.lo: ../include/net-snmp/library/types.h
 ./snmp_perl.lo: ../include/net-snmp/library/snmp_api.h
 ./snmp_perl.lo: ../include/net-snmp/varbind_api.h
@@ -1824,6 +1490,7 @@
 ./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/ucd_compat.h
 ./snmp_perl.lo: ../include/net-snmp/library/mib.h
@@ -1905,9 +1572,9 @@
 ./snmp_perl.lo: ../include/net-snmp/agent/mfd.h
 ./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
-./snmp_vars.lo: ../include/net-snmp/types.h 
+./snmp_vars.lo: ../include/net-snmp/net-snmp-includes.h
+./snmp_vars.lo: ../include/net-snmp/definitions.h
+./snmp_vars.lo: ../include/net-snmp/types.h
 ./snmp_vars.lo: ../include/net-snmp/library/oid.h
 ./snmp_vars.lo: ../include/net-snmp/library/types.h
 ./snmp_vars.lo: ../include/net-snmp/library/snmp_api.h
@@ -1931,6 +1598,7 @@
 ./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/ucd_compat.h
 ./snmp_vars.lo: ../include/net-snmp/library/mib.h
@@ -2019,180 +1687,12 @@
 ./snmp_vars.lo: ../agent/mibgroup/agent_module_includes.h
 ./snmp_vars.lo: mibgroup/smux/smux.h mibgroup/utilities/iquery.h
 ./snmp_vars.lo: mibgroup/snmpv3/usmConf.h mibgroup/mibII/vacm_conf.h
-./snmp_vars.lo: ../agent/mibgroup/mib_module_includes.h
-./snmp_vars.lo: mibgroup/examples/example.h mibgroup/testhandler.h
-./snmp_vars.lo: mibgroup/host/hrh_storage.h mibgroup/host/hrh_filesys.h
-./snmp_vars.lo: mibgroup/host/hrSWInstalledTable.h
-./snmp_vars.lo: mibgroup/host/hrSWRunTable.h mibgroup/host/hr_system.h
-./snmp_vars.lo: mibgroup/host/hr_device.h mibgroup/host/hr_other.h
-./snmp_vars.lo: mibgroup/host/hr_proc.h mibgroup/host/hr_network.h
-./snmp_vars.lo: mibgroup/host/hr_print.h mibgroup/host/hr_disk.h
-./snmp_vars.lo: mibgroup/host/hr_partition.h mibgroup/examples/scalar_int.h
-./snmp_vars.lo: mibgroup/examples/watched.h mibgroup/examples/data_set.h
-./snmp_vars.lo: mibgroup/examples/delayed_instance.h
-./snmp_vars.lo: mibgroup/tsm-mib/snmpTsmConfigurationUsePrefix.h
-./snmp_vars.lo: mibgroup/Rmon/rows.h mibgroup/Rmon/agutil.h
-./snmp_vars.lo: mibgroup/Rmon/statistics.h mibgroup/Rmon/alarmTable.h
-./snmp_vars.lo: mibgroup/Rmon/history.h mibgroup/Rmon/event.h
-./snmp_vars.lo: mibgroup/host/data_access/swinst.h
-./snmp_vars.lo: mibgroup/host/data_access/swrun.h
-./snmp_vars.lo: mibgroup/host/hrSWRunPerfTable.h
-./snmp_vars.lo: mibgroup/tlstm-mib/snmpTlstmSession/snmpTlstmSession.h
-./snmp_vars.lo: mibgroup/tlstm-mib/snmpTlstmAddrTable/snmpTlstmAddrTable.h
-./snmp_vars.lo: mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.h
-./snmp_vars.lo: mibgroup/tlstm-mib/snmpTlstmParamsTable/snmpTlstmParamsTable.h
-./snmp_vars.lo: mibgroup/tsm-mib/snmpTsmStats/snmpTsmStats.h
-./snmp_vars.lo: mibgroup/disman/event/mteScalars.h
-./snmp_vars.lo: mibgroup/disman/event/mteTrigger.h
-./snmp_vars.lo: mibgroup/disman/event/mteTriggerTable.h
-./snmp_vars.lo: mibgroup/disman/event/mteTriggerDeltaTable.h
-./snmp_vars.lo: mibgroup/disman/event/mteTriggerExistenceTable.h
-./snmp_vars.lo: mibgroup/disman/event/mteTriggerBooleanTable.h
-./snmp_vars.lo: mibgroup/disman/event/mteTriggerThresholdTable.h
-./snmp_vars.lo: mibgroup/disman/event/mteTriggerConf.h
-./snmp_vars.lo: mibgroup/disman/event/mteEvent.h
-./snmp_vars.lo: ../agent/mibgroup/disman/event/mteTrigger.h
-./snmp_vars.lo: mibgroup/disman/event/mteEventTable.h
-./snmp_vars.lo: mibgroup/disman/event/mteEventSetTable.h
-./snmp_vars.lo: mibgroup/disman/event/mteEventNotificationTable.h
-./snmp_vars.lo: mibgroup/disman/event/mteEventConf.h
-./snmp_vars.lo: mibgroup/disman/event/mteObjects.h
-./snmp_vars.lo: mibgroup/disman/event/mteObjectsTable.h
-./snmp_vars.lo: mibgroup/disman/event/mteObjectsConf.h
-./snmp_vars.lo: mibgroup/snmpv3/snmpMPDStats_5_5.h
-./snmp_vars.lo: mibgroup/snmpv3/usmStats_5_5.h mibgroup/snmpv3/snmpEngine.h
-./snmp_vars.lo: mibgroup/snmpv3/usmUser.h mibgroup/mibII/snmp_mib_5_5.h
-./snmp_vars.lo: mibgroup/mibII/system_mib.h mibgroup/mibII/sysORTable.h
-./snmp_vars.lo: mibgroup/mibII/at.h mibgroup/mibII/ip.h
-./snmp_vars.lo: mibgroup/mibII/var_route.h mibgroup/mibII/route_write.h
-./snmp_vars.lo: mibgroup/mibII/at.h mibgroup/mibII/tcp.h
-./snmp_vars.lo: mibgroup/mibII/icmp.h mibgroup/mibII/udp.h
-./snmp_vars.lo: mibgroup/mibII/vacm_vars.h mibgroup/mibII/setSerialNo.h
-./snmp_vars.lo: mibgroup/mibII/ipv6.h mibgroup/ucd-snmp/disk_hw.h
-./snmp_vars.lo: ../agent/mibgroup/mibdefs.h mibgroup/ucd-snmp/proc.h
-./snmp_vars.lo: mibgroup/ucd-snmp/versioninfo.h mibgroup/ucd-snmp/pass.h
-./snmp_vars.lo: mibgroup/ucd-snmp/pass_persist.h mibgroup/ucd-snmp/loadave.h
-./snmp_vars.lo: mibgroup/agent/extend.h mibgroup/ucd-snmp/errormib.h
-./snmp_vars.lo: mibgroup/ucd-snmp/file.h mibgroup/ucd-snmp/dlmod.h
-./snmp_vars.lo: mibgroup/ucd-snmp/proxy.h mibgroup/ucd-snmp/logmatch.h
-./snmp_vars.lo: mibgroup/ucd-snmp/memory.h mibgroup/ucd-snmp/vmstat.h
-./snmp_vars.lo: mibgroup/notification/snmpNotifyTable.h
-./snmp_vars.lo: mibgroup/notification/snmpNotifyFilterProfileTable.h
-./snmp_vars.lo: mibgroup/notification-log-mib/notification_log.h
-./snmp_vars.lo: mibgroup/target/target_counters_5_5.h
-./snmp_vars.lo: mibgroup/target/snmpTargetAddrEntry.h
-./snmp_vars.lo: mibgroup/target/snmpTargetParamsEntry.h
-./snmp_vars.lo: mibgroup/agent/nsTransactionTable.h
-./snmp_vars.lo: mibgroup/agent/nsModuleTable.h mibgroup/agent/nsDebug.h
-./snmp_vars.lo: mibgroup/agent/nsCache.h mibgroup/agent/nsLogging.h
-./snmp_vars.lo: mibgroup/agent/nsVacmAccessTable.h
-./snmp_vars.lo: mibgroup/disman/schedule/schedCore.h
-./snmp_vars.lo: mibgroup/disman/schedule/schedConf.h
-./snmp_vars.lo: mibgroup/disman/schedule/schedTable.h
-./snmp_vars.lo: mibgroup/utilities/override.h
-./snmp_vars.lo: mibgroup/hardware/memory/hw_mem.h
-./snmp_vars.lo: mibgroup/hardware/fsys/hw_fsys.h mibgroup/hardware/cpu/cpu.h
-./snmp_vars.lo: mibgroup/hardware/cpu/cpu_linux.h mibgroup/mibII/var_route.h
-./snmp_vars.lo: mibgroup/mibII/tcpTable.h mibgroup/mibII/udpTable.h
-./snmp_vars.lo: mibgroup/mibII/vacm_context.h mibgroup/ip-mib/ip_scalars.h
-./snmp_vars.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h
-./snmp_vars.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_constants.h
-./snmp_vars.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.h
-./snmp_vars.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h
-./snmp_vars.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access.h
-./snmp_vars.lo: mibgroup/if-mib/ifTable/ifTable.h
-./snmp_vars.lo: ../include/net-snmp/data_access/interface.h
-./snmp_vars.lo: mibgroup/if-mib/ifTable/ifTable_constants.h
-./snmp_vars.lo: mibgroup/if-mib/ifTable/ifTable_interface.h
-./snmp_vars.lo: mibgroup/if-mib/ifTable/ifTable.h
-./snmp_vars.lo: mibgroup/if-mib/ifTable/ifTable_data_access.h
-./snmp_vars.lo: mibgroup/if-mib/ifXTable/ifXTable.h
-./snmp_vars.lo: ../agent/mibgroup/if-mib/ifTable/ifTable.h
-./snmp_vars.lo: mibgroup/if-mib/ifXTable/ifXTable_constants.h
-./snmp_vars.lo: mibgroup/if-mib/ifXTable/ifXTable_interface.h
-./snmp_vars.lo: mibgroup/if-mib/ifXTable/ifXTable.h
-./snmp_vars.lo: mibgroup/if-mib/ifXTable/ifXTable_data_access.h
-./snmp_vars.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable.h
-./snmp_vars.lo: ../include/net-snmp/data_access/ipaddress.h
-./snmp_vars.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable_constants.h
-./snmp_vars.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable_interface.h
-./snmp_vars.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable.h
-./snmp_vars.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable_data_access.h
-./snmp_vars.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable.h
-./snmp_vars.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_constants.h
-./snmp_vars.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_interface.h
-./snmp_vars.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable.h
-./snmp_vars.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_data_access.h
-./snmp_vars.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable.h
-./snmp_vars.lo: ../include/net-snmp/data_access/defaultrouter.h
-./snmp_vars.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_oids.h
-./snmp_vars.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_enums.h
-./snmp_vars.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_interface.h
-./snmp_vars.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable.h
-./snmp_vars.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_access.h
-./snmp_vars.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_get.h
-./snmp_vars.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable.h
-./snmp_vars.lo: ../include/net-snmp/data_access/arp.h
-./snmp_vars.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_constants.h
-./snmp_vars.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_interface.h
-./snmp_vars.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable.h
-./snmp_vars.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access.h
-./snmp_vars.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.h
-./snmp_vars.lo: ../include/net-snmp/data_access/ipstats.h
-./snmp_vars.lo: ../include/net-snmp/data_access/systemstats.h
-./snmp_vars.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_constants.h
-./snmp_vars.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_interface.h
-./snmp_vars.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.h
-./snmp_vars.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access.h
-./snmp_vars.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable.h
-./snmp_vars.lo: ../include/net-snmp/data_access/scopezone.h
-./snmp_vars.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_oids.h
-./snmp_vars.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_enums.h
-./snmp_vars.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_interface.h
-./snmp_vars.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable.h
-./snmp_vars.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_data_access.h
-./snmp_vars.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.h
-./snmp_vars.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_oids.h
-./snmp_vars.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_enums.h
-./snmp_vars.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.h
-./snmp_vars.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.h
-./snmp_vars.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_access.h
-./snmp_vars.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.h
-./snmp_vars.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h
-./snmp_vars.lo: ../include/net-snmp/data_access/route.h
-./snmp_vars.lo: ../agent/mibgroup/mibII/route_headers.h
-./snmp_vars.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_constants.h
-./snmp_vars.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_interface.h
-./snmp_vars.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h
-./snmp_vars.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access.h
-./snmp_vars.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.h
-./snmp_vars.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_constants.h
-./snmp_vars.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface.h
-./snmp_vars.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.h
-./snmp_vars.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_data_access.h
-./snmp_vars.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.h
-./snmp_vars.lo: ../include/net-snmp/data_access/tcpConn.h
-./snmp_vars.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_constants.h
-./snmp_vars.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_interface.h
-./snmp_vars.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.h
-./snmp_vars.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access.h
-./snmp_vars.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.h
-./snmp_vars.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_constants.h
-./snmp_vars.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_interface.h
-./snmp_vars.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.h
-./snmp_vars.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_data_access.h
-./snmp_vars.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable.h
-./snmp_vars.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_constants.h
-./snmp_vars.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_interface.h
-./snmp_vars.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable.h
-./snmp_vars.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_data_access.h
-./snmp_vars.lo: mibgroup/if-mib/data_access/interface.h snmp_perl.h
-./snmp_vars.lo: ../agent/mibgroup/agent_module_inits.h
+./snmp_vars.lo: snmp_perl.h ../agent/mibgroup/agent_module_inits.h
 ./helpers/all_helpers.lo: ../include/net-snmp/net-snmp-config.h
 ./helpers/all_helpers.lo: ../include/net-snmp/net-snmp-features.h
 ./helpers/all_helpers.lo: ../include/net-snmp/net-snmp-includes.h
 ./helpers/all_helpers.lo: ../include/net-snmp/definitions.h
-./helpers/all_helpers.lo: ../include/net-snmp/types.h 
+./helpers/all_helpers.lo: ../include/net-snmp/types.h
 ./helpers/all_helpers.lo: ../include/net-snmp/library/oid.h
 ./helpers/all_helpers.lo: ../include/net-snmp/library/types.h
 ./helpers/all_helpers.lo: ../include/net-snmp/library/snmp_api.h
@@ -2216,6 +1716,7 @@
 ./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/ucd_compat.h
 ./helpers/all_helpers.lo: ../include/net-snmp/library/mib.h
@@ -2300,7 +1801,7 @@
 ./helpers/baby_steps.lo: ../include/net-snmp/net-snmp-features.h
 ./helpers/baby_steps.lo: ../include/net-snmp/net-snmp-includes.h
 ./helpers/baby_steps.lo: ../include/net-snmp/definitions.h
-./helpers/baby_steps.lo: ../include/net-snmp/types.h 
+./helpers/baby_steps.lo: ../include/net-snmp/types.h
 ./helpers/baby_steps.lo: ../include/net-snmp/library/oid.h
 ./helpers/baby_steps.lo: ../include/net-snmp/library/types.h
 ./helpers/baby_steps.lo: ../include/net-snmp/library/snmp_api.h
@@ -2324,6 +1825,7 @@
 ./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/ucd_compat.h
 ./helpers/baby_steps.lo: ../include/net-snmp/library/mib.h
@@ -2430,6 +1932,7 @@
 ./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/ucd_compat.h
 ./helpers/bulk_to_next.lo: ../include/net-snmp/library/mib.h
@@ -2538,6 +2041,7 @@
 ./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/ucd_compat.h
 ./helpers/cache_handler.lo: ../include/net-snmp/library/mib.h
@@ -2644,6 +2148,7 @@
 ./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/ucd_compat.h
 ./helpers/debug_handler.lo: ../include/net-snmp/library/mib.h
@@ -2728,7 +2233,7 @@
 ./helpers/instance.lo: ../include/net-snmp/net-snmp-features.h
 ./helpers/instance.lo: ../include/net-snmp/net-snmp-includes.h
 ./helpers/instance.lo: ../include/net-snmp/definitions.h
-./helpers/instance.lo: ../include/net-snmp/types.h 
+./helpers/instance.lo: ../include/net-snmp/types.h
 ./helpers/instance.lo: ../include/net-snmp/library/oid.h
 ./helpers/instance.lo: ../include/net-snmp/library/types.h
 ./helpers/instance.lo: ../include/net-snmp/library/snmp_api.h
@@ -2752,6 +2257,7 @@
 ./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/ucd_compat.h
 ./helpers/instance.lo: ../include/net-snmp/library/mib.h
@@ -2859,6 +2365,7 @@
 ./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/ucd_compat.h
 ./helpers/mode_end_call.lo: ../include/net-snmp/library/mib.h
@@ -2941,7 +2448,7 @@
 ./helpers/multiplexer.lo: ../include/net-snmp/net-snmp-config.h
 ./helpers/multiplexer.lo: ../include/net-snmp/net-snmp-includes.h
 ./helpers/multiplexer.lo: ../include/net-snmp/definitions.h
-./helpers/multiplexer.lo: ../include/net-snmp/types.h 
+./helpers/multiplexer.lo: ../include/net-snmp/types.h
 ./helpers/multiplexer.lo: ../include/net-snmp/library/oid.h
 ./helpers/multiplexer.lo: ../include/net-snmp/library/types.h
 ./helpers/multiplexer.lo: ../include/net-snmp/library/snmp_api.h
@@ -2965,6 +2472,7 @@
 ./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/ucd_compat.h
 ./helpers/multiplexer.lo: ../include/net-snmp/library/mib.h
@@ -3047,8 +2555,8 @@
 ./helpers/multiplexer.lo: ../include/net-snmp/agent/snmp_get_statistic.h
 ./helpers/null.lo: ../include/net-snmp/net-snmp-config.h
 ./helpers/null.lo: ../include/net-snmp/net-snmp-includes.h
-./helpers/null.lo:  ../include/net-snmp/definitions.h
-./helpers/null.lo: ../include/net-snmp/types.h 
+./helpers/null.lo: ../include/net-snmp/definitions.h
+./helpers/null.lo: ../include/net-snmp/types.h
 ./helpers/null.lo: ../include/net-snmp/library/oid.h
 ./helpers/null.lo: ../include/net-snmp/library/types.h
 ./helpers/null.lo: ../include/net-snmp/library/snmp_api.h
@@ -3072,6 +2580,7 @@
 ./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/ucd_compat.h
 ./helpers/null.lo: ../include/net-snmp/library/mib.h
@@ -3155,7 +2664,7 @@
 ./helpers/old_api.lo: ../include/net-snmp/net-snmp-config.h
 ./helpers/old_api.lo: ../include/net-snmp/net-snmp-includes.h
 ./helpers/old_api.lo: ../include/net-snmp/definitions.h
-./helpers/old_api.lo: ../include/net-snmp/types.h 
+./helpers/old_api.lo: ../include/net-snmp/types.h
 ./helpers/old_api.lo: ../include/net-snmp/library/oid.h
 ./helpers/old_api.lo: ../include/net-snmp/library/types.h
 ./helpers/old_api.lo: ../include/net-snmp/library/snmp_api.h
@@ -3179,6 +2688,7 @@
 ./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/ucd_compat.h
 ./helpers/old_api.lo: ../include/net-snmp/library/mib.h
@@ -3263,7 +2773,7 @@
 ./helpers/read_only.lo: ../include/net-snmp/net-snmp-config.h
 ./helpers/read_only.lo: ../include/net-snmp/net-snmp-includes.h
 ./helpers/read_only.lo: ../include/net-snmp/definitions.h
-./helpers/read_only.lo: ../include/net-snmp/types.h 
+./helpers/read_only.lo: ../include/net-snmp/types.h
 ./helpers/read_only.lo: ../include/net-snmp/library/oid.h
 ./helpers/read_only.lo: ../include/net-snmp/library/types.h
 ./helpers/read_only.lo: ../include/net-snmp/library/snmp_api.h
@@ -3287,6 +2797,7 @@
 ./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/ucd_compat.h
 ./helpers/read_only.lo: ../include/net-snmp/library/mib.h
@@ -3371,7 +2882,7 @@
 ./helpers/row_merge.lo: ../include/net-snmp/net-snmp-features.h
 ./helpers/row_merge.lo: ../include/net-snmp/net-snmp-includes.h
 ./helpers/row_merge.lo: ../include/net-snmp/definitions.h
-./helpers/row_merge.lo: ../include/net-snmp/types.h 
+./helpers/row_merge.lo: ../include/net-snmp/types.h
 ./helpers/row_merge.lo: ../include/net-snmp/library/oid.h
 ./helpers/row_merge.lo: ../include/net-snmp/library/types.h
 ./helpers/row_merge.lo: ../include/net-snmp/library/snmp_api.h
@@ -3395,6 +2906,7 @@
 ./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/ucd_compat.h
 ./helpers/row_merge.lo: ../include/net-snmp/library/mib.h
@@ -3477,7 +2989,7 @@
 ./helpers/scalar.lo: ../include/net-snmp/net-snmp-config.h
 ./helpers/scalar.lo: ../include/net-snmp/net-snmp-includes.h
 ./helpers/scalar.lo: ../include/net-snmp/definitions.h
-./helpers/scalar.lo: ../include/net-snmp/types.h 
+./helpers/scalar.lo: ../include/net-snmp/types.h
 ./helpers/scalar.lo: ../include/net-snmp/library/oid.h
 ./helpers/scalar.lo: ../include/net-snmp/library/types.h
 ./helpers/scalar.lo: ../include/net-snmp/library/snmp_api.h
@@ -3501,6 +3013,7 @@
 ./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/ucd_compat.h
 ./helpers/scalar.lo: ../include/net-snmp/library/mib.h
@@ -3608,6 +3121,7 @@
 ./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/ucd_compat.h
 ./helpers/scalar_group.lo: ../include/net-snmp/library/mib.h
@@ -3691,7 +3205,7 @@
 ./helpers/serialize.lo: ../include/net-snmp/net-snmp-config.h
 ./helpers/serialize.lo: ../include/net-snmp/net-snmp-includes.h
 ./helpers/serialize.lo: ../include/net-snmp/definitions.h
-./helpers/serialize.lo: ../include/net-snmp/types.h 
+./helpers/serialize.lo: ../include/net-snmp/types.h
 ./helpers/serialize.lo: ../include/net-snmp/library/oid.h
 ./helpers/serialize.lo: ../include/net-snmp/library/types.h
 ./helpers/serialize.lo: ../include/net-snmp/library/snmp_api.h
@@ -3715,6 +3229,7 @@
 ./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/ucd_compat.h
 ./helpers/serialize.lo: ../include/net-snmp/library/mib.h
@@ -3823,6 +3338,7 @@
 ./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/ucd_compat.h
 ./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/mib.h
@@ -3906,7 +3422,7 @@
 ./helpers/stash_cache.lo: ../include/net-snmp/net-snmp-features.h
 ./helpers/stash_cache.lo: ../include/net-snmp/net-snmp-includes.h
 ./helpers/stash_cache.lo: ../include/net-snmp/definitions.h
-./helpers/stash_cache.lo: ../include/net-snmp/types.h 
+./helpers/stash_cache.lo: ../include/net-snmp/types.h
 ./helpers/stash_cache.lo: ../include/net-snmp/library/oid.h
 ./helpers/stash_cache.lo: ../include/net-snmp/library/types.h
 ./helpers/stash_cache.lo: ../include/net-snmp/library/snmp_api.h
@@ -3930,6 +3446,7 @@
 ./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/ucd_compat.h
 ./helpers/stash_cache.lo: ../include/net-snmp/library/mib.h
@@ -4039,6 +3556,7 @@
 ./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/ucd_compat.h
 ./helpers/stash_to_next.lo: ../include/net-snmp/library/mib.h
@@ -4124,7 +3642,7 @@
 ./helpers/table_array.lo: ../include/net-snmp/net-snmp-features.h
 ./helpers/table_array.lo: ../include/net-snmp/net-snmp-includes.h
 ./helpers/table_array.lo: ../include/net-snmp/definitions.h
-./helpers/table_array.lo: ../include/net-snmp/types.h 
+./helpers/table_array.lo: ../include/net-snmp/types.h
 ./helpers/table_array.lo: ../include/net-snmp/library/oid.h
 ./helpers/table_array.lo: ../include/net-snmp/library/types.h
 ./helpers/table_array.lo: ../include/net-snmp/library/snmp_api.h
@@ -4148,6 +3666,7 @@
 ./helpers/table_array.lo: ../include/net-snmp/library/snmpTCPDomain.h
 ./helpers/table_array.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./helpers/table_array.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h
+./helpers/table_array.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./helpers/table_array.lo: ../include/net-snmp/library/snmpIPXDomain.h
 ./helpers/table_array.lo: ../include/net-snmp/library/ucd_compat.h
 ./helpers/table_array.lo: ../include/net-snmp/library/mib.h
@@ -4230,8 +3749,8 @@
 ./helpers/table.lo: ../include/net-snmp/net-snmp-config.h
 ./helpers/table.lo: ../include/net-snmp/net-snmp-features.h
 ./helpers/table.lo: ../include/net-snmp/net-snmp-includes.h
-./helpers/table.lo:  ../include/net-snmp/definitions.h
-./helpers/table.lo: ../include/net-snmp/types.h 
+./helpers/table.lo: ../include/net-snmp/definitions.h
+./helpers/table.lo: ../include/net-snmp/types.h
 ./helpers/table.lo: ../include/net-snmp/library/oid.h
 ./helpers/table.lo: ../include/net-snmp/library/types.h
 ./helpers/table.lo: ../include/net-snmp/library/snmp_api.h
@@ -4255,6 +3774,7 @@
 ./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/ucd_compat.h
 ./helpers/table.lo: ../include/net-snmp/library/mib.h
@@ -4362,6 +3882,7 @@
 ./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/ucd_compat.h
 ./helpers/table_container.lo: ../include/net-snmp/library/mib.h
@@ -4445,7 +3966,7 @@
 ./helpers/table_data.lo: ../include/net-snmp/net-snmp-features.h
 ./helpers/table_data.lo: ../include/net-snmp/net-snmp-includes.h
 ./helpers/table_data.lo: ../include/net-snmp/definitions.h
-./helpers/table_data.lo: ../include/net-snmp/types.h 
+./helpers/table_data.lo: ../include/net-snmp/types.h
 ./helpers/table_data.lo: ../include/net-snmp/library/oid.h
 ./helpers/table_data.lo: ../include/net-snmp/library/types.h
 ./helpers/table_data.lo: ../include/net-snmp/library/snmp_api.h
@@ -4469,6 +3990,7 @@
 ./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/ucd_compat.h
 ./helpers/table_data.lo: ../include/net-snmp/library/mib.h
@@ -4576,6 +4098,7 @@
 ./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/ucd_compat.h
 ./helpers/table_dataset.lo: ../include/net-snmp/library/mib.h
@@ -4683,6 +4206,7 @@
 ./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/ucd_compat.h
 ./helpers/table_iterator.lo: ../include/net-snmp/library/mib.h
@@ -4767,7 +4291,7 @@
 ./helpers/table_row.lo: ../include/net-snmp/net-snmp-features.h
 ./helpers/table_row.lo: ../include/net-snmp/net-snmp-includes.h
 ./helpers/table_row.lo: ../include/net-snmp/definitions.h
-./helpers/table_row.lo: ../include/net-snmp/types.h 
+./helpers/table_row.lo: ../include/net-snmp/types.h
 ./helpers/table_row.lo: ../include/net-snmp/library/oid.h
 ./helpers/table_row.lo: ../include/net-snmp/library/types.h
 ./helpers/table_row.lo: ../include/net-snmp/library/snmp_api.h
@@ -4791,6 +4315,7 @@
 ./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/ucd_compat.h
 ./helpers/table_row.lo: ../include/net-snmp/library/mib.h
@@ -4874,7 +4399,7 @@
 ./helpers/table_tdata.lo: ../include/net-snmp/net-snmp-features.h
 ./helpers/table_tdata.lo: ../include/net-snmp/net-snmp-includes.h
 ./helpers/table_tdata.lo: ../include/net-snmp/definitions.h
-./helpers/table_tdata.lo: ../include/net-snmp/types.h 
+./helpers/table_tdata.lo: ../include/net-snmp/types.h
 ./helpers/table_tdata.lo: ../include/net-snmp/library/oid.h
 ./helpers/table_tdata.lo: ../include/net-snmp/library/types.h
 ./helpers/table_tdata.lo: ../include/net-snmp/library/snmp_api.h
@@ -4898,6 +4423,7 @@
 ./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/ucd_compat.h
 ./helpers/table_tdata.lo: ../include/net-snmp/library/mib.h
@@ -4981,7 +4507,7 @@
 ./helpers/watcher.lo: ../include/net-snmp/net-snmp-features.h
 ./helpers/watcher.lo: ../include/net-snmp/net-snmp-includes.h
 ./helpers/watcher.lo: ../include/net-snmp/definitions.h
-./helpers/watcher.lo: ../include/net-snmp/types.h 
+./helpers/watcher.lo: ../include/net-snmp/types.h
 ./helpers/watcher.lo: ../include/net-snmp/library/oid.h
 ./helpers/watcher.lo: ../include/net-snmp/library/types.h
 ./helpers/watcher.lo: ../include/net-snmp/library/snmp_api.h
@@ -5005,6 +4531,7 @@
 ./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/ucd_compat.h
 ./helpers/watcher.lo: ../include/net-snmp/library/mib.h
@@ -5111,6 +4638,7 @@
 ./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/ucd_compat.h
 ./mibgroup/header_complex.lo: ../include/net-snmp/library/mib.h
@@ -5221,6 +4749,7 @@
 ./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/ucd_compat.h
 ./mibgroup/testhandler.lo: ../include/net-snmp/library/mib.h
@@ -5305,7 +4834,7 @@
 ./mibgroup/util_funcs.lo: ../include/net-snmp/net-snmp-features.h
 ./mibgroup/util_funcs.lo: ../include/net-snmp/net-snmp-includes.h
 ./mibgroup/util_funcs.lo: ../include/net-snmp/definitions.h
-./mibgroup/util_funcs.lo: ../include/net-snmp/types.h 
+./mibgroup/util_funcs.lo: ../include/net-snmp/types.h
 ./mibgroup/util_funcs.lo: ../include/net-snmp/library/oid.h
 ./mibgroup/util_funcs.lo: ../include/net-snmp/library/types.h
 ./mibgroup/util_funcs.lo: ../include/net-snmp/library/snmp_api.h
@@ -5329,6 +4858,7 @@
 ./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/ucd_compat.h
 ./mibgroup/util_funcs.lo: ../include/net-snmp/library/mib.h
@@ -5413,6 +4943,8 @@
 ./mibgroup/util_funcs.lo: ./mibgroup/util_funcs/header_simple_table.h
 ./mibgroup/util_funcs.lo: ./mibgroup/util_funcs/MIB_STATS_CACHE_TIMEOUT.h
 ./mibgroup/util_funcs.lo: ./mibgroup/utilities/execute.h
+./mibgroup/util_funcs.lo: ./mibgroup/ucd-snmp/errormib.h
+./mibgroup/util_funcs.lo: ../agent/mibgroup/mibdefs.h
 ./mibgroup/winExtDLL.lo: ../include/net-snmp/net-snmp-config.h
 ./mibgroup/winExtDLL.lo: ../include/net-snmp/net-snmp-features.h
 ./mibgroup/winExtDLL.lo: ../include/net-snmp/agent/mib_module_config.h
diff --git a/agent/agent_index.c b/agent/agent_index.c
index ce8f8ca..0129217 100644
--- a/agent/agent_index.c
+++ b/agent/agent_index.c
@@ -42,7 +42,6 @@
 #include "mibgroup/struct.h"
 #include <net-snmp/agent/table.h>
 #include <net-snmp/agent/table_iterator.h>
-#include "mib_module_includes.h"
 
 #ifdef USING_AGENTX_SUBAGENT_MODULE
 #include "agentx/subagent.h"
@@ -528,9 +527,30 @@ unregister_index(netsnmp_variable_list * varbind, int remember,
 
     for (idxptr2 = idxptr; idxptr2 != NULL;
          prev_idx_ptr = idxptr2, idxptr2 = idxptr2->next_idx) {
-        i = SNMP_MIN(varbind->val_len, idxptr2->varbind->val_len);
-        res2 =
-            memcmp(varbind->val.string, idxptr2->varbind->val.string, i);
+        switch (varbind->type) {
+        case ASN_INTEGER:
+            res2 =
+                (*varbind->val.integer -
+                 *idxptr2->varbind->val.integer);
+            break;
+        case ASN_OCTET_STR:
+            i = SNMP_MIN(varbind->val_len,
+                         idxptr2->varbind->val_len);
+            res2 =
+                memcmp(varbind->val.string,
+                       idxptr2->varbind->val.string, i);
+            break;
+        case ASN_OBJECT_ID:
+            res2 =
+                snmp_oid_compare(varbind->val.objid,
+                                 varbind->val_len / sizeof(oid),
+                                 idxptr2->varbind->val.objid,
+                                 idxptr2->varbind->val_len /
+                                 sizeof(oid));
+            break;
+        default:
+            return INDEX_ERR_WRONG_TYPE;        /* wrong type */
+        }
         if (res2 <= 0)
             break;
     }
diff --git a/agent/agent_registry.c b/agent/agent_registry.c
index 1e2482a..0dd6c42 100644
--- a/agent/agent_registry.c
+++ b/agent/agent_registry.c
@@ -60,7 +60,6 @@
 #include <net-snmp/agent/table.h>
 #include <net-snmp/agent/table_iterator.h>
 #include <net-snmp/agent/agent_registry.h>
-#include "mib_module_includes.h"
 
 #ifdef USING_AGENTX_SUBAGENT_MODULE
 #include "agentx/subagent.h"
@@ -528,7 +527,7 @@ netsnmp_subtree_deepcopy(netsnmp_subtree *a)
 /** @private
  *  Replaces next subtree pointer in given subtree.
  */
-NETSNMP_INLINE void
+NETSNMP_STATIC_INLINE void
 netsnmp_subtree_change_next(netsnmp_subtree *ptr, netsnmp_subtree *thenext)
 {
     ptr->next = thenext;
@@ -543,7 +542,7 @@ netsnmp_subtree_change_next(netsnmp_subtree *ptr, netsnmp_subtree *thenext)
 /** @private
  *  Replaces previous subtree pointer in given subtree.
  */
-NETSNMP_INLINE void
+NETSNMP_STATIC_INLINE void
 netsnmp_subtree_change_prev(netsnmp_subtree *ptr, netsnmp_subtree *theprev)
 {
     ptr->prev = theprev;
@@ -1416,7 +1415,7 @@ register_mib_detach(void)
  */
 int
 register_mib_context(const char *moduleName,
-                     struct variable *var,
+                     const struct variable *var,
                      size_t varsize,
                      size_t numvars,
                      const oid * mibloc,
@@ -1481,7 +1480,7 @@ register_mib_context(const char *moduleName,
  */
 int
 register_mib_range(const char *moduleName,
-                   struct variable *var,
+                   const struct variable *var,
                    size_t varsize,
                    size_t numvars,
                    const oid * mibloc,
@@ -1530,7 +1529,7 @@ register_mib_range(const char *moduleName,
  */
 int
 register_mib_priority(const char *moduleName,
-                      struct variable *var,
+                      const struct variable *var,
                       size_t varsize,
                       size_t numvars,
                       const oid * mibloc, size_t mibloclen, int priority)
@@ -1570,7 +1569,7 @@ register_mib_priority(const char *moduleName,
  */
 int
 register_mib(const char *moduleName,
-             struct variable *var,
+             const struct variable *var,
              size_t varsize,
              size_t numvars, const oid * mibloc, size_t mibloclen)
 {
@@ -2320,6 +2319,9 @@ dump_registry(void)
 /* End of MIB registration code */
 
 
+netsnmp_feature_child_of(register_signal, netsnmp_unused)
+#ifndef NETSNMP_FEATURE_REMOVE_REGISTER_SIGNAL
+
 /** @defgroup agent_signals POSIX signals support for agents.
  *     Registering and unregistering signal handlers.
  *   @ingroup agent_registry
@@ -2417,5 +2419,7 @@ unregister_signal(int sig)
 /**  @} */
 /* End of signals support code */
 
+#endif /* NETSNMP_FEATURE_REMOVE_REGISTER_SIGNAL */
+
 /**  @} */
 
diff --git a/agent/agent_trap.c b/agent/agent_trap.c
index dfa9dcf..080b8bf 100644
--- a/agent/agent_trap.c
+++ b/agent/agent_trap.c
@@ -938,7 +938,7 @@ send_trap_to_sess(netsnmp_session * sess, netsnmp_pdu *template_pdu)
             u_char          tmp[SPRINT_MAX_LEN];
 
             int len = snmpv3_get_engineID(tmp, sizeof(tmp));
-            memdup(&pdu->securityEngineID, tmp, len);
+            pdu->securityEngineID = netsnmp_memdup(tmp, len);
             pdu->securityEngineIDLen = len;
         }
 
@@ -1273,7 +1273,7 @@ snmpd_parse_config_trapsess(const char *word, char *cptr)
             u_char          tmp[SPRINT_MAX_LEN];
 
             len = snmpv3_get_engineID( tmp, sizeof(tmp));
-            memdup(&ss->securityEngineID, tmp, len);
+            ss->securityEngineID = netsnmp_memdup(tmp, len);
             ss->securityEngineIDLen = len;
     }
 
diff --git a/agent/auto_nlist.c b/agent/auto_nlist.c
index 25d080f..ecdaf24 100644
--- a/agent/auto_nlist.c
+++ b/agent/auto_nlist.c
@@ -56,6 +56,7 @@ auto_nlist_value(const char *string)
         static char *n_name = NULL;
 #endif
         *ptr = (struct autonlist *) malloc(sizeof(struct autonlist));
+        memset(*ptr, 0, sizeof(struct autonlist));
         it = *ptr;
         it->left = 0;
         it->right = 0;
diff --git a/agent/helpers/Makefile.depend b/agent/helpers/Makefile.depend
index 6bc869a..165e333 100644
--- a/agent/helpers/Makefile.depend
+++ b/agent/helpers/Makefile.depend
@@ -7,7 +7,7 @@
 ./all_helpers.lo: ../../include/net-snmp/net-snmp-features.h
 ./all_helpers.lo: ../../include/net-snmp/net-snmp-includes.h
 ./all_helpers.lo: ../../include/net-snmp/definitions.h
-./all_helpers.lo: ../../include/net-snmp/types.h 
+./all_helpers.lo: ../../include/net-snmp/types.h
 ./all_helpers.lo: ../../include/net-snmp/library/oid.h
 ./all_helpers.lo: ../../include/net-snmp/library/types.h
 ./all_helpers.lo: ../../include/net-snmp/library/snmp_api.h
@@ -31,6 +31,7 @@
 ./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/ucd_compat.h
 ./all_helpers.lo: ../../include/net-snmp/library/mib.h
@@ -115,8 +116,8 @@
 ./baby_steps.lo: ../../include/net-snmp/net-snmp-config.h
 ./baby_steps.lo: ../../include/net-snmp/net-snmp-features.h
 ./baby_steps.lo: ../../include/net-snmp/net-snmp-includes.h
-./baby_steps.lo:  ../../include/net-snmp/definitions.h
-./baby_steps.lo: ../../include/net-snmp/types.h 
+./baby_steps.lo: ../../include/net-snmp/definitions.h
+./baby_steps.lo: ../../include/net-snmp/types.h
 ./baby_steps.lo: ../../include/net-snmp/library/oid.h
 ./baby_steps.lo: ../../include/net-snmp/library/types.h
 ./baby_steps.lo: ../../include/net-snmp/library/snmp_api.h
@@ -140,6 +141,7 @@
 ./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/ucd_compat.h
 ./baby_steps.lo: ../../include/net-snmp/library/mib.h
@@ -222,7 +224,7 @@
 ./bulk_to_next.lo: ../../include/net-snmp/net-snmp-config.h
 ./bulk_to_next.lo: ../../include/net-snmp/net-snmp-includes.h
 ./bulk_to_next.lo: ../../include/net-snmp/definitions.h
-./bulk_to_next.lo: ../../include/net-snmp/types.h 
+./bulk_to_next.lo: ../../include/net-snmp/types.h
 ./bulk_to_next.lo: ../../include/net-snmp/library/oid.h
 ./bulk_to_next.lo: ../../include/net-snmp/library/types.h
 ./bulk_to_next.lo: ../../include/net-snmp/library/snmp_api.h
@@ -246,6 +248,7 @@
 ./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/ucd_compat.h
 ./bulk_to_next.lo: ../../include/net-snmp/library/mib.h
@@ -330,7 +333,7 @@
 ./cache_handler.lo: ../../include/net-snmp/net-snmp-features.h
 ./cache_handler.lo: ../../include/net-snmp/net-snmp-includes.h
 ./cache_handler.lo: ../../include/net-snmp/definitions.h
-./cache_handler.lo: ../../include/net-snmp/types.h 
+./cache_handler.lo: ../../include/net-snmp/types.h
 ./cache_handler.lo: ../../include/net-snmp/library/oid.h
 ./cache_handler.lo: ../../include/net-snmp/library/types.h
 ./cache_handler.lo: ../../include/net-snmp/library/snmp_api.h
@@ -354,6 +357,7 @@
 ./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/ucd_compat.h
 ./cache_handler.lo: ../../include/net-snmp/library/mib.h
@@ -436,7 +440,7 @@
 ./debug_handler.lo: ../../include/net-snmp/net-snmp-config.h
 ./debug_handler.lo: ../../include/net-snmp/net-snmp-includes.h
 ./debug_handler.lo: ../../include/net-snmp/definitions.h
-./debug_handler.lo: ../../include/net-snmp/types.h 
+./debug_handler.lo: ../../include/net-snmp/types.h
 ./debug_handler.lo: ../../include/net-snmp/library/oid.h
 ./debug_handler.lo: ../../include/net-snmp/library/types.h
 ./debug_handler.lo: ../../include/net-snmp/library/snmp_api.h
@@ -460,6 +464,7 @@
 ./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/ucd_compat.h
 ./debug_handler.lo: ../../include/net-snmp/library/mib.h
@@ -544,7 +549,7 @@
 ./instance.lo: ../../include/net-snmp/net-snmp-features.h
 ./instance.lo: ../../include/net-snmp/net-snmp-includes.h
 ./instance.lo: ../../include/net-snmp/definitions.h
-./instance.lo: ../../include/net-snmp/types.h 
+./instance.lo: ../../include/net-snmp/types.h
 ./instance.lo: ../../include/net-snmp/library/oid.h
 ./instance.lo: ../../include/net-snmp/library/types.h
 ./instance.lo: ../../include/net-snmp/library/snmp_api.h
@@ -568,6 +573,7 @@
 ./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/ucd_compat.h
 ./instance.lo: ../../include/net-snmp/library/mib.h
@@ -651,7 +657,7 @@
 ./mode_end_call.lo: ../../include/net-snmp/net-snmp-features.h
 ./mode_end_call.lo: ../../include/net-snmp/net-snmp-includes.h
 ./mode_end_call.lo: ../../include/net-snmp/definitions.h
-./mode_end_call.lo: ../../include/net-snmp/types.h 
+./mode_end_call.lo: ../../include/net-snmp/types.h
 ./mode_end_call.lo: ../../include/net-snmp/library/oid.h
 ./mode_end_call.lo: ../../include/net-snmp/library/types.h
 ./mode_end_call.lo: ../../include/net-snmp/library/snmp_api.h
@@ -675,6 +681,7 @@
 ./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/ucd_compat.h
 ./mode_end_call.lo: ../../include/net-snmp/library/mib.h
@@ -757,7 +764,7 @@
 ./multiplexer.lo: ../../include/net-snmp/net-snmp-config.h
 ./multiplexer.lo: ../../include/net-snmp/net-snmp-includes.h
 ./multiplexer.lo: ../../include/net-snmp/definitions.h
-./multiplexer.lo: ../../include/net-snmp/types.h 
+./multiplexer.lo: ../../include/net-snmp/types.h
 ./multiplexer.lo: ../../include/net-snmp/library/oid.h
 ./multiplexer.lo: ../../include/net-snmp/library/types.h
 ./multiplexer.lo: ../../include/net-snmp/library/snmp_api.h
@@ -781,6 +788,7 @@
 ./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/ucd_compat.h
 ./multiplexer.lo: ../../include/net-snmp/library/mib.h
@@ -862,9 +870,9 @@
 ./multiplexer.lo: ../../include/net-snmp/agent/mfd.h
 ./multiplexer.lo: ../../include/net-snmp/agent/snmp_get_statistic.h
 ./null.lo: ../../include/net-snmp/net-snmp-config.h
-./null.lo: ../../include/net-snmp/net-snmp-includes.h 
+./null.lo: ../../include/net-snmp/net-snmp-includes.h
 ./null.lo: ../../include/net-snmp/definitions.h
-./null.lo: ../../include/net-snmp/types.h 
+./null.lo: ../../include/net-snmp/types.h
 ./null.lo: ../../include/net-snmp/library/oid.h
 ./null.lo: ../../include/net-snmp/library/types.h
 ./null.lo: ../../include/net-snmp/library/snmp_api.h
@@ -888,6 +896,7 @@
 ./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/ucd_compat.h
 ./null.lo: ../../include/net-snmp/library/mib.h
@@ -969,9 +978,9 @@
 ./null.lo: ../../include/net-snmp/agent/mfd.h
 ./null.lo: ../../include/net-snmp/agent/snmp_get_statistic.h
 ./old_api.lo: ../../include/net-snmp/net-snmp-config.h
-./old_api.lo: ../../include/net-snmp/net-snmp-includes.h 
-./old_api.lo:  ../../include/net-snmp/definitions.h
-./old_api.lo: ../../include/net-snmp/types.h 
+./old_api.lo: ../../include/net-snmp/net-snmp-includes.h
+./old_api.lo: ../../include/net-snmp/definitions.h
+./old_api.lo: ../../include/net-snmp/types.h
 ./old_api.lo: ../../include/net-snmp/library/oid.h
 ./old_api.lo: ../../include/net-snmp/library/types.h
 ./old_api.lo: ../../include/net-snmp/library/snmp_api.h
@@ -995,6 +1004,7 @@
 ./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/ucd_compat.h
 ./old_api.lo: ../../include/net-snmp/library/mib.h
@@ -1079,7 +1089,7 @@
 ./read_only.lo: ../../include/net-snmp/net-snmp-config.h
 ./read_only.lo: ../../include/net-snmp/net-snmp-includes.h
 ./read_only.lo: ../../include/net-snmp/definitions.h
-./read_only.lo: ../../include/net-snmp/types.h 
+./read_only.lo: ../../include/net-snmp/types.h
 ./read_only.lo: ../../include/net-snmp/library/oid.h
 ./read_only.lo: ../../include/net-snmp/library/types.h
 ./read_only.lo: ../../include/net-snmp/library/snmp_api.h
@@ -1103,6 +1113,7 @@
 ./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/ucd_compat.h
 ./read_only.lo: ../../include/net-snmp/library/mib.h
@@ -1187,7 +1198,7 @@
 ./row_merge.lo: ../../include/net-snmp/net-snmp-features.h
 ./row_merge.lo: ../../include/net-snmp/net-snmp-includes.h
 ./row_merge.lo: ../../include/net-snmp/definitions.h
-./row_merge.lo: ../../include/net-snmp/types.h 
+./row_merge.lo: ../../include/net-snmp/types.h
 ./row_merge.lo: ../../include/net-snmp/library/oid.h
 ./row_merge.lo: ../../include/net-snmp/library/types.h
 ./row_merge.lo: ../../include/net-snmp/library/snmp_api.h
@@ -1211,6 +1222,7 @@
 ./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/ucd_compat.h
 ./row_merge.lo: ../../include/net-snmp/library/mib.h
@@ -1291,9 +1303,9 @@
 ./row_merge.lo: ../../include/net-snmp/agent/mfd.h
 ./row_merge.lo: ../../include/net-snmp/agent/snmp_get_statistic.h
 ./scalar.lo: ../../include/net-snmp/net-snmp-config.h
-./scalar.lo: ../../include/net-snmp/net-snmp-includes.h 
-./scalar.lo:  ../../include/net-snmp/definitions.h
-./scalar.lo: ../../include/net-snmp/types.h 
+./scalar.lo: ../../include/net-snmp/net-snmp-includes.h
+./scalar.lo: ../../include/net-snmp/definitions.h
+./scalar.lo: ../../include/net-snmp/types.h
 ./scalar.lo: ../../include/net-snmp/library/oid.h
 ./scalar.lo: ../../include/net-snmp/library/types.h
 ./scalar.lo: ../../include/net-snmp/library/snmp_api.h
@@ -1317,6 +1329,7 @@
 ./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/ucd_compat.h
 ./scalar.lo: ../../include/net-snmp/library/mib.h
@@ -1400,7 +1413,7 @@
 ./scalar_group.lo: ../../include/net-snmp/net-snmp-config.h
 ./scalar_group.lo: ../../include/net-snmp/net-snmp-includes.h
 ./scalar_group.lo: ../../include/net-snmp/definitions.h
-./scalar_group.lo: ../../include/net-snmp/types.h 
+./scalar_group.lo: ../../include/net-snmp/types.h
 ./scalar_group.lo: ../../include/net-snmp/library/oid.h
 ./scalar_group.lo: ../../include/net-snmp/library/types.h
 ./scalar_group.lo: ../../include/net-snmp/library/snmp_api.h
@@ -1424,6 +1437,7 @@
 ./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/ucd_compat.h
 ./scalar_group.lo: ../../include/net-snmp/library/mib.h
@@ -1507,7 +1521,7 @@
 ./serialize.lo: ../../include/net-snmp/net-snmp-config.h
 ./serialize.lo: ../../include/net-snmp/net-snmp-includes.h
 ./serialize.lo: ../../include/net-snmp/definitions.h
-./serialize.lo: ../../include/net-snmp/types.h 
+./serialize.lo: ../../include/net-snmp/types.h
 ./serialize.lo: ../../include/net-snmp/library/oid.h
 ./serialize.lo: ../../include/net-snmp/library/types.h
 ./serialize.lo: ../../include/net-snmp/library/snmp_api.h
@@ -1531,6 +1545,7 @@
 ./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/ucd_compat.h
 ./serialize.lo: ../../include/net-snmp/library/mib.h
@@ -1639,6 +1654,7 @@
 ./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/ucd_compat.h
 ./snmp_get_statistic.lo: ../../include/net-snmp/library/mib.h
@@ -1722,7 +1738,7 @@
 ./stash_cache.lo: ../../include/net-snmp/net-snmp-features.h
 ./stash_cache.lo: ../../include/net-snmp/net-snmp-includes.h
 ./stash_cache.lo: ../../include/net-snmp/definitions.h
-./stash_cache.lo: ../../include/net-snmp/types.h 
+./stash_cache.lo: ../../include/net-snmp/types.h
 ./stash_cache.lo: ../../include/net-snmp/library/oid.h
 ./stash_cache.lo: ../../include/net-snmp/library/types.h
 ./stash_cache.lo: ../../include/net-snmp/library/snmp_api.h
@@ -1746,6 +1762,7 @@
 ./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/ucd_compat.h
 ./stash_cache.lo: ../../include/net-snmp/library/mib.h
@@ -1831,7 +1848,7 @@
 ./stash_to_next.lo: ../../include/net-snmp/net-snmp-features.h
 ./stash_to_next.lo: ../../include/net-snmp/net-snmp-includes.h
 ./stash_to_next.lo: ../../include/net-snmp/definitions.h
-./stash_to_next.lo: ../../include/net-snmp/types.h 
+./stash_to_next.lo: ../../include/net-snmp/types.h
 ./stash_to_next.lo: ../../include/net-snmp/library/oid.h
 ./stash_to_next.lo: ../../include/net-snmp/library/types.h
 ./stash_to_next.lo: ../../include/net-snmp/library/snmp_api.h
@@ -1855,6 +1872,7 @@
 ./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/ucd_compat.h
 ./stash_to_next.lo: ../../include/net-snmp/library/mib.h
@@ -1940,7 +1958,7 @@
 ./table_array.lo: ../../include/net-snmp/net-snmp-features.h
 ./table_array.lo: ../../include/net-snmp/net-snmp-includes.h
 ./table_array.lo: ../../include/net-snmp/definitions.h
-./table_array.lo: ../../include/net-snmp/types.h 
+./table_array.lo: ../../include/net-snmp/types.h
 ./table_array.lo: ../../include/net-snmp/library/oid.h
 ./table_array.lo: ../../include/net-snmp/library/types.h
 ./table_array.lo: ../../include/net-snmp/library/snmp_api.h
@@ -1964,6 +1982,7 @@
 ./table_array.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./table_array.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./table_array.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./table_array.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./table_array.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./table_array.lo: ../../include/net-snmp/library/ucd_compat.h
 ./table_array.lo: ../../include/net-snmp/library/mib.h
@@ -2045,9 +2064,9 @@
 ./table_array.lo: ../../include/net-snmp/agent/snmp_get_statistic.h
 ./table.lo: ../../include/net-snmp/net-snmp-config.h
 ./table.lo: ../../include/net-snmp/net-snmp-features.h
-./table.lo: ../../include/net-snmp/net-snmp-includes.h 
-./table.lo:  ../../include/net-snmp/definitions.h
-./table.lo: ../../include/net-snmp/types.h 
+./table.lo: ../../include/net-snmp/net-snmp-includes.h
+./table.lo: ../../include/net-snmp/definitions.h
+./table.lo: ../../include/net-snmp/types.h
 ./table.lo: ../../include/net-snmp/library/oid.h
 ./table.lo: ../../include/net-snmp/library/types.h
 ./table.lo: ../../include/net-snmp/library/snmp_api.h
@@ -2071,6 +2090,7 @@
 ./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/ucd_compat.h
 ./table.lo: ../../include/net-snmp/library/mib.h
@@ -2154,7 +2174,7 @@
 ./table_container.lo: ../../include/net-snmp/net-snmp-features.h
 ./table_container.lo: ../../include/net-snmp/net-snmp-includes.h
 ./table_container.lo: ../../include/net-snmp/definitions.h
-./table_container.lo: ../../include/net-snmp/types.h 
+./table_container.lo: ../../include/net-snmp/types.h
 ./table_container.lo: ../../include/net-snmp/library/oid.h
 ./table_container.lo: ../../include/net-snmp/library/types.h
 ./table_container.lo: ../../include/net-snmp/library/snmp_api.h
@@ -2178,6 +2198,7 @@
 ./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/ucd_compat.h
 ./table_container.lo: ../../include/net-snmp/library/mib.h
@@ -2260,8 +2281,8 @@
 ./table_data.lo: ../../include/net-snmp/net-snmp-config.h
 ./table_data.lo: ../../include/net-snmp/net-snmp-features.h
 ./table_data.lo: ../../include/net-snmp/net-snmp-includes.h
-./table_data.lo:  ../../include/net-snmp/definitions.h
-./table_data.lo: ../../include/net-snmp/types.h 
+./table_data.lo: ../../include/net-snmp/definitions.h
+./table_data.lo: ../../include/net-snmp/types.h
 ./table_data.lo: ../../include/net-snmp/library/oid.h
 ./table_data.lo: ../../include/net-snmp/library/types.h
 ./table_data.lo: ../../include/net-snmp/library/snmp_api.h
@@ -2285,6 +2306,7 @@
 ./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/ucd_compat.h
 ./table_data.lo: ../../include/net-snmp/library/mib.h
@@ -2368,7 +2390,7 @@
 ./table_dataset.lo: ../../include/net-snmp/net-snmp-features.h
 ./table_dataset.lo: ../../include/net-snmp/net-snmp-includes.h
 ./table_dataset.lo: ../../include/net-snmp/definitions.h
-./table_dataset.lo: ../../include/net-snmp/types.h 
+./table_dataset.lo: ../../include/net-snmp/types.h
 ./table_dataset.lo: ../../include/net-snmp/library/oid.h
 ./table_dataset.lo: ../../include/net-snmp/library/types.h
 ./table_dataset.lo: ../../include/net-snmp/library/snmp_api.h
@@ -2392,6 +2414,7 @@
 ./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/ucd_compat.h
 ./table_dataset.lo: ../../include/net-snmp/library/mib.h
@@ -2475,7 +2498,7 @@
 ./table_iterator.lo: ../../include/net-snmp/net-snmp-features.h
 ./table_iterator.lo: ../../include/net-snmp/net-snmp-includes.h
 ./table_iterator.lo: ../../include/net-snmp/definitions.h
-./table_iterator.lo: ../../include/net-snmp/types.h 
+./table_iterator.lo: ../../include/net-snmp/types.h
 ./table_iterator.lo: ../../include/net-snmp/library/oid.h
 ./table_iterator.lo: ../../include/net-snmp/library/types.h
 ./table_iterator.lo: ../../include/net-snmp/library/snmp_api.h
@@ -2499,6 +2522,7 @@
 ./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/ucd_compat.h
 ./table_iterator.lo: ../../include/net-snmp/library/mib.h
@@ -2583,7 +2607,7 @@
 ./table_row.lo: ../../include/net-snmp/net-snmp-features.h
 ./table_row.lo: ../../include/net-snmp/net-snmp-includes.h
 ./table_row.lo: ../../include/net-snmp/definitions.h
-./table_row.lo: ../../include/net-snmp/types.h 
+./table_row.lo: ../../include/net-snmp/types.h
 ./table_row.lo: ../../include/net-snmp/library/oid.h
 ./table_row.lo: ../../include/net-snmp/library/types.h
 ./table_row.lo: ../../include/net-snmp/library/snmp_api.h
@@ -2607,6 +2631,7 @@
 ./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/ucd_compat.h
 ./table_row.lo: ../../include/net-snmp/library/mib.h
@@ -2690,7 +2715,7 @@
 ./table_tdata.lo: ../../include/net-snmp/net-snmp-features.h
 ./table_tdata.lo: ../../include/net-snmp/net-snmp-includes.h
 ./table_tdata.lo: ../../include/net-snmp/definitions.h
-./table_tdata.lo: ../../include/net-snmp/types.h 
+./table_tdata.lo: ../../include/net-snmp/types.h
 ./table_tdata.lo: ../../include/net-snmp/library/oid.h
 ./table_tdata.lo: ../../include/net-snmp/library/types.h
 ./table_tdata.lo: ../../include/net-snmp/library/snmp_api.h
@@ -2714,6 +2739,7 @@
 ./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/ucd_compat.h
 ./table_tdata.lo: ../../include/net-snmp/library/mib.h
@@ -2795,9 +2821,9 @@
 ./table_tdata.lo: ../../include/net-snmp/agent/snmp_get_statistic.h
 ./watcher.lo: ../../include/net-snmp/net-snmp-config.h
 ./watcher.lo: ../../include/net-snmp/net-snmp-features.h
-./watcher.lo: ../../include/net-snmp/net-snmp-includes.h 
-./watcher.lo:  ../../include/net-snmp/definitions.h
-./watcher.lo: ../../include/net-snmp/types.h 
+./watcher.lo: ../../include/net-snmp/net-snmp-includes.h
+./watcher.lo: ../../include/net-snmp/definitions.h
+./watcher.lo: ../../include/net-snmp/types.h
 ./watcher.lo: ../../include/net-snmp/library/oid.h
 ./watcher.lo: ../../include/net-snmp/library/types.h
 ./watcher.lo: ../../include/net-snmp/library/snmp_api.h
@@ -2821,6 +2847,7 @@
 ./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/ucd_compat.h
 ./watcher.lo: ../../include/net-snmp/library/mib.h
diff --git a/agent/helpers/instance.c b/agent/helpers/instance.c
index a187d58..a5ee841 100644
--- a/agent/helpers/instance.c
+++ b/agent/helpers/instance.c
@@ -656,7 +656,7 @@ netsnmp_instance_num_file_handler(netsnmp_mib_handler *handler,
             return SNMP_ERR_NOERROR;
         }
 
-        memdup((u_char **) & it_save, (u_char *)&it, sizeof(u_long));
+        it_save = netsnmp_memdup(&it, sizeof(u_long));
         if (it_save == NULL) {
             netsnmp_set_request_error(reqinfo, requests,
                                       SNMP_ERR_RESOURCEUNAVAILABLE);
diff --git a/agent/helpers/old_api.c b/agent/helpers/old_api.c
index 4888cbc..d2b99d9 100644
--- a/agent/helpers/old_api.c
+++ b/agent/helpers/old_api.c
@@ -52,7 +52,7 @@ get_old_api_handler(void)
 }
 
 struct variable *
-netsnmp_duplicate_variable(struct variable *var)
+netsnmp_duplicate_variable(const struct variable *var)
 {
     struct variable *var2 = NULL;
     
@@ -71,7 +71,7 @@ netsnmp_duplicate_variable(struct variable *var)
  */
 int
 netsnmp_register_old_api(const char *moduleName,
-                         struct variable *var,
+                         const struct variable *var,
                          size_t varsize,
                          size_t numvars,
                          const oid * mibloc,
@@ -95,8 +95,8 @@ netsnmp_register_old_api(const char *moduleName,
         if (reginfo == NULL)
             return SNMP_ERR_GENERR;
 
-	vp = netsnmp_duplicate_variable((struct variable *)
-					((char *) var + varsize * i));
+	vp = netsnmp_duplicate_variable((const struct variable *)
+					((const char *) var + varsize * i));
 
         reginfo->handler = get_old_api_handler();
         reginfo->handlerName = strdup(moduleName);
@@ -124,7 +124,8 @@ netsnmp_register_old_api(const char *moduleName,
         reginfo->range_ubound = range_ubound;
         reginfo->timeout = timeout;
         reginfo->contextName = (context) ? strdup(context) : NULL;
-        reginfo->modes = HANDLER_CAN_RWRITE;
+        reginfo->modes = vp->acl == NETSNMP_OLDAPI_RONLY ? HANDLER_CAN_RONLY :
+                         HANDLER_CAN_RWRITE;
 
         /*
          * register ourselves in the mib tree 
@@ -140,7 +141,7 @@ netsnmp_register_old_api(const char *moduleName,
 /** registers a row within a mib table */
 int
 netsnmp_register_mib_table_row(const char *moduleName,
-                               struct variable *var,
+                               const struct variable *var,
                                size_t varsize,
                                size_t numvars,
                                oid * mibloc,
@@ -154,8 +155,8 @@ netsnmp_register_mib_table_row(const char *moduleName,
     oid             ubound = 0;
 
     for (i = 0; i < numvars; i++) {
-        struct variable *vr =
-            (struct variable *) ((char *) var + (i * varsize));
+        const struct variable *vr =
+            (const struct variable *) ((const char *) var + (i * varsize));
         netsnmp_handler_registration *r;
         if ( var_subid > (int)mibloclen ) {
             break;    /* doesn't make sense */
diff --git a/agent/helpers/table_data.c b/agent/helpers/table_data.c
index 75ddc1d..659d903 100644
--- a/agent/helpers/table_data.c
+++ b/agent/helpers/table_data.c
@@ -96,8 +96,7 @@ netsnmp_table_data_clone_row(netsnmp_table_row *row)
     if (!row)
         return NULL;
 
-    memdup((u_char **) & newrow, (u_char *) row,
-           sizeof(netsnmp_table_row));
+    newrow = netsnmp_memdup(row, sizeof(netsnmp_table_row));
     if (!newrow)
         return NULL;
 
diff --git a/agent/helpers/table_dataset.c b/agent/helpers/table_dataset.c
index 0949a8a..931c27a 100644
--- a/agent/helpers/table_dataset.c
+++ b/agent/helpers/table_dataset.c
@@ -107,7 +107,7 @@ netsnmp_init_table_dataset(void) {
 /** deletes a single dataset table data.
  *  returns the (possibly still good) next pointer of the deleted data object.
  */
-NETSNMP_INLINE netsnmp_table_data_set_storage *
+NETSNMP_STATIC_INLINE netsnmp_table_data_set_storage *
 netsnmp_table_dataset_delete_data(netsnmp_table_data_set_storage *data)
 {
     netsnmp_table_data_set_storage *nextPtr = NULL;
@@ -246,16 +246,16 @@ netsnmp_table_data_set_clone_row(netsnmp_table_row *row)
              (netsnmp_table_data_set_storage **) &(newrow->data); data;
              newrowdata = &((*newrowdata)->next), data = data->next) {
 
-            memdup((u_char **) newrowdata, (u_char *) data,
-                   sizeof(netsnmp_table_data_set_storage));
+            *newrowdata = netsnmp_memdup(data,
+                sizeof(netsnmp_table_data_set_storage));
             if (!*newrowdata) {
                 netsnmp_table_dataset_delete_row(newrow);
                 return NULL;
             }
 
             if (data->data.voidp) {
-                memdup((u_char **) & ((*newrowdata)->data.voidp),
-                       (u_char *) data->data.voidp, data->data_len);
+                (*newrowdata)->data.voidp =
+                    netsnmp_memdup(data->data.voidp, data->data_len);
                 if (!(*newrowdata)->data.voidp) {
                     netsnmp_table_dataset_delete_row(newrow);
                     return NULL;
@@ -331,8 +331,7 @@ netsnmp_table_set_add_default_row(netsnmp_table_data_set *table_set,
     new_col->writable = writable;
     new_col->column = column;
     if (default_value) {
-        memdup((u_char **) & (new_col->data.voidp),
-               (u_char *) default_value, default_value_len);
+        new_col->data.voidp = netsnmp_memdup(default_value, default_value_len);
         new_col->data_len = default_value_len;
     }
     if (table_set->default_row == NULL)
diff --git a/agent/helpers/table_tdata.c b/agent/helpers/table_tdata.c
index 5bdb26a..8865084 100644
--- a/agent/helpers/table_tdata.c
+++ b/agent/helpers/table_tdata.c
@@ -125,8 +125,7 @@ netsnmp_tdata_clone_row(netsnmp_tdata_row *row)
     if (!row)
         return NULL;
 
-    memdup((u_char **) & newrow, (u_char *) row,
-           sizeof(netsnmp_tdata_row));
+    newrow = netsnmp_memdup(row, sizeof(netsnmp_tdata_row));
     if (!newrow)
         return NULL;
 
diff --git a/agent/kernel.c b/agent/kernel.c
index 200ad0b..00fde77 100644
--- a/agent/kernel.c
+++ b/agent/kernel.c
@@ -68,6 +68,12 @@ init_kmem(const char *file)
     char            err[4096];
 
     kd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, err);
+    if (!kd)
+#ifdef KVM_NO_FILES
+	kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, err);
+#else
+	kd = kvm_openfiles(NULL, "/dev/null", NULL, O_RDONLY, err);
+#endif
     if (!kd && !netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, 
                                        NETSNMP_DS_AGENT_NO_ROOT_ACCESS)) {
         snmp_log(LOG_CRIT, "init_kmem: kvm_openfiles failed: %s\n", err);
@@ -101,16 +107,17 @@ int
 klookup(unsigned long off, void *target, size_t siz)
 {
     int             result;
+
     if (kd == NULL)
         return 0;
     result = kvm_read(kd, off, target, siz);
     if (result != siz) {
 #if HAVE_KVM_OPENFILES
-        snmp_log(LOG_ERR, "kvm_read(*, %lx, %p, %zx) = %d: %s\n", off,
-                 target, siz, result, kvm_geterr(kd));
+        snmp_log(LOG_ERR, "kvm_read(*, %lx, %p, %x) = %d: %s\n", off,
+                 target, (unsigned) siz, result, kvm_geterr(kd));
 #else
         snmp_log(LOG_ERR, "kvm_read(*, %lx, %p, %d) = %d: ", off, target,
-                 siz, result);
+                 (unsigned) siz, result);
         snmp_log_perror("klookup");
 #endif
         return 0;
@@ -144,30 +151,34 @@ int             swap = -1, mem = -1, kmem = -1;
 int
 init_kmem(const char *file)
 {
+    const int no_root_access = netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
+                                              NETSNMP_DS_AGENT_NO_ROOT_ACCESS);
+    int res = TRUE;
+
     kmem = open(file, O_RDONLY);
-    if (kmem < 0 && !netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, 
-					    NETSNMP_DS_AGENT_NO_ROOT_ACCESS)) {
+    if (kmem < 0 && !no_root_access) {
         snmp_log_perror(file);
+        res = FALSE;
     }
     if (kmem >= 0)
         fcntl(kmem, F_SETFD, 1/*FD_CLOEXEC*/);
     mem = open("/dev/mem", O_RDONLY);
-    if (mem < 0 && !netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, 
-					   NETSNMP_DS_AGENT_NO_ROOT_ACCESS)) {
+    if (mem < 0 && !no_root_access) {
         snmp_log_perror("/dev/mem");
+        res = FALSE;
     }
     if (mem >= 0)
         fcntl(mem, F_SETFD, 1/*FD_CLOEXEC*/);
 #ifdef DMEM_LOC
     swap = open(DMEM_LOC, O_RDONLY);
-    if (swap < 0 && !netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, 
-					    NETSNMP_DS_AGENT_NO_ROOT_ACCESS)) {
+    if (swap < 0 && !no_root_access) {
         snmp_log_perror(DMEM_LOC);
+        res = FALSE;
     }
     if (swap >= 0)
         fcntl(swap, F_SETFD, 1/*FD_CLOEXEC*/);
 #endif
-    return kmem >= 0 && mem >= 0 && swap >= 0;
+    return res;
 }
 
 /** @private
@@ -209,7 +220,7 @@ klookup(unsigned long off, void *target, size_t siz)
         return 0;
 
     if ((retsiz = klseek((off_t) off)) != off) {
-        snmp_log(LOG_ERR, "klookup(%lx, %p, %d): ", off, target, siz);
+        snmp_log(LOG_ERR, "klookup(%lx, %p, %d): ", off, target, (int) siz);
         snmp_log_perror("klseek");
         return (0);
     }
@@ -219,12 +230,13 @@ klookup(unsigned long off, void *target, size_t siz)
              * these happen too often on too many architectures to print them
              * unless we're in debugging mode. People get very full log files. 
              */
-            snmp_log(LOG_ERR, "klookup(%lx, %p, %d): ", off, target, siz);
+            snmp_log(LOG_ERR, "klookup(%lx, %p, %d): ", off, target, (int) siz);
             snmp_log_perror("klread");
         }
         return (0);
     }
-    DEBUGMSGTL(("verbose:kernel:klookup", "klookup(%lx, %p, %d) succeeded", off, target, siz));
+    DEBUGMSGTL(("verbose:kernel:klookup", "klookup(%lx, %p, %d) succeeded",
+                off, target, (int) siz));
     return (1);
 }
 
diff --git a/agent/mibgroup/Makefile.depend b/agent/mibgroup/Makefile.depend
index dac364d..a5ab40b 100644
--- a/agent/mibgroup/Makefile.depend
+++ b/agent/mibgroup/Makefile.depend
@@ -6,7 +6,7 @@
 ./header_complex.lo: ../../include/net-snmp/system/generic.h
 ./header_complex.lo: ../../include/net-snmp/net-snmp-includes.h
 ./header_complex.lo: ../../include/net-snmp/definitions.h
-./header_complex.lo: ../../include/net-snmp/types.h 
+./header_complex.lo: ../../include/net-snmp/types.h
 ./header_complex.lo: ../../include/net-snmp/library/oid.h
 ./header_complex.lo: ../../include/net-snmp/library/types.h
 ./header_complex.lo: ../../include/net-snmp/library/snmp_api.h
@@ -30,6 +30,7 @@
 ./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/ucd_compat.h
 ./header_complex.lo: ../../include/net-snmp/library/mib.h
@@ -117,7 +118,7 @@
 ./testhandler.lo: ../../include/net-snmp/net-snmp-features.h
 ./testhandler.lo: ../../include/net-snmp/net-snmp-includes.h
 ./testhandler.lo: ../../include/net-snmp/definitions.h
-./testhandler.lo: ../../include/net-snmp/types.h 
+./testhandler.lo: ../../include/net-snmp/types.h
 ./testhandler.lo: ../../include/net-snmp/library/oid.h
 ./testhandler.lo: ../../include/net-snmp/library/types.h
 ./testhandler.lo: ../../include/net-snmp/library/snmp_api.h
@@ -141,6 +142,7 @@
 ./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/ucd_compat.h
 ./testhandler.lo: ../../include/net-snmp/library/mib.h
@@ -224,8 +226,8 @@
 ./util_funcs.lo: ../../include/net-snmp/net-snmp-config.h
 ./util_funcs.lo: ../../include/net-snmp/net-snmp-features.h
 ./util_funcs.lo: ../../include/net-snmp/net-snmp-includes.h
-./util_funcs.lo:  ../../include/net-snmp/definitions.h
-./util_funcs.lo: ../../include/net-snmp/types.h 
+./util_funcs.lo: ../../include/net-snmp/definitions.h
+./util_funcs.lo: ../../include/net-snmp/types.h
 ./util_funcs.lo: ../../include/net-snmp/library/oid.h
 ./util_funcs.lo: ../../include/net-snmp/library/types.h
 ./util_funcs.lo: ../../include/net-snmp/library/snmp_api.h
@@ -249,6 +251,7 @@
 ./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/ucd_compat.h
 ./util_funcs.lo: ../../include/net-snmp/library/mib.h
@@ -331,6 +334,7 @@
 ./util_funcs.lo: util_funcs.h util_funcs/header_generic.h
 ./util_funcs.lo: util_funcs/header_simple_table.h
 ./util_funcs.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h utilities/execute.h
+./util_funcs.lo: ucd-snmp/errormib.h mibdefs.h
 ./winExtDLL.lo: ../../include/net-snmp/net-snmp-config.h
 ./winExtDLL.lo: ../../include/net-snmp/net-snmp-features.h
 ./winExtDLL.lo: ../../include/net-snmp/agent/mib_module_config.h
@@ -338,7 +342,7 @@
 ./agent/extend.lo: ../../include/net-snmp/net-snmp-features.h
 ./agent/extend.lo: ../../include/net-snmp/net-snmp-includes.h
 ./agent/extend.lo: ../../include/net-snmp/definitions.h
-./agent/extend.lo: ../../include/net-snmp/types.h 
+./agent/extend.lo: ../../include/net-snmp/types.h
 ./agent/extend.lo: ../../include/net-snmp/library/oid.h
 ./agent/extend.lo: ../../include/net-snmp/library/types.h
 ./agent/extend.lo: ../../include/net-snmp/library/snmp_api.h
@@ -362,6 +366,7 @@
 ./agent/extend.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./agent/extend.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./agent/extend.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./agent/extend.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./agent/extend.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./agent/extend.lo: ../../include/net-snmp/library/ucd_compat.h
 ./agent/extend.lo: ../../include/net-snmp/library/mib.h
@@ -448,7 +453,7 @@
 ./agent/nsCache.lo: ../../include/net-snmp/net-snmp-features.h
 ./agent/nsCache.lo: ../../include/net-snmp/net-snmp-includes.h
 ./agent/nsCache.lo: ../../include/net-snmp/definitions.h
-./agent/nsCache.lo: ../../include/net-snmp/types.h 
+./agent/nsCache.lo: ../../include/net-snmp/types.h
 ./agent/nsCache.lo: ../../include/net-snmp/library/oid.h
 ./agent/nsCache.lo: ../../include/net-snmp/library/types.h
 ./agent/nsCache.lo: ../../include/net-snmp/library/snmp_api.h
@@ -472,6 +477,7 @@
 ./agent/nsCache.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./agent/nsCache.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./agent/nsCache.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./agent/nsCache.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./agent/nsCache.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./agent/nsCache.lo: ../../include/net-snmp/library/ucd_compat.h
 ./agent/nsCache.lo: ../../include/net-snmp/library/mib.h
@@ -551,11 +557,11 @@
 ./agent/nsCache.lo: ../../include/net-snmp/agent/table_array.h
 ./agent/nsCache.lo: ../../include/net-snmp/agent/mfd.h
 ./agent/nsCache.lo: ../../include/net-snmp/agent/snmp_get_statistic.h
-./agent/nsCache.lo:  agent/nsCache.h
+./agent/nsCache.lo: agent/nsCache.h
 ./agent/nsDebug.lo: ../../include/net-snmp/net-snmp-config.h
 ./agent/nsDebug.lo: ../../include/net-snmp/net-snmp-includes.h
 ./agent/nsDebug.lo: ../../include/net-snmp/definitions.h
-./agent/nsDebug.lo: ../../include/net-snmp/types.h 
+./agent/nsDebug.lo: ../../include/net-snmp/types.h
 ./agent/nsDebug.lo: ../../include/net-snmp/library/oid.h
 ./agent/nsDebug.lo: ../../include/net-snmp/library/types.h
 ./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_api.h
@@ -579,6 +585,7 @@
 ./agent/nsDebug.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./agent/nsDebug.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./agent/nsDebug.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./agent/nsDebug.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./agent/nsDebug.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./agent/nsDebug.lo: ../../include/net-snmp/library/ucd_compat.h
 ./agent/nsDebug.lo: ../../include/net-snmp/library/mib.h
@@ -659,12 +666,12 @@
 ./agent/nsDebug.lo: ../../include/net-snmp/agent/table_array.h
 ./agent/nsDebug.lo: ../../include/net-snmp/agent/mfd.h
 ./agent/nsDebug.lo: ../../include/net-snmp/agent/snmp_get_statistic.h
-./agent/nsDebug.lo:  agent/nsDebug.h
+./agent/nsDebug.lo: agent/nsDebug.h
 ./agent/nsLogging.lo: ../../include/net-snmp/net-snmp-config.h
 ./agent/nsLogging.lo: ../../include/net-snmp/net-snmp-features.h
 ./agent/nsLogging.lo: ../../include/net-snmp/net-snmp-includes.h
 ./agent/nsLogging.lo: ../../include/net-snmp/definitions.h
-./agent/nsLogging.lo: ../../include/net-snmp/types.h 
+./agent/nsLogging.lo: ../../include/net-snmp/types.h
 ./agent/nsLogging.lo: ../../include/net-snmp/library/oid.h
 ./agent/nsLogging.lo: ../../include/net-snmp/library/types.h
 ./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_api.h
@@ -688,6 +695,7 @@
 ./agent/nsLogging.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./agent/nsLogging.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./agent/nsLogging.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./agent/nsLogging.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./agent/nsLogging.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./agent/nsLogging.lo: ../../include/net-snmp/library/ucd_compat.h
 ./agent/nsLogging.lo: ../../include/net-snmp/library/mib.h
@@ -767,7 +775,7 @@
 ./agent/nsLogging.lo: ../../include/net-snmp/agent/table_array.h
 ./agent/nsLogging.lo: ../../include/net-snmp/agent/mfd.h
 ./agent/nsLogging.lo: ../../include/net-snmp/agent/snmp_get_statistic.h
-./agent/nsLogging.lo:  agent/nsLogging.h
+./agent/nsLogging.lo: agent/nsLogging.h
 ./agent/nsModuleTable.lo: ../../include/net-snmp/net-snmp-config.h
 ./agent/nsModuleTable.lo: ../../include/net-snmp/net-snmp-features.h
 ./agent/nsModuleTable.lo: ../../include/net-snmp/net-snmp-includes.h
@@ -796,6 +804,7 @@
 ./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./agent/nsModuleTable.lo: ../../include/net-snmp/library/ucd_compat.h
 ./agent/nsModuleTable.lo: ../../include/net-snmp/library/mib.h
@@ -904,6 +913,7 @@
 ./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./agent/nsTransactionTable.lo: ../../include/net-snmp/library/ucd_compat.h
 ./agent/nsTransactionTable.lo: ../../include/net-snmp/library/mib.h
@@ -1012,6 +1022,7 @@
 ./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/ucd_compat.h
 ./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/mib.h
@@ -1120,6 +1131,7 @@
 ./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./agentx/agentx_config.lo: ../../include/net-snmp/library/ucd_compat.h
 ./agentx/agentx_config.lo: ../../include/net-snmp/library/mib.h
@@ -1205,7 +1217,7 @@
 ./agentx/client.lo: ../../include/net-snmp/net-snmp-features.h
 ./agentx/client.lo: ../../include/net-snmp/net-snmp-includes.h
 ./agentx/client.lo: ../../include/net-snmp/definitions.h
-./agentx/client.lo: ../../include/net-snmp/types.h 
+./agentx/client.lo: ../../include/net-snmp/types.h
 ./agentx/client.lo: ../../include/net-snmp/library/oid.h
 ./agentx/client.lo: ../../include/net-snmp/library/types.h
 ./agentx/client.lo: ../../include/net-snmp/library/snmp_api.h
@@ -1229,6 +1241,7 @@
 ./agentx/client.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./agentx/client.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./agentx/client.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./agentx/client.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./agentx/client.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./agentx/client.lo: ../../include/net-snmp/library/ucd_compat.h
 ./agentx/client.lo: ../../include/net-snmp/library/mib.h
@@ -1338,6 +1351,7 @@
 ./agentx/master_admin.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./agentx/master_admin.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./agentx/master_admin.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./agentx/master_admin.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./agentx/master_admin.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./agentx/master_admin.lo: ../../include/net-snmp/library/ucd_compat.h
 ./agentx/master_admin.lo: ../../include/net-snmp/library/mib.h
@@ -1426,7 +1440,7 @@
 ./agentx/master.lo: ../../include/net-snmp/net-snmp-features.h
 ./agentx/master.lo: ../../include/net-snmp/net-snmp-includes.h
 ./agentx/master.lo: ../../include/net-snmp/definitions.h
-./agentx/master.lo: ../../include/net-snmp/types.h 
+./agentx/master.lo: ../../include/net-snmp/types.h
 ./agentx/master.lo: ../../include/net-snmp/library/oid.h
 ./agentx/master.lo: ../../include/net-snmp/library/types.h
 ./agentx/master.lo: ../../include/net-snmp/library/snmp_api.h
@@ -1450,6 +1464,7 @@
 ./agentx/master.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./agentx/master.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./agentx/master.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./agentx/master.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./agentx/master.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./agentx/master.lo: ../../include/net-snmp/library/ucd_compat.h
 ./agentx/master.lo: ../../include/net-snmp/library/mib.h
@@ -1534,7 +1549,7 @@
 ./agentx/protocol.lo: ../../include/net-snmp/net-snmp-config.h
 ./agentx/protocol.lo: ../../include/net-snmp/net-snmp-includes.h
 ./agentx/protocol.lo: ../../include/net-snmp/definitions.h
-./agentx/protocol.lo: ../../include/net-snmp/types.h 
+./agentx/protocol.lo: ../../include/net-snmp/types.h
 ./agentx/protocol.lo: ../../include/net-snmp/library/oid.h
 ./agentx/protocol.lo: ../../include/net-snmp/library/types.h
 ./agentx/protocol.lo: ../../include/net-snmp/library/snmp_api.h
@@ -1558,6 +1573,7 @@
 ./agentx/protocol.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./agentx/protocol.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./agentx/protocol.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./agentx/protocol.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./agentx/protocol.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./agentx/protocol.lo: ../../include/net-snmp/library/ucd_compat.h
 ./agentx/protocol.lo: ../../include/net-snmp/library/mib.h
@@ -1606,7 +1622,7 @@
 ./agentx/subagent.lo: ../../include/net-snmp/net-snmp-features.h
 ./agentx/subagent.lo: ../../include/net-snmp/net-snmp-includes.h
 ./agentx/subagent.lo: ../../include/net-snmp/definitions.h
-./agentx/subagent.lo: ../../include/net-snmp/types.h 
+./agentx/subagent.lo: ../../include/net-snmp/types.h
 ./agentx/subagent.lo: ../../include/net-snmp/library/oid.h
 ./agentx/subagent.lo: ../../include/net-snmp/library/types.h
 ./agentx/subagent.lo: ../../include/net-snmp/library/snmp_api.h
@@ -1630,6 +1646,7 @@
 ./agentx/subagent.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./agentx/subagent.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./agentx/subagent.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./agentx/subagent.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./agentx/subagent.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./agentx/subagent.lo: ../../include/net-snmp/library/ucd_compat.h
 ./agentx/subagent.lo: ../../include/net-snmp/library/mib.h
@@ -1743,6 +1760,7 @@
 ./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./deliver/deliverByNotify.lo: ../../include/net-snmp/library/ucd_compat.h
 ./deliver/deliverByNotify.lo: ../../include/net-snmp/library/mib.h
@@ -1851,6 +1869,7 @@
 ./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/ucd_compat.h
 ./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/mib.h
@@ -1959,6 +1978,7 @@
 ./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./disman/mteEventTable.lo: ../../include/net-snmp/library/ucd_compat.h
 ./disman/mteEventTable.lo: ../../include/net-snmp/library/mib.h
@@ -2070,6 +2090,7 @@
 ./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./disman/mteObjectsTable.lo: ../../include/net-snmp/library/ucd_compat.h
 ./disman/mteObjectsTable.lo: ../../include/net-snmp/library/mib.h
@@ -2178,6 +2199,7 @@
 ./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/ucd_compat.h
 ./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/mib.h
@@ -2288,6 +2310,7 @@
 ./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/ucd_compat.h
 ./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/mib.h
@@ -2398,6 +2421,7 @@
 ./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/ucd_compat.h
 ./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/mib.h
@@ -2509,6 +2533,7 @@
 ./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./disman/mteTriggerTable.lo: ../../include/net-snmp/library/ucd_compat.h
 ./disman/mteTriggerTable.lo: ../../include/net-snmp/library/mib.h
@@ -2622,6 +2647,7 @@
 ./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/ucd_compat.h
 ./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/mib.h
@@ -2732,6 +2758,7 @@
 ./examples/data_set.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./examples/data_set.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./examples/data_set.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./examples/data_set.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./examples/data_set.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./examples/data_set.lo: ../../include/net-snmp/library/ucd_compat.h
 ./examples/data_set.lo: ../../include/net-snmp/library/mib.h
@@ -2839,6 +2866,7 @@
 ./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./examples/delayed_instance.lo: ../../include/net-snmp/library/ucd_compat.h
 ./examples/delayed_instance.lo: ../../include/net-snmp/library/mib.h
@@ -2923,7 +2951,7 @@
 ./examples/example.lo: ../../include/net-snmp/net-snmp-config.h
 ./examples/example.lo: ../../include/net-snmp/net-snmp-includes.h
 ./examples/example.lo: ../../include/net-snmp/definitions.h
-./examples/example.lo: ../../include/net-snmp/types.h 
+./examples/example.lo: ../../include/net-snmp/types.h
 ./examples/example.lo: ../../include/net-snmp/library/oid.h
 ./examples/example.lo: ../../include/net-snmp/library/types.h
 ./examples/example.lo: ../../include/net-snmp/library/snmp_api.h
@@ -2947,6 +2975,7 @@
 ./examples/example.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./examples/example.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./examples/example.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./examples/example.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./examples/example.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./examples/example.lo: ../../include/net-snmp/library/ucd_compat.h
 ./examples/example.lo: ../../include/net-snmp/library/mib.h
@@ -3055,6 +3084,7 @@
 ./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/ucd_compat.h
 ./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/mib.h
@@ -3165,6 +3195,7 @@
 ./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/ucd_compat.h
 ./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/mib.h
@@ -3277,6 +3308,7 @@
 ./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/ucd_compat.h
 ./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/mib.h
@@ -3349,6 +3381,7 @@
 ./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/ucd_compat.h
 ./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/mib.h
@@ -3421,6 +3454,7 @@
 ./examples/notification.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./examples/notification.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./examples/notification.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./examples/notification.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./examples/notification.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./examples/notification.lo: ../../include/net-snmp/library/ucd_compat.h
 ./examples/notification.lo: ../../include/net-snmp/library/mib.h
@@ -3530,6 +3564,7 @@
 ./examples/scalar_int.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./examples/scalar_int.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./examples/scalar_int.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./examples/scalar_int.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./examples/scalar_int.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./examples/scalar_int.lo: ../../include/net-snmp/library/ucd_compat.h
 ./examples/scalar_int.lo: ../../include/net-snmp/library/mib.h
@@ -3636,6 +3671,7 @@
 ./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/ucd_compat.h
 ./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/mib.h
@@ -3721,7 +3757,7 @@
 ./examples/watched.lo: ../../include/net-snmp/net-snmp-config.h
 ./examples/watched.lo: ../../include/net-snmp/net-snmp-includes.h
 ./examples/watched.lo: ../../include/net-snmp/definitions.h
-./examples/watched.lo: ../../include/net-snmp/types.h 
+./examples/watched.lo: ../../include/net-snmp/types.h
 ./examples/watched.lo: ../../include/net-snmp/library/oid.h
 ./examples/watched.lo: ../../include/net-snmp/library/types.h
 ./examples/watched.lo: ../../include/net-snmp/library/snmp_api.h
@@ -3745,6 +3781,7 @@
 ./examples/watched.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./examples/watched.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./examples/watched.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./examples/watched.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./examples/watched.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./examples/watched.lo: ../../include/net-snmp/library/ucd_compat.h
 ./examples/watched.lo: ../../include/net-snmp/library/mib.h
@@ -3826,10 +3863,10 @@
 ./examples/watched.lo: ../../include/net-snmp/agent/mfd.h
 ./examples/watched.lo: ../../include/net-snmp/agent/snmp_get_statistic.h
 ./host/hr_device.lo: ../../include/net-snmp/net-snmp-config.h
-./host/hr_device.lo:  host_res.h
+./host/hr_device.lo: host_res.h
 ./host/hr_device.lo: ../../include/net-snmp/net-snmp-includes.h
 ./host/hr_device.lo: ../../include/net-snmp/definitions.h
-./host/hr_device.lo: ../../include/net-snmp/types.h 
+./host/hr_device.lo: ../../include/net-snmp/types.h
 ./host/hr_device.lo: ../../include/net-snmp/library/oid.h
 ./host/hr_device.lo: ../../include/net-snmp/library/types.h
 ./host/hr_device.lo: ../../include/net-snmp/library/snmp_api.h
@@ -3853,6 +3890,7 @@
 ./host/hr_device.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./host/hr_device.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./host/hr_device.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./host/hr_device.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./host/hr_device.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./host/hr_device.lo: ../../include/net-snmp/library/ucd_compat.h
 ./host/hr_device.lo: ../../include/net-snmp/library/mib.h
@@ -3906,7 +3944,7 @@
 ./host/hr_disk.lo: ../../include/net-snmp/net-snmp-config.h host_res.h
 ./host/hr_disk.lo: ../../include/net-snmp/net-snmp-includes.h
 ./host/hr_disk.lo: ../../include/net-snmp/definitions.h
-./host/hr_disk.lo: ../../include/net-snmp/types.h 
+./host/hr_disk.lo: ../../include/net-snmp/types.h
 ./host/hr_disk.lo: ../../include/net-snmp/library/oid.h
 ./host/hr_disk.lo: ../../include/net-snmp/library/types.h
 ./host/hr_disk.lo: ../../include/net-snmp/library/snmp_api.h
@@ -3930,6 +3968,7 @@
 ./host/hr_disk.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./host/hr_disk.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./host/hr_disk.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./host/hr_disk.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./host/hr_disk.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./host/hr_disk.lo: ../../include/net-snmp/library/ucd_compat.h
 ./host/hr_disk.lo: ../../include/net-snmp/library/mib.h
@@ -3979,13 +4018,13 @@
 ./host/hr_disk.lo: ../../include/net-snmp/agent/var_struct.h
 ./host/hr_disk.lo: ../../include/net-snmp/agent/agent_registry.h
 ./host/hr_disk.lo: ../../include/net-snmp/library/fd_event_manager.h
-./host/hr_disk.lo: ./host/hr_disk.h 
+./host/hr_disk.lo: ./host/hr_disk.h
 ./host/hr_disk.lo: ../../include/net-snmp/agent/agent_read_config.h
 ./host/hr_filesys.lo: ../../include/net-snmp/net-snmp-config.h
 ./host/hr_filesys.lo: ../../include/net-snmp/net-snmp-features.h
 ./host/hr_filesys.lo: ../../include/net-snmp/net-snmp-includes.h
 ./host/hr_filesys.lo: ../../include/net-snmp/definitions.h
-./host/hr_filesys.lo: ../../include/net-snmp/types.h 
+./host/hr_filesys.lo: ../../include/net-snmp/types.h
 ./host/hr_filesys.lo: ../../include/net-snmp/library/oid.h
 ./host/hr_filesys.lo: ../../include/net-snmp/library/types.h
 ./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_api.h
@@ -4009,6 +4048,7 @@
 ./host/hr_filesys.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./host/hr_filesys.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./host/hr_filesys.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./host/hr_filesys.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./host/hr_filesys.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./host/hr_filesys.lo: ../../include/net-snmp/library/ucd_compat.h
 ./host/hr_filesys.lo: ../../include/net-snmp/library/mib.h
@@ -4090,12 +4130,12 @@
 ./host/hr_filesys.lo: ../../include/net-snmp/agent/snmp_get_statistic.h
 ./host/hr_filesys.lo: ../../include/net-snmp/agent/hardware/memory.h
 ./host/hr_filesys.lo: host_res.h ./host/hr_filesys.h ./host/hr_storage.h
-./host/hr_filesys.lo: ./host/hr_disk.h 
+./host/hr_filesys.lo: ./host/hr_disk.h
 ./host/hrh_filesys.lo: ../../include/net-snmp/net-snmp-config.h
 ./host/hrh_filesys.lo: ../../include/net-snmp/net-snmp-features.h
 ./host/hrh_filesys.lo: ../../include/net-snmp/net-snmp-includes.h
 ./host/hrh_filesys.lo: ../../include/net-snmp/definitions.h
-./host/hrh_filesys.lo: ../../include/net-snmp/types.h 
+./host/hrh_filesys.lo: ../../include/net-snmp/types.h
 ./host/hrh_filesys.lo: ../../include/net-snmp/library/oid.h
 ./host/hrh_filesys.lo: ../../include/net-snmp/library/types.h
 ./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_api.h
@@ -4119,6 +4159,7 @@
 ./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./host/hrh_filesys.lo: ../../include/net-snmp/library/ucd_compat.h
 ./host/hrh_filesys.lo: ../../include/net-snmp/library/mib.h
@@ -4201,11 +4242,11 @@
 ./host/hrh_filesys.lo: ../../include/net-snmp/agent/hardware/memory.h
 ./host/hrh_filesys.lo: ../../include/net-snmp/agent/hardware/fsys.h
 ./host/hrh_filesys.lo: host_res.h ./host/hrh_filesys.h ./host/hrh_storage.h
-./host/hrh_filesys.lo: ./host/hr_disk.h 
+./host/hrh_filesys.lo: ./host/hr_disk.h
 ./host/hrh_storage.lo: ../../include/net-snmp/net-snmp-config.h
 ./host/hrh_storage.lo: ../../include/net-snmp/net-snmp-includes.h
 ./host/hrh_storage.lo: ../../include/net-snmp/definitions.h
-./host/hrh_storage.lo: ../../include/net-snmp/types.h 
+./host/hrh_storage.lo: ../../include/net-snmp/types.h
 ./host/hrh_storage.lo: ../../include/net-snmp/library/oid.h
 ./host/hrh_storage.lo: ../../include/net-snmp/library/types.h
 ./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_api.h
@@ -4229,6 +4270,7 @@
 ./host/hrh_storage.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./host/hrh_storage.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./host/hrh_storage.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./host/hrh_storage.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./host/hrh_storage.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./host/hrh_storage.lo: ../../include/net-snmp/library/ucd_compat.h
 ./host/hrh_storage.lo: ../../include/net-snmp/library/mib.h
@@ -4312,12 +4354,12 @@
 ./host/hrh_storage.lo: ../../include/net-snmp/agent/hardware/memory.h
 ./host/hrh_storage.lo: ../../include/net-snmp/agent/hardware/fsys.h
 ./host/hrh_storage.lo: host_res.h ./host/hrh_filesys.h ./host/hrh_storage.h
-./host/hrh_storage.lo: ./host/hr_disk.h 
+./host/hrh_storage.lo: ./host/hr_disk.h
 ./host/hr_network.lo: ../../include/net-snmp/net-snmp-config.h
 ./host/hr_network.lo: ../../include/net-snmp/net-snmp-features.h
 ./host/hr_network.lo: ../../include/net-snmp/net-snmp-includes.h
 ./host/hr_network.lo: ../../include/net-snmp/definitions.h
-./host/hr_network.lo: ../../include/net-snmp/types.h 
+./host/hr_network.lo: ../../include/net-snmp/types.h
 ./host/hr_network.lo: ../../include/net-snmp/library/oid.h
 ./host/hr_network.lo: ../../include/net-snmp/library/types.h
 ./host/hr_network.lo: ../../include/net-snmp/library/snmp_api.h
@@ -4341,6 +4383,7 @@
 ./host/hr_network.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./host/hr_network.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./host/hr_network.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./host/hr_network.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./host/hr_network.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./host/hr_network.lo: ../../include/net-snmp/library/ucd_compat.h
 ./host/hr_network.lo: ../../include/net-snmp/library/mib.h
@@ -4421,12 +4464,12 @@
 ./host/hr_network.lo: ../../include/net-snmp/agent/mfd.h
 ./host/hr_network.lo: ../../include/net-snmp/agent/snmp_get_statistic.h
 ./host/hr_network.lo: ../../include/net-snmp/data_access/interface.h
-./host/hr_network.lo:  host_res.h mibII/interfaces.h
+./host/hr_network.lo: host_res.h mibII/interfaces.h
 ./host/hr_network.lo: ./host/hr_network.h
 ./host/hr_other.lo: ../../include/net-snmp/net-snmp-config.h host_res.h
 ./host/hr_other.lo: ../../include/net-snmp/net-snmp-includes.h
 ./host/hr_other.lo: ../../include/net-snmp/definitions.h
-./host/hr_other.lo: ../../include/net-snmp/types.h 
+./host/hr_other.lo: ../../include/net-snmp/types.h
 ./host/hr_other.lo: ../../include/net-snmp/library/oid.h
 ./host/hr_other.lo: ../../include/net-snmp/library/types.h
 ./host/hr_other.lo: ../../include/net-snmp/library/snmp_api.h
@@ -4450,6 +4493,7 @@
 ./host/hr_other.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./host/hr_other.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./host/hr_other.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./host/hr_other.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./host/hr_other.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./host/hr_other.lo: ../../include/net-snmp/library/ucd_compat.h
 ./host/hr_other.lo: ../../include/net-snmp/library/mib.h
@@ -4501,7 +4545,7 @@
 ./host/hr_other.lo: ../../include/net-snmp/library/fd_event_manager.h
 ./host/hr_other.lo: ./host/hr_other.h
 ./host/hr_partition.lo: ../../include/net-snmp/net-snmp-config.h
-./host/hr_partition.lo:  host_res.h
+./host/hr_partition.lo: host_res.h
 ./host/hr_partition.lo: ../../include/net-snmp/net-snmp-includes.h
 ./host/hr_partition.lo: ../../include/net-snmp/definitions.h
 ./host/hr_partition.lo: ../../include/net-snmp/types.h
@@ -4528,6 +4572,7 @@
 ./host/hr_partition.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./host/hr_partition.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./host/hr_partition.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./host/hr_partition.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./host/hr_partition.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./host/hr_partition.lo: ../../include/net-snmp/library/ucd_compat.h
 ./host/hr_partition.lo: ../../include/net-snmp/library/mib.h
@@ -4578,12 +4623,12 @@
 ./host/hr_partition.lo: ../../include/net-snmp/agent/agent_registry.h
 ./host/hr_partition.lo: ../../include/net-snmp/library/fd_event_manager.h
 ./host/hr_partition.lo: ./host/hr_partition.h ./host/hr_filesys.h
-./host/hr_partition.lo: ./host/hr_disk.h 
+./host/hr_partition.lo: ./host/hr_disk.h
 ./host/hr_print.lo: ../../include/net-snmp/net-snmp-config.h
-./host/hr_print.lo:  host_res.h
+./host/hr_print.lo: host_res.h
 ./host/hr_print.lo: ../../include/net-snmp/net-snmp-includes.h
 ./host/hr_print.lo: ../../include/net-snmp/definitions.h
-./host/hr_print.lo: ../../include/net-snmp/types.h 
+./host/hr_print.lo: ../../include/net-snmp/types.h
 ./host/hr_print.lo: ../../include/net-snmp/library/oid.h
 ./host/hr_print.lo: ../../include/net-snmp/library/types.h
 ./host/hr_print.lo: ../../include/net-snmp/library/snmp_api.h
@@ -4607,6 +4652,7 @@
 ./host/hr_print.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./host/hr_print.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./host/hr_print.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./host/hr_print.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./host/hr_print.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./host/hr_print.lo: ../../include/net-snmp/library/ucd_compat.h
 ./host/hr_print.lo: ../../include/net-snmp/library/mib.h
@@ -4663,7 +4709,7 @@
 ./host/hr_proc.lo: ../../include/net-snmp/net-snmp-config.h
 ./host/hr_proc.lo: ../../include/net-snmp/net-snmp-includes.h
 ./host/hr_proc.lo: ../../include/net-snmp/definitions.h
-./host/hr_proc.lo: ../../include/net-snmp/types.h 
+./host/hr_proc.lo: ../../include/net-snmp/types.h
 ./host/hr_proc.lo: ../../include/net-snmp/library/oid.h
 ./host/hr_proc.lo: ../../include/net-snmp/library/types.h
 ./host/hr_proc.lo: ../../include/net-snmp/library/snmp_api.h
@@ -4687,6 +4733,7 @@
 ./host/hr_proc.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./host/hr_proc.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./host/hr_proc.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./host/hr_proc.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./host/hr_proc.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./host/hr_proc.lo: ../../include/net-snmp/library/ucd_compat.h
 ./host/hr_proc.lo: ../../include/net-snmp/library/mib.h
@@ -4767,15 +4814,15 @@
 ./host/hr_proc.lo: ../../include/net-snmp/agent/table_array.h
 ./host/hr_proc.lo: ../../include/net-snmp/agent/mfd.h
 ./host/hr_proc.lo: ../../include/net-snmp/agent/snmp_get_statistic.h
-./host/hr_proc.lo:   host_res.h
+./host/hr_proc.lo: host_res.h
 ./host/hr_proc.lo: ./host/hr_proc.h ../../include/net-snmp/agent/auto_nlist.h
 ./host/hr_proc.lo: ../../include/net-snmp/agent/hardware/cpu.h
 ./host/hr_proc.lo: ucd-snmp/loadave.h mibdefs.h
 ./host/hr_storage.lo: ../../include/net-snmp/net-snmp-config.h
-./host/hr_storage.lo:  host_res.h
+./host/hr_storage.lo: host_res.h
 ./host/hr_storage.lo: ../../include/net-snmp/net-snmp-includes.h
 ./host/hr_storage.lo: ../../include/net-snmp/definitions.h
-./host/hr_storage.lo: ../../include/net-snmp/types.h 
+./host/hr_storage.lo: ../../include/net-snmp/types.h
 ./host/hr_storage.lo: ../../include/net-snmp/library/oid.h
 ./host/hr_storage.lo: ../../include/net-snmp/library/types.h
 ./host/hr_storage.lo: ../../include/net-snmp/library/snmp_api.h
@@ -4799,6 +4846,7 @@
 ./host/hr_storage.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./host/hr_storage.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./host/hr_storage.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./host/hr_storage.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./host/hr_storage.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./host/hr_storage.lo: ../../include/net-snmp/library/ucd_compat.h
 ./host/hr_storage.lo: ../../include/net-snmp/library/mib.h
@@ -4909,6 +4957,7 @@
 ./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/ucd_compat.h
 ./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/mib.h
@@ -4993,10 +5042,10 @@
 ./host/hrSWInstalledTable.lo: ./host/hrSWInstalledTable.h
 ./host/hr_swinst.lo: ../../include/net-snmp/net-snmp-config.h
 ./host/hr_swinst.lo: ../../include/net-snmp/net-snmp-features.h
-./host/hr_swinst.lo:   host_res.h
+./host/hr_swinst.lo: host_res.h
 ./host/hr_swinst.lo: ../../include/net-snmp/net-snmp-includes.h
 ./host/hr_swinst.lo: ../../include/net-snmp/definitions.h
-./host/hr_swinst.lo: ../../include/net-snmp/types.h 
+./host/hr_swinst.lo: ../../include/net-snmp/types.h
 ./host/hr_swinst.lo: ../../include/net-snmp/library/oid.h
 ./host/hr_swinst.lo: ../../include/net-snmp/library/types.h
 ./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_api.h
@@ -5020,6 +5069,7 @@
 ./host/hr_swinst.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./host/hr_swinst.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./host/hr_swinst.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./host/hr_swinst.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./host/hr_swinst.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./host/hr_swinst.lo: ../../include/net-snmp/library/ucd_compat.h
 ./host/hr_swinst.lo: ../../include/net-snmp/library/mib.h
@@ -5071,7 +5121,7 @@
 ./host/hr_swinst.lo: ./host/hr_swinst.h
 ./host/hr_swrun.lo: ../../include/net-snmp/net-snmp-config.h
 ./host/hr_swrun.lo: ../../include/net-snmp/output_api.h
-./host/hr_swrun.lo: ../../include/net-snmp/types.h 
+./host/hr_swrun.lo: ../../include/net-snmp/types.h
 ./host/hr_swrun.lo: ../../include/net-snmp/library/oid.h
 ./host/hr_swrun.lo: ../../include/net-snmp/library/types.h
 ./host/hr_swrun.lo: ../../include/net-snmp/definitions.h
@@ -5093,6 +5143,7 @@
 ./host/hr_swrun.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./host/hr_swrun.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./host/hr_swrun.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./host/hr_swrun.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./host/hr_swrun.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./host/hr_swrun.lo: ../../include/net-snmp/library/ucd_compat.h
 ./host/hr_swrun.lo: ../../include/net-snmp/library/mib.h
@@ -5105,7 +5156,7 @@
 ./host/hr_swrun.lo: ../../include/net-snmp/library/snmp-tc.h
 ./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_debug.h
 ./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_logging.h
-./host/hr_swrun.lo:  host_res.h
+./host/hr_swrun.lo: host_res.h
 ./host/hr_swrun.lo: ../../include/net-snmp/net-snmp-includes.h
 ./host/hr_swrun.lo: ../../include/net-snmp/library/getopt.h
 ./host/hr_swrun.lo: ../../include/net-snmp/utilities.h
@@ -5176,6 +5227,7 @@
 ./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/ucd_compat.h
 ./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/mib.h
@@ -5286,6 +5338,7 @@
 ./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./host/hrSWRunTable.lo: ../../include/net-snmp/library/ucd_compat.h
 ./host/hrSWRunTable.lo: ../../include/net-snmp/library/mib.h
@@ -5372,7 +5425,7 @@
 ./host/hr_system.lo: ../../include/net-snmp/net-snmp-features.h
 ./host/hr_system.lo: ../../include/net-snmp/net-snmp-includes.h
 ./host/hr_system.lo: ../../include/net-snmp/definitions.h
-./host/hr_system.lo: ../../include/net-snmp/types.h 
+./host/hr_system.lo: ../../include/net-snmp/types.h
 ./host/hr_system.lo: ../../include/net-snmp/library/oid.h
 ./host/hr_system.lo: ../../include/net-snmp/library/types.h
 ./host/hr_system.lo: ../../include/net-snmp/library/snmp_api.h
@@ -5396,6 +5449,7 @@
 ./host/hr_system.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./host/hr_system.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./host/hr_system.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./host/hr_system.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./host/hr_system.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./host/hr_system.lo: ../../include/net-snmp/library/ucd_compat.h
 ./host/hr_system.lo: ../../include/net-snmp/library/mib.h
@@ -5505,6 +5559,7 @@
 ./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/ucd_compat.h
 ./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/mib.h
@@ -5587,11 +5642,11 @@
 ./ip-mib/ip_scalars.lo: ../../include/net-snmp/data_access/ip_scalars.h
 ./ip-mib/ip_scalars.lo: ./ip-mib/ip_scalars.h
 ./mibII/at.lo: ../../include/net-snmp/net-snmp-config.h
-./mibII/at.lo: ./mibII/mibII_common.h 
+./mibII/at.lo: ./mibII/mibII_common.h
 ./mibII/at.lo: ../../agent/kernel.h
 ./mibII/at.lo: ../../include/net-snmp/net-snmp-includes.h
 ./mibII/at.lo: ../../include/net-snmp/definitions.h
-./mibII/at.lo: ../../include/net-snmp/types.h 
+./mibII/at.lo: ../../include/net-snmp/types.h
 ./mibII/at.lo: ../../include/net-snmp/library/oid.h
 ./mibII/at.lo: ../../include/net-snmp/library/types.h
 ./mibII/at.lo: ../../include/net-snmp/library/snmp_api.h
@@ -5615,6 +5670,7 @@
 ./mibII/at.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/at.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/at.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/at.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/at.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/at.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/at.lo: ../../include/net-snmp/library/mib.h
@@ -5699,11 +5755,11 @@
 ./mibII/at.lo: ./mibII/interfaces.h
 ./mibII/at.lo: ../../include/net-snmp/data_access/interface.h
 ./mibII/icmp.lo: ../../include/net-snmp/net-snmp-config.h
-./mibII/icmp.lo: ./mibII/mibII_common.h 
-./mibII/icmp.lo:  ../../agent/kernel.h
+./mibII/icmp.lo: ./mibII/mibII_common.h
+./mibII/icmp.lo: ../../agent/kernel.h
 ./mibII/icmp.lo: ../../include/net-snmp/net-snmp-includes.h
-./mibII/icmp.lo:  ../../include/net-snmp/definitions.h
-./mibII/icmp.lo: ../../include/net-snmp/types.h 
+./mibII/icmp.lo: ../../include/net-snmp/definitions.h
+./mibII/icmp.lo: ../../include/net-snmp/types.h
 ./mibII/icmp.lo: ../../include/net-snmp/library/oid.h
 ./mibII/icmp.lo: ../../include/net-snmp/library/types.h
 ./mibII/icmp.lo: ../../include/net-snmp/library/snmp_api.h
@@ -5727,6 +5783,7 @@
 ./mibII/icmp.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/icmp.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/icmp.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/icmp.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/icmp.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/icmp.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/icmp.lo: ../../include/net-snmp/library/mib.h
@@ -5813,10 +5870,10 @@
 ./mibII/icmp.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h ./mibII/icmp.h
 ./mibII/interfaces.lo: ../../include/net-snmp/net-snmp-config.h
 ./mibII/interfaces.lo: ../../include/net-snmp/net-snmp-features.h
-./mibII/interfaces.lo:  ../../agent/kernel.h
+./mibII/interfaces.lo: ../../agent/kernel.h
 ./mibII/interfaces.lo: ../../include/net-snmp/net-snmp-includes.h
 ./mibII/interfaces.lo: ../../include/net-snmp/definitions.h
-./mibII/interfaces.lo: ../../include/net-snmp/types.h 
+./mibII/interfaces.lo: ../../include/net-snmp/types.h
 ./mibII/interfaces.lo: ../../include/net-snmp/library/oid.h
 ./mibII/interfaces.lo: ../../include/net-snmp/library/types.h
 ./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_api.h
@@ -5840,6 +5897,7 @@
 ./mibII/interfaces.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/interfaces.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/interfaces.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/interfaces.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/interfaces.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/interfaces.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/interfaces.lo: ../../include/net-snmp/library/mib.h
@@ -5923,14 +5981,16 @@
 ./mibII/interfaces.lo: ../../include/net-snmp/agent/sysORTable.h
 ./mibII/interfaces.lo: ../../include/net-snmp/agent/agent_callbacks.h
 ./mibII/interfaces.lo: ../../include/net-snmp/data_access/interface.h
-./mibII/interfaces.lo: ./mibII/interfaces.h struct.h
+./mibII/interfaces.lo: ./mibII/interfaces.h struct.h util_funcs.h
 ./mibII/interfaces.lo: util_funcs/header_generic.h
+./mibII/interfaces.lo: util_funcs/header_simple_table.h
+./mibII/interfaces.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h
 ./mibII/ipAddr.lo: ../../include/net-snmp/net-snmp-config.h
 ./mibII/ipAddr.lo: ../../include/net-snmp/net-snmp-features.h
-./mibII/ipAddr.lo:  ../../agent/kernel.h
+./mibII/ipAddr.lo: ../../agent/kernel.h
 ./mibII/ipAddr.lo: ../../include/net-snmp/net-snmp-includes.h
 ./mibII/ipAddr.lo: ../../include/net-snmp/definitions.h
-./mibII/ipAddr.lo: ../../include/net-snmp/types.h 
+./mibII/ipAddr.lo: ../../include/net-snmp/types.h
 ./mibII/ipAddr.lo: ../../include/net-snmp/library/oid.h
 ./mibII/ipAddr.lo: ../../include/net-snmp/library/types.h
 ./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_api.h
@@ -5954,6 +6014,7 @@
 ./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/ipAddr.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/ipAddr.lo: ../../include/net-snmp/library/mib.h
@@ -6038,11 +6099,11 @@
 ./mibII/ipAddr.lo: ./mibII/ip.h ./mibII/var_route.h ./mibII/route_write.h
 ./mibII/ipAddr.lo: ./mibII/at.h ./mibII/interfaces.h
 ./mibII/ip.lo: ../../include/net-snmp/net-snmp-config.h
-./mibII/ip.lo: ./mibII/mibII_common.h 
+./mibII/ip.lo: ./mibII/mibII_common.h
 ./mibII/ip.lo: ../../agent/kernel.h
 ./mibII/ip.lo: ../../include/net-snmp/net-snmp-includes.h
 ./mibII/ip.lo: ../../include/net-snmp/definitions.h
-./mibII/ip.lo: ../../include/net-snmp/types.h 
+./mibII/ip.lo: ../../include/net-snmp/types.h
 ./mibII/ip.lo: ../../include/net-snmp/library/oid.h
 ./mibII/ip.lo: ../../include/net-snmp/library/types.h
 ./mibII/ip.lo: ../../include/net-snmp/library/snmp_api.h
@@ -6066,6 +6127,7 @@
 ./mibII/ip.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/ip.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/ip.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/ip.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/ip.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/ip.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/ip.lo: ../../include/net-snmp/library/mib.h
@@ -6180,6 +6242,7 @@
 ./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/mib.h
@@ -6264,7 +6327,7 @@
 ./mibII/ipCidrRouteTable_access.lo: ./mibII/ipCidrRouteTable_enums.h
 ./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/net-snmp-config.h
 ./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/net-snmp-features.h
-./mibII/ipCidrRouteTable.lo: ./mibII/route_headers.h 
+./mibII/ipCidrRouteTable.lo: ./mibII/route_headers.h
 ./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/net-snmp-includes.h
 ./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/definitions.h
 ./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/types.h
@@ -6291,6 +6354,7 @@
 ./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/mib.h
@@ -6403,6 +6467,7 @@
 ./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/mib.h
@@ -6451,7 +6516,7 @@
 ./mibII/ipv6.lo: ../../include/net-snmp/net-snmp-config.h
 ./mibII/ipv6.lo: ../../include/net-snmp/net-snmp-features.h
 ./mibII/ipv6.lo: ../../include/net-snmp/net-snmp-includes.h
-./mibII/ipv6.lo:  ../../include/net-snmp/definitions.h
+./mibII/ipv6.lo: ../../include/net-snmp/definitions.h
 ./mibII/ipv6.lo: ../../include/net-snmp/types.h
 ./mibII/ipv6.lo: ../../include/net-snmp/library/oid.h
 ./mibII/ipv6.lo: ../../include/net-snmp/library/types.h
@@ -6476,6 +6541,7 @@
 ./mibII/ipv6.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/ipv6.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/ipv6.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/ipv6.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/ipv6.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/ipv6.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/ipv6.lo: ../../include/net-snmp/library/mib.h
@@ -6586,6 +6652,7 @@
 ./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/kernel_linux.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/kernel_linux.lo: ../../include/net-snmp/library/mib.h
@@ -6665,7 +6732,7 @@
 ./mibII/kernel_linux.lo: ../../include/net-snmp/agent/table_array.h
 ./mibII/kernel_linux.lo: ../../include/net-snmp/agent/mfd.h
 ./mibII/kernel_linux.lo: ../../include/net-snmp/agent/snmp_get_statistic.h
-./mibII/kernel_linux.lo: ./mibII/kernel_linux.h
+./mibII/kernel_linux.lo: ./mibII/kernel_linux.h ./mibII/kernel_mib.h
 ./mibII/kernel_netbsd.lo: ../../include/net-snmp/net-snmp-config.h
 ./mibII/kernel_netbsd.lo: ../../include/net-snmp/net-snmp-includes.h
 ./mibII/kernel_netbsd.lo: ../../include/net-snmp/definitions.h
@@ -6693,6 +6760,7 @@
 ./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/mib.h
@@ -6774,6 +6842,115 @@
 ./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/mfd.h
 ./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/snmp_get_statistic.h
 ./mibII/kernel_netbsd.lo: ./mibII/kernel_netbsd.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/net-snmp-config.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/net-snmp-includes.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/definitions.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/types.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/oid.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/types.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_api.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/varbind_api.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_client.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/pdu_api.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/asn1.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/output_api.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_debug.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_logging.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/session_api.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/callback.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_transport.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_service.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpCallbackDomain.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpUnixDomain.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpUDPDomain.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpTCPDomain.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpIPXDomain.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/ucd_compat.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/mib.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/mib_api.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/parse.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/oid_stash.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/net-snmp-features.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_impl.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp-tc.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/getopt.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/utilities.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/system.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/tools.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/int64.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/mt_support.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_alarm.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/data_list.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/check_varbind.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/container.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/factory.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/container_binary_array.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/container_list_ssll.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/container_iterator.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/container.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_assert.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/version.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/config_api.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/read_config.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/default_store.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_parse_args.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_enum.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/vacm.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/snmpv3_api.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpv3.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/transform_oids.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/keytools.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/scapi.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/lcd_time.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_secmod.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpv3-security-includes.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmptsm.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpusm.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/mib_module_config.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/agent_module_config.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/snmp_agent.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/snmp_vars.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/agent_handler.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/var_struct.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/agent_registry.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/fd_event_manager.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/ds_agent.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/agent_read_config.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/agent_trap.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/all_helpers.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/instance.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/baby_steps.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/scalar.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/scalar_group.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/watcher.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/multiplexer.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/null.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/debug_handler.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/cache_handler.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/old_api.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/read_only.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/row_merge.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/serialize.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/bulk_to_next.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/mode_end_call.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/table.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/table_data.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/table_dataset.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/table_tdata.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/table_iterator.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/table_container.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/table_array.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/mfd.h
+./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/snmp_get_statistic.h
+./mibII/kernel_sysctl.lo: ./mibII/kernel_sysctl.h
 ./mibII/mta_sendmail.lo: ../../include/net-snmp/net-snmp-config.h
 ./mibII/mta_sendmail.lo: ../../include/net-snmp/net-snmp-includes.h
 ./mibII/mta_sendmail.lo: ../../include/net-snmp/definitions.h
@@ -6801,6 +6978,7 @@
 ./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/mta_sendmail.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/mta_sendmail.lo: ../../include/net-snmp/library/mib.h
@@ -6881,7 +7059,7 @@
 ./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/table_array.h
 ./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/mfd.h
 ./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/snmp_get_statistic.h
-./mibII/mta_sendmail.lo: ./mibII/mta_sendmail.h 
+./mibII/mta_sendmail.lo: ./mibII/mta_sendmail.h
 ./mibII/route_write.lo: ../../include/net-snmp/net-snmp-config.h
 ./mibII/route_write.lo: ../../include/net-snmp/net-snmp-includes.h
 ./mibII/route_write.lo: ../../include/net-snmp/definitions.h
@@ -6909,6 +7087,7 @@
 ./mibII/route_write.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/route_write.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/route_write.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/route_write.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/route_write.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/route_write.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/route_write.lo: ../../include/net-snmp/library/mib.h
@@ -7019,6 +7198,7 @@
 ./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/setSerialNo.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/setSerialNo.lo: ../../include/net-snmp/library/mib.h
@@ -7127,6 +7307,7 @@
 ./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/mib.h
@@ -7213,7 +7394,7 @@
 ./mibII/snmp_mib.lo: ../../include/net-snmp/net-snmp-features.h
 ./mibII/snmp_mib.lo: ../../include/net-snmp/net-snmp-includes.h
 ./mibII/snmp_mib.lo: ../../include/net-snmp/definitions.h
-./mibII/snmp_mib.lo: ../../include/net-snmp/types.h 
+./mibII/snmp_mib.lo: ../../include/net-snmp/types.h
 ./mibII/snmp_mib.lo: ../../include/net-snmp/library/oid.h
 ./mibII/snmp_mib.lo: ../../include/net-snmp/library/types.h
 ./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_api.h
@@ -7237,6 +7418,7 @@
 ./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/snmp_mib.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/snmp_mib.lo: ../../include/net-snmp/library/mib.h
@@ -7322,7 +7504,7 @@
 ./mibII/sysORTable.lo: ../../include/net-snmp/net-snmp-config.h
 ./mibII/sysORTable.lo: ../../include/net-snmp/net-snmp-includes.h
 ./mibII/sysORTable.lo: ../../include/net-snmp/definitions.h
-./mibII/sysORTable.lo: ../../include/net-snmp/types.h 
+./mibII/sysORTable.lo: ../../include/net-snmp/types.h
 ./mibII/sysORTable.lo: ../../include/net-snmp/library/oid.h
 ./mibII/sysORTable.lo: ../../include/net-snmp/library/types.h
 ./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_api.h
@@ -7346,6 +7528,7 @@
 ./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/sysORTable.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/sysORTable.lo: ../../include/net-snmp/library/mib.h
@@ -7434,7 +7617,7 @@
 ./mibII/system_mib.lo: ../../include/net-snmp/net-snmp-features.h
 ./mibII/system_mib.lo: ../../include/net-snmp/net-snmp-includes.h
 ./mibII/system_mib.lo: ../../include/net-snmp/definitions.h
-./mibII/system_mib.lo: ../../include/net-snmp/types.h 
+./mibII/system_mib.lo: ../../include/net-snmp/types.h
 ./mibII/system_mib.lo: ../../include/net-snmp/library/oid.h
 ./mibII/system_mib.lo: ../../include/net-snmp/library/types.h
 ./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_api.h
@@ -7458,6 +7641,7 @@
 ./mibII/system_mib.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/system_mib.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/system_mib.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/system_mib.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/system_mib.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/system_mib.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/system_mib.lo: ../../include/net-snmp/library/mib.h
@@ -7545,11 +7729,11 @@
 ./mibII/system_mib.lo: ./mibII/system_mib.h ./mibII/updates.h
 ./mibII/tcp.lo: ../../include/net-snmp/net-snmp-config.h
 ./mibII/tcp.lo: ../../include/net-snmp/net-snmp-features.h
-./mibII/tcp.lo: ./mibII/mibII_common.h 
+./mibII/tcp.lo: ./mibII/mibII_common.h
 ./mibII/tcp.lo: ../../agent/kernel.h
 ./mibII/tcp.lo: ../../include/net-snmp/net-snmp-includes.h
 ./mibII/tcp.lo: ../../include/net-snmp/definitions.h
-./mibII/tcp.lo: ../../include/net-snmp/types.h 
+./mibII/tcp.lo: ../../include/net-snmp/types.h
 ./mibII/tcp.lo: ../../include/net-snmp/library/oid.h
 ./mibII/tcp.lo: ../../include/net-snmp/library/types.h
 ./mibII/tcp.lo: ../../include/net-snmp/library/snmp_api.h
@@ -7573,6 +7757,7 @@
 ./mibII/tcp.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/tcp.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/tcp.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/tcp.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/tcp.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/tcp.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/tcp.lo: ../../include/net-snmp/library/mib.h
@@ -7659,11 +7844,11 @@
 ./mibII/tcp.lo: ./mibII/tcpTable.h
 ./mibII/tcpTable.lo: ../../include/net-snmp/net-snmp-config.h
 ./mibII/tcpTable.lo: ../../include/net-snmp/net-snmp-features.h
-./mibII/tcpTable.lo: ./mibII/mibII_common.h 
-./mibII/tcpTable.lo:  ../../agent/kernel.h
+./mibII/tcpTable.lo: ./mibII/mibII_common.h
+./mibII/tcpTable.lo: ../../agent/kernel.h
 ./mibII/tcpTable.lo: ../../include/net-snmp/net-snmp-includes.h
 ./mibII/tcpTable.lo: ../../include/net-snmp/definitions.h
-./mibII/tcpTable.lo: ../../include/net-snmp/types.h 
+./mibII/tcpTable.lo: ../../include/net-snmp/types.h
 ./mibII/tcpTable.lo: ../../include/net-snmp/library/oid.h
 ./mibII/tcpTable.lo: ../../include/net-snmp/library/types.h
 ./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_api.h
@@ -7687,6 +7872,7 @@
 ./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/tcpTable.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/tcpTable.lo: ../../include/net-snmp/library/mib.h
@@ -7769,11 +7955,11 @@
 ./mibII/tcpTable.lo: ../../include/net-snmp/agent/auto_nlist.h ./mibII/tcp.h
 ./mibII/tcpTable.lo: ./mibII/tcpTable.h
 ./mibII/udp.lo: ../../include/net-snmp/net-snmp-config.h
-./mibII/udp.lo: ./mibII/mibII_common.h 
+./mibII/udp.lo: ./mibII/mibII_common.h
 ./mibII/udp.lo: ../../agent/kernel.h
 ./mibII/udp.lo: ../../include/net-snmp/net-snmp-includes.h
 ./mibII/udp.lo: ../../include/net-snmp/definitions.h
-./mibII/udp.lo: ../../include/net-snmp/types.h 
+./mibII/udp.lo: ../../include/net-snmp/types.h
 ./mibII/udp.lo: ../../include/net-snmp/library/oid.h
 ./mibII/udp.lo: ../../include/net-snmp/library/types.h
 ./mibII/udp.lo: ../../include/net-snmp/library/snmp_api.h
@@ -7797,6 +7983,7 @@
 ./mibII/udp.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/udp.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/udp.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/udp.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/udp.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/udp.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/udp.lo: ../../include/net-snmp/library/mib.h
@@ -7883,11 +8070,11 @@
 ./mibII/udp.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h ./mibII/udp.h
 ./mibII/udp.lo: ./mibII/udpTable.h
 ./mibII/udpTable.lo: ../../include/net-snmp/net-snmp-config.h
-./mibII/udpTable.lo: ./mibII/mibII_common.h 
-./mibII/udpTable.lo:  ../../agent/kernel.h
+./mibII/udpTable.lo: ./mibII/mibII_common.h
+./mibII/udpTable.lo: ../../agent/kernel.h
 ./mibII/udpTable.lo: ../../include/net-snmp/net-snmp-includes.h
 ./mibII/udpTable.lo: ../../include/net-snmp/definitions.h
-./mibII/udpTable.lo: ../../include/net-snmp/types.h 
+./mibII/udpTable.lo: ../../include/net-snmp/types.h
 ./mibII/udpTable.lo: ../../include/net-snmp/library/oid.h
 ./mibII/udpTable.lo: ../../include/net-snmp/library/types.h
 ./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_api.h
@@ -7911,6 +8098,7 @@
 ./mibII/udpTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/udpTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/udpTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/udpTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/udpTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/udpTable.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/udpTable.lo: ../../include/net-snmp/library/mib.h
@@ -7996,7 +8184,7 @@
 ./mibII/updates.lo: ../../include/net-snmp/net-snmp-config.h
 ./mibII/updates.lo: ../../include/net-snmp/net-snmp-includes.h
 ./mibII/updates.lo: ../../include/net-snmp/definitions.h
-./mibII/updates.lo: ../../include/net-snmp/types.h 
+./mibII/updates.lo: ../../include/net-snmp/types.h
 ./mibII/updates.lo: ../../include/net-snmp/library/oid.h
 ./mibII/updates.lo: ../../include/net-snmp/library/types.h
 ./mibII/updates.lo: ../../include/net-snmp/library/snmp_api.h
@@ -8020,6 +8208,7 @@
 ./mibII/updates.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/updates.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/updates.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/updates.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/updates.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/updates.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/updates.lo: ../../include/net-snmp/library/mib.h
@@ -8103,7 +8292,7 @@
 ./mibII/vacm_conf.lo: ../../include/net-snmp/net-snmp-config.h
 ./mibII/vacm_conf.lo: ../../include/net-snmp/net-snmp-includes.h
 ./mibII/vacm_conf.lo: ../../include/net-snmp/definitions.h
-./mibII/vacm_conf.lo: ../../include/net-snmp/types.h 
+./mibII/vacm_conf.lo: ../../include/net-snmp/types.h
 ./mibII/vacm_conf.lo: ../../include/net-snmp/library/oid.h
 ./mibII/vacm_conf.lo: ../../include/net-snmp/library/types.h
 ./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_api.h
@@ -8127,6 +8316,7 @@
 ./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/vacm_conf.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/vacm_conf.lo: ../../include/net-snmp/library/mib.h
@@ -8236,6 +8426,7 @@
 ./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/vacm_context.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/vacm_context.lo: ../../include/net-snmp/library/mib.h
@@ -8320,7 +8511,7 @@
 ./mibII/vacm_vars.lo: ../../include/net-snmp/net-snmp-config.h
 ./mibII/vacm_vars.lo: ../../include/net-snmp/net-snmp-includes.h
 ./mibII/vacm_vars.lo: ../../include/net-snmp/definitions.h
-./mibII/vacm_vars.lo: ../../include/net-snmp/types.h 
+./mibII/vacm_vars.lo: ../../include/net-snmp/types.h
 ./mibII/vacm_vars.lo: ../../include/net-snmp/library/oid.h
 ./mibII/vacm_vars.lo: ../../include/net-snmp/library/types.h
 ./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_api.h
@@ -8344,6 +8535,7 @@
 ./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/vacm_vars.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/vacm_vars.lo: ../../include/net-snmp/library/mib.h
@@ -8429,10 +8621,10 @@
 ./mibII/vacm_vars.lo: ./mibII/vacm_vars.h util_funcs/header_generic.h
 ./mibII/var_route.lo: ../../include/net-snmp/net-snmp-config.h
 ./mibII/var_route.lo: ../../include/net-snmp/net-snmp-features.h
-./mibII/var_route.lo: ./mibII/route_headers.h 
+./mibII/var_route.lo: ./mibII/route_headers.h
 ./mibII/var_route.lo: ../../include/net-snmp/net-snmp-includes.h
 ./mibII/var_route.lo: ../../include/net-snmp/definitions.h
-./mibII/var_route.lo: ../../include/net-snmp/types.h 
+./mibII/var_route.lo: ../../include/net-snmp/types.h
 ./mibII/var_route.lo: ../../include/net-snmp/library/oid.h
 ./mibII/var_route.lo: ../../include/net-snmp/library/types.h
 ./mibII/var_route.lo: ../../include/net-snmp/library/snmp_api.h
@@ -8456,6 +8648,7 @@
 ./mibII/var_route.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./mibII/var_route.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./mibII/var_route.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./mibII/var_route.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./mibII/var_route.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./mibII/var_route.lo: ../../include/net-snmp/library/ucd_compat.h
 ./mibII/var_route.lo: ../../include/net-snmp/library/mib.h
@@ -8539,11 +8732,13 @@
 ./mibII/var_route.lo: ../../include/net-snmp/data_access/interface.h
 ./mibII/var_route.lo: ./mibII/ip.h ./mibII/var_route.h ./mibII/route_write.h
 ./mibII/var_route.lo: ./mibII/at.h ../../agent/kernel.h ./mibII/interfaces.h
-./mibII/var_route.lo: struct.h
+./mibII/var_route.lo: struct.h util_funcs.h util_funcs/header_generic.h
+./mibII/var_route.lo: util_funcs/header_simple_table.h
+./mibII/var_route.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h
 ./misc/ipfwacc.lo: ../../include/net-snmp/net-snmp-config.h
 ./misc/ipfwacc.lo: ../../include/net-snmp/net-snmp-includes.h
 ./misc/ipfwacc.lo: ../../include/net-snmp/definitions.h
-./misc/ipfwacc.lo: ../../include/net-snmp/types.h 
+./misc/ipfwacc.lo: ../../include/net-snmp/types.h
 ./misc/ipfwacc.lo: ../../include/net-snmp/library/oid.h
 ./misc/ipfwacc.lo: ../../include/net-snmp/library/types.h
 ./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_api.h
@@ -8567,6 +8762,7 @@
 ./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./misc/ipfwacc.lo: ../../include/net-snmp/library/ucd_compat.h
 ./misc/ipfwacc.lo: ../../include/net-snmp/library/mib.h
@@ -8676,6 +8872,7 @@
 ./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/ucd_compat.h
 ./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/mib.h
@@ -8786,6 +8983,7 @@
 ./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/ucd_compat.h
 ./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/mib.h
@@ -8895,6 +9093,7 @@
 ./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/ucd_compat.h
 ./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/mib.h
@@ -8991,7 +9190,7 @@
 ./Rmon/agutil.lo: ../../include/net-snmp/net-snmp-config.h
 ./Rmon/agutil.lo: ../../include/net-snmp/net-snmp-includes.h
 ./Rmon/agutil.lo: ../../include/net-snmp/definitions.h
-./Rmon/agutil.lo: ../../include/net-snmp/types.h 
+./Rmon/agutil.lo: ../../include/net-snmp/types.h
 ./Rmon/agutil.lo: ../../include/net-snmp/library/oid.h
 ./Rmon/agutil.lo: ../../include/net-snmp/library/types.h
 ./Rmon/agutil.lo: ../../include/net-snmp/library/snmp_api.h
@@ -9015,6 +9214,7 @@
 ./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/ucd_compat.h
 ./Rmon/agutil.lo: ../../include/net-snmp/library/mib.h
@@ -9096,10 +9296,10 @@
 ./Rmon/agutil.lo: ../../include/net-snmp/agent/mfd.h
 ./Rmon/agutil.lo: ../../include/net-snmp/agent/snmp_get_statistic.h
 ./Rmon/agutil.lo: ./Rmon/agutil.h ./Rmon/agutil_api.h
-./Rmon/alarm.lo: ../../include/net-snmp/net-snmp-config.h 
+./Rmon/alarm.lo: ../../include/net-snmp/net-snmp-config.h
 ./Rmon/alarm.lo: ../../include/net-snmp/net-snmp-includes.h
-./Rmon/alarm.lo:  ../../include/net-snmp/definitions.h
-./Rmon/alarm.lo: ../../include/net-snmp/types.h 
+./Rmon/alarm.lo: ../../include/net-snmp/definitions.h
+./Rmon/alarm.lo: ../../include/net-snmp/types.h
 ./Rmon/alarm.lo: ../../include/net-snmp/library/oid.h
 ./Rmon/alarm.lo: ../../include/net-snmp/library/types.h
 ./Rmon/alarm.lo: ../../include/net-snmp/library/snmp_api.h
@@ -9123,6 +9323,7 @@
 ./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/ucd_compat.h
 ./Rmon/alarm.lo: ../../include/net-snmp/library/mib.h
@@ -9208,7 +9409,7 @@
 ./Rmon/alarmTable.lo: ../../include/net-snmp/net-snmp-features.h
 ./Rmon/alarmTable.lo: ../../include/net-snmp/net-snmp-includes.h
 ./Rmon/alarmTable.lo: ../../include/net-snmp/definitions.h
-./Rmon/alarmTable.lo: ../../include/net-snmp/types.h 
+./Rmon/alarmTable.lo: ../../include/net-snmp/types.h
 ./Rmon/alarmTable.lo: ../../include/net-snmp/library/oid.h
 ./Rmon/alarmTable.lo: ../../include/net-snmp/library/types.h
 ./Rmon/alarmTable.lo: ../../include/net-snmp/library/snmp_api.h
@@ -9232,6 +9433,7 @@
 ./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/ucd_compat.h
 ./Rmon/alarmTable.lo: ../../include/net-snmp/library/mib.h
@@ -9315,8 +9517,8 @@
 ./Rmon/event.lo: ../../include/net-snmp/net-snmp-config.h
 ./Rmon/event.lo: ../../include/net-snmp/net-snmp-features.h
 ./Rmon/event.lo: ../../include/net-snmp/net-snmp-includes.h
-./Rmon/event.lo:  ../../include/net-snmp/definitions.h
-./Rmon/event.lo: ../../include/net-snmp/types.h 
+./Rmon/event.lo: ../../include/net-snmp/definitions.h
+./Rmon/event.lo: ../../include/net-snmp/types.h
 ./Rmon/event.lo: ../../include/net-snmp/library/oid.h
 ./Rmon/event.lo: ../../include/net-snmp/library/types.h
 ./Rmon/event.lo: ../../include/net-snmp/library/snmp_api.h
@@ -9340,6 +9542,7 @@
 ./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/ucd_compat.h
 ./Rmon/event.lo: ../../include/net-snmp/library/mib.h
@@ -9423,7 +9626,7 @@
 ./Rmon/history.lo: ../../include/net-snmp/net-snmp-config.h
 ./Rmon/history.lo: ../../include/net-snmp/net-snmp-includes.h
 ./Rmon/history.lo: ../../include/net-snmp/definitions.h
-./Rmon/history.lo: ../../include/net-snmp/types.h 
+./Rmon/history.lo: ../../include/net-snmp/types.h
 ./Rmon/history.lo: ../../include/net-snmp/library/oid.h
 ./Rmon/history.lo: ../../include/net-snmp/library/types.h
 ./Rmon/history.lo: ../../include/net-snmp/library/snmp_api.h
@@ -9447,6 +9650,7 @@
 ./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/ucd_compat.h
 ./Rmon/history.lo: ../../include/net-snmp/library/mib.h
@@ -9531,7 +9735,7 @@
 ./Rmon/rows.lo: ../../include/net-snmp/net-snmp-config.h
 ./Rmon/rows.lo: ../../include/net-snmp/net-snmp-includes.h
 ./Rmon/rows.lo: ../../include/net-snmp/definitions.h
-./Rmon/rows.lo: ../../include/net-snmp/types.h 
+./Rmon/rows.lo: ../../include/net-snmp/types.h
 ./Rmon/rows.lo: ../../include/net-snmp/library/oid.h
 ./Rmon/rows.lo: ../../include/net-snmp/library/types.h
 ./Rmon/rows.lo: ../../include/net-snmp/library/snmp_api.h
@@ -9555,6 +9759,7 @@
 ./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/ucd_compat.h
 ./Rmon/rows.lo: ../../include/net-snmp/library/mib.h
@@ -9639,7 +9844,7 @@
 ./Rmon/statistics.lo: ../../include/net-snmp/net-snmp-config.h
 ./Rmon/statistics.lo: ../../include/net-snmp/net-snmp-includes.h
 ./Rmon/statistics.lo: ../../include/net-snmp/definitions.h
-./Rmon/statistics.lo: ../../include/net-snmp/types.h 
+./Rmon/statistics.lo: ../../include/net-snmp/types.h
 ./Rmon/statistics.lo: ../../include/net-snmp/library/oid.h
 ./Rmon/statistics.lo: ../../include/net-snmp/library/types.h
 ./Rmon/statistics.lo: ../../include/net-snmp/library/snmp_api.h
@@ -9663,6 +9868,7 @@
 ./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/ucd_compat.h
 ./Rmon/statistics.lo: ../../include/net-snmp/library/mib.h
@@ -9772,6 +9978,7 @@
 ./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/ucd_compat.h
 ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/mib.h
@@ -9881,6 +10088,7 @@
 ./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/ucd_compat.h
 ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/mib.h
@@ -9990,6 +10198,7 @@
 ./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/ucd_compat.h
 ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/mib.h
@@ -10099,6 +10308,7 @@
 ./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/ucd_compat.h
 ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/mib.h
@@ -10208,6 +10418,7 @@
 ./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/ucd_compat.h
 ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/mib.h
@@ -10317,6 +10528,7 @@
 ./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/ucd_compat.h
 ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/mib.h
@@ -10426,6 +10638,7 @@
 ./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/ucd_compat.h
 ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/mib.h
@@ -10535,6 +10748,7 @@
 ./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/ucd_compat.h
 ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/mib.h
@@ -10644,6 +10858,7 @@
 ./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/ucd_compat.h
 ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/mib.h
@@ -10753,6 +10968,7 @@
 ./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/ucd_compat.h
 ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/mib.h
@@ -10861,6 +11077,7 @@
 ./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/ucd_compat.h
 ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/mib.h
@@ -10969,6 +11186,7 @@
 ./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/ucd_compat.h
 ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/mib.h
@@ -11077,6 +11295,7 @@
 ./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/ucd_compat.h
 ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/mib.h
@@ -11187,6 +11406,7 @@
 ./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/ucd_compat.h
 ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/mib.h
@@ -11302,6 +11522,7 @@
 ./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/ucd_compat.h
 ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/mib.h
@@ -11416,6 +11637,7 @@
 ./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/ucd_compat.h
 ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/mib.h
@@ -11528,6 +11750,7 @@
 ./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/ucd_compat.h
 ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/mib.h
@@ -11620,7 +11843,7 @@
 ./smux/smux.lo: ../../include/net-snmp/net-snmp-features.h
 ./smux/smux.lo: ../../include/net-snmp/net-snmp-includes.h
 ./smux/smux.lo: ../../include/net-snmp/definitions.h
-./smux/smux.lo: ../../include/net-snmp/types.h 
+./smux/smux.lo: ../../include/net-snmp/types.h
 ./smux/smux.lo: ../../include/net-snmp/library/oid.h
 ./smux/smux.lo: ../../include/net-snmp/library/types.h
 ./smux/smux.lo: ../../include/net-snmp/library/snmp_api.h
@@ -11644,6 +11867,7 @@
 ./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/ucd_compat.h
 ./smux/smux.lo: ../../include/net-snmp/library/mib.h
@@ -11727,7 +11951,7 @@
 ./smux/snmp_bgp.lo: ../../include/net-snmp/net-snmp-config.h
 ./smux/snmp_bgp.lo: ../../include/net-snmp/net-snmp-includes.h
 ./smux/snmp_bgp.lo: ../../include/net-snmp/definitions.h
-./smux/snmp_bgp.lo: ../../include/net-snmp/types.h 
+./smux/snmp_bgp.lo: ../../include/net-snmp/types.h
 ./smux/snmp_bgp.lo: ../../include/net-snmp/library/oid.h
 ./smux/snmp_bgp.lo: ../../include/net-snmp/library/types.h
 ./smux/snmp_bgp.lo: ../../include/net-snmp/library/snmp_api.h
@@ -11751,6 +11975,7 @@
 ./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/ucd_compat.h
 ./smux/snmp_bgp.lo: ../../include/net-snmp/library/mib.h
@@ -11835,7 +12060,7 @@
 ./smux/snmp_ospf.lo: ../../include/net-snmp/net-snmp-config.h
 ./smux/snmp_ospf.lo: ../../include/net-snmp/net-snmp-includes.h
 ./smux/snmp_ospf.lo: ../../include/net-snmp/definitions.h
-./smux/snmp_ospf.lo: ../../include/net-snmp/types.h 
+./smux/snmp_ospf.lo: ../../include/net-snmp/types.h
 ./smux/snmp_ospf.lo: ../../include/net-snmp/library/oid.h
 ./smux/snmp_ospf.lo: ../../include/net-snmp/library/types.h
 ./smux/snmp_ospf.lo: ../../include/net-snmp/library/snmp_api.h
@@ -11859,6 +12084,7 @@
 ./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/ucd_compat.h
 ./smux/snmp_ospf.lo: ../../include/net-snmp/library/mib.h
@@ -11943,7 +12169,7 @@
 ./smux/snmp_rip2.lo: ../../include/net-snmp/net-snmp-config.h
 ./smux/snmp_rip2.lo: ../../include/net-snmp/net-snmp-includes.h
 ./smux/snmp_rip2.lo: ../../include/net-snmp/definitions.h
-./smux/snmp_rip2.lo: ../../include/net-snmp/types.h 
+./smux/snmp_rip2.lo: ../../include/net-snmp/types.h
 ./smux/snmp_rip2.lo: ../../include/net-snmp/library/oid.h
 ./smux/snmp_rip2.lo: ../../include/net-snmp/library/types.h
 ./smux/snmp_rip2.lo: ../../include/net-snmp/library/snmp_api.h
@@ -11967,6 +12193,7 @@
 ./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/ucd_compat.h
 ./smux/snmp_rip2.lo: ../../include/net-snmp/library/mib.h
@@ -12076,6 +12303,7 @@
 ./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/ucd_compat.h
 ./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/mib.h
@@ -12186,6 +12414,7 @@
 ./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/ucd_compat.h
 ./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/mib.h
@@ -12295,6 +12524,7 @@
 ./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/ucd_compat.h
 ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/mib.h
@@ -12381,7 +12611,7 @@
 ./snmpv3/usmConf.lo: ../../include/net-snmp/net-snmp-config.h
 ./snmpv3/usmConf.lo: ../../include/net-snmp/net-snmp-includes.h
 ./snmpv3/usmConf.lo: ../../include/net-snmp/definitions.h
-./snmpv3/usmConf.lo: ../../include/net-snmp/types.h 
+./snmpv3/usmConf.lo: ../../include/net-snmp/types.h
 ./snmpv3/usmConf.lo: ../../include/net-snmp/library/oid.h
 ./snmpv3/usmConf.lo: ../../include/net-snmp/library/types.h
 ./snmpv3/usmConf.lo: ../../include/net-snmp/library/snmp_api.h
@@ -12405,6 +12635,7 @@
 ./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/ucd_compat.h
 ./snmpv3/usmConf.lo: ../../include/net-snmp/library/mib.h
@@ -12513,6 +12744,7 @@
 ./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/ucd_compat.h
 ./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/mib.h
@@ -12598,7 +12830,7 @@
 ./snmpv3/usmStats.lo: ../../include/net-snmp/net-snmp-config.h
 ./snmpv3/usmStats.lo: ../../include/net-snmp/net-snmp-includes.h
 ./snmpv3/usmStats.lo: ../../include/net-snmp/definitions.h
-./snmpv3/usmStats.lo: ../../include/net-snmp/types.h 
+./snmpv3/usmStats.lo: ../../include/net-snmp/types.h
 ./snmpv3/usmStats.lo: ../../include/net-snmp/library/oid.h
 ./snmpv3/usmStats.lo: ../../include/net-snmp/library/types.h
 ./snmpv3/usmStats.lo: ../../include/net-snmp/library/snmp_api.h
@@ -12622,6 +12854,7 @@
 ./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/ucd_compat.h
 ./snmpv3/usmStats.lo: ../../include/net-snmp/library/mib.h
@@ -12709,7 +12942,7 @@
 ./snmpv3/usmUser.lo: ../../include/net-snmp/net-snmp-features.h
 ./snmpv3/usmUser.lo: ../../include/net-snmp/net-snmp-includes.h
 ./snmpv3/usmUser.lo: ../../include/net-snmp/definitions.h
-./snmpv3/usmUser.lo: ../../include/net-snmp/types.h 
+./snmpv3/usmUser.lo: ../../include/net-snmp/types.h
 ./snmpv3/usmUser.lo: ../../include/net-snmp/library/oid.h
 ./snmpv3/usmUser.lo: ../../include/net-snmp/library/types.h
 ./snmpv3/usmUser.lo: ../../include/net-snmp/library/snmp_api.h
@@ -12733,6 +12966,7 @@
 ./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/ucd_compat.h
 ./snmpv3/usmUser.lo: ../../include/net-snmp/library/mib.h
@@ -12840,6 +13074,7 @@
 ./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/ucd_compat.h
 ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/mib.h
@@ -12949,6 +13184,7 @@
 ./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/ucd_compat.h
 ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/mib.h
@@ -13034,7 +13270,7 @@
 ./target/target.lo: ../../include/net-snmp/net-snmp-features.h
 ./target/target.lo: ../../include/net-snmp/net-snmp-includes.h
 ./target/target.lo: ../../include/net-snmp/definitions.h
-./target/target.lo: ../../include/net-snmp/types.h 
+./target/target.lo: ../../include/net-snmp/types.h
 ./target/target.lo: ../../include/net-snmp/library/oid.h
 ./target/target.lo: ../../include/net-snmp/library/types.h
 ./target/target.lo: ../../include/net-snmp/library/snmp_api.h
@@ -13058,6 +13294,7 @@
 ./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/ucd_compat.h
 ./target/target.lo: ../../include/net-snmp/library/mib.h
@@ -13167,6 +13404,7 @@
 ./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./target/target_counters_5_5.lo: ../../include/net-snmp/library/ucd_compat.h
 ./target/target_counters_5_5.lo: ../../include/net-snmp/library/mib.h
@@ -13274,6 +13512,7 @@
 ./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/ucd_compat.h
 ./target/target_counters.lo: ../../include/net-snmp/library/mib.h
@@ -13382,6 +13621,7 @@
 ./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/ucd_compat.h
 ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/mib.h
@@ -13466,7 +13706,7 @@
 ./tunnel/tunnel.lo: ../../include/net-snmp/net-snmp-config.h
 ./tunnel/tunnel.lo: ../../include/net-snmp/net-snmp-includes.h
 ./tunnel/tunnel.lo: ../../include/net-snmp/definitions.h
-./tunnel/tunnel.lo: ../../include/net-snmp/types.h 
+./tunnel/tunnel.lo: ../../include/net-snmp/types.h
 ./tunnel/tunnel.lo: ../../include/net-snmp/library/oid.h
 ./tunnel/tunnel.lo: ../../include/net-snmp/library/types.h
 ./tunnel/tunnel.lo: ../../include/net-snmp/library/snmp_api.h
@@ -13490,6 +13730,7 @@
 ./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/ucd_compat.h
 ./tunnel/tunnel.lo: ../../include/net-snmp/library/mib.h
@@ -13582,7 +13823,7 @@
 ./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/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
@@ -13606,6 +13847,7 @@
 ./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./ucd-snmp/disk.lo: ../../include/net-snmp/library/ucd_compat.h
 ./ucd-snmp/disk.lo: ../../include/net-snmp/library/mib.h
@@ -13688,11 +13930,11 @@
 ./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/disk.lo: util_funcs/header_simple_table.h ./ucd-snmp/errormib.h
 ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/net-snmp-config.h
 ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/net-snmp-includes.h
 ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/definitions.h
-./ucd-snmp/disk_hw.lo: ../../include/net-snmp/types.h 
+./ucd-snmp/disk_hw.lo: ../../include/net-snmp/types.h
 ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/oid.h
 ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/types.h
 ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/snmp_api.h
@@ -13716,6 +13958,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/mib.h
@@ -13798,11 +14041,11 @@
 ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/agent/snmp_get_statistic.h
 ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/agent/hardware/fsys.h struct.h
 ./ucd-snmp/disk_hw.lo: ./ucd-snmp/disk.h mibdefs.h
-./ucd-snmp/disk_hw.lo: util_funcs/header_simple_table.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
 ./ucd-snmp/diskio.lo: ../../include/net-snmp/definitions.h
-./ucd-snmp/diskio.lo: ../../include/net-snmp/types.h 
+./ucd-snmp/diskio.lo: ../../include/net-snmp/types.h
 ./ucd-snmp/diskio.lo: ../../include/net-snmp/library/oid.h
 ./ucd-snmp/diskio.lo: ../../include/net-snmp/library/types.h
 ./ucd-snmp/diskio.lo: ../../include/net-snmp/library/snmp_api.h
@@ -13826,6 +14069,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/diskio.lo: ../../include/net-snmp/library/mib.h
@@ -13906,12 +14150,13 @@
 ./ucd-snmp/diskio.lo: ../../include/net-snmp/agent/table_array.h
 ./ucd-snmp/diskio.lo: ../../include/net-snmp/agent/mfd.h
 ./ucd-snmp/diskio.lo: ../../include/net-snmp/agent/snmp_get_statistic.h
+./ucd-snmp/diskio.lo: ../../include/net-snmp/agent/agent_callbacks.h
 ./ucd-snmp/diskio.lo: util_funcs/header_simple_table.h ./ucd-snmp/diskio.h
 ./ucd-snmp/dlmod.lo: ../../include/net-snmp/net-snmp-config.h
 ./ucd-snmp/dlmod.lo: ../../include/net-snmp/net-snmp-features.h
 ./ucd-snmp/dlmod.lo: ../../include/net-snmp/net-snmp-includes.h
 ./ucd-snmp/dlmod.lo: ../../include/net-snmp/definitions.h
-./ucd-snmp/dlmod.lo: ../../include/net-snmp/types.h 
+./ucd-snmp/dlmod.lo: ../../include/net-snmp/types.h
 ./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/oid.h
 ./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/types.h
 ./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/snmp_api.h
@@ -13935,6 +14180,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/mib.h
@@ -14042,6 +14288,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/errormib.lo: ../../include/net-snmp/library/mib.h
@@ -14153,6 +14400,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/extensible.lo: ../../include/net-snmp/library/mib.h
@@ -14243,7 +14491,7 @@
 ./ucd-snmp/file.lo: ../../include/net-snmp/net-snmp-config.h
 ./ucd-snmp/file.lo: ../../include/net-snmp/net-snmp-includes.h
 ./ucd-snmp/file.lo: ../../include/net-snmp/definitions.h
-./ucd-snmp/file.lo: ../../include/net-snmp/types.h 
+./ucd-snmp/file.lo: ../../include/net-snmp/types.h
 ./ucd-snmp/file.lo: ../../include/net-snmp/library/oid.h
 ./ucd-snmp/file.lo: ../../include/net-snmp/library/types.h
 ./ucd-snmp/file.lo: ../../include/net-snmp/library/snmp_api.h
@@ -14267,6 +14515,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/file.lo: ../../include/net-snmp/library/mib.h
@@ -14352,7 +14601,7 @@
 ./ucd-snmp/hpux.lo: ../../include/net-snmp/net-snmp-config.h
 ./ucd-snmp/hpux.lo: ../../include/net-snmp/net-snmp-includes.h
 ./ucd-snmp/hpux.lo: ../../include/net-snmp/definitions.h
-./ucd-snmp/hpux.lo: ../../include/net-snmp/types.h 
+./ucd-snmp/hpux.lo: ../../include/net-snmp/types.h
 ./ucd-snmp/hpux.lo: ../../include/net-snmp/library/oid.h
 ./ucd-snmp/hpux.lo: ../../include/net-snmp/library/types.h
 ./ucd-snmp/hpux.lo: ../../include/net-snmp/library/snmp_api.h
@@ -14376,6 +14625,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/hpux.lo: ../../include/net-snmp/library/mib.h
@@ -14485,6 +14735,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/mib.h
@@ -14565,7 +14816,7 @@
 ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/agent/mfd.h
 ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/agent/snmp_get_statistic.h
 ./ucd-snmp/lmSensors.lo: util_funcs/header_simple_table.h
-./ucd-snmp/lmSensors.lo:  ./ucd-snmp/lmSensors.h
+./ucd-snmp/lmSensors.lo: ./ucd-snmp/lmSensors.h
 ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/net-snmp-config.h
 ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/net-snmp-includes.h
 ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/definitions.h
@@ -14593,6 +14844,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/mib.h
@@ -14679,7 +14931,7 @@
 ./ucd-snmp/loadave.lo: ../../include/net-snmp/net-snmp-config.h
 ./ucd-snmp/loadave.lo: ../../include/net-snmp/net-snmp-includes.h
 ./ucd-snmp/loadave.lo: ../../include/net-snmp/definitions.h
-./ucd-snmp/loadave.lo: ../../include/net-snmp/types.h 
+./ucd-snmp/loadave.lo: ../../include/net-snmp/types.h
 ./ucd-snmp/loadave.lo: ../../include/net-snmp/library/oid.h
 ./ucd-snmp/loadave.lo: ../../include/net-snmp/library/types.h
 ./ucd-snmp/loadave.lo: ../../include/net-snmp/library/snmp_api.h
@@ -14703,6 +14955,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/loadave.lo: ../../include/net-snmp/library/mib.h
@@ -14815,6 +15068,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/mib.h
@@ -14901,7 +15155,7 @@
 ./ucd-snmp/memory.lo: ../../include/net-snmp/net-snmp-config.h
 ./ucd-snmp/memory.lo: ../../include/net-snmp/net-snmp-includes.h
 ./ucd-snmp/memory.lo: ../../include/net-snmp/definitions.h
-./ucd-snmp/memory.lo: ../../include/net-snmp/types.h 
+./ucd-snmp/memory.lo: ../../include/net-snmp/types.h
 ./ucd-snmp/memory.lo: ../../include/net-snmp/library/oid.h
 ./ucd-snmp/memory.lo: ../../include/net-snmp/library/types.h
 ./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_api.h
@@ -14925,6 +15179,7 @@
 ./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./ucd-snmp/memory.lo: ../../include/net-snmp/library/ucd_compat.h
 ./ucd-snmp/memory.lo: ../../include/net-snmp/library/mib.h
@@ -15034,6 +15289,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/mib.h
@@ -15144,6 +15400,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/mib.h
@@ -15254,6 +15511,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/mib.h
@@ -15367,6 +15625,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/mib.h
@@ -15477,6 +15736,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/mib.h
@@ -15587,6 +15847,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/mib.h
@@ -15675,7 +15936,7 @@
 ./ucd-snmp/pass.lo: ../../include/net-snmp/net-snmp-features.h
 ./ucd-snmp/pass.lo: ../../include/net-snmp/net-snmp-includes.h
 ./ucd-snmp/pass.lo: ../../include/net-snmp/definitions.h
-./ucd-snmp/pass.lo: ../../include/net-snmp/types.h 
+./ucd-snmp/pass.lo: ../../include/net-snmp/types.h
 ./ucd-snmp/pass.lo: ../../include/net-snmp/library/oid.h
 ./ucd-snmp/pass.lo: ../../include/net-snmp/library/types.h
 ./ucd-snmp/pass.lo: ../../include/net-snmp/library/snmp_api.h
@@ -15699,6 +15960,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/pass.lo: ../../include/net-snmp/library/mib.h
@@ -15810,6 +16072,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/mib.h
@@ -15923,6 +16186,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/mib.h
@@ -16011,7 +16275,7 @@
 ./ucd-snmp/proc.lo: ../../include/net-snmp/net-snmp-features.h
 ./ucd-snmp/proc.lo: ../../include/net-snmp/net-snmp-includes.h
 ./ucd-snmp/proc.lo: ../../include/net-snmp/definitions.h
-./ucd-snmp/proc.lo: ../../include/net-snmp/types.h 
+./ucd-snmp/proc.lo: ../../include/net-snmp/types.h
 ./ucd-snmp/proc.lo: ../../include/net-snmp/library/oid.h
 ./ucd-snmp/proc.lo: ../../include/net-snmp/library/types.h
 ./ucd-snmp/proc.lo: ../../include/net-snmp/library/snmp_api.h
@@ -16035,6 +16299,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/proc.lo: ../../include/net-snmp/library/mib.h
@@ -16114,7 +16379,9 @@
 ./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 util_funcs.h
+./ucd-snmp/proc.lo: struct.h ./ucd-snmp/proc.h mibdefs.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
@@ -16122,7 +16389,7 @@
 ./ucd-snmp/proxy.lo: ../../include/net-snmp/net-snmp-features.h
 ./ucd-snmp/proxy.lo: ../../include/net-snmp/net-snmp-includes.h
 ./ucd-snmp/proxy.lo: ../../include/net-snmp/definitions.h
-./ucd-snmp/proxy.lo: ../../include/net-snmp/types.h 
+./ucd-snmp/proxy.lo: ../../include/net-snmp/types.h
 ./ucd-snmp/proxy.lo: ../../include/net-snmp/library/oid.h
 ./ucd-snmp/proxy.lo: ../../include/net-snmp/library/types.h
 ./ucd-snmp/proxy.lo: ../../include/net-snmp/library/snmp_api.h
@@ -16146,6 +16413,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/proxy.lo: ../../include/net-snmp/library/mib.h
@@ -16254,6 +16522,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/mib.h
@@ -16364,6 +16633,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/mib.h
@@ -16473,6 +16743,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/mib.h
@@ -16559,7 +16830,7 @@
 ./ucd-snmp/vmstat.lo: ../../include/net-snmp/net-snmp-config.h
 ./ucd-snmp/vmstat.lo: ../../include/net-snmp/net-snmp-includes.h
 ./ucd-snmp/vmstat.lo: ../../include/net-snmp/definitions.h
-./ucd-snmp/vmstat.lo: ../../include/net-snmp/types.h 
+./ucd-snmp/vmstat.lo: ../../include/net-snmp/types.h
 ./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/oid.h
 ./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/types.h
 ./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_api.h
@@ -16583,6 +16854,7 @@
 ./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/ucd_compat.h
 ./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/mib.h
@@ -16693,6 +16965,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/mib.h
@@ -16803,6 +17076,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/mib.h
@@ -16912,6 +17186,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/mib.h
@@ -17023,6 +17298,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/mib.h
@@ -17133,6 +17409,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/mib.h
@@ -17243,6 +17520,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/mib.h
@@ -17353,6 +17631,7 @@
 ./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/ucd_compat.h
 ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/mib.h
@@ -17438,7 +17717,7 @@
 ./ucd-snmp/vmstat_solaris2.lo: ./ucd-snmp/vmstat_solaris2.h
 ./util_funcs/Exit.lo: ../../include/net-snmp/net-snmp-config.h
 ./util_funcs/Exit.lo: ../../include/net-snmp/library/snmp_logging.h
-./util_funcs/Exit.lo: ../../include/net-snmp/types.h 
+./util_funcs/Exit.lo: ../../include/net-snmp/types.h
 ./util_funcs/Exit.lo: ../../include/net-snmp/library/oid.h
 ./util_funcs/Exit.lo: ../../include/net-snmp/library/types.h
 ./util_funcs/Exit.lo: ../../include/net-snmp/definitions.h
@@ -17462,6 +17741,7 @@
 ./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/ucd_compat.h
 ./util_funcs/Exit.lo: ../../include/net-snmp/library/mib.h
@@ -17472,7 +17752,7 @@
 ./util_funcs/Exit.lo: ../../include/net-snmp/library/snmp_impl.h
 ./util_funcs/Exit.lo: ../../include/net-snmp/library/snmp.h
 ./util_funcs/Exit.lo: ../../include/net-snmp/library/snmp-tc.h
-./util_funcs/Exit.lo:  ./util_funcs/Exit.h
+./util_funcs/Exit.lo: ./util_funcs/Exit.h
 ./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/net-snmp-config.h
 ./util_funcs/get_pid_from_inode.lo: ./util_funcs/get_pid_from_inode.h
 ./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/output_api.h
@@ -17498,6 +17778,7 @@
 ./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/ucd_compat.h
 ./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/library/mib.h
@@ -17537,6 +17818,7 @@
 ./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/ucd_compat.h
 ./util_funcs/header_generic.lo: ../../include/net-snmp/library/mib.h
@@ -17645,6 +17927,7 @@
 ./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/ucd_compat.h
 ./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/mib.h
@@ -17753,6 +18036,7 @@
 ./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/ucd_compat.h
 ./util_funcs/restart.lo: ../../include/net-snmp/library/mib.h
@@ -17823,6 +18107,7 @@
 ./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/ucd_compat.h
 ./utilities/execute.lo: ../../include/net-snmp/library/mib.h
@@ -17903,13 +18188,13 @@
 ./utilities/execute.lo: ../../include/net-snmp/agent/table_array.h
 ./utilities/execute.lo: ../../include/net-snmp/agent/mfd.h
 ./utilities/execute.lo: ../../include/net-snmp/agent/snmp_get_statistic.h
-./utilities/execute.lo: ./ucd-snmp/errormib.h mibdefs.h ./utilities/execute.h
+./utilities/execute.lo: ucd-snmp/errormib.h mibdefs.h ./utilities/execute.h
 ./utilities/execute.lo: struct.h
 ./utilities/iquery.lo: ../../include/net-snmp/net-snmp-config.h
 ./utilities/iquery.lo: ../../include/net-snmp/net-snmp-features.h
 ./utilities/iquery.lo: ../../include/net-snmp/net-snmp-includes.h
 ./utilities/iquery.lo: ../../include/net-snmp/definitions.h
-./utilities/iquery.lo: ../../include/net-snmp/types.h 
+./utilities/iquery.lo: ../../include/net-snmp/types.h
 ./utilities/iquery.lo: ../../include/net-snmp/library/oid.h
 ./utilities/iquery.lo: ../../include/net-snmp/library/types.h
 ./utilities/iquery.lo: ../../include/net-snmp/library/snmp_api.h
@@ -17933,6 +18218,7 @@
 ./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/ucd_compat.h
 ./utilities/iquery.lo: ../../include/net-snmp/library/mib.h
@@ -18040,6 +18326,7 @@
 ./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/ucd_compat.h
 ./utilities/override.lo: ../../include/net-snmp/library/mib.h
diff --git a/agent/mibgroup/agent/extend.c b/agent/mibgroup/agent/extend.c
index 68a11e2..48379a2 100644
--- a/agent/mibgroup/agent/extend.c
+++ b/agent/mibgroup/agent/extend.c
@@ -34,7 +34,7 @@ typedef struct extend_registration_block_s {
     size_t              oid_len;
     long                num_entries;
     netsnmp_extend     *ehead;
-    netsnmp_handler_registration       *reg[3];
+    netsnmp_handler_registration       *reg[4];
     struct extend_registration_block_s *next;
 } extend_registration_block;
 extend_registration_block *ereg_head = NULL;
@@ -51,6 +51,9 @@ unsigned int             num_compatability_entries = 0;
 unsigned int             max_compatability_entries = 50;
 netsnmp_old_extend *compatability_entries;
 
+char           *cmdlinebuf;
+size_t          cmdlinesize;
+
 WriteMethod fixExec2Error;
 FindVarMethod var_extensible_old;
 oid  old_extensible_variables_oid[] = { NETSNMP_UCDAVIS_MIB, NETSNMP_SHELLMIBNUM, 1 };
@@ -222,10 +225,13 @@ _register_extend( oid *base, size_t len )
     rc = netsnmp_register_watched_scalar2( reg, winfo );
     if (rc != SNMPERR_SUCCESS)
         goto bail;
+    eptr->reg[3] = reg;
 
     return eptr;
 
 bail:
+    if (eptr->reg[3])
+        netsnmp_unregister_handler(eptr->reg[3]);
     if (eptr->reg[2])
         netsnmp_unregister_handler(eptr->reg[2]);
     if (eptr->reg[1])
@@ -267,6 +273,7 @@ extend_clear_callback(int majorID, int minorID,
         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);
     }
     ereg_head = NULL;
@@ -550,6 +557,10 @@ extend_parse_config(const char *token, char *cptr)
     }
 
     eptr      = _register_extend( oid_buf, oid_len );
+    if (!eptr) {
+        snmp_log(LOG_ERR, "Failed to register extend entry '%s' - possibly duplicate name.\n", exec_name );
+        return;
+    }
     extension = _new_extension( exec_name, flags, eptr );
     if (extension) {
         extension->command  = strdup( exec_command );
@@ -1451,6 +1462,32 @@ handle_nsExtendOutput2Table(netsnmp_mib_handler          *handler,
          *
          *************************/
 
+char * _get_cmdline(netsnmp_extend *extend)
+{
+    size_t          size;
+    char           *newbuf;
+    const char     *args = extend->args;
+
+    if (args == NULL)
+        /* Use empty string for processes without arguments. */
+        args = "";
+
+    size = strlen(extend->command) + strlen(args) + 2;
+    if (size > cmdlinesize) {
+        newbuf = realloc(cmdlinebuf, size);
+        if (!newbuf) {
+            free(cmdlinebuf);
+            cmdlinebuf = NULL;
+            cmdlinesize = 0;
+            return NULL;
+        }
+        cmdlinebuf = newbuf;
+        cmdlinesize = size;
+    }
+    sprintf(cmdlinebuf, "%s %s", extend->command, args);
+    return cmdlinebuf;
+}
+
 u_char *
 var_extensible_old(struct variable * vp,
                      oid * name,
@@ -1461,6 +1498,7 @@ var_extensible_old(struct variable * vp,
     netsnmp_old_extend *exten = NULL;
     static long     long_ret;
     unsigned int idx;
+    char         *cmdline;
 
     if (header_simple_table
         (vp, name, length, exact, var_len, write_method, num_compatability_entries))
@@ -1479,8 +1517,10 @@ var_extensible_old(struct variable * vp,
             *var_len = strlen(exten->exec_entry->token);
             return ((u_char *) (exten->exec_entry->token));
         case SHELLCOMMAND:
-            *var_len = strlen(exten->exec_entry->command);
-            return ((u_char *) (exten->exec_entry->command));
+            cmdline = _get_cmdline(exten->exec_entry);
+            if (cmdline)
+                *var_len = strlen(cmdline);
+            return ((u_char *) cmdline);
         case ERRORFLAG:        /* return code from the process */
             netsnmp_cache_check_and_reload( exten->exec_entry->cache );
             long_ret = exten->exec_entry->result;
@@ -1503,8 +1543,10 @@ var_extensible_old(struct variable * vp,
 
         case ERRORFIXCMD:
             if (exten->efix_entry) {
-                *var_len = strlen(exten->efix_entry->command);
-                return ((u_char *) exten->efix_entry->command);
+                cmdline = _get_cmdline(exten->efix_entry);
+		if (cmdline)
+                    *var_len = strlen(cmdline);
+                return ((u_char *) cmdline);
             } else {
                 *var_len = 0;
                 return ((u_char *) &long_return);  /* Just needs to be non-null! */
diff --git a/agent/mibgroup/agent/nsCache.c b/agent/mibgroup/agent/nsCache.c
index a56b0bd..d32263b 100644
--- a/agent/mibgroup/agent/nsCache.c
+++ b/agent/mibgroup/agent/nsCache.c
@@ -304,7 +304,8 @@ handle_nsCacheTable(netsnmp_mib_handler *handler,
 		}
 		status = (cache_entry->enabled ?
 	                   (cache_entry->timestampM ?
-                             (!netsnmp_ready_monotonic(cache_entry->timestampM,
+                             (cache_entry->timeout >= 0 &&
+                              !netsnmp_ready_monotonic(cache_entry->timestampM,
                                                        1000*cache_entry->timeout) ?
 	                        NSCACHE_STATUS_ACTIVE:
 	                        NSCACHE_STATUS_EXPIRED) :
diff --git a/agent/mibgroup/agent/nsTransactionTable.c b/agent/mibgroup/agent/nsTransactionTable.c
index 75fe7be..d7d3ce9 100644
--- a/agent/mibgroup/agent/nsTransactionTable.c
+++ b/agent/mibgroup/agent/nsTransactionTable.c
@@ -194,6 +194,7 @@ nsTransactionTable_handler(netsnmp_mib_handler *handler,
         if (asp == NULL) {
             netsnmp_set_request_error(reqinfo, requests,
                                       SNMP_NOSUCHINSTANCE);
+            continue;
         }
 
         /*
diff --git a/agent/mibgroup/agentx/agentx_config.c b/agent/mibgroup/agentx/agentx_config.c
index ea453c2..b590c7a 100644
--- a/agent/mibgroup/agentx/agentx_config.c
+++ b/agent/mibgroup/agentx/agentx_config.c
@@ -180,8 +180,10 @@ agentx_config_init(void)
      */
     netsnmp_register_default_domain("agentx", "unix tcp");
     netsnmp_register_default_target("agentx", "unix", NETSNMP_AGENTX_SOCKET);
+#define val(x) __STRING(x)
     netsnmp_register_default_target("agentx", "tcp",
-                                    "localhost:" __STRING(AGENTX_PORT));
+                                    "localhost:" val(AGENTX_PORT));
+#undef val
     agentx_register_config_handler("agentxsocket",
                                   agentx_parse_agentx_socket, NULL,
                                   "AgentX bind address");
diff --git a/agent/mibgroup/agentx/master_admin.c b/agent/mibgroup/agentx/master_admin.c
index 64aa491..4eaeab6 100644
--- a/agent/mibgroup/agentx/master_admin.c
+++ b/agent/mibgroup/agentx/master_admin.c
@@ -229,7 +229,7 @@ register_agentx_list(netsnmp_session * session, netsnmp_pdu *pdu)
      * register mib. Note that for failure cases, the registration info
      * (reg) will be freed, and thus is no longer a valid pointer.
      */
-    switch (netsnmp_register_mib(buf, NULL, 0, 1,
+    switch (netsnmp_register_mib(buf, NULL, 0, 0,
                                  pdu->variables->name,
                                  pdu->variables->name_length,
                                  pdu->priority, pdu->range_subid, ubound,
diff --git a/agent/mibgroup/agentx/subagent.c b/agent/mibgroup/agentx/subagent.c
index b3da321..1f9d31c 100644
--- a/agent/mibgroup/agentx/subagent.c
+++ b/agent/mibgroup/agentx/subagent.c
@@ -768,7 +768,7 @@ agentx_register_callbacks(netsnmp_session * s)
 
     DEBUGMSGTL(("agentx/subagent",
                 "registering callbacks for session %p\n", s));
-    memdup((u_char **)&sess_p, &s, sizeof(s));
+    sess_p = netsnmp_memdup(&s, sizeof(s));
     netsnmp_assert(sess_p);
     s->myvoid = sess_p;
     if (!sess_p)
diff --git a/agent/mibgroup/disman/event/mteTrigger.c b/agent/mibgroup/disman/event/mteTrigger.c
index 7fca1b0..5a0dcba 100644
--- a/agent/mibgroup/disman/event/mteTrigger.c
+++ b/agent/mibgroup/disman/event/mteTrigger.c
@@ -541,6 +541,13 @@ mteTrigger_run( unsigned int reg, void *clientarg)
         } /* !old_results - end of else block */
     } /* MTE_TRIGGER_EXISTENCE */
 
+    /*
+     * We'll need sysUpTime.0 regardless...
+     */
+    DEBUGMSGTL(("disman:event:delta", "retrieve sysUpTime.0\n"));
+    memset( &sysUT_var, 0, sizeof( netsnmp_variable_list ));
+    snmp_set_var_objid( &sysUT_var, _sysUpTime_instance, _sysUpTime_inst_len );
+    netsnmp_query_get(  &sysUT_var, entry->session );
 
     if (( entry->mteTriggerTest & MTE_TRIGGER_BOOLEAN   ) ||
         ( entry->mteTriggerTest & MTE_TRIGGER_THRESHOLD )) {
@@ -590,14 +597,6 @@ mteTrigger_run( unsigned int reg, void *clientarg)
          * (including sysUpTime.0 if not specified explicitly).
          */
         if ( entry->flags & MTE_TRIGGER_FLAG_DELTA ) {
-            /*
-             * We'll need sysUpTime.0 regardless...
-             */
-            DEBUGMSGTL(("disman:event:delta", "retrieve sysUpTime.0\n"));
-            memset( &sysUT_var, 0, sizeof( netsnmp_variable_list ));
-            snmp_set_var_objid( &sysUT_var, _sysUpTime_instance,
-                                            _sysUpTime_inst_len );
-            netsnmp_query_get(  &sysUT_var, entry->session );
 
             if (!(entry->flags & MTE_TRIGGER_FLAG_SYSUPT)) {
                 /*
diff --git a/agent/mibgroup/disman/expr/expExpressionConf.c b/agent/mibgroup/disman/expr/expExpressionConf.c
index 5c08c72..826d679 100644
--- a/agent/mibgroup/disman/expr/expExpressionConf.c
+++ b/agent/mibgroup/disman/expr/expExpressionConf.c
@@ -140,7 +140,7 @@ parse_expression(const char *token, char *line)
          * object name into the expression field...
          */
         /*   XXX - TODO - Handle string literals */
-        if (!isalpha(*cp)) {
+        if (!isalpha(*cp & 0xFF)) {
            *cp2++ = *cp++;
            continue;
         }
diff --git a/agent/mibgroup/disman/expr/expValue.c b/agent/mibgroup/disman/expr/expValue.c
index 46638f2..eeff402 100644
--- a/agent/mibgroup/disman/expr/expValue.c
+++ b/agent/mibgroup/disman/expr/expValue.c
@@ -230,7 +230,7 @@ _expParse_integer( char *start, char **end ) {
 
     n = atoi(start);
     for (cp=start; *cp; cp++)
-        if (!isdigit(*cp))
+        if (!isdigit(*cp & 0xFF))
             break;
     *end = cp;
     return n;
@@ -565,7 +565,7 @@ DIGIT:
             break;
 
         default:
-            if (isalpha( *cp1 )) {
+            if (isalpha( *cp1 & 0xFF )) {
                 /*
                  * Unrecognised function call ?
                  */
@@ -576,7 +576,7 @@ DIGIT:
                 var->data = (void *)(cp1 - exprRaw);
                 return var;
             }
-            else if (!isspace( *cp1 )) {
+            else if (!isspace( *cp1 & 0xFF )) {
                 /*
                  * Unrecognised operator ?
                  */
diff --git a/agent/mibgroup/disman/expression/expExpressionTable.c b/agent/mibgroup/disman/expression/expExpressionTable.c
index ce3b0db..212952d 100644
--- a/agent/mibgroup/disman/expression/expExpressionTable.c
+++ b/agent/mibgroup/disman/expression/expExpressionTable.c
@@ -563,8 +563,7 @@ write_expExpression(int action,
          */
         tmpvar = StorageTmp->expExpression;
         tmplen = StorageTmp->expExpressionLen;
-        memdup((u_char **) & StorageTmp->expExpression, var_val,
-               var_val_len);
+        StorageTmp->expExpression = netsnmp_memdup(var_val, var_val_len);
         StorageTmp->expExpressionLen = var_val_len;
         break;
 
@@ -738,8 +737,7 @@ write_expExpressionComment(int action,
          */
         tmpvar = StorageTmp->expExpressionComment;
         tmplen = StorageTmp->expExpressionCommentLen;
-        memdup((u_char **) & StorageTmp->expExpressionComment, var_val,
-               var_val_len);
+        StorageTmp->expExpressionComment = netsnmp_memdup(var_val, var_val_len);
         StorageTmp->expExpressionCommentLen = var_val_len;
         break;
 
diff --git a/agent/mibgroup/disman/expression/expObjectTable.c b/agent/mibgroup/disman/expression/expObjectTable.c
index e56f25a..e057f56 100644
--- a/agent/mibgroup/disman/expression/expObjectTable.c
+++ b/agent/mibgroup/disman/expression/expObjectTable.c
@@ -156,9 +156,8 @@ create_expObjectTable_data(void)
 
     StorageNew->expObjectIDWildcard = EXPOBJCETIDWILDCARD_FALSE;
     StorageNew->expObjectSampleType = EXPOBJCETSAMPLETYPE_ABSOLUTEVALUE;
-    memdup((unsigned char **)
-           &(StorageNew->expObjectDeltaDiscontinuityID),
-           (unsigned char *) TimeInstance, sizeof(TimeInstance));
+    StorageNew->expObjectDeltaDiscontinuityID =
+        netsnmp_memdup(TimeInstance, sizeof(TimeInstance));
     StorageNew->expObjectDeltaDiscontinuityIDLen =
         sizeof(TimeInstance) / sizeof(oid);
 
@@ -552,8 +551,7 @@ write_expObjectID(int action,
          */
         tmpvar = StorageTmp->expObjectID;
         tmplen = StorageTmp->expObjectIDLen;
-        memdup((u_char **) & StorageTmp->expObjectID, var_val,
-               var_val_len);
+        StorageTmp->expObjectID = netsnmp_memdup(var_val, var_val_len);
         StorageTmp->expObjectIDLen = var_val_len / sizeof(oid);
         break;
 
@@ -811,8 +809,8 @@ write_expObjectDeltaDiscontinuityID(int action,
          */
         tmpvar = StorageTmp->expObjectDeltaDiscontinuityID;
         tmplen = StorageTmp->expObjectDeltaDiscontinuityIDLen;
-        memdup((u_char **) & StorageTmp->expObjectDeltaDiscontinuityID,
-               var_val, var_val_len);
+        StorageTmp->expObjectDeltaDiscontinuityID =
+            netsnmp_memdup(var_val, var_val_len);
         StorageTmp->expObjectDeltaDiscontinuityIDLen =
             var_val_len / sizeof(oid);
         break;
@@ -1075,8 +1073,7 @@ write_expObjectConditional(int action,
          */
         tmpvar = StorageTmp->expObjectConditional;
         tmplen = StorageTmp->expObjectConditionalLen;
-        memdup((u_char **) & StorageTmp->expObjectConditional, var_val,
-               var_val_len);
+        StorageTmp->expObjectConditional = netsnmp_memdup(var_val, var_val_len);
         StorageTmp->expObjectConditionalLen = var_val_len / sizeof(oid);
         break;
 
diff --git a/agent/mibgroup/disman/mteObjectsTable.c b/agent/mibgroup/disman/mteObjectsTable.c
index c3f331d..09ceb2a 100644
--- a/agent/mibgroup/disman/mteObjectsTable.c
+++ b/agent/mibgroup/disman/mteObjectsTable.c
@@ -437,8 +437,7 @@ write_mteObjectsID(int action,
          */
         tmpvar = StorageTmp->mteObjectsID;
         tmplen = StorageTmp->mteObjectsIDLen;
-        memdup((u_char **) & StorageTmp->mteObjectsID, var_val,
-               var_val_len);
+        StorageTmp->mteObjectsID = netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteObjectsIDLen = var_val_len / sizeof(oid);
         break;
 
diff --git a/agent/mibgroup/disman/mteTriggerDeltaTable.c b/agent/mibgroup/disman/mteTriggerDeltaTable.c
index b5d2244..c829e6a 100644
--- a/agent/mibgroup/disman/mteTriggerDeltaTable.c
+++ b/agent/mibgroup/disman/mteTriggerDeltaTable.c
@@ -243,8 +243,8 @@ write_mteTriggerDeltaDiscontinuityID(int action,
          */
         tmpvar = StorageTmp->mteTriggerDeltaDiscontinuityID;
         tmplen = StorageTmp->mteTriggerDeltaDiscontinuityIDLen;
-        memdup((u_char **) & StorageTmp->mteTriggerDeltaDiscontinuityID,
-               var_val, var_val_len);
+        StorageTmp->mteTriggerDeltaDiscontinuityID =
+            netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteTriggerDeltaDiscontinuityIDLen =
             var_val_len / sizeof(oid);
         break;
diff --git a/agent/mibgroup/disman/mteTriggerExistenceTable.c b/agent/mibgroup/disman/mteTriggerExistenceTable.c
index fdfdaf2..4e6b64b 100644
--- a/agent/mibgroup/disman/mteTriggerExistenceTable.c
+++ b/agent/mibgroup/disman/mteTriggerExistenceTable.c
@@ -293,8 +293,8 @@ write_mteTriggerExistenceTest(int action,
          */
         tmpvar = StorageTmp->mteTriggerExistenceTest;
         tmplen = StorageTmp->mteTriggerExistenceTestLen;
-        memdup((u_char **) & StorageTmp->mteTriggerExistenceTest, var_val,
-               var_val_len);
+        StorageTmp->mteTriggerExistenceTest =
+            netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteTriggerExistenceTestLen = var_val_len;
         break;
 
@@ -385,8 +385,8 @@ write_mteTriggerExistenceStartup(int action,
          */
         tmpvar = StorageTmp->mteTriggerExistenceStartup;
         tmplen = StorageTmp->mteTriggerExistenceStartupLen;
-        memdup((u_char **) & StorageTmp->mteTriggerExistenceStartup,
-               var_val, var_val_len);
+        StorageTmp->mteTriggerExistenceStartup =
+            netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteTriggerExistenceStartupLen = var_val_len;
         break;
 
@@ -477,8 +477,8 @@ write_mteTriggerExistenceObjectsOwner(int action,
          */
         tmpvar = StorageTmp->mteTriggerExistenceObjectsOwner;
         tmplen = StorageTmp->mteTriggerExistenceObjectsOwnerLen;
-        memdup((u_char **) & StorageTmp->mteTriggerExistenceObjectsOwner,
-               var_val, var_val_len);
+        StorageTmp->mteTriggerExistenceObjectsOwner =
+            netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteTriggerExistenceObjectsOwnerLen = var_val_len;
         break;
 
@@ -569,8 +569,8 @@ write_mteTriggerExistenceObjects(int action,
          */
         tmpvar = StorageTmp->mteTriggerExistenceObjects;
         tmplen = StorageTmp->mteTriggerExistenceObjectsLen;
-        memdup((u_char **) & StorageTmp->mteTriggerExistenceObjects,
-               var_val, var_val_len);
+        StorageTmp->mteTriggerExistenceObjects =
+            netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteTriggerExistenceObjectsLen = var_val_len;
         break;
 
@@ -661,8 +661,8 @@ write_mteTriggerExistenceEventOwner(int action,
          */
         tmpvar = StorageTmp->mteTriggerExistenceEventOwner;
         tmplen = StorageTmp->mteTriggerExistenceEventOwnerLen;
-        memdup((u_char **) & StorageTmp->mteTriggerExistenceEventOwner,
-               var_val, var_val_len);
+        StorageTmp->mteTriggerExistenceEventOwner =
+            netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteTriggerExistenceEventOwnerLen = var_val_len;
         break;
 
@@ -752,8 +752,8 @@ write_mteTriggerExistenceEvent(int action,
          */
         tmpvar = StorageTmp->mteTriggerExistenceEvent;
         tmplen = StorageTmp->mteTriggerExistenceEventLen;
-        memdup((u_char **) & StorageTmp->mteTriggerExistenceEvent, var_val,
-               var_val_len);
+        StorageTmp->mteTriggerExistenceEvent =
+            netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteTriggerExistenceEventLen = var_val_len;
         break;
 
diff --git a/agent/mibgroup/disman/mteTriggerTable.c b/agent/mibgroup/disman/mteTriggerTable.c
index a2306f7..80a45a3 100644
--- a/agent/mibgroup/disman/mteTriggerTable.c
+++ b/agent/mibgroup/disman/mteTriggerTable.c
@@ -283,9 +283,8 @@ create_mteTriggerTable_data(void)
     StorageNew->mteTriggerObjectsOwner = strdup("");
     StorageNew->mteTriggerObjects = strdup("");
     StorageNew->mteTriggerEnabled = MTETRIGGERENABLED_FALSE;
-    memdup((unsigned char **)
-           &(StorageNew->mteTriggerDeltaDiscontinuityID),
-           (unsigned char *) sysUpTimeInstance, sizeof(sysUpTimeInstance));
+    StorageNew->mteTriggerDeltaDiscontinuityID =
+        netsnmp_memdup(sysUpTimeInstance, sizeof(sysUpTimeInstance));
     StorageNew->mteTriggerDeltaDiscontinuityIDLen =
         sizeof(sysUpTimeInstance) / sizeof(oid);
     StorageNew->mteTriggerDeltaDiscontinuityIDWildcard = TV_FALSE;
@@ -1678,8 +1677,7 @@ write_mteTriggerComment(int action,
          */
         tmpvar = StorageTmp->mteTriggerComment;
         tmplen = StorageTmp->mteTriggerCommentLen;
-        memdup((u_char **) & StorageTmp->mteTriggerComment, var_val,
-               var_val_len);
+        StorageTmp->mteTriggerComment = netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteTriggerCommentLen = var_val_len;
         break;
 
@@ -1766,8 +1764,7 @@ write_mteTriggerTest(int action,
          */
         tmpvar = StorageTmp->mteTriggerTest;
         tmplen = StorageTmp->mteTriggerTestLen;
-        memdup((u_char **) & StorageTmp->mteTriggerTest, var_val,
-               var_val_len);
+        StorageTmp->mteTriggerTest = netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteTriggerTestLen = var_val_len;
         break;
 
@@ -1939,8 +1936,7 @@ write_mteTriggerValueID(int action,
          */
         tmpvar = StorageTmp->mteTriggerValueID;
         tmplen = StorageTmp->mteTriggerValueIDLen;
-        memdup((u_char **) & StorageTmp->mteTriggerValueID, var_val,
-               var_val_len);
+        StorageTmp->mteTriggerValueID = netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteTriggerValueIDLen = var_val_len / sizeof(oid);
         break;
 
@@ -2118,8 +2114,7 @@ write_mteTriggerTargetTag(int action,
          */
         tmpvar = StorageTmp->mteTriggerTargetTag;
         tmplen = StorageTmp->mteTriggerTargetTagLen;
-        memdup((u_char **) & StorageTmp->mteTriggerTargetTag, var_val,
-               var_val_len);
+        StorageTmp->mteTriggerTargetTag = netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteTriggerTargetTagLen = var_val_len;
         break;
 
@@ -2208,8 +2203,8 @@ write_mteTriggerContextName(int action,
          */
         tmpvar = StorageTmp->mteTriggerContextName;
         tmplen = StorageTmp->mteTriggerContextNameLen;
-        memdup((u_char **) & StorageTmp->mteTriggerContextName, var_val,
-               var_val_len);
+        StorageTmp->mteTriggerContextName =
+            netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteTriggerContextNameLen = var_val_len;
         break;
 
@@ -2469,8 +2464,8 @@ write_mteTriggerObjectsOwner(int action,
          */
         tmpvar = StorageTmp->mteTriggerObjectsOwner;
         tmplen = StorageTmp->mteTriggerObjectsOwnerLen;
-        memdup((u_char **) & StorageTmp->mteTriggerObjectsOwner, var_val,
-               var_val_len);
+        StorageTmp->mteTriggerObjectsOwner =
+            netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteTriggerObjectsOwnerLen = var_val_len;
         break;
 
@@ -2559,8 +2554,7 @@ write_mteTriggerObjects(int action,
          */
         tmpvar = StorageTmp->mteTriggerObjects;
         tmplen = StorageTmp->mteTriggerObjectsLen;
-        memdup((u_char **) & StorageTmp->mteTriggerObjects, var_val,
-               var_val_len);
+        StorageTmp->mteTriggerObjects = netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteTriggerObjectsLen = var_val_len;
         break;
 
@@ -3133,16 +3127,17 @@ mte_get_response(struct mteTriggerTable_data *item, netsnmp_pdu *pdu)
     pdu->securityLevel = item->pdu_securityLevel;
     pdu->tDomain = item->pdu_tDomain;
     pdu->tDomainLen = item->pdu_tDomainLen;
-    memdup((u_char **) & pdu->transport_data, item->pdu_transport,
-           item->pdu_transportLen);
+    pdu->transport_data = netsnmp_memdup(item->pdu_transport,
+                                         item->pdu_transportLen);
     pdu->transport_data_length = item->pdu_transportLen;
-    memdup(&pdu->community, item->pdu_community, item->pdu_community_len);
+    pdu->community = netsnmp_memdup(item->pdu_community,
+                                    item->pdu_community_len);
     pdu->community_len = item->pdu_community_len;
-    memdup((u_char **) & pdu->contextName, item->mteTriggerContextName,
-           item->mteTriggerContextNameLen);
+    pdu->contextName = netsnmp_memdup(item->mteTriggerContextName,
+                                      item->mteTriggerContextNameLen);
     pdu->contextNameLen = item->mteTriggerContextNameLen;
-    memdup((u_char **) & pdu->securityName, item->pdu_securityName,
-           item->pdu_securityNameLen);
+    pdu->securityName = netsnmp_memdup(item->pdu_securityName,
+                                       item->pdu_securityNameLen);
     pdu->securityNameLen = item->pdu_securityNameLen;
     DEBUGMSGTL(("mteTriggerTable",
                 "accessing locally with secName \"%s\" community \"%s\"\n",
@@ -3460,9 +3455,8 @@ mte_run_trigger(unsigned int clientreg, void *clientarg)
          */
         if (response->errstat == SNMPERR_SUCCESS &&
             response->variables->val.integer)
-            memdup((unsigned char **) &value,
-                   (unsigned char *) response->variables->val.integer,
-                   sizeof(*response->variables->val.integer));
+            value = netsnmp_memdup(response->variables->val.integer,
+                                   sizeof(*response->variables->val.integer));
         else
             value = NULL;
 
diff --git a/agent/mibgroup/disman/mteTriggerThresholdTable.c b/agent/mibgroup/disman/mteTriggerThresholdTable.c
index 93c02b2..be963c1 100644
--- a/agent/mibgroup/disman/mteTriggerThresholdTable.c
+++ b/agent/mibgroup/disman/mteTriggerThresholdTable.c
@@ -837,8 +837,8 @@ write_mteTriggerThresholdObjectsOwner(int action,
          */
         tmpvar = StorageTmp->mteTriggerThresholdObjectsOwner;
         tmplen = StorageTmp->mteTriggerThresholdObjectsOwnerLen;
-        memdup((u_char **) & StorageTmp->mteTriggerThresholdObjectsOwner,
-               var_val, var_val_len);
+        StorageTmp->mteTriggerThresholdObjectsOwner =
+            netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteTriggerThresholdObjectsOwnerLen = var_val_len;
         break;
 
@@ -929,8 +929,8 @@ write_mteTriggerThresholdObjects(int action,
          */
         tmpvar = StorageTmp->mteTriggerThresholdObjects;
         tmplen = StorageTmp->mteTriggerThresholdObjectsLen;
-        memdup((u_char **) & StorageTmp->mteTriggerThresholdObjects,
-               var_val, var_val_len);
+        StorageTmp->mteTriggerThresholdObjects =
+            netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteTriggerThresholdObjectsLen = var_val_len;
         break;
 
@@ -1021,8 +1021,8 @@ write_mteTriggerThresholdRisingEventOwner(int action,
          */
         tmpvar = StorageTmp->mteTriggerThresholdRisingEventOwner;
         tmplen = StorageTmp->mteTriggerThresholdRisingEventOwnerLen;
-        memdup((u_char **) & StorageTmp->
-               mteTriggerThresholdRisingEventOwner, var_val, var_val_len);
+        StorageTmp->mteTriggerThresholdRisingEventOwner =
+            netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteTriggerThresholdRisingEventOwnerLen = var_val_len;
         break;
 
@@ -1113,8 +1113,8 @@ write_mteTriggerThresholdRisingEvent(int action,
          */
         tmpvar = StorageTmp->mteTriggerThresholdRisingEvent;
         tmplen = StorageTmp->mteTriggerThresholdRisingEventLen;
-        memdup((u_char **) & StorageTmp->mteTriggerThresholdRisingEvent,
-               var_val, var_val_len);
+        StorageTmp->mteTriggerThresholdRisingEvent =
+            netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteTriggerThresholdRisingEventLen = var_val_len;
         break;
 
@@ -1205,8 +1205,8 @@ write_mteTriggerThresholdFallingEventOwner(int action,
          */
         tmpvar = StorageTmp->mteTriggerThresholdFallingEventOwner;
         tmplen = StorageTmp->mteTriggerThresholdFallingEventOwnerLen;
-        memdup((u_char **) & StorageTmp->
-               mteTriggerThresholdFallingEventOwner, var_val, var_val_len);
+        StorageTmp->mteTriggerThresholdFallingEventOwner =
+            netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteTriggerThresholdFallingEventOwnerLen = var_val_len;
         break;
 
@@ -1297,8 +1297,8 @@ write_mteTriggerThresholdFallingEvent(int action,
          */
         tmpvar = StorageTmp->mteTriggerThresholdFallingEvent;
         tmplen = StorageTmp->mteTriggerThresholdFallingEventLen;
-        memdup((u_char **) & StorageTmp->mteTriggerThresholdFallingEvent,
-               var_val, var_val_len);
+        StorageTmp->mteTriggerThresholdFallingEvent =
+            netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteTriggerThresholdFallingEventLen = var_val_len;
         break;
 
@@ -1389,9 +1389,8 @@ write_mteTriggerThresholdDeltaRisingEventOwner(int action,
          */
         tmpvar = StorageTmp->mteTriggerThresholdDeltaRisingEventOwner;
         tmplen = StorageTmp->mteTriggerThresholdDeltaRisingEventOwnerLen;
-        memdup((u_char **) & StorageTmp->
-               mteTriggerThresholdDeltaRisingEventOwner, var_val,
-               var_val_len);
+        StorageTmp->mteTriggerThresholdDeltaRisingEventOwner =
+            netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteTriggerThresholdDeltaRisingEventOwnerLen =
             var_val_len;
         break;
@@ -1483,8 +1482,8 @@ write_mteTriggerThresholdDeltaRisingEvent(int action,
          */
         tmpvar = StorageTmp->mteTriggerThresholdDeltaRisingEvent;
         tmplen = StorageTmp->mteTriggerThresholdDeltaRisingEventLen;
-        memdup((u_char **) & StorageTmp->
-               mteTriggerThresholdDeltaRisingEvent, var_val, var_val_len);
+        StorageTmp->mteTriggerThresholdDeltaRisingEvent =
+            netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteTriggerThresholdDeltaRisingEventLen = var_val_len;
         break;
 
@@ -1576,9 +1575,8 @@ write_mteTriggerThresholdDeltaFallingEventOwner(int action,
          */
         tmpvar = StorageTmp->mteTriggerThresholdDeltaFallingEventOwner;
         tmplen = StorageTmp->mteTriggerThresholdDeltaFallingEventOwnerLen;
-        memdup((u_char **) & StorageTmp->
-               mteTriggerThresholdDeltaFallingEventOwner, var_val,
-               var_val_len);
+        StorageTmp->mteTriggerThresholdDeltaFallingEventOwner =
+            netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteTriggerThresholdDeltaFallingEventOwnerLen =
             var_val_len;
         break;
@@ -1670,8 +1668,8 @@ write_mteTriggerThresholdDeltaFallingEvent(int action,
          */
         tmpvar = StorageTmp->mteTriggerThresholdDeltaFallingEvent;
         tmplen = StorageTmp->mteTriggerThresholdDeltaFallingEventLen;
-        memdup((u_char **) & StorageTmp->
-               mteTriggerThresholdDeltaFallingEvent, var_val, var_val_len);
+        StorageTmp->mteTriggerThresholdDeltaFallingEvent =
+            netsnmp_memdup(var_val, var_val_len);
         StorageTmp->mteTriggerThresholdDeltaFallingEventLen = var_val_len;
         break;
 
diff --git a/agent/mibgroup/disman/nslookup/lookupCtlTable.c b/agent/mibgroup/disman/nslookup/lookupCtlTable.c
index 3048999..0f71da6 100644
--- a/agent/mibgroup/disman/nslookup/lookupCtlTable.c
+++ b/agent/mibgroup/disman/nslookup/lookupCtlTable.c
@@ -530,7 +530,7 @@ run_lookup(struct lookupTable_data *item)
         struct in_addr addr_in;
         struct hostent *lookup;
 
-        if (!inet_aton(address, &addr_in)) {
+        if (inet_pton(AF_INET, address, &addr_in) != 1) {
             DEBUGMSGTL(("lookupResultsTable", "Invalid argument: %s\n",
                         address));
             modify_lookupCtlRc(item, 99);
diff --git a/agent/mibgroup/disman/ping/pingCtlTable.c b/agent/mibgroup/disman/ping/pingCtlTable.c
index b9add8f..87b09ef 100644
--- a/agent/mibgroup/disman/ping/pingCtlTable.c
+++ b/agent/mibgroup/disman/ping/pingCtlTable.c
@@ -1453,9 +1453,10 @@ proc_v4(char *ptr, ssize_t len, struct timeval *tvrecv, time_t timep,
 
 	    StorageNew->pingResultsLastGoodProbe_time = timep;
             free(StorageNew->pingResultsLastGoodProbe);
-            memdup(&StorageNew->pingResultsLastGoodProbe,
-		date_n_time(&timep,
-		    &StorageNew->pingResultsLastGoodProbeLen), 11);
+            StorageNew->pingResultsLastGoodProbe =
+                netsnmp_memdup(date_n_time(&timep,
+                                      &StorageNew->pingResultsLastGoodProbeLen),
+                               11);
 
             temp = SNMP_MALLOC_STRUCT(pingProbeHistoryTable_data);
 
@@ -1489,8 +1490,10 @@ proc_v4(char *ptr, ssize_t len, struct timeval *tvrecv, time_t timep,
             temp->pingProbeHistoryLastRC = 0;
 
 	    temp->pingProbeHistoryTime_time = timep;
-	    memdup(&temp->pingProbeHistoryTime,
-		date_n_time(&timep, &temp->pingProbeHistoryTimeLen), 11);
+            temp->pingProbeHistoryTime = 
+                netsnmp_memdup(date_n_time(&timep,
+                                           &temp->pingProbeHistoryTimeLen),
+                               11);
 
             if (StorageNew->pingResultsSendProbes == 1)
                 item->pingProbeHis = temp;
@@ -1568,8 +1571,9 @@ proc_v4(char *ptr, ssize_t len, struct timeval *tvrecv, time_t timep,
         temp->pingProbeHistoryLastRC = 1;
 
 	temp->pingProbeHistoryTime_time = timep;
-	memdup(&temp->pingProbeHistoryTime,
-	    date_n_time(&timep, &temp->pingProbeHistoryTimeLen), 11);
+	temp->pingProbeHistoryTime =
+            netsnmp_memdup(date_n_time(&timep, &temp->pingProbeHistoryTimeLen),
+                           11);
 
         if (StorageNew->pingResultsSendProbes == 1)
             item->pingProbeHis = temp;
@@ -5027,8 +5031,10 @@ main_loop(struct pingCtlTable_data *item, int icmp_sock, int preload,
                     temp->pingProbeHistoryLastRC = 1;
 
 		    temp->pingProbeHistoryTime_time = timep;
-		    memdup(&temp->pingProbeHistoryTime,
-			date_n_time(&timep, &temp->pingProbeHistoryTimeLen), 11);
+                    temp->pingProbeHistoryTime =
+                        netsnmp_memdup(date_n_time(&timep,
+                                               &temp->pingProbeHistoryTimeLen),
+                                       11);
 
                     if (StorageNew->pingResultsSendProbes == 1)
                         item->pingProbeHis = temp;
@@ -5320,8 +5326,10 @@ gather_statistics(int *series, struct pingCtlTable_data *item, __u8 * ptr,
 
     StorageNew->pingResultsLastGoodProbe_time = timep;
     free(StorageNew->pingResultsLastGoodProbe);
-    memdup(&StorageNew->pingResultsLastGoodProbe,
-	date_n_time(&timep, &StorageNew->pingResultsLastGoodProbeLen), 11);
+    StorageNew->pingResultsLastGoodProbe =
+        netsnmp_memdup(date_n_time(&timep,
+                                   &StorageNew->pingResultsLastGoodProbeLen),
+                       11);
 
     /* ProbeHistory               */
     if (item->pingCtlMaxRows != 0) {
@@ -5356,8 +5364,9 @@ gather_statistics(int *series, struct pingCtlTable_data *item, __u8 * ptr,
         temp->pingProbeHistoryLastRC = 0;
 
 	temp->pingProbeHistoryTime_time = timep;
-	memdup(&temp->pingProbeHistoryTime,
-	    date_n_time(&timep, &temp->pingProbeHistoryTimeLen), 11);
+	temp->pingProbeHistoryTime =
+            netsnmp_memdup(date_n_time(&timep, &temp->pingProbeHistoryTimeLen),
+                           11);
 
         if (StorageNew->pingResultsSendProbes == 1)
             item->pingProbeHis = temp;
diff --git a/agent/mibgroup/disman/traceroute/traceRouteCtlTable.c b/agent/mibgroup/disman/traceroute/traceRouteCtlTable.c
index 04143eb..b925c5e 100644
--- a/agent/mibgroup/disman/traceroute/traceRouteCtlTable.c
+++ b/agent/mibgroup/disman/traceroute/traceRouteCtlTable.c
@@ -4480,7 +4480,7 @@ run_traceRoute(unsigned int clientreg, void *clientarg)
                             if (old_HopsAddress[k] == NULL) {
                                 exit(1);
                             }
-                            memdup((u_char **) & old_HopsAddress[k],
+                            old_HopsAddress[k] = netsnmp_memdup(
                                    StorageTmp->traceRouteHopsIpTgtAddress,
                                    StorageTmp->
                                    traceRouteHopsIpTgtAddressLen + 1);
@@ -4767,9 +4767,10 @@ run_traceRoute(unsigned int clientreg, void *clientarg)
                     temp_his->traceRouteProbeHistoryLastRC = 0;
 
 		    temp_his->traceRouteProbeHistoryTime_time = timep;
-                    memdup(&temp_his->traceRouteProbeHistoryTime,
-                        date_n_time(&timep,
-			    &temp_his->traceRouteProbeHistoryTimeLen), 11);
+                    temp_his->traceRouteProbeHistoryTime =
+                        netsnmp_memdup(date_n_time(&timep,
+                                      &temp_his->traceRouteProbeHistoryTimeLen),
+                                       11);
                     if (probe == 0)
                         item->traceRouteProbeHis = temp_his;
                     else {
@@ -4843,9 +4844,10 @@ run_traceRoute(unsigned int clientreg, void *clientarg)
                     current->traceRouteHopsSentProbes = probe + 1;
                     current->traceRouteHopsProbeResponses = responseProbe;
 		    current->traceRouteHopsLastGoodProbe_time = timep;
-                    memdup(&current->traceRouteHopsLastGoodProbe,
-                        date_n_time(&timep,
-			    &current->traceRouteHopsLastGoodProbeLen), 11);
+                    current->traceRouteHopsLastGoodProbe =
+                        netsnmp_memdup(date_n_time(&timep,
+                                      &current->traceRouteHopsLastGoodProbeLen),
+                                       11);
                 }
 
                 (void) fflush(stdout);
@@ -4864,9 +4866,11 @@ run_traceRoute(unsigned int clientreg, void *clientarg)
                         StorageResults->traceRouteResultsTestSuccesses + 1;
 
 		    StorageResults->traceRouteResultsLastGoodPath_time = timep;
-                    memdup(&StorageResults->traceRouteResultsLastGoodPath,
-                        date_n_time(&timep,
-			    &StorageResults->traceRouteResultsLastGoodPathLen), 11);
+                    StorageResults->traceRouteResultsLastGoodPath =
+                        netsnmp_memdup(date_n_time(&timep,
+                                              &StorageResults->
+                                              traceRouteResultsLastGoodPathLen),
+                                       11);
                     if ((item->
                          traceRouteCtlTrapGeneration[0] &
                          TRACEROUTETRAPGENERATION_TESTCOMPLETED) != 0) {
@@ -5164,7 +5168,7 @@ run_traceRoute(unsigned int clientreg, void *clientarg)
                             if (old_HopsAddress[k] == NULL) {
                                 exit(1);
                             }
-                            memdup((u_char **) & old_HopsAddress[k],
+                            old_HopsAddress[k] = netsnmp_memdup(
                                    StorageTmp->traceRouteHopsIpTgtAddress,
                                    StorageTmp->
                                    traceRouteHopsIpTgtAddressLen + 1);
@@ -5401,7 +5405,7 @@ run_traceRoute(unsigned int clientreg, void *clientarg)
                     temp_his->traceRouteProbeHistoryLastRC = 0;
 
 		    temp_his->traceRouteProbeHistoryTime_time = timep;
-                    memdup(&temp_his->traceRouteProbeHistoryTime,
+                    temp_his->traceRouteProbeHistoryTime = netsnmp_memdup(
                         date_n_time(&timep,
 			    &temp_his->traceRouteProbeHistoryTimeLen), 11);
 
@@ -5477,8 +5481,8 @@ run_traceRoute(unsigned int clientreg, void *clientarg)
                     current->traceRouteHopsSentProbes = probe + 1;
                     current->traceRouteHopsProbeResponses = responseProbe;
 		    current->traceRouteHopsLastGoodProbe_time = timep;
-                    memdup(&current->traceRouteHopsLastGoodProbe,
-                        date_n_time(&timep,
+                    current->traceRouteHopsLastGoodProbe = 
+                        netsnmp_memdup(date_n_time(&timep,
 			    &current->traceRouteHopsLastGoodProbeLen), 11);
 
                     snmp_free_varbind(vars_hops);
@@ -5501,9 +5505,11 @@ run_traceRoute(unsigned int clientreg, void *clientarg)
                     StorageResults->traceRouteResultsTestSuccesses =
                         StorageResults->traceRouteResultsTestSuccesses + 1;
 		    StorageResults->traceRouteResultsLastGoodPath_time = timep;
-                    memdup(&StorageResults->traceRouteResultsLastGoodPath,
-                        date_n_time(&timep,
-			    &StorageResults->traceRouteResultsLastGoodPathLen), 11);
+                    StorageResults->traceRouteResultsLastGoodPath =
+                        netsnmp_memdup(date_n_time(&timep,
+                                                   &StorageResults->
+                                              traceRouteResultsLastGoodPathLen),
+                                       11);
                     if ((item->
                          traceRouteCtlTrapGeneration[0] &
                          TRACEROUTETRAPGENERATION_TESTCOMPLETED) != 0) {
diff --git a/agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.c b/agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.c
index 00f4bc3..6eb69f7 100644
--- a/agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.c
+++ b/agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.c
@@ -39,7 +39,8 @@ dot3stats_interface_name_list_get (struct ifname *list_head, int *retval)
     for (p = addrs; p; p = p->ifa_next) {
 
         if (!list_head) {
-            if ( (list_head = (struct ifname *) malloc (sizeof(struct ifname))) < 0) {
+            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");
@@ -59,7 +60,8 @@ dot3stats_interface_name_list_get (struct ifname *list_head, int *retval)
         if (nameptr1)
             continue;
 
-        if ( (nameptr2->ifn_next = (struct ifname *) malloc (sizeof(struct ifname))) < 0) {
+        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");
@@ -440,7 +442,7 @@ _dot3Stats_netlink_get_errorcntrs(dot3StatsTable_rowreq_ctx *rowreq_ctx, const c
         {
             dot3StatsTable_data *data = &rowreq_ctx->data;
 
-            snmp_log(LOG_ERR, "IFLA_STATS for %s\n", name);
+            DEBUGMSGTL(("access:dot3StatsTable", "IFLA_STATS for %s\n", name));
 
             data->dot3StatsFCSErrors = ke->stats.rx_crc_errors;
             rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSFCSERRORS_FLAG;
@@ -527,7 +529,7 @@ interface_dot3stats_get_errorcounters (dot3StatsTable_rowreq_ctx *rowreq_ctx, co
 
     if (_dot3Stats_netlink_get_errorcntrs(rowreq_ctx, name) == 0)
     {
-        snmp_log(LOG_NOTICE, "interface_dot3stats_get_errorcounters: got data from IFLA_STATS\n");
+        DEBUGMSGTL(("access:dot3StatsTable", "interface_dot3stats_get_errorcounters: got data from IFLA_STATS\n"));
         return;
     }
 
diff --git a/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable_data_access.c b/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable_data_access.c
index 5414001..74f33bf 100644
--- a/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable_data_access.c
+++ b/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable_data_access.c
@@ -211,7 +211,6 @@ dot3StatsTable_container_shutdown(netsnmp_container * container_ptr)
 int
 dot3StatsTable_container_load(netsnmp_container * container)
 {
-    dot3StatsTable_rowreq_ctx *rowreq_ctx;
     size_t          count = 0;
     int             fd;
 #if defined(linux)
@@ -269,6 +268,8 @@ dot3StatsTable_container_load(netsnmp_container * container)
      */
 
     for (p = list_head; p; p = p->ifn_next) {
+        dot3StatsTable_rowreq_ctx *rowreq_ctx;
+
         DEBUGMSGTL(("access:dot3StatsTable", "processing '%s'\n", p->name));
 
         /*
diff --git a/agent/mibgroup/examples/delayed_instance.c b/agent/mibgroup/examples/delayed_instance.c
index ea59502..5d54569 100644
--- a/agent/mibgroup/examples/delayed_instance.c
+++ b/agent/mibgroup/examples/delayed_instance.c
@@ -195,8 +195,7 @@ return_delayed_response(unsigned int clientreg, void *clientarg)
         /*
          * store old value for UNDO support in the future. 
          */
-        memdup((u_char **) & delay_time_cache,
-               (u_char *) & delay_time, sizeof(delay_time));
+        delay_time_cache = netsnmp_memdup(&delay_time, sizeof(delay_time));
 
         /*
          * malloc failed 
diff --git a/agent/mibgroup/examples/example.c b/agent/mibgroup/examples/example.c
index 50b7e7d..dd97daf 100644
--- a/agent/mibgroup/examples/example.c
+++ b/agent/mibgroup/examples/example.c
@@ -370,8 +370,12 @@ var_example(struct variable *vp,
         /*
          * we're returning 127.0.0.1 
          */
-        long_ret = ntohl(INADDR_LOOPBACK);
-        return (u_char *) & long_ret;
+        {
+            in_addr_t addr = ntohl(INADDR_LOOPBACK);
+            memcpy(string, &addr, sizeof(addr));
+            *var_len = sizeof(addr);
+        }
+        return (u_char *) string;
 
     case EXAMPLECOUNTER:
         long_ret = 42;
@@ -602,10 +606,10 @@ write_exampletrap(int action,
  * second since the netwok management portion of system was last
  * reinitialized.  - snmpTrapOID.0 which is part of the trap group SNMPv2
  * MIB whose value is the object-id of the specific trap you have defined
- * in your own MIB.  Other variables can be added to caracterize the
+ * in your own MIB.  Other variables can be added to characterize the
  * trap.
  * 
- * The function send_v2trap adds automaticallys the two objects but the
+ * The function send_v2trap adds automatically the two objects but the
  * value of snmpTrapOID.0 is 0.0 by default. If you want to add your trap
  * name, you have to reconstruct this object and to add your own
  * variable.
diff --git a/agent/mibgroup/examples/netSnmpHostsTable.c b/agent/mibgroup/examples/netSnmpHostsTable.c
index f2aa0c7..8ea2d03 100644
--- a/agent/mibgroup/examples/netSnmpHostsTable.c
+++ b/agent/mibgroup/examples/netSnmpHostsTable.c
@@ -259,8 +259,7 @@ netSnmpHostsTable_handler(netsnmp_mib_handler *handler,
                     if (retval) {
                         ui = SNMP_MALLOC_STRUCT(undoInfo);
                         ui->len = retval_len;
-                        memdup((u_char **) & ui->ptr,
-                               (u_char *) retval, ui->len);
+                        ui->ptr = netsnmp_memdup(retval, ui->len);
                     }
 
                     /** check the new value, possibly against the
@@ -298,8 +297,7 @@ netSnmpHostsTable_handler(netsnmp_mib_handler *handler,
                     if (retval) {
                         ui = SNMP_MALLOC_STRUCT(undoInfo);
                         ui->len = retval_len;
-                        memdup((u_char **) & ui->ptr,
-                               (u_char *) retval, ui->len);
+                        ui->ptr = netsnmp_memdup(retval, ui->len);
                     }
 
                     /** check the new value, possibly against the
@@ -336,8 +334,7 @@ netSnmpHostsTable_handler(netsnmp_mib_handler *handler,
                     if (retval) {
                         ui = SNMP_MALLOC_STRUCT(undoInfo);
                         ui->len = retval_len;
-                        memdup((u_char **) & ui->ptr,
-                               (u_char *) retval, ui->len);
+                        ui->ptr = netsnmp_memdup(retval, ui->len);
                     }
 
                     /** check the new value, possibly against the
@@ -374,8 +371,7 @@ netSnmpHostsTable_handler(netsnmp_mib_handler *handler,
                     if (retval) {
                         ui = SNMP_MALLOC_STRUCT(undoInfo);
                         ui->len = retval_len;
-                        memdup((u_char **) & ui->ptr,
-                               (u_char *) retval, ui->len);
+                        ui->ptr = netsnmp_memdup(retval, ui->len);
                     }
 
                     /** check the new value, possibly against the
diff --git a/agent/mibgroup/hardware/cpu/cpu_kstat.c b/agent/mibgroup/hardware/cpu/cpu_kstat.c
index 049864c..33f188e 100644
--- a/agent/mibgroup/hardware/cpu/cpu_kstat.c
+++ b/agent/mibgroup/hardware/cpu/cpu_kstat.c
@@ -131,6 +131,8 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) {
                  */
             cpu->swapIn       += (unsigned long long)cs.cpu_vminfo.swapin;
             cpu->swapOut      += (unsigned long long)cs.cpu_vminfo.swapout;
+            cpu->pageIn       += (unsigned long long)cs.cpu_sysinfo.bread;
+            cpu->pageOut      += (unsigned long long)cs.cpu_sysinfo.bwrite;
             cpu->nInterrupts  += (unsigned long long)cs.cpu_sysinfo.intr;
             cpu->nCtxSwitches += (unsigned long long)cs.cpu_sysinfo.pswitch;
         }
diff --git a/agent/mibgroup/hardware/cpu/cpu_linux.c b/agent/mibgroup/hardware/cpu/cpu_linux.c
index 8a081cd..b1dc308 100644
--- a/agent/mibgroup/hardware/cpu/cpu_linux.c
+++ b/agent/mibgroup/hardware/cpu/cpu_linux.c
@@ -154,7 +154,9 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) {
                 snmp_log_perror("Missing CPU info entry");
                 break;
             }
-            b1 = b2+5; /* Skip "cpuN " */
+            b1 = b2; /* Skip "cpuN " */
+            while(*b1 != ' ') b1++;
+            b1++;
         }
 
         num_cpuline_elem = sscanf(b1, "%llu %llu %llu %llu %llu %llu %llu %llu %llu %llu",
@@ -163,27 +165,27 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) {
 
         /* kernel 2.6.33 and above */
         if (num_cpuline_elem == 10) {
-            cpu->guestnice_ticks = (unsigned long long)cguest_nicell;
+            cpu->guestnice_ticks = cguest_nicell;
         }
         /* kernel 2.6.24 and above */
         if (num_cpuline_elem >= 9) {
-            cpu->guest_ticks = (unsigned long long)cguestll;
+            cpu->guest_ticks = cguestll;
         }
         /* kernel 2.6.11 and above */
         if (num_cpuline_elem >= 8) {
-            cpu->steal_ticks = (unsigned long long)cstealll;
+            cpu->steal_ticks = cstealll;
         }
         /* kernel 2.6 */
         if (num_cpuline_elem >= 5) {
-            cpu->wait_ticks   = (unsigned long long)ciowll;
-            cpu->intrpt_ticks = (unsigned long long)cirqll;
-            cpu->sirq_ticks   = (unsigned long long)csoftll;
+            cpu->wait_ticks   = ciowll;
+            cpu->intrpt_ticks = cirqll;
+            cpu->sirq_ticks   = csoftll;
         }
         /* rest */
-        cpu->user_ticks = (unsigned long long)cusell;
-        cpu->nice_ticks = (unsigned long long)cicell;
-        cpu->sys_ticks  = (unsigned long long)csysll;
-        cpu->idle_ticks = (unsigned long long)cidell;
+        cpu->user_ticks = cusell;
+        cpu->nice_ticks = cicell;
+        cpu->sys_ticks  = csysll;
+        cpu->idle_ticks = cidell;
     }
     if ( b1 == buff ) {
 	if (first)
diff --git a/agent/mibgroup/hardware/cpu/cpu_mach.c b/agent/mibgroup/hardware/cpu/cpu_mach.c
index d527b3d..7f090c9 100644
--- a/agent/mibgroup/hardware/cpu/cpu_mach.c
+++ b/agent/mibgroup/hardware/cpu/cpu_mach.c
@@ -108,6 +108,7 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) {
     cpu0->pageIn = vmstat.pageins;
     cpu0->pageOut = vmstat.pageouts;
 	/* not implemented: swapIn, swapOut, nInterrupts, nCtxSwitches */
+    return 1;
 }
 
  	  	 
diff --git a/agent/mibgroup/hardware/cpu/cpu_perfstat.c b/agent/mibgroup/hardware/cpu/cpu_perfstat.c
index 5f58190..5fdd531 100644
--- a/agent/mibgroup/hardware/cpu/cpu_perfstat.c
+++ b/agent/mibgroup/hardware/cpu/cpu_perfstat.c
@@ -90,7 +90,7 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) {
     strcpy( name.name, "");
     if (perfstat_cpu(&name, cs2, sizeof(perfstat_cpu_t), n) > 0) {
         for ( i = 0; i < n; i++ ) {
-            cpu = netsnmp_cpu_get_byIdx( i, 0 );
+            cpu = netsnmp_cpu_get_byIdx( i, 1 );
             cpu->user_ticks = (unsigned long long)cs2[i].user;
             cpu->sys_ticks  = (unsigned long long)cs2[i].sys + (unsigned long long)cs2[i].wait;
             cpu->kern_ticks = (unsigned long long)cs2[i].sys;
diff --git a/agent/mibgroup/hardware/cpu/cpu_pstat.c b/agent/mibgroup/hardware/cpu/cpu_pstat.c
index 35c1d63..d550450 100644
--- a/agent/mibgroup/hardware/cpu/cpu_pstat.c
+++ b/agent/mibgroup/hardware/cpu/cpu_pstat.c
@@ -22,6 +22,7 @@
 void init_cpu_pstat( void ) {
     int                   i, cpuversion;
     struct pst_dynamic    psd;
+    struct pst_processor  *psp;
     char                  descr[ SNMP_MAXBUF ];
     netsnmp_cpu_info     *cpu = netsnmp_cpu_get_byIdx( -1, 1 );
     strcpy(cpu->name, "Overall CPU statistics");
@@ -31,31 +32,49 @@ void init_cpu_pstat( void ) {
     switch (cpuversion) {
     case CPU_HP_MC68020:
         snprintf(descr, SNMP_MAXBUF, " Motorola MC68020 ");
+        break;
     case CPU_HP_MC68030:
         snprintf(descr, SNMP_MAXBUF, " Motorola MC68030 ");
+        break;
     case CPU_HP_MC68040:
         snprintf(descr, SNMP_MAXBUF, " Motorola MC68040 ");
+        break;
     case CPU_PA_RISC1_0:
         snprintf(descr, SNMP_MAXBUF, " HP PA-RISC 1.0 ");
+        break;
     case CPU_PA_RISC1_1:
         snprintf(descr, SNMP_MAXBUF, " HP PA-RISC 1.1 ");
+        break;
     case CPU_PA_RISC1_2:
         snprintf(descr, SNMP_MAXBUF, " HP PA-RISC 1.2 ");
+        break;
     case CPU_PA_RISC2_0:
         snprintf(descr, SNMP_MAXBUF, " HP PA-RISC 2.0 ");
+        break;
     default:
         snprintf(descr, SNMP_MAXBUF, "An electronic chip with an HP label");
+        break;
     }
 #else
     snprintf(descr, SNMP_MAXBUF, "An electronic chip without(?) an HP label");
 #endif
 
+    (void)memset(&psd, 0, sizeof(struct pst_dynamic));
     if (pstat_getdynamic(&psd, sizeof(psd), 1, 0) > 0) {
-        for ( i = 0; i < psd.psd_proc_cnt; i++ ) {
-            cpu = netsnmp_cpu_get_byIdx( i, 1 );
-            sprintf( cpu->name, "cpu%d", i );
-            sprintf( cpu->descr, descr );
+        size_t nspu = psd.psd_max_proc_cnt;
+        psp = (struct pst_processor *)
+                malloc(nspu * sizeof(struct pst_processor));
+        (void)memset(psp, 0, nspu * sizeof(struct pst_processor));
+        if (pstat_getprocessor(psp, sizeof(struct pst_processor), nspu, 0) != -1) {
+            for (i = 0; i < nspu; i++) {
+                if (psp[i].psp_processor_state == PSP_SPU_ENABLED) {
+                    cpu = netsnmp_cpu_get_byIdx( i, 1 );
+                    sprintf( cpu->name, "cpu%d", i );
+                    sprintf( cpu->descr, descr );
+                }
+            }
         }
+        free(psp);
     }
     cpu_num = psd.psd_proc_cnt;
 }
@@ -64,45 +83,56 @@ void init_cpu_pstat( void ) {
     /*
      * Load the latest CPU usage statistics
      */
-int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) {
+int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) 
+{
     int                   i;
     struct pst_dynamic    psd;
+    struct pst_processor  *psp;
     struct pst_vminfo     psv;
     netsnmp_cpu_info *cpu = netsnmp_cpu_get_byIdx( -1, 0 );
 
-    pstat_getdynamic(&psd, sizeof(psd), 1, 0);
-    /* XXX - Compare cpu_num against psd.psd_proc_cnt */
-    cpu->user_ticks = (unsigned long long)psd.psd_cpu_time[CP_USER];
-    cpu->nice_ticks = (unsigned long long)psd.psd_cpu_time[CP_NICE];
-    cpu->sys2_ticks = (unsigned long long)psd.psd_cpu_time[CP_SYS]+
-                                     psd.psd_cpu_time[CP_WAIT];
-    cpu->idle_ticks = (unsigned long long)psd.psd_cpu_time[CP_IDLE];
-    cpu->wait_ticks = (unsigned long long)psd.psd_cpu_time[CP_WAIT];
-    cpu->kern_ticks = (unsigned long long)psd.psd_cpu_time[CP_SYS];
-        /* XXX - record (sum of) "all other ticks" */
-        /* intrpt_ticks, sirq_ticks unused */
+    if (pstat_getdynamic(&psd, sizeof(psd), 1, 0) > 0) {
+        size_t nspu = psd.psd_max_proc_cnt;
+        /* XXX - Compare cpu_num against psd.psd_proc_cnt */
+        cpu->user_ticks = (unsigned long long)psd.psd_cpu_time[CP_USER];
+        cpu->nice_ticks = (unsigned long long)psd.psd_cpu_time[CP_NICE];
+        cpu->sys2_ticks = (unsigned long long)psd.psd_cpu_time[CP_SYS]+
+                          (unsigned long long)psd.psd_cpu_time[CP_WAIT];
+        cpu->idle_ticks = (unsigned long long)psd.psd_cpu_time[CP_IDLE];
+        cpu->wait_ticks = (unsigned long long)psd.psd_cpu_time[CP_WAIT];
+        cpu->kern_ticks = (unsigned long long)psd.psd_cpu_time[CP_SYS];
+            /* XXX - record (sum of) "all other ticks" */
+            /* intrpt_ticks, sirq_ticks unused */
 
-        /*
-         * Interrupt/Context Switch statistics
-         *   XXX - Do these really belong here ?
-         */
-    pstat_getvminfo(&psv, sizeof(psv), 1, 0);
-    cpu->swapIn  = (unsigned long long)psv.psv_sswpin;
-    cpu->swapOut = (unsigned long long)psv.psv_sswpout;
-    cpu->nInterrupts  = (unsigned long long)psv.psv_sintr;
-    cpu->nCtxSwitches = (unsigned long long)psv.psv_sswtch;
+            /*
+             * Interrupt/Context Switch statistics
+             *   XXX - Do these really belong here ?
+             */
+        pstat_getvminfo(&psv, sizeof(psv), 1, 0);
+        cpu->swapIn  = (unsigned long long)psv.psv_sswpin;
+        cpu->swapOut = (unsigned long long)psv.psv_sswpout;
+        cpu->nInterrupts  = (unsigned long long)psv.psv_sintr;
+        cpu->nCtxSwitches = (unsigned long long)psv.psv_sswtch;
 
+        psp = (struct pst_processor *)
+                malloc(nspu * sizeof(struct pst_processor));
+        (void)memset(psp, 0, nspu * sizeof(struct pst_processor));
 
-    for ( i = 0; i < psd.psd_proc_cnt; i++ ) {
-        cpu = netsnmp_cpu_get_byIdx( i, 0 );
-        cpu->user_ticks = (unsigned long long)psd.psd_mp_cpu_time[i][CP_USER];
-        cpu->nice_ticks = (unsigned long long)psd.psd_mp_cpu_time[i][CP_NICE];
-        cpu->sys2_ticks = (unsigned long long)psd.psd_mp_cpu_time[i][CP_SYS]+
-                                         psd.psd_mp_cpu_time[i][CP_WAIT];
-        cpu->idle_ticks = (unsigned long long)psd.psd_mp_cpu_time[i][CP_IDLE];
-        cpu->wait_ticks = (unsigned long long)psd.psd_mp_cpu_time[i][CP_WAIT];
-        cpu->kern_ticks = (unsigned long long)psd.psd_mp_cpu_time[i][CP_SYS];
-        /* XXX - record (sum of) "all other ticks" */
+        if (pstat_getprocessor(psp, sizeof(struct pst_processor), nspu, 0) != -1) {
+            for (i = 0; i < nspu; i++) {
+                if (psp[i].psp_processor_state == PSP_SPU_ENABLED) {
+                    cpu = netsnmp_cpu_get_byIdx( i, 0 );
+                    cpu->user_ticks = (unsigned long long)psp[i].psp_cpu_time[CP_USER];
+                    cpu->nice_ticks = (unsigned long long)psp[i].psp_cpu_time[CP_NICE];
+                    cpu->sys2_ticks = (unsigned long long)psp[i].psp_cpu_time[CP_SYS]+
+                                      (unsigned long long)psp[i].psp_cpu_time[CP_WAIT];
+                    cpu->idle_ticks = (unsigned long long)psp[i].psp_cpu_time[CP_IDLE];
+                    cpu->wait_ticks = (unsigned long long)psp[i].psp_cpu_time[CP_WAIT];
+                    cpu->kern_ticks = (unsigned long long)psp[i].psp_cpu_time[CP_SYS];
+                }
+            }
+        }
+        free(psp);
     }
 
     return 0;
diff --git a/agent/mibgroup/hardware/cpu/cpu_sysctl.c b/agent/mibgroup/hardware/cpu/cpu_sysctl.c
index 5599a58..5ecb68e 100644
--- a/agent/mibgroup/hardware/cpu/cpu_sysctl.c
+++ b/agent/mibgroup/hardware/cpu/cpu_sysctl.c
@@ -78,13 +78,20 @@ void init_cpu_sysctl( void ) {
 
 #if defined(__NetBSD__)
 #define NETSNMP_KERN_CPU  KERN_CP_TIME
+#define NETSNMP_KERN_MCPU
+#define NETSNMP_KERN_MCPU_TYPE NETSNMP_CPU_STATS
 #elif defined(KERN_CPUSTATS)              /* BSDi */
 #define NETSNMP_KERN_CPU  KERN_CPUSTATS
+#elif defined(KERN_CPTIME2)                /* OpenBSD */
+#define NETSNMP_KERN_CPU  KERN_CPTIME
+#define NETSNMP_KERN_MCPU
+#define NETSNMP_KERN_MCPU_TYPE u_int64_t
 #elif defined(KERN_CPTIME)                /* OpenBSD */
 #define NETSNMP_KERN_CPU  KERN_CPTIME
 
 #elif defined(__FreeBSD__)
-#define NETSNMP_KERN_CPU  0    /* dummy value - sysctlnametomib(2) should be used */
+#define NETSNMP_KERN_MCPU 1    /* Enable support for multi-cpu stats. Valid for FreeBSD >=6.4, >=7.1, >=8.0 and beyond */
+#define NETSNMP_KERN_MCPU_TYPE NETSNMP_CPU_STATS
 
 #else
 #error "No CPU statistics sysctl token"
@@ -106,8 +113,13 @@ void init_cpu_sysctl( void ) {
     #define NS_VM_SWTCH		swtch
     #define NS_VM_PAGEIN	pageins
     #define NS_VM_PAGEOUT	pdpageouts
+#ifdef HAVE_STRUCT_UVMEXP_PGSWAPIN
+    #define NS_VM_SWAPIN	pgswapin
+    #define NS_VM_SWAPOUT	pgswapout
+#else
     #define NS_VM_SWAPIN	swapins
     #define NS_VM_SWAPOUT	swapouts
+#endif
 
 #if defined(VM_UVMEXP2)                   /* NetBSD 1.6+ */
 #define NETSNMP_VM_STATS       VM_UVMEXP2
@@ -147,9 +159,6 @@ void init_cpu_sysctl( void ) {
      * Load the latest CPU usage statistics
      */
 int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) {
-#ifdef NETSNMP_KERN_MCPU
-    int                     i;
-#endif
 
     /*
      * Strictly speaking, BSDi ought to use
@@ -159,13 +168,20 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) {
      * Don't fight it, Dave - go with the flow....
      */
     NETSNMP_CPU_STATS cpu_stats[CPUSTATES];
+    size_t         cpu_size  = sizeof(cpu_stats);
 #if !defined(__FreeBSD__) && !defined(__NetBSD__)
     int            cpu_mib[] = { CTL_KERN, NETSNMP_KERN_CPU };
 #endif
-    size_t         cpu_size  = sizeof(cpu_stats);
+#ifdef __FreeBSD__
+    static int     cp_times = -1;
+#endif
+#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;
-    int            mcpu_mib[] = { CTL_KERN, NETSNMP_KERN_MCPU };
     size_t         mcpu_size;
 #endif
     NETSNMP_VM_STATS_TYPE mem_stats;
@@ -173,17 +189,17 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) {
     size_t         mem_size  = sizeof(NETSNMP_VM_STATS_TYPE);
     netsnmp_cpu_info *cpu = netsnmp_cpu_get_byIdx( -1, 0 );
 
-#if (defined(__FreeBSD__) || defined(__NetBSD__))
+#if defined(__FreeBSD__) || defined(__NetBSD__)
     sysctlbyname("kern.cp_time", cpu_stats, &cpu_size, NULL, 0);
 #else
     sysctl(cpu_mib, 2,  cpu_stats, &cpu_size, NULL, 0);
 #endif
-    cpu->user_ticks = (unsigned long long)cpu_stats[CP_USER];
-    cpu->nice_ticks = (unsigned long long)cpu_stats[CP_NICE];
-    cpu->sys2_ticks = (unsigned long long)cpu_stats[CP_SYS]+cpu_stats[CP_INTR];
-    cpu->kern_ticks = (unsigned long long)cpu_stats[CP_SYS];
-    cpu->idle_ticks = (unsigned long long)cpu_stats[CP_IDLE];
-    cpu->intrpt_ticks = (unsigned long long)cpu_stats[CP_INTR];
+    cpu->user_ticks = cpu_stats[CP_USER];
+    cpu->nice_ticks = cpu_stats[CP_NICE];
+    cpu->sys2_ticks = cpu_stats[CP_SYS]+cpu_stats[CP_INTR];
+    cpu->kern_ticks = cpu_stats[CP_SYS];
+    cpu->idle_ticks = cpu_stats[CP_IDLE];
+    cpu->intrpt_ticks = cpu_stats[CP_INTR];
         /* wait_ticks, sirq_ticks unused */
     
         /*
@@ -191,30 +207,83 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) {
          *   XXX - Do these really belong here ?
          */
     sysctl(mem_mib, 2, &mem_stats, &mem_size, NULL, 0);
-    cpu->nInterrupts  = (unsigned long long)mem_stats.NS_VM_INTR;
-    cpu->nCtxSwitches = (unsigned long long)mem_stats.NS_VM_SWTCH;
-    cpu->swapIn       = (unsigned long long)mem_stats.NS_VM_SWAPIN;
-    cpu->swapOut      = (unsigned long long)mem_stats.NS_VM_SWAPOUT;
+    cpu->nInterrupts  = mem_stats.NS_VM_INTR;
+    cpu->nCtxSwitches = mem_stats.NS_VM_SWTCH;
+    cpu->swapIn       = mem_stats.NS_VM_SWAPIN;
+    cpu->swapOut      = mem_stats.NS_VM_SWAPOUT;
 #ifdef NS_VM_PAGEIN
-    cpu->pageIn       = (unsigned long long)mem_stats.NS_VM_PAGEIN;
+    cpu->pageIn       = mem_stats.NS_VM_PAGEIN;
 #endif
 #ifdef NS_VM_PAGEOUT
-    cpu->pageOut      = (unsigned long long)mem_stats.NS_VM_PAGEOUT;
+    cpu->pageOut      = mem_stats.NS_VM_PAGEOUT;
 #endif
 
 #ifdef NETSNMP_KERN_MCPU
-    mcpu_size  = cpu_num*sizeof(NETSNMP_KERN_MCPU_TYPE);
+#if defined(KERN_CPTIME2)
+    mcpu_size  = cpu_num*sizeof(cpu_stats);
     mcpu_stats = malloc(mcpu_size);
-    sysctl(mcpu_mib, 2, mcpu_stats, &mcpu_size, NULL, 0);
-    for ( i = 0; i < cpu_num; i++ ) {
+#elif defined(__NetBSD__)
+    mcpu_size  = cpu_num*sizeof(cpu_stats);
+    mcpu_stats = malloc(mcpu_size);
+    sysctlbyname("kern.cp_time", mcpu_stats, &mcpu_size, NULL, 0);
+#elif defined(__FreeBSD__)
+    if (cp_times == -1) {
+	int ret = sysctlbyname("kern.cp_times", NULL, &mcpu_size, NULL, 0);
+	cp_times = ret == -1 ? 0 : 1;
+    }
+    if (cp_times) {
+	sysctlbyname("kern.cp_times", NULL, &mcpu_size, NULL, 0);
+	mcpu_stats = malloc(mcpu_size);
+	sysctlbyname("kern.cp_times", mcpu_stats, &mcpu_size, NULL, 0);
+    }
+    else {
+	mcpu_size  = sizeof(cpu_stats);
+	mcpu_stats = malloc(mcpu_size);
+	sysctlbyname("kern.cp_time", mcpu_stats, &mcpu_size, NULL, 0);
+	act_cpu = 1;
+    }
+#endif
+    for ( i = 0; i < act_cpu; i++ ) {
         cpu = netsnmp_cpu_get_byIdx( i, 0 );
         /* XXX - per-CPU statistics - mcpu_mib[i].??? */
+#ifdef KERN_CPTIME2
+	mcpu_mib[2] = i;
+	sysctl(mcpu_mib, 3, mcpu_stats+i*CPUSTATES, &mcpu_size, NULL, 0);
+#endif
+	/* Almost copy & paste of previous cpu stats stuff :) */
+	cpu->user_ticks = mcpu_stats[(i*CPUSTATES)+CP_USER];
+	cpu->nice_ticks = mcpu_stats[(i*CPUSTATES)+CP_NICE];
+	cpu->sys2_ticks = mcpu_stats[(i*CPUSTATES)+CP_SYS]+mcpu_stats[(i*CPUSTATES)+CP_INTR];
+	cpu->kern_ticks = mcpu_stats[(i*CPUSTATES)+CP_SYS];
+	cpu->idle_ticks = mcpu_stats[(i*CPUSTATES)+CP_IDLE];
+	cpu->intrpt_ticks = mcpu_stats[(i*CPUSTATES)+CP_INTR];
+	    /* wait_ticks, sirq_ticks unused */
+
+	    /*
+	     * Interrupt/Context Switch statistics
+	     *   XXX - Do these really belong here ?
+	     */
+
+	/* There's no real need to execute another sysctl()
+	 *
+	 * sysctl(mem_mib, 2, &mem_stats, &mem_size, NULL, 0);
+	 */
+	cpu->nInterrupts  = mem_stats.NS_VM_INTR;
+	cpu->nCtxSwitches = mem_stats.NS_VM_SWTCH;
+	cpu->swapIn       = mem_stats.NS_VM_SWAPIN;
+	cpu->swapOut      = mem_stats.NS_VM_SWAPOUT;
+#ifdef NS_VM_PAGEIN
+	cpu->pageIn       = mem_stats.NS_VM_PAGEIN;
+#endif
+#ifdef NS_VM_PAGEOUT
+	cpu->pageOut      = mem_stats.NS_VM_PAGEOUT;
+#endif
     }
     free(mcpu_stats);
-#else
+#else	/* NETSNMP_KERN_MCPU */
         /* Copy "overall" figures to cpu0 entry */
     _cpu_copy_stats( cpu );
-#endif
+#endif  /* NETSNMP_KERN_MCPU */
 
     return 0;
 }
diff --git a/agent/mibgroup/hardware/fsys/fsys_getfsstats.c b/agent/mibgroup/hardware/fsys/fsys_getfsstats.c
index 8e9468b..05027f4 100644
--- a/agent/mibgroup/hardware/fsys/fsys_getfsstats.c
+++ b/agent/mibgroup/hardware/fsys/fsys_getfsstats.c
@@ -34,29 +34,6 @@
 #define NSFS_FLAGS      f_flags
 #endif
 
-/*
-#if defined(HAVE_STATVFS)
-#define NSFS_STATFS     statvfs
-#define NSFS_FLAGS      f_flag
-#else
-#define NSFS_STATFS     statfs
-#define NSFS_FLAGS      f_flags
-#endif
-*/
-
-/*
-#if defined(HAVE_STATVFS) && defined(__NetBSD__)
-#define NSFS_NAMELEN    _VFS_NAMELEN
-#define NSFS_GETFSSTAT  getvfsstat
-#define NSFS_STATFS     statvfs
-#else
-#define NSFS_FLAGS      f_flags
-#define NSFS_NAMELEN    _VFS_NAMELEN
-#define NSFS_GETFSSTAT  getvfsstat
-#define NSFS_STATFS     statvfs
-#endif
-*/
-
 int
 _fs_type( char *typename )
 {
@@ -88,6 +65,10 @@ _fs_type( char *typename )
        return NETSNMP_FS_TYPE_EXT2;
     else if ( !strcmp(typename, MOUNT_NTFS) )
        return NETSNMP_FS_TYPE_NTFS;
+    else if ( !strcmp(typename, MOUNT_ZFS) )
+       return NETSNMP_FS_TYPE_OTHER;
+    else if ( !strcmp(typename, MOUNT_ACFS) )
+       return NETSNMP_FS_TYPE_OTHER;
 
        /*
         * NetBSD also recognises the following filesystem types:
diff --git a/agent/mibgroup/hardware/fsys/fsys_mntctl.c b/agent/mibgroup/hardware/fsys/fsys_mntctl.c
index a03019a..9fbb068 100644
--- a/agent/mibgroup/hardware/fsys/fsys_mntctl.c
+++ b/agent/mibgroup/hardware/fsys/fsys_mntctl.c
@@ -59,6 +59,9 @@ _fsys_type( int type)
 #ifdef MNT_PROCFS
         case MNT_PROCFS:
 #endif
+#ifdef MNT_ACFS
+        case MNT_ACFS:
+#endif
         case MNT_SFS:
         case MNT_CACHEFS:
             return NETSNMP_FS_TYPE_OTHER;
@@ -93,7 +96,7 @@ netsnmp_fsys_arch_load( void )
     /*
      * Retrieve information about the currently mounted filesystems...
      */
-    ret = mntctl(MCTL_QUERY, sizeof(uint), &size);
+    ret = mntctl(MCTL_QUERY, sizeof(uint), (void *) &size);
     if ( ret != 0 || size<=0 ) {
         snmp_log_perror( "initial mntctl failed" );
         return;
@@ -105,7 +108,7 @@ netsnmp_fsys_arch_load( void )
         return;
     }
 
-    ret = mntctl(MCTL_QUERY, size, aixmnt );
+    ret = mntctl(MCTL_QUERY, size, (void *) aixmnt);
     if ( ret <= 0 ) {
         free(aixmnt);
         snmp_log_perror( "main mntctl failed" );
@@ -160,7 +163,7 @@ netsnmp_fsys_arch_load( void )
             continue;
 
         if ( statfs( entry->path, &stat_buf ) < 0 ) {
-            snprintf( tmpbuf, sizeof(tmpbuf), "Cannot statfs %s\n", entry->path );
+            snprintf( tmpbuf, sizeof(tmpbuf), "Cannot statfs %s", entry->path );
             snmp_log_perror( tmpbuf );
             continue;
         }
diff --git a/agent/mibgroup/hardware/fsys/fsys_mntent.c b/agent/mibgroup/hardware/fsys/fsys_mntent.c
index c5e711c..94d23db 100644
--- a/agent/mibgroup/hardware/fsys/fsys_mntent.c
+++ b/agent/mibgroup/hardware/fsys/fsys_mntent.c
@@ -139,6 +139,10 @@ _fsys_type( char *typename )
               !strcmp(typename, MNTTYPE_REISERFS) ||
               !strcmp(typename, MNTTYPE_OCFS2) ||
               !strcmp(typename, MNTTYPE_CVFS) ||
+              !strcmp(typename, MNTTYPE_SIMFS) ||
+              !strcmp(typename, MNTTYPE_BTRFS) ||
+              !strcmp(typename, MNTTYPE_ZFS) ||
+              !strcmp(typename, MNTTYPE_ACFS) ||
               !strcmp(typename, MNTTYPE_LOFS))
        return NETSNMP_FS_TYPE_OTHER;
 
@@ -174,7 +178,7 @@ netsnmp_fsys_arch_load( void )
      */
     fp = fopen( ETC_MNTTAB, "r" );   /* OR setmntent()?? */
     if ( !fp ) {
-        snprintf( tmpbuf, sizeof(tmpbuf), "Cannot open %s\n", ETC_MNTTAB );
+        snprintf( tmpbuf, sizeof(tmpbuf), "Cannot open %s", ETC_MNTTAB );
         snmp_log_perror( tmpbuf );
         return;
     }
@@ -234,7 +238,7 @@ netsnmp_fsys_arch_load( void )
         if ( NSFS_STATFS( entry->path, &stat_buf ) < 0 )
 #endif
         {
-            snprintf( tmpbuf, sizeof(tmpbuf), "Cannot statfs %s\n", entry->path );
+            snprintf( tmpbuf, sizeof(tmpbuf), "Cannot statfs %s", entry->path );
             snmp_log_perror( tmpbuf );
             continue;
         }
diff --git a/agent/mibgroup/hardware/fsys/mnttypes.h b/agent/mibgroup/hardware/fsys/mnttypes.h
index ed4f590..37ed4fb 100644
--- a/agent/mibgroup/hardware/fsys/mnttypes.h
+++ b/agent/mibgroup/hardware/fsys/mnttypes.h
@@ -142,6 +142,18 @@
 #ifndef MNTTYPE_CVFS
 #define MNTTYPE_CVFS     "cvfs"
 #endif
+#ifndef MNTTYPE_SIMFS
+#define MNTTYPE_SIMFS     "simfs"
+#endif
+#ifndef MNTTYPE_BTRFS
+#define MNTTYPE_BTRFS     "btrfs"
+#endif
+#ifndef MNTTYPE_ZFS
+#define MNTTYPE_ZFS       "zfs"
+#endif
+#ifndef MNTTYPE_ACFS
+#define MNTTYPE_ACFS      "acfs"
+#endif
 
 /*
  *  File systems to skip
diff --git a/agent/mibgroup/hardware/fsys/mounts.h b/agent/mibgroup/hardware/fsys/mounts.h
index 2148888..eab65da 100644
--- a/agent/mibgroup/hardware/fsys/mounts.h
+++ b/agent/mibgroup/hardware/fsys/mounts.h
@@ -56,6 +56,12 @@
 #ifndef MOUNT_UFS
 #define MOUNT_UFS    "ufs"
 #endif
+#ifndef MOUNT_ZFS
+#define MOUNT_ZFS    "zfs"
+#endif
+#ifndef MOUNT_ACFS
+#define MOUNT_ACFS   "acfs"
+#endif
 
 /*
 #ifndef MNTTYPE_AFS
diff --git a/agent/mibgroup/hardware/memory.h b/agent/mibgroup/hardware/memory.h
index c33450a..7e4e88e 100644
--- a/agent/mibgroup/hardware/memory.h
+++ b/agent/mibgroup/hardware/memory.h
@@ -3,7 +3,7 @@ config_require(hardware/memory/hw_mem)
 #if defined(linux)
 config_require(hardware/memory/memory_linux)
 
-#elif (defined(darwin7) || defined(darwin8) || defined(darwin9))
+#elif (defined(darwin))
 config_require(hardware/memory/memory_darwin)
 
 #elif (defined(freebsd2) || defined(freebsd3) || defined(freebsd4)  || defined(freebsd5)|| defined(freebsd6))
diff --git a/agent/mibgroup/hardware/memory/hw_mem.c b/agent/mibgroup/hardware/memory/hw_mem.c
index badc775..1f4474f 100644
--- a/agent/mibgroup/hardware/memory/hw_mem.c
+++ b/agent/mibgroup/hardware/memory/hw_mem.c
@@ -14,9 +14,16 @@ extern NetsnmpCacheLoad netsnmp_mem_arch_load;
 netsnmp_memory_info *_mem_head  = NULL;
 netsnmp_cache       *_mem_cache = NULL;
 
+#ifdef darwin
+/* 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( 5, netsnmp_mem_arch_load, NULL,
+    _mem_cache = netsnmp_cache_create( MEMORY_CACHE_SECONDS, netsnmp_mem_arch_load, NULL,
                                           nsMemory, OID_LENGTH(nsMemory));
 }
 
diff --git a/agent/mibgroup/hardware/memory/memory_darwin.c b/agent/mibgroup/hardware/memory/memory_darwin.c
index 4914f0c..4462c45 100644
--- a/agent/mibgroup/hardware/memory/memory_darwin.c
+++ b/agent/mibgroup/hardware/memory/memory_darwin.c
@@ -5,10 +5,14 @@
 
 #include <dirent.h>
 #include <unistd.h>
-#include <mach/mach_host.h>
+
 #include <sys/stat.h>
 #include <sys/sysctl.h>
 
+#include <mach/mach.h>
+#include <mach/mach_time.h>
+#include <CoreFoundation/CoreFoundation.h>
+#include <IOKit/ps/IOPowerSources.h>
 
 /*
  * Retained from UCD implementation
@@ -44,8 +48,7 @@ int pages_swapped(void) {
      mach_port = mach_host_self();
      error = host_processor_sets(mach_port, &psets, &pcnt);
      if (error != KERN_SUCCESS) {
-        snprintf(errmsg, sizeof(errmsg), "Error in host_processor_sets(): %s\n", mach_error_string(error));
-        snmp_log_perror(errmsg);
+        snmp_log(LOG_ERR, "Error in host_processor_sets(): %s\n", mach_error_string(error));
         return(0);
      }
 
@@ -75,7 +78,11 @@ int pages_swapped(void) {
             for (address = 0;; address += size) {
                 /* 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) {
+#if defined(__ppc64__) || defined(__x86_64__)
+                if (vm_region_64(tasks[j], &address, &size, VM_REGION_EXTENDED_INFO, &info, &count, &object_name) != KERN_SUCCESS) {
+#else
+                if (vm_region(tasks[j], &address, &size, VM_REGION_EXTENDED_INFO, &info, &count, &object_name) != KERN_SUCCESS) {
+#endif
                     /* No more memory regions. */
                     break;
                 }
diff --git a/agent/mibgroup/hardware/memory/memory_freebsd.c b/agent/mibgroup/hardware/memory/memory_freebsd.c
index c5007d5..8d18698 100644
--- a/agent/mibgroup/hardware/memory/memory_freebsd.c
+++ b/agent/mibgroup/hardware/memory/memory_freebsd.c
@@ -24,7 +24,7 @@ quad_t    swapTotal;
 quad_t    swapUsed;
 quad_t    swapFree;
 
-int swapmode(long);
+static int swapmode(long);
 
 
     /*
@@ -36,9 +36,15 @@ int netsnmp_mem_arch_load( netsnmp_cache *cache, void *magic ) {
     long           pagesize;
     int            nswap;
 
+#if !defined(VM_TOTAL)
+    unsigned int   free_mem;
+    size_t         free_size = sizeof(free_mem);
+    unsigned int   mem_pages;
+#else
     struct vmtotal total;
     size_t         total_size  = sizeof(total);
-    int            total_mib[] = { CTL_VM, VM_METER };
+    int            total_mib[] = { CTL_VM, VM_TOTAL };
+#endif
 
     u_long         phys_mem;
     u_long         user_mem;
@@ -57,7 +63,12 @@ int netsnmp_mem_arch_load( netsnmp_cache *cache, void *magic ) {
     /*
      * Retrieve the memory information from the underlying O/S...
      */
+#if !defined(VM_TOTAL)
+    sysctlbyname("vm.stats.vm.v_free_count", &free_mem,    &free_size,    NULL, 0);
+    sysctlbyname("vm.stats.vm.v_page_count", &mem_pages,    &free_size,    NULL, 0);
+#else
     sysctl(total_mib,    2, &total,    &total_size,    NULL, 0);
+#endif
     sysctl(phys_mem_mib, 2, &phys_mem, &mem_size,      NULL, 0);
     sysctl(user_mem_mib, 2, &user_mem, &mem_size,      NULL, 0);
     sysctlbyname("vm.stats.vm.v_cache_count",    &cache_count, &cache_size, NULL, 0);
@@ -82,7 +93,11 @@ int netsnmp_mem_arch_load( netsnmp_cache *cache, void *magic ) {
              mem->descr = strdup("Physical memory");
         mem->units = pagesize;
         mem->size  = phys_mem/pagesize;
+#if !defined(VM_TOTAL)
+	mem->free  = free_mem;
+#else
         mem->free  = total.t_free;
+#endif
     }
 
     mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_USERMEM, 1 );
@@ -92,8 +107,13 @@ int netsnmp_mem_arch_load( netsnmp_cache *cache, void *magic ) {
         if (!mem->descr)
              mem->descr = strdup("Real memory");
         mem->units = pagesize;
+#if !defined(VM_TOTAL)
+	mem->size  = user_mem/pagesize;
+	mem->free  = free_mem;
+#else
         mem->size  = total.t_rm;
-        mem->free  = total.t_arm;
+        mem->free  = total.t_rm - total.t_arm;
+#endif
     }
 
     mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_VIRTMEM, 1 );
@@ -103,10 +123,16 @@ int netsnmp_mem_arch_load( netsnmp_cache *cache, void *magic ) {
         if (!mem->descr)
              mem->descr = strdup("Virtual memory");
         mem->units = pagesize;
+#if !defined(VM_TOTAL)
+	mem->size  = mem_pages+swapTotal;
+	mem->free  = free_mem+swapFree;
+#else
         mem->size  = total.t_vm;
-        mem->free  = total.t_avm;
+        mem->free  = total.t_vm - total.t_avm;
+#endif
     }
 
+#if defined(VM_TOTAL)
     mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_SHARED, 1 );
     if (!mem) {
         snmp_log_perror("No Shared Memory info entry");
@@ -115,7 +141,7 @@ int netsnmp_mem_arch_load( netsnmp_cache *cache, void *magic ) {
              mem->descr = strdup("Shared virtual memory");
         mem->units = pagesize;
         mem->size  = total.t_vmshr;
-        mem->free  = total.t_avmshr;
+        mem->free  = total.t_vmshr - total.t_avmshr;
     }
 
     mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_SHARED2, 1 );
@@ -126,8 +152,9 @@ int netsnmp_mem_arch_load( netsnmp_cache *cache, void *magic ) {
              mem->descr = strdup("Shared real memory");
         mem->units = pagesize;
         mem->size  = total.t_rmshr;
-        mem->free  = total.t_armshr;
+        mem->free  = total.t_rmshr - total.t_armshr;
     }
+#endif
 
     mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_CACHED, 1 );
     if (!mem) {
@@ -136,8 +163,8 @@ int netsnmp_mem_arch_load( netsnmp_cache *cache, void *magic ) {
         if (!mem->descr)
              mem->descr = strdup("Cached memory");
         mem->units = pagesize;
-        mem->size  = cache_max + inact_count;
-        mem->free  = cache_max - cache_count;
+        mem->size  = cache_count;
+        mem->free  = 0;
     }
 
     nswap = swapmode(pagesize);
@@ -180,7 +207,7 @@ int netsnmp_mem_arch_load( netsnmp_cache *cache, void *magic ) {
  * This is just way too ugly ;) 
  */
 
-int
+static int
 swapmode(long pagesize)
 {
     struct extensible ext;
@@ -211,22 +238,21 @@ swapmode(long pagesize)
 
 #include <sys/conf.h>
 
-int
+extern kvm_t *kd;
+
+static int
 swapmode(long pagesize)
 {
     int             i, n;
-    static kvm_t   *kd = NULL;
     struct kvm_swap kswap[16];
     netsnmp_memory_info *mem;
     char buf[1024];
 
-    if (kd == NULL)
-        kd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, NULL);
     n = kvm_getswapinfo(kd, kswap, sizeof(kswap) / sizeof(kswap[0]), 0);
 
     swapUsed = swapTotal = swapFree = 0;
 
-    if ( n > 1 ) {
+    if ( n > 0 ) {
         /*
          * If there are multiple swap devices, then record
          *   the statistics for each one separately...
diff --git a/agent/mibgroup/hardware/memory/memory_netbsd.c b/agent/mibgroup/hardware/memory/memory_netbsd.c
index 5749ae2..68cd209 100644
--- a/agent/mibgroup/hardware/memory/memory_netbsd.c
+++ b/agent/mibgroup/hardware/memory/memory_netbsd.c
@@ -48,8 +48,8 @@ int netsnmp_mem_arch_load( netsnmp_cache *cache, void *magic ) {
     int             uvmexp_mib[] = { CTL_VM, VM_UVMEXP };
     int             total_mib[] = { CTL_VM, VM_METER };
 #else
-    unsigned int    bufspace;
-    unsigned int    maxbufspace;
+    unsigned long   bufspace;
+    unsigned long   maxbufspace;
     size_t          buf_size  = sizeof(bufspace);
 #endif
 
@@ -63,27 +63,27 @@ int netsnmp_mem_arch_load( netsnmp_cache *cache, void *magic ) {
     sysctl(user_mem_mib, 2, &user_mem, &mem_size,      NULL, 0);
 #else
     if (sysctlbyname("vm.uvmexp", &uvmexp, &uvmexp_size, NULL, 0) == -1) {
-        snmp_log(LOG_ERR, "sysctl vm.uvmexp failed (errno %d)\n", errno);
+        snmp_log_perror("sysctl vm.uvmexp");
         return -1;
     }
     if (sysctlbyname("vm.vmmeter", &total,  &total_size, NULL, 0) == -1) {
-        snmp_log(LOG_ERR, "sysctl vm.vmmeter failed (errno %d)\n", errno);
+        snmp_log_perror("sysctl vm.vmmeter");
         return -1;
     }
     if (sysctlbyname("hw.physmem64", &phys_mem, &mem_size, NULL, 0) == -1) {
-        snmp_log(LOG_ERR, "sysctl hw.physmem64 failed (errno %d)\n", errno);
+        snmp_log_perror("sysctl hw.physmem64");
         return -1;
     }
     if (sysctlbyname("hw.usermem64", &user_mem, &mem_size, NULL, 0) == -1) {
-        snmp_log(LOG_ERR, "sysctl hw.usermem64 failed (errno %d)\n", errno);
+        snmp_log_perror("sysctl hw.usermem64");
         return -1;
     }
     if (sysctlbyname("vm.bufmem", &bufspace, &buf_size, NULL, 0) == -1) {
-        snmp_log(LOG_ERR, "sysctl vm.bufmem failed (errno %d)\n", errno);
+        snmp_log_perror("sysctl vm.bufmem");
         return -1;
     }
     if (sysctlbyname("vm.bufmem_hiwater", &maxbufspace, &buf_size, NULL, 0) == -1) {
-        snmp_log(LOG_ERR, "sysctl vm.bufmem_hiwater failed (errno %d)\n", errno);
+        snmp_log_perror("sysctl vm.bufmem_hiwater");
         return -1;
     }
 
diff --git a/agent/mibgroup/host/data_access/swinst_apt.c b/agent/mibgroup/host/data_access/swinst_apt.c
index 26cdba5..c7606d2 100644
--- a/agent/mibgroup/host/data_access/swinst_apt.c
+++ b/agent/mibgroup/host/data_access/swinst_apt.c
@@ -39,8 +39,8 @@ netsnmp_swinst_arch_init(void)
 {
     strlcpy(pkg_directory, "/var/lib/dpkg/info", sizeof(pkg_directory));
     snprintf(apt_fmt, SNMP_MAXBUF, "%%%d[^#]#%%%d[^#]#%%%d[^#]#%%%d[^#]#%%%d[^#]#%%%ds",
-	SNMP_MAXBUF, SNMP_MAXBUF, SNMP_MAXBUF,
-	SNMP_MAXBUF, SNMP_MAXBUF, SNMP_MAXBUF);
+	SNMP_MAXBUF-1, SNMP_MAXBUF-1, SNMP_MAXBUF-1,
+	SNMP_MAXBUF-1, SNMP_MAXBUF-1, SNMP_MAXBUF-1);
 }
 
 void
@@ -65,7 +65,6 @@ netsnmp_swinst_arch_load( netsnmp_container *container, u_int flags)
     char buf[BUFSIZ];
     netsnmp_swinst_entry *entry;
     int i = 0;
-    int rc;
 
     if (p == NULL) {
 	snmp_perror("dpkg-list");
@@ -77,7 +76,7 @@ netsnmp_swinst_arch_load( netsnmp_container *container, u_int flags)
         entry = netsnmp_swinst_entry_create( i++ );
         if (NULL == entry)
             continue;   /* error already logged by function */
-        rc = CONTAINER_INSERT(container, entry);
+        CONTAINER_INSERT(container, entry);
 
 	sscanf(buf, apt_fmt, package, version, section, priority, essential, status);
 	if (strstr(status, "not-installed"))
@@ -96,7 +95,7 @@ netsnmp_swinst_arch_load( netsnmp_container *container, u_int flags)
     }
     pclose(p);
     DEBUGMSGTL(("swinst:load:arch"," loaded %d entries\n",
-                CONTAINER_SIZE(container)));
+                (int) CONTAINER_SIZE(container)));
 
     return 0;
 }
diff --git a/agent/mibgroup/host/data_access/swinst_darwin.c b/agent/mibgroup/host/data_access/swinst_darwin.c
index e7a0294..7a47372 100644
--- a/agent/mibgroup/host/data_access/swinst_darwin.c
+++ b/agent/mibgroup/host/data_access/swinst_darwin.c
@@ -129,7 +129,8 @@ netsnmp_swinst_arch_load( netsnmp_container *container, u_int flags )
     return 0;
 }
 
-void  _dump_flags(u_long flags)
+static void
+_dump_flags(u_long flags)
 {
     static struct {
         const char*name;
@@ -255,6 +256,8 @@ _add_applications_in_dir(netsnmp_container *container, const char* path)
             rc = -1;
             SNMP_CFRelease(prodName);
             SNMP_CFRelease(version);
+            CFRelease(currentPath);
+            CFRelease(currentURL);
             break;
         }
 
@@ -285,7 +288,7 @@ _add_applications_in_dir(netsnmp_container *container, const char* path)
     return rc;
 }
 
-int
+static int
 _check_bundled_app(CFURLRef currentURL, CFStringRef *prodName,
                    CFStringRef *version, const char* file)
 {
diff --git a/agent/mibgroup/host/data_access/swinst_pkginfo.c b/agent/mibgroup/host/data_access/swinst_pkginfo.c
index 965a7ef..a122cb1 100644
--- a/agent/mibgroup/host/data_access/swinst_pkginfo.c
+++ b/agent/mibgroup/host/data_access/swinst_pkginfo.c
@@ -32,6 +32,11 @@
 #include <pkginfo.h>
 #endif
 
+#ifdef HAVE_PKG_H
+#define restrict
+#include <pkg.h>
+#endif
+
 #include <net-snmp/net-snmp-includes.h>
 #include <net-snmp/agent/net-snmp-agent-includes.h>
 #include <net-snmp/library/container.h>
@@ -97,52 +102,115 @@ netsnmp_swinst_arch_load( netsnmp_container *container, u_int flags)
     size_t                date_len;
     int                   i = 1;
     netsnmp_swinst_entry *entry;
-
-    if ( !pkg_directory[0] ) {
-        return 1;    /* Can't report installed packages
-                         if there isn't a list of them! */
+#ifdef HAVE_LIBPKG
+    struct pkgdb *db = NULL;
+    struct pkgdb_it *it = NULL;
+    struct pkg *pkg = NULL;
+    char pkgname[ SNMP_MAXPATH ];
+    char pkgdate[ BUFSIZ ];
+    int pkgng = 0;
+
+    if (pkg_init(NULL, NULL)) {
+        snmp_log( LOG_ERR, "SWInst: error initializing pkgng db\n" );
+        return 1;
     }
-    d = opendir( pkg_directory );
-    if (!d)
+
+    if (pkgdb_open(&db, PKGDB_DEFAULT) != EPKG_OK) {
+	snmp_log( LOG_ERR, "SWInst: error opening pkgng db\n" );
 	return 1;
-    while ((dp = readdir(d)) != NULL) {
-        if ( '.' == dp->d_name[0] )
-            continue;
-        entry = netsnmp_swinst_entry_create( i++ );
-        if (NULL == entry)
-            continue;   /* error already logged by function */
-        CONTAINER_INSERT(container, entry);
+    }
+
+    if (pkg_status(NULL) == PKG_STATUS_ACTIVE) {
+	pkgng = 1;
+    } else {
+	snmp_log( LOG_INFO, "SWInst: not a pkgng system\n" );
+    }
+
+    /* if we are using FreeBSD's pkgng */
+    if (pkgng) {
+        if ((it = pkgdb_query(db, NULL, MATCH_ALL)) == NULL) {
+            snmp_log( LOG_ERR, "SWInst: error querying pkgng db\n" );
+            return 1;
+        }
+
+        while (pkgdb_it_next(it, &pkg, PKG_LOAD_BASIC) == EPKG_OK) {
+            pkg_snprintf(pkgname, sizeof(pkgname), "%n-%v", pkg, pkg);
+            pkg_snprintf(pkgdate, sizeof(pkgdate), "%t", pkg);
+
+            entry = netsnmp_swinst_entry_create( i++ );
+
+            if (NULL == entry)
+                continue;   /* error already logged by function */
+
+            CONTAINER_INSERT(container, entry);
+
+            entry->swName_len = snprintf( entry->swName, sizeof(entry->swName),
+                                          "%s", pkgname );
+            if (entry->swName_len >= sizeof(entry->swName))
+                entry->swName_len = sizeof(entry->swName)-1;
+
+            install_time = atoi(pkgdate);
+            cp = date_n_time( &install_time, &date_len );
+            memcpy( entry->swDate, cp, date_len );
+            entry->swDate_len = date_len;
+        }
+
+        pkgdb_it_free(it);
+        pkgdb_close(db);
+        pkg_shutdown();
+    } else {
+#endif /* HAVE_LIBPKG */
+        if ( !pkg_directory[0] ) {
+            return 1;    /* Can't report installed packages
+                         if there isn't a list of them! */
+        }
+
+        d = opendir( pkg_directory );
+        if (!d)
+            return 1;
+
+        while ((dp = readdir(d)) != NULL) {
+            if ( '.' == dp->d_name[0] )
+                continue;
+            snprintf( buf, BUFSIZ, "%s/%s", pkg_directory, dp->d_name );
+            if (stat( buf, &stat_buf ) < 0)
+                continue;
+            entry = netsnmp_swinst_entry_create( i++ );
+            if (NULL == entry)
+                continue;   /* error already logged by function */
+            CONTAINER_INSERT(container, entry);
 
 #ifdef HAVE_PKGINFO
-        v = pkgparam( dp->d_name, "VERSION" );
-        c = pkgparam( dp->d_name, "CATEGORY" );
-
-        entry->swName_len = snprintf( entry->swName, sizeof(entry->swName),
-                                      "%s-%s", dp->d_name, v );
-	if (entry->swName_len >= sizeof(entry->swName))
-	    entry->swName_len = sizeof(entry->swName)-1;
-        entry->swType = (NULL != strstr( c, "system"))
-                        ? 2      /* operatingSystem */
-                        : 4;     /*  application    */
-
-        /* Do we need to free 'v' & 'c' ??? */
+	    v = pkgparam( dp->d_name, "VERSION" );
+	    c = pkgparam( dp->d_name, "CATEGORY" );
+
+	    entry->swName_len = snprintf( entry->swName, sizeof(entry->swName),
+					  "%s-%s", dp->d_name, v );
+	    if (entry->swName_len >= sizeof(entry->swName))
+		entry->swName_len = sizeof(entry->swName)-1;
+	    entry->swType = (NULL != strstr( c, "system"))
+			    ? 2      /* operatingSystem */
+			    : 4;     /*  application    */
+
+	    /* Do we need to free 'v' & 'c' ??? */
 #else
-        entry->swName_len = snprintf( entry->swName, sizeof(entry->swName),
-                                      "%s", dp->d_name );
-	if (entry->swName_len >= sizeof(entry->swName))
-	    entry->swName_len = sizeof(entry->swName)-1;
+	    entry->swName_len = snprintf( entry->swName, sizeof(entry->swName),
+					  "%s", dp->d_name );
+	    if (entry->swName_len >= sizeof(entry->swName))
+		entry->swName_len = sizeof(entry->swName)-1;
 
-        /* no information about O/S vs application packages ??? */
+	    /* no information about O/S vs application packages ??? */
 #endif
 
-        snprintf( buf, BUFSIZ, "%s/%s", pkg_directory, dp->d_name );
-        stat( buf, &stat_buf );
-        install_time = stat_buf.st_mtime;
-        cp = date_n_time( &install_time, &date_len );
-        memcpy( entry->swDate, cp, date_len );
-        entry->swDate_len = date_len;
+	    install_time = stat_buf.st_mtime;
+	    cp = date_n_time( &install_time, &date_len );
+	    memcpy( entry->swDate, cp, date_len );
+	    entry->swDate_len = date_len;
+	}
+	closedir( d );
+#ifdef HAVE_LIBPKG
     }
-    closedir( d );
+#endif
 
     DEBUGMSGTL(("swinst:load:arch"," loaded %d entries\n",
                 (int)CONTAINER_SIZE(container)));
diff --git a/agent/mibgroup/host/data_access/swrun_cygwin.c b/agent/mibgroup/host/data_access/swrun_cygwin.c
index ca5194d..a1e1475 100644
--- a/agent/mibgroup/host/data_access/swrun_cygwin.c
+++ b/agent/mibgroup/host/data_access/swrun_cygwin.c
@@ -205,9 +205,10 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags)
         h = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, n);
 
         if (curproc.ppid) {
-            entry->hrSWRunPath_len = snprintf(entry->hrSWRunPath,
-                                       sizeof(entry->hrSWRunPath)-1, "%s",
-                    cygwin_conv_to_posix_path(curproc.progname));
+            entry->hrSWRunPath_len =
+                sprintf(entry->hrSWRunPath, "%.*s",
+                        (int)sizeof(entry->hrSWRunPath) - 1,
+                        cygwin_conv_to_posix_path(curproc.progname));
         } else if (query == CW_GETPINFO_FULL) {
 
             if (h) {
@@ -216,9 +217,9 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags)
                     n = 0;
                 if (n && myGetModuleFileNameEx(h, hm[0], string,
                                                   sizeof string)) {
-                   entry->hrSWRunPath_len = snprintf(entry->hrSWRunPath,
-                                              sizeof(entry->hrSWRunPath)-1,
-                                                    "%s", string );
+                   entry->hrSWRunPath_len =
+                       sprintf(entry->hrSWRunPath, "%.*s",
+                               (int)sizeof(entry->hrSWRunPath) - 1, string);
                 }
             }
         }
@@ -236,8 +237,9 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags)
                 cp2++;           /* Find the final component ... */
             else
                 cp2 = entry->hrSWRunPath;          /* ... if any */
-            entry->hrSWRunName_len = snprintf(entry->hrSWRunName,
-                                       sizeof(entry->hrSWRunName)-1, "%s", cp2);
+            entry->hrSWRunName_len =
+                sprintf(entry->hrSWRunName, "%.*s",
+                        (int)sizeof(entry->hrSWRunName) - 1, cp2);
 
             if ( cp1 )
                 *cp1 = '.';     /* Restore the file extension */
diff --git a/agent/mibgroup/host/data_access/swrun_darwin.c b/agent/mibgroup/host/data_access/swrun_darwin.c
index 6c6b82a..3b00fe3 100644
--- a/agent/mibgroup/host/data_access/swrun_darwin.c
+++ b/agent/mibgroup/host/data_access/swrun_darwin.c
@@ -120,7 +120,7 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags)
          * skip empty names.
          * p_stat = (SIDL|SRUN|SSLEEP|SSTOP|SZOMB)
          */
-        if ((NULL == processes[i].kp_proc.p_comm) ||
+        if (('\0' == processes[i].kp_proc.p_comm[0]) ||
             (0 == processes[i].kp_proc.p_pid)) {
             DEBUGMSGTL(("swrun:load:arch",
                         " skipping p_comm '%s', pid %5d, p_pstat %d\n",
@@ -172,9 +172,10 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags)
          * check for system processes
          */
         if (P_SYSTEM & processes[i].kp_proc.p_flag) {
-            entry->hrSWRunType = 2; /* operatingSystem */
+            entry->hrSWRunType = HRSWRUNTYPE_OPERATINGSYSTEM;
             DEBUGMSGTL(("swrun:load:arch", SWRUNINDENT "SYSTEM\n"));
         }
+        else entry->hrSWRunType = HRSWRUNTYPE_APPLICATION;
 
         /*
          * get mem size, run time
@@ -192,7 +193,7 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags)
             } at, ns;
             at.uq = taskinfo.ptinfo.pti_total_user +
                     taskinfo.ptinfo.pti_total_system;
-            ns.uw = AbsoluteToNanoseconds( at.uw );
+            ns = at;
             ns.uq = ns.uq / 10000000LL; /* nano to deci */
             if (task_mem > INT32_MAX) {
                 DEBUGMSGTL(("swrun:load:arch", SWRUNINDENT "mem overflow\n"));
@@ -209,7 +210,7 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags)
     free(processes);
 
     DEBUGMSGTL(("swrun:load:arch"," loaded %d entries\n",
-                CONTAINER_SIZE(container)));
+                (int)CONTAINER_SIZE(container)));
 
     return 0;
 }
@@ -385,8 +386,8 @@ _set_command_name(netsnmp_swrun_entry *entry)
             break; /* End of exec_path reached. */
     }
     if (cp != exec_path + len) {
-        DEBUGMSGTL(("swrun:load:arch:_cn"," OFF BY %d\n",
-                    (exec_path + len) - cp));
+        DEBUGMSGTL(("swrun:load:arch:_cn", " OFF BY %d\n",
+                    (int)((exec_path + len) - cp)));
         netsnmp_assert( cp == exec_path + len );
     }
 #endif
@@ -457,7 +458,7 @@ _set_command_name(netsnmp_swrun_entry *entry)
          */
         if(entry->hrSWRunParameters_len < sizeof(entry->hrSWRunParameters)-1) {
             strlcat(&entry->hrSWRunParameters[entry->hrSWRunParameters_len],
-                    argN, sizeof(entry->hrSWRunParameters));
+                    argN, sizeof(entry->hrSWRunParameters)-entry->hrSWRunParameters_len-1);
             entry->hrSWRunParameters_len = strlen(entry->hrSWRunParameters);
             if ((entry->hrSWRunParameters_len+2 < sizeof(entry->hrSWRunParameters)-1) && (0 != nargs)) {
                 /* add space between params */
diff --git a/agent/mibgroup/host/data_access/swrun_kinfo.c b/agent/mibgroup/host/data_access/swrun_kinfo.c
index b13ea3a..7cce6e7 100644
--- a/agent/mibgroup/host/data_access/swrun_kinfo.c
+++ b/agent/mibgroup/host/data_access/swrun_kinfo.c
@@ -3,7 +3,7 @@
  *     hrSWRunTable data access:
  *     kvm_getprocs() interface - FreeBSD, NetBSD, OpenBSD
  *
- * NB: later FreeBSD uses a different kinfo_proc structure
+ * NB: later FreeBSD and OpenBSD use different kinfo_proc structures
  */
 #include <net-snmp/net-snmp-config.h>
 
@@ -32,6 +32,9 @@
 #ifdef HAVE_SYS_SYSCTL_H
 #include <sys/sysctl.h>
 #endif
+#ifdef HAVE_SYS_PROC_H
+#include <sys/proc.h>
+#endif
 #ifdef HAVE_SYS_USER_H
 #include <sys/user.h>
 #endif
@@ -55,15 +58,21 @@ extern kvm_t *kd;
 #define SWRUN_TABLE	kinfo_proc
 #define SWRUN_K_STAT	ki_stat
 #define SWRUN_K_PID	ki_pid
+#define SWRUN_K_PPID	ki_ppid
+#define SWRUN_K_TID	ki_tid
 #define SWRUN_K_COMM	ki_comm
 #define SWRUN_K_FLAG	ki_flag
 #define SWRUN_K_CLASS	ki_pri.pri_class
 
-#elif HAVE_KVM_GETPROC2
+#elif HAVE_KVM_GETPROC2 || defined(openbsd5)
     /*
      * newer NetBSD, OpenBSD kinfo_proc2 field names
      */
+#if defined(openbsd5)
+#define SWRUN_TABLE	kinfo_proc
+#else
 #define SWRUN_TABLE	kinfo_proc2
+#endif
 #define SWRUN_K_STAT	p_stat
 #define SWRUN_K_PID	p_pid
 #define SWRUN_K_COMM	p_comm
@@ -97,6 +106,22 @@ extern kvm_t *kd;
  *  Define dummy values if not already provided by the system
  */
 
+#ifdef dragonfly
+
+/*
+ * DragonFly is special. p_stat is an enum!
+ */
+
+#define SRUN	200
+#define SSLEEP	202
+#define SWAIT	203
+#define SLOCK	205
+#define SDEAD	208
+#define SONPROC	209
+
+
+#else
+
 #ifndef SRUN
 #define SRUN	200	/* Defined by FreeBSD/OpenBSD, missing in  NetBSD */
 #endif
@@ -128,6 +153,8 @@ extern kvm_t *kd;
 #define SONPROC	209	/* Defined by OpenBSD, missing in FreeBSD/NetBSD */
 #endif
 
+#endif
+
 /* ---------------------------------------------------------------------
  */
 void
@@ -150,23 +177,29 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags)
 {
     struct SWRUN_TABLE  *proc_table;
     int                  nprocs, i, rc;
-    char                 buf[BUFSIZ], **argv;
+    char                 buf[BUFSIZ+1], **argv;
     netsnmp_swrun_entry *entry;
 
     if ( 0 == kd ) {
         DEBUGMSGTL(("swrun:load:arch"," Can't query kvm info\n"));
         return 1;     /* No handle for retrieving process table */
     }
-#if HAVE_KVM_GETPROC2
+#if defined(openbsd5)
+    proc_table = kvm_getprocs(kd, KERN_PROC_KTHREAD, 0, sizeof(struct kinfo_proc), &nprocs );
+#elif defined(HAVE_KVM_GETPROC2)
     proc_table = kvm_getproc2(kd, KERN_PROC_ALL, 0, sizeof(struct kinfo_proc2), &nprocs );
-#elif defined(KERN_PROC_PROC)
-    proc_table = kvm_getprocs(kd, KERN_PROC_PROC, 0, &nprocs );
 #else
     proc_table = kvm_getprocs(kd, KERN_PROC_ALL, 0, &nprocs );
 #endif
     for ( i=0 ; i<nprocs; i++ ) {
         if ( 0 == proc_table[i].SWRUN_K_STAT )
             continue;
+        if ( -1 == proc_table[i].SWRUN_K_PID )
+            continue;
+#ifdef SWRUN_K_TID
+	if ( 0 == proc_table[i].SWRUN_K_PPID )
+	    proc_table[i].SWRUN_K_PID = proc_table[i].SWRUN_K_TID;
+#endif
         entry = netsnmp_swrun_entry_create(proc_table[i].SWRUN_K_PID);
         if (NULL == entry)
             continue;   /* error already logged by function */
@@ -186,18 +219,18 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags)
 #if HAVE_KVM_GETPROC2
         argv = kvm_getargv2( kd, &(proc_table[i]), 0);
 #else
-        argv = kvm_getargv(  kd, &(proc_table[i]), 0);
+        argv = kvm_getargv(  kd, &(proc_table[i]), BUFSIZ);
 #endif
 
-        entry->hrSWRunName_len = snprintf(entry->hrSWRunName,
-                                   sizeof(entry->hrSWRunName)-1,
-                                          "%s", proc_table[i].SWRUN_K_COMM);
+        entry->hrSWRunName_len = sprintf(entry->hrSWRunName, "%.*s",
+                                         (int)sizeof(entry->hrSWRunName) - 1,
+                                         proc_table[i].SWRUN_K_COMM);
 
-        if ( argv && *argv)
-            entry->hrSWRunPath_len = snprintf(entry->hrSWRunPath,
-                                       sizeof(entry->hrSWRunPath)-1,
-                                              "%s", argv[0]);
-        else {
+        if (argv && *argv) {
+            entry->hrSWRunPath_len = sprintf(entry->hrSWRunPath, "%.*s",
+                                             (int)sizeof(entry->hrSWRunPath)-1,
+                                             argv[0]);
+        } else {
             memcpy( entry->hrSWRunPath, entry->hrSWRunName,
                                         entry->hrSWRunName_len );
             entry->hrSWRunPath_len = entry->hrSWRunName_len;
@@ -219,13 +252,15 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags)
         if (argv)
             argv++;    /* Skip argv[0] */
         while ( argv && *argv ) {
-            strcat(buf, " ");
-            strcat(buf, *argv);
+            strlcat(buf, " ", sizeof(buf));
+            strlcat(buf, *argv, sizeof(buf));
             argv++;
         }
-        entry->hrSWRunParameters_len = snprintf(entry->hrSWRunParameters,
-                                         sizeof(entry->hrSWRunParameters)-1,
-                                          "%s", buf+1);
+        if (strlen(buf) >= BUFSIZ-10)
+            snmp_log(LOG_ERR, "params %lu/%d %s\n", strlen(buf), BUFSIZ, buf);
+        entry->hrSWRunParameters_len =
+            sprintf(entry->hrSWRunParameters, "%.*s",
+                    (int)sizeof(entry->hrSWRunParameters) - 1, buf+1);
 
         entry->hrSWRunType = (P_SYSTEM & proc_table[i].SWRUN_K_FLAG) 
 #ifdef SWRUN_K_CLASS
@@ -265,6 +300,7 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags)
         case SRUN:    entry->hrSWRunStatus = HRSWRUNSTATUS_RUNNING;
                       break;
         case SSLEEP:
+	case SACTIVE:
         case SWAIT:   entry->hrSWRunStatus = HRSWRUNSTATUS_RUNNABLE;
                       break;
         case SIDL:
@@ -288,24 +324,27 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags)
 	 entry->hrSWRunPerfCPU += (proc_table[i].ki_rusage_ch.ru_utime.tv_sec*1000000 + proc_table[i].ki_rusage_ch.ru_utime.tv_usec) / 10000;
 	 entry->hrSWRunPerfCPU += (proc_table[i].ki_rusage_ch.ru_stime.tv_sec*1000000 + proc_table[i].ki_rusage_ch.ru_stime.tv_usec) / 10000;
 	 entry->hrSWRunPerfMem  = proc_table[i].ki_rssize * (getpagesize()/1024);  /* in kB */
-#elif defined(HAVE_KVM_GETPROC2)
+#elif defined(HAVE_KVM_GETPROC2) || defined(openbsd5)
         /*
          * newer NetBSD, OpenBSD
          */
-        entry->hrSWRunPerfCPU  = proc_table[i].p_uticks;
-        entry->hrSWRunPerfCPU += proc_table[i].p_sticks;
-        entry->hrSWRunPerfCPU += proc_table[i].p_iticks;
+	entry->hrSWRunPerfCPU = proc_table[i].p_rtime_sec*100;
+	entry->hrSWRunPerfCPU += proc_table[i].p_rtime_usec / 10000;
+
         entry->hrSWRunPerfMem  = proc_table[i].p_vm_rssize;
         entry->hrSWRunPerfMem *= (getpagesize() / 1024);
 #elif defined(dragonfly) && __DragonFly_version >= 190000
 	entry->hrSWRunPerfCPU  = proc_table[i].kp_lwp.kl_uticks;
 	entry->hrSWRunPerfCPU += proc_table[i].kp_lwp.kl_sticks;
 	entry->hrSWRunPerfCPU += proc_table[i].kp_lwp.kl_iticks;
+	entry->hrSWRunPerfCPU = entry->hrSWRunPerfCPU / 10000;
+
 	entry->hrSWRunPerfMem  = proc_table[i].kp_vm_map_size / 1024;
 #elif defined(dragonfly)
 	entry->hrSWRunPerfCPU  = proc_table[i].kp_eproc.e_uticks;
 	entry->hrSWRunPerfCPU += proc_table[i].kp_eproc.e_sticks;
 	entry->hrSWRunPerfCPU += proc_table[i].kp_eproc.e_iticks;
+
 	entry->hrSWRunPerfMem  = proc_table[i].kp_vm_map_size / 1024;
 
 #else
diff --git a/agent/mibgroup/host/data_access/swrun_kvm_proc.c b/agent/mibgroup/host/data_access/swrun_kvm_proc.c
index ae6876e..7156cf9 100644
--- a/agent/mibgroup/host/data_access/swrun_kvm_proc.c
+++ b/agent/mibgroup/host/data_access/swrun_kvm_proc.c
@@ -109,9 +109,9 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags)
         }
         rc = CONTAINER_INSERT(container, entry);
 
-        entry->hrSWRunName_len = snprintf(entry->hrSWRunName,
-                                   sizeof(entry->hrSWRunName)-1,
-                                          "%s", proc_buf->p_user.u_comm);
+        entry->hrSWRunName_len = sprintf(entry->hrSWRunName, "%.*s",
+                                         (int)sizeof(entry->hrSWRunName)-1,
+                                         proc_buf->p_user.u_comm);
         /*
          *  Split u_psargs into two:
          *     argv[0]   is hrSWRunPath
@@ -120,12 +120,12 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags)
         for ( cp = proc_buf->p_user.u_psargs; ' ' == *cp; cp++ )
             ;
         *cp = '\0';    /* End of argv[0] */
-        entry->hrSWRunPath_len = snprintf(entry->hrSWRunPath,
-                                   sizeof(entry->hrSWRunPath)-1,
-                                          "%s", proc_buf->p_user.u_psargs);
-        entry->hrSWRunParameters_len = snprintf(entry->hrSWRunParameters,
-                                         sizeof(entry->hrSWRunParameters)-1,
-                                          "%s", cp+1);
+        entry->hrSWRunPath_len = sprintf(entry->hrSWRunPath, "%.*s",
+                                          (int)sizeof(entry->hrSWRunPath)-1,
+                                          proc_buf->p_user.u_psargs);
+        entry->hrSWRunParameters_len =
+            sprintf(entry->hrSWRunParameters, "%.*s",
+                    (int)sizeof(entry->hrSWRunParameters) - 1, cp + 1);
         *cp = ' ';     /* Restore u_psargs value */
 
         /*
diff --git a/agent/mibgroup/host/data_access/swrun_procfs_status.c b/agent/mibgroup/host/data_access/swrun_procfs_status.c
index 80182d0..ef9e269 100644
--- a/agent/mibgroup/host/data_access/swrun_procfs_status.c
+++ b/agent/mibgroup/host/data_access/swrun_procfs_status.c
@@ -57,7 +57,7 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags)
     FILE                *fp;
     int                  pid, i;
     unsigned long long   cpu;
-    char                 buf[BUFSIZ], buf2[BUFSIZ], *cp;
+    char                 buf[BUFSIZ], buf2[BUFSIZ], *cp, *cp1;
     netsnmp_swrun_entry *entry;
     
     procdir = opendir("/proc");
@@ -120,40 +120,38 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags)
         if (!fp) {
             netsnmp_swrun_entry_free(entry);
             continue; /* file (process) probably went away */
-	}
-        memset(buf, 0, sizeof(buf));
-        if ((cp = fgets( buf, BUFSIZ-1, fp )) == NULL) {
-            fclose(fp);
-            netsnmp_swrun_entry_free(entry);
-            continue;
         }
+        entry->hrSWRunType = HRSWRUNTYPE_APPLICATION;
+        memset(buf, 0, sizeof(buf));
+        cp = fgets( buf, BUFSIZ-1, fp );
         fclose(fp);
-
-        /*
-         *     argv[0]   is hrSWRunPath
-         */ 
-        entry->hrSWRunPath_len = snprintf(entry->hrSWRunPath,
-                                   sizeof(entry->hrSWRunPath)-1, "%s", buf);
-        /*
-         * Stitch together argv[1..] to construct hrSWRunParameters
-         */
-        cp = buf + entry->hrSWRunPath_len+1;
-        while ( 1 ) {
-            while (*cp)
-                cp++;
-            if ( '\0' == *(cp+1))
-                break;      /* '\0''\0' => End of command line */
-            *cp = ' ';
+        if (cp != NULL) {
+            /*
+             *     argv[0]   is hrSWRunPath
+             */ 
+            entry->hrSWRunPath_len = snprintf(entry->hrSWRunPath,
+                                       sizeof(entry->hrSWRunPath)-1, "%s", buf);
+            /*
+             * Stitch together argv[1..] to construct hrSWRunParameters
+             */
+            cp = buf + entry->hrSWRunPath_len+1;
+            while ( 1 ) {
+                while (*cp)
+                    cp++;
+                if ( '\0' == *(cp+1))
+                    break;      /* '\0''\0' => End of command line */
+                *cp = ' ';
+            }
+            entry->hrSWRunParameters_len
+                = sprintf(entry->hrSWRunParameters, "%.*s",
+                          (int)sizeof(entry->hrSWRunParameters) - 1,
+                          buf + entry->hrSWRunPath_len + 1);
+        } else {
+            /* empty /proc/PID/cmdline, it's probably a kernel thread */
+            entry->hrSWRunPath_len = 0;
+            entry->hrSWRunParameters_len = 0;
+            entry->hrSWRunType = HRSWRUNTYPE_OPERATINGSYSTEM;
         }
-        entry->hrSWRunParameters_len
-            = sprintf(entry->hrSWRunParameters, "%.*s",
-                      (int)sizeof(entry->hrSWRunParameters) - 1,
-                      buf + entry->hrSWRunPath_len + 1);
- 
-        /*
-         * XXX - No information regarding system processes vs applications
-         */
-        entry->hrSWRunType = HRSWRUNTYPE_APPLICATION;
 
         /*
          *   {xxx} {xxx} STATUS  {xxx}*10  UTIME STIME  {xxx}*8 RSS
@@ -174,8 +172,12 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags)
         cp = buf;
         while ( ' ' != *(cp++))    /* Skip first field */
             ;
-        while ( ' ' != *(cp++))    /* Skip second field */
-            ;
+        cp1 = cp;                  /* Skip second field */
+        while (*cp1) {
+            if (*cp1 == ')') cp = cp1;
+            cp1++;
+        }
+        cp += 2;
         
         switch (*cp) {
         case 'R':  entry->hrSWRunStatus = HRSWRUNSTATUS_RUNNING;
diff --git a/agent/mibgroup/host/data_access/swrun_procinfo.c b/agent/mibgroup/host/data_access/swrun_procinfo.c
index 20caee6..14640e1 100644
--- a/agent/mibgroup/host/data_access/swrun_procinfo.c
+++ b/agent/mibgroup/host/data_access/swrun_procinfo.c
@@ -42,7 +42,7 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags)
 {
     struct procsinfo    *proc_table;
     pid_t                proc_index = 0;
-    int                  nprocs, rc, i;
+    int                  nprocs, i;
     char                 pentry[128], *ppentry, fullpath[128];
     netsnmp_swrun_entry *entry;
 
@@ -67,7 +67,7 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags)
         entry = netsnmp_swrun_entry_create(proc_table[i].pi_pid);
         if (NULL == entry)
             continue;   /* error already logged by function */
-        rc = CONTAINER_INSERT(container, entry);
+        CONTAINER_INSERT(container, entry);
 
 	memset(pentry, 0, sizeof(pentry));								/* Empty each time */
 	if(!(SKPROC & proc_table[i].pi_flags)) {							/* Remove kernel processes */
@@ -124,7 +124,7 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags)
     free(proc_table);
 
     DEBUGMSGTL(("swrun:load:arch"," loaded %d entries\n",
-                CONTAINER_SIZE(container)));
+                (int) CONTAINER_SIZE(container)));
 
     return 0;
 }
diff --git a/agent/mibgroup/host/hr_disk.c b/agent/mibgroup/host/hr_disk.c
index 679264b..c4ac52f 100644
--- a/agent/mibgroup/host/hr_disk.c
+++ b/agent/mibgroup/host/hr_disk.c
@@ -133,8 +133,10 @@
 void            Init_HR_Disk(void);
 int             Get_Next_HR_Disk(void);
 int             Get_Next_HR_Disk_Partition(char *, size_t, int);
+#if !(defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7))
 static void     Add_HR_Disk_entry(const char *, int, int, int, int,
                                   const char *, int, int);
+#endif
 static void     Save_HR_Disk_General(void);
 static void     Save_HR_Disk_Specific(void);
 static int      Query_Disk(int, const char *);
@@ -150,7 +152,9 @@ static int      HRD_type_index;
 static int      HRD_index;
 static char     HRD_savedModel[40];
 static long     HRD_savedCapacity = 1044;
+#if defined(DIOC_DESCRIBE) || defined(DKIOCINFO) || defined(HAVE_LINUX_HDREG_H)
 static int      HRD_savedFlags;
+#endif
 static time_t   HRD_history[HRDEV_TYPE_MASK + 1];
 
 #ifdef DIOC_DESCRIBE
@@ -668,6 +672,7 @@ typedef struct {
 static HRD_disk_t disk_devices[MAX_NUMBER_DISK_TYPES];
 static int      HR_number_disk_types = 0;
 
+#if !(defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7))
 static void
 Add_HR_Disk_entry(const char *devpart_string,
                   int first_ctl,
@@ -724,6 +729,7 @@ Add_HR_Disk_entry(const char *devpart_string,
                     devpart_string, nbr_created));
 #endif
 }
+#endif
 
 void
 Init_HR_Disk(void)
diff --git a/agent/mibgroup/host/hr_partition.c b/agent/mibgroup/host/hr_partition.c
index abe7692..3b9abd6 100644
--- a/agent/mibgroup/host/hr_partition.c
+++ b/agent/mibgroup/host/hr_partition.c
@@ -47,6 +47,10 @@ static char     HRP_savedName[1024];
 #ifdef NETSNMP_CAN_GET_DISK_LABEL
 static char     HRP_savedLabel[1024];
 #endif
+#ifdef darwin
+extern int
+Get_HR_Disk_Label(char *string, size_t str_len, const char *devfull);
+#endif
 
 static int      HRP_DiskIndex;
 
diff --git a/agent/mibgroup/host/hr_print.c b/agent/mibgroup/host/hr_print.c
index e7660ff..4cfa25b 100644
--- a/agent/mibgroup/host/hr_print.c
+++ b/agent/mibgroup/host/hr_print.c
@@ -199,7 +199,10 @@ var_hrprint(struct variable * vp,
 
 static int      HRP_index;
 static char   **HRP_name;
-static int      HRP_nbrnames, HRP_maxnames;
+static int      HRP_nbrnames;
+#if HAVE_LPSTAT || HAVE_CGETNEXT || HAVE_PRINTCAP
+static int      HRP_maxnames;
+#endif
 
 #define HRP_MAX_INCR 10
 
diff --git a/agent/mibgroup/host/hr_swinst.c b/agent/mibgroup/host/hr_swinst.c
index 4aa4593..25582bd 100644
--- a/agent/mibgroup/host/hr_swinst.c
+++ b/agent/mibgroup/host/hr_swinst.c
@@ -515,9 +515,12 @@ var_hrswinst(struct variable * vp,
                 snprintf(string, sizeof(string), "%s/%s",
                          swi->swi_directory, swi->swi_name);
                 string[ sizeof(string)-1 ] = 0;
-                stat(string, &stat_buf);
-                ret = date_n_time(&stat_buf.st_mtime, var_len);
+                if (stat(string, &stat_buf) >= 0)
+                    ret = date_n_time(&stat_buf.st_mtime, var_len);
+                else
+                    goto err;
             } else {
+err:
 #if NETSNMP_NO_DUMMY_VALUES
                 ret = NULL;
 #else
diff --git a/agent/mibgroup/host/hr_swrun.c b/agent/mibgroup/host/hr_swrun.c
index 644e7bd..f40e997 100644
--- a/agent/mibgroup/host/hr_swrun.c
+++ b/agent/mibgroup/host/hr_swrun.c
@@ -524,6 +524,12 @@ get_proc_stat_field(int pid,
     if ((cp = get_proc_file_line("/proc/%d/stat", pid, buf, buflen)) == NULL )
 	return NULL;
     for (i = 0; *cp && i < skip; ++i) {
+        /*
+         * The second field is 'comm' and can contain spaces. Hence skip to
+         * the closing parenthesis.
+         */
+        if (i == 1 && *cp == '(')
+            cp = strrchr(cp, ')');
 	cp = skip_to_next_field(cp);
     }
     return cp;
@@ -695,6 +701,8 @@ var_hrswrun(struct variable * vp,
         strcpy(string, proc_table[LowProcIndex].ki_comm);
     #elif defined(dragonfly) && __DragonFly_version >= 190000
         strcpy(string, proc_table[LowProcIndex].kp_comm);
+    #elif defined(openbsd5)
+        strcpy(string, proc_table[LowProcIndex].p_comm);
     #else
         strcpy(string, proc_table[LowProcIndex].kp_proc.p_comm);
     #endif
@@ -816,6 +824,8 @@ var_hrswrun(struct variable * vp,
         strcpy(string, proc_table[LowProcIndex].ki_comm);
     #elif defined(dragonfly) && __DragonFly_version >= 190000
         strcpy(string, proc_table[LowProcIndex].kp_comm);
+    #elif defined(openbsd5)
+        strcpy(string, proc_table[LowProcIndex].p_comm);
     #else
         strcpy(string, proc_table[LowProcIndex].kp_proc.p_comm);
     #endif
@@ -1002,6 +1012,11 @@ var_hrswrun(struct variable * vp,
 		long_return = 2;/* operatingSystem */
 	} else
 	    long_return = 4;	/* application */
+    #elif defined(openbsd5)
+        if (proc_table[LowProcIndex].p_flag & P_SYSTEM)
+	    long_return = 2;	/* operatingSystem */
+	else
+	    long_return = 4;	/* application */
     #else
       #if defined(dragonfly) && __DragonFly_version >= 190000
         if (proc_table[LowProcIndex].kp_flags & P_SYSTEM)
@@ -1052,6 +1067,8 @@ var_hrswrun(struct variable * vp,
         switch (proc_table[LowProcIndex].ki_stat) {
     #elif defined(dragonfly) && __DragonFly_version >= 190000
         switch (proc_table[LowProcIndex].kp_stat) {
+    #elif defined(openbsd5)
+        switch (proc_table[LowProcIndex].p_stat) {
     #else
         switch (proc_table[LowProcIndex].kp_proc.p_stat) {
     #endif
@@ -1157,6 +1174,10 @@ var_hrswrun(struct variable * vp,
         long_return = proc_table[LowProcIndex].kp_lwp.kl_uticks +
             proc_table[LowProcIndex].kp_lwp.kl_sticks +
             proc_table[LowProcIndex].kp_lwp.kl_iticks;
+    #elif defined(openbsd5)
+        long_return = proc_table[LowProcIndex].p_uticks +
+            proc_table[LowProcIndex].p_sticks +
+            proc_table[LowProcIndex].p_iticks;
     #elif defined(dragonfly)
         long_return = proc_table[LowProcIndex].kp_eproc.e_uticks +
             proc_table[LowProcIndex].kp_eproc.e_sticks +
@@ -1278,6 +1299,11 @@ var_hrswrun(struct variable * vp,
     #else
             proc_table[LowProcIndex].kp_eproc.e_vm.vm_map.size / 1024;
     #endif
+  #elif defined(openbsd5)
+        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);
   #else
         long_return = proc_table[LowProcIndex].kp_eproc.e_vm.vm_tsize +
             proc_table[LowProcIndex].kp_eproc.e_vm.vm_ssize +
@@ -1540,7 +1566,11 @@ Init_HR_SWRun(void)
             nproc = 0;
             return;
         }
+  #if defined(openbsd5)
+        proc_table = kvm_getprocs(kd, KERN_PROC_ALL, 0, sizeof (struct kinfo_proc), &nproc);
+  #else
         proc_table = kvm_getprocs(kd, KERN_PROC_ALL, 0, &nproc);
+  #endif
     }
 #else
 
@@ -1600,6 +1630,9 @@ Get_Next_HR_SWRun(void)
     #elif defined(dragonfly) && __DragonFly_version >= 190000
         if (proc_table[current_proc_entry].kp_stat != 0)
             return proc_table[current_proc_entry++].kp_pid;
+    #elif defined(openbsd5)
+        if (proc_table[current_proc_entry].p_stat != 0)
+            return proc_table[current_proc_entry++].p_pid;
     #else
         if (proc_table[current_proc_entry].kp_proc.p_stat != 0)
             return proc_table[current_proc_entry++].kp_proc.p_pid;
diff --git a/agent/mibgroup/host/hr_system.c b/agent/mibgroup/host/hr_system.c
index 9fea4f4..d99cc7d 100644
--- a/agent/mibgroup/host/hr_system.c
+++ b/agent/mibgroup/host/hr_system.c
@@ -257,9 +257,6 @@ var_hrsys(struct variable * vp,
     char bootparam[8192];
 #endif
     time_t          now;
-#if !(defined(NR_TASKS) || defined(solaris2) || defined(hpux10) || defined(hpux11))
-    int             nproc = 0;
-#endif
 #ifdef linux
     FILE           *fp;
 #endif
@@ -334,19 +331,28 @@ var_hrsys(struct variable * vp,
 #if defined(NR_TASKS)
         long_return = NR_TASKS; /* <linux/tasks.h> */
 #elif NETSNMP_CAN_USE_SYSCTL && defined(CTL_KERN) && defined(KERN_MAXPROC)
-        buf_size = sizeof(nproc);
-        if (sysctl(maxproc_mib, 2, &nproc, &buf_size, NULL, 0) < 0)
-            return NULL;
-        long_return = nproc;
+	{
+	    int nproc = 0;
+
+	    buf_size = sizeof(nproc);
+	    if (sysctl(maxproc_mib, 2, &nproc, &buf_size, NULL, 0) < 0)
+		return NULL;
+	    long_return = nproc;
+	}
 #elif defined(hpux10) || defined(hpux11)
         pstat_getstatic(&pst_buf, sizeof(struct pst_static), 1, 0);
         long_return = pst_buf.max_proc;
 #elif defined(solaris2)
-    long_return=get_max_solaris_processes();
-    if(long_return == -1) return NULL;
+        long_return = get_max_solaris_processes();
+        if (long_return == -1)
+            return NULL;
 #elif defined(NPROC_SYMBOL)
-        auto_nlist(NPROC_SYMBOL, (char *) &nproc, sizeof(int));
-        long_return = nproc;
+	{
+	    int nproc = 0;
+
+	    auto_nlist(NPROC_SYMBOL, (char *) &nproc, sizeof(nproc));
+	    long_return = nproc;
+	}
 #else
 #if NETSNMP_NO_DUMMY_VALUES
         return NULL;
diff --git a/agent/mibgroup/if-mib/data_access/interface.c b/agent/mibgroup/if-mib/data_access/interface.c
index 8cb73e8..26e31fc 100644
--- a/agent/mibgroup/if-mib/data_access/interface.c
+++ b/agent/mibgroup/if-mib/data_access/interface.c
@@ -472,6 +472,7 @@ _access_interface_entry_compare_name(const void *lhs, const void *rhs)
                   ((const netsnmp_interface_entry *) rhs)->name);
 }
 
+#ifndef NETSNMP_ACCESS_INTERFACE_NOARCH
 /**
  */
 static void
@@ -479,6 +480,7 @@ _access_interface_entry_release(netsnmp_interface_entry * entry, void *context)
 {
     netsnmp_access_interface_entry_free(entry);
 }
+#endif
 
 /**
  */
diff --git a/agent/mibgroup/if-mib/data_access/interface_linux.c b/agent/mibgroup/if-mib/data_access/interface_linux.c
index 3419811..f196fc8 100644
--- a/agent/mibgroup/if-mib/data_access/interface_linux.c
+++ b/agent/mibgroup/if-mib/data_access/interface_linux.c
@@ -18,7 +18,31 @@ netsnmp_feature_require(interface_ioctl_flags_set)
 
 #ifdef HAVE_PCI_LOOKUP_NAME
 #include <pci/pci.h>
+#include <setjmp.h>
 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
+netsnmp_pci_error(char *msg, ...)
+{
+    va_list args;
+    char *buf;
+    int buflen;
+
+    va_start(args, msg);
+    buflen = strlen("pcilib: ")+strlen(msg)+2;
+    buf = malloc(buflen);
+    snprintf(buf, buflen, "pcilib: %s\n", msg);
+    snmp_vlog(LOG_ERR, buf, args);
+    free(buf);
+    va_end(args);
+    if (do_longjmp)
+	longjmp(err_buf, 1);
+    else
+	exit(1);
+}
 #endif
 
 #ifdef HAVE_LINUX_ETHTOOL_H
@@ -147,10 +171,22 @@ netsnmp_arch_interface_init(void)
 
 #ifdef HAVE_PCI_LOOKUP_NAME
     pci_access = pci_alloc();
-    if (pci_access)
+    if (!pci_access) {
+	snmp_log(LOG_ERR, "pcilib: pci_alloc failed\n");
+	return;
+    }
+
+    pci_access->error = netsnmp_pci_error;
+
+    do_longjmp = 1;
+    if (setjmp(err_buf)) {
+        pci_cleanup(pci_access);
+	snmp_log(LOG_ERR, "pcilib: pci_init failed\n");
+        pci_access = NULL;
+    }
+    else if (pci_access)
 	pci_init(pci_access);
-    else
-	snmp_log(LOG_ERR, "Unable to create pci access method\n");
+    do_longjmp = 0;
 #endif
 }
 
@@ -1061,7 +1097,7 @@ int netsnmp_prefix_listen()
     }
 
     memset(&req, 0, sizeof(req));
-    req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg));
+    req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtgenmsg));
     req.n.nlmsg_flags = NLM_F_REQUEST | NLM_F_ROOT;
     req.n.nlmsg_type = RTM_GETLINK;
     req.r.ifi_family = AF_INET6;
diff --git a/agent/mibgroup/if-mib/data_access/interface_sysctl.c b/agent/mibgroup/if-mib/data_access/interface_sysctl.c
index 1deff82..6076d19 100644
--- a/agent/mibgroup/if-mib/data_access/interface_sysctl.c
+++ b/agent/mibgroup/if-mib/data_access/interface_sysctl.c
@@ -355,11 +355,12 @@ netsnmp_arch_interface_container_load(netsnmp_container* container,
     if_list = (u_char*)malloc(if_list_size);
     if (if_list == NULL) {
         snmp_log(LOG_ERR, "could not allocate memory for interface info "
-                 "(%zu bytes)\n", if_list_size);
+                 "(%u bytes)\n", (unsigned) if_list_size);
         return -3;
     } else {
         DEBUGMSGTL(("access:interface:container:sysctl",
-                    "allocated %zu bytes for if_list\n", if_list_size));
+                    "allocated %u bytes for if_list\n",
+                    (unsigned) if_list_size));
     }
 
     if (sysctl(sysctl_oid, sizeof(sysctl_oid)/sizeof(int), if_list,
diff --git a/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c b/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c
index b8a09b5..fb838ef 100644
--- a/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c
+++ b/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c
@@ -500,11 +500,6 @@ _add_new_interface(netsnmp_interface_entry *ifentry,
                 _check_and_replace_old(ifentry, container);
 
         CONTAINER_INSERT(container, rowreq_ctx);
-        /*
-         * fix this when we hit an arch that reports its own last change
-         */
-        netsnmp_assert(0 == (ifentry->ns_flags &
-                             NETSNMP_INTERFACE_FLAGS_HAS_LASTCHANGE));
         if (0 == _first_load) {
             rowreq_ctx->data.ifLastChange = netsnmp_get_agent_uptime();
             ifTable_lastChange_set(rowreq_ctx->data.ifLastChange);
diff --git a/agent/mibgroup/if-mib/ifXTable/ifXTable_interface.c b/agent/mibgroup/if-mib/ifXTable/ifXTable_interface.c
index 6828ab2..23b50d0 100644
--- a/agent/mibgroup/if-mib/ifXTable/ifXTable_interface.c
+++ b/agent/mibgroup/if-mib/ifXTable/ifXTable_interface.c
@@ -1828,7 +1828,7 @@ ifXTable_container_init_persistence(netsnmp_container *container)
     register_config_handler(NULL, row_token,
                             _ifXTable_container_row_restore, NULL, NULL);
     netsnmp_assert(container);
-    memdup((u_char **)&container_p, &container, sizeof(container));
+    container_p = netsnmp_memdup(&container, sizeof(container));
     netsnmp_assert(container_p);
     rc = snmp_register_callback(SNMP_CALLBACK_LIBRARY,
                                 SNMP_CALLBACK_STORE_DATA,
diff --git a/agent/mibgroup/ip-forward-mib/data_access/route.h b/agent/mibgroup/ip-forward-mib/data_access/route.h
index a2b4ee4..2c731a6 100644
--- a/agent/mibgroup/ip-forward-mib/data_access/route.h
+++ b/agent/mibgroup/ip-forward-mib/data_access/route.h
@@ -22,6 +22,10 @@ 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)
+#elif defined( freebsd7 ) || defined( netbsd5 ) || defined( openbsd4 ) || defined( dragonfly ) || defined( darwin )
+config_require(ip-forward-mib/data_access/route_sysctl)
+#elif defined(solaris2) && defined( HAVE_MIB2_IPIFSTATSENTRY_T )
+config_require(ip-forward-mib/data_access/route_solaris)
 #else
 config_error(the route data access library is not available in this environment.)
 #endif
diff --git a/agent/mibgroup/ip-forward-mib/data_access/route_ioctl.c b/agent/mibgroup/ip-forward-mib/data_access/route_ioctl.c
index 815c415..ff89161 100644
--- a/agent/mibgroup/ip-forward-mib/data_access/route_ioctl.c
+++ b/agent/mibgroup/ip-forward-mib/data_access/route_ioctl.c
@@ -56,6 +56,7 @@
 
 #include <net-snmp/net-snmp-includes.h>
 #include <net-snmp/agent/net-snmp-agent-includes.h>
+#include <net-snmp/data_access/ipaddress.h>
 #include <net-snmp/data_access/route.h>
 
 #include "ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.h"
@@ -97,7 +98,7 @@ int _netsnmp_ioctl_route_set_v4(netsnmp_route_entry * entry)
 
     s = socket(AF_INET, SOCK_RAW, NETSNMP_ROUTE_WRITE_PROTOCOL);
     if (s < 0) {
-        snmp_log_perror("socket");
+        snmp_log_perror("netsnmp_ioctl_route_set_v4: socket");
         return -3;
     }
 
@@ -106,7 +107,7 @@ int _netsnmp_ioctl_route_set_v4(netsnmp_route_entry * entry)
     dst.sin_family = AF_INET;
     memcpy(&dst.sin_addr.s_addr, entry->rt_dest, 4);
     DEBUGSTR = inet_ntoa(dst.sin_addr);
-    DEBUGMSGTL(("access:route","*** route to %s\n", DEBUGSTR));
+    DEBUGMSGTL(("access:route","add route to %s\n", DEBUGSTR));
 
     gateway.sin_family = AF_INET;
     memcpy(&gateway.sin_addr.s_addr, entry->rt_nexthop, 4);
@@ -114,7 +115,10 @@ int _netsnmp_ioctl_route_set_v4(netsnmp_route_entry * entry)
     DEBUGMSGTL(("access:route","    via %s\n", DEBUGSTR));
 
     mask.sin_family = AF_INET;
-    mask.sin_addr.s_addr = htonl(0);
+    if (entry->rt_pfx_len != 0)
+	mask.sin_addr.s_addr = netsnmp_ipaddress_ipv4_mask(entry->rt_pfx_len);
+    else
+	mask.sin_addr.s_addr = entry->rt_mask;
     DEBUGSTR = inet_ntoa(mask.sin_addr);
     DEBUGMSGTL(("access:route","    mask %s\n", DEBUGSTR));
 
@@ -133,30 +137,31 @@ int _netsnmp_ioctl_route_set_v4(netsnmp_route_entry * entry)
 #endif
 
     rc = ioctl(s, SIOCADDRT, (caddr_t) & route);
-    close(s);
     if (rc < 0) {
-        snmp_log_perror("ioctl");
-        return -4;
+        snmp_log_perror("netsnmp_ioctl_route_set_v4: ioctl");
+        rc = -4;
     }
+    close(s);
 
-    return 0;
+    return rc;
 }
 #endif
 
 #if defined SIOCDELRT && !defined(irix6)
 int _netsnmp_ioctl_route_delete_v4(netsnmp_route_entry * entry)
 {
-    struct sockaddr_in dst;
+    struct sockaddr_in dst, mask;
     struct sockaddr_in gateway;
     int             s, rc;
     RTENTRY         route;
+    char           *DEBUGSTR;
 
     netsnmp_assert(NULL != entry); /* checked in netsnmp_arch_route_delete */
     netsnmp_assert((4 == entry->rt_dest_len) && (4 == entry->rt_nexthop_len));
 
     s = socket(AF_INET, SOCK_RAW, NETSNMP_ROUTE_WRITE_PROTOCOL);
     if (s < 0) {
-        snmp_log_perror("socket");
+        snmp_log_perror("netsnmp_ioctl_route_delete_v4: socket");
         return -3;
     }
 
@@ -164,11 +169,20 @@ int _netsnmp_ioctl_route_delete_v4(netsnmp_route_entry * entry)
 
     dst.sin_family = AF_INET;
     memcpy(&dst.sin_addr.s_addr, entry->rt_dest, 4);
+    DEBUGSTR = inet_ntoa(dst.sin_addr);
+    DEBUGMSGTL(("access:route","del route to %s\n", DEBUGSTR));
+
+    mask.sin_family = AF_INET;
+    if (entry->rt_pfx_len != 0)
+	mask.sin_addr.s_addr = netsnmp_ipaddress_ipv4_mask(entry->rt_pfx_len);
+    else
+	mask.sin_addr.s_addr = entry->rt_mask;
 
     gateway.sin_family = AF_INET;
     memcpy(&gateway.sin_addr.s_addr, entry->rt_nexthop, 4);
 
     memcpy(&route.rt_dst, &dst, sizeof(struct sockaddr_in));
+    memcpy(&route.rt_genmask, &mask, sizeof(struct sockaddr_in));
     memcpy(&route.rt_gateway, &gateway, sizeof(struct sockaddr_in));
 
     if (32 == entry->rt_pfx_len)
@@ -182,11 +196,11 @@ int _netsnmp_ioctl_route_delete_v4(netsnmp_route_entry * entry)
 #endif
 
     rc = ioctl(s, SIOCDELRT, (caddr_t) & route);
-    close(s);
     if (rc < 0) {
-        snmp_log_perror("ioctl");
+        snmp_log_perror("netsnmp_ioctl_route_delete_v4: ioctl");
         rc = -4;
     }
+    close(s);
 
     return rc;
 }
diff --git a/agent/mibgroup/ip-forward-mib/data_access/route_linux.c b/agent/mibgroup/ip-forward-mib/data_access/route_linux.c
index 7228e38..0f80fe8 100644
--- a/agent/mibgroup/ip-forward-mib/data_access/route_linux.c
+++ b/agent/mibgroup/ip-forward-mib/data_access/route_linux.c
@@ -140,7 +140,6 @@ _load_ipv4(netsnmp_container* container, u_long *index )
         /*
          * count bits in mask
          */
-        mask = htonl(mask);
         entry->rt_pfx_len = netsnmp_ipaddress_ipv4_prefix_len(mask);
 
 #ifdef USING_IP_FORWARD_MIB_INETCIDRROUTETABLE_INETCIDRROUTETABLE_MODULE
diff --git a/agent/mibgroup/ip-forward-mib/data_access/route_solaris.c b/agent/mibgroup/ip-forward-mib/data_access/route_solaris.c
new file mode 100644
index 0000000..5d8ad22
--- /dev/null
+++ b/agent/mibgroup/ip-forward-mib/data_access/route_solaris.c
@@ -0,0 +1,258 @@
+/*
+ *  Interface MIB architecture support
+ *
+ * $Id$
+ */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include "mibII/mibII_common.h"
+
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+#include <net-snmp/data_access/interface.h>
+#include <net-snmp/data_access/route.h>
+#include <net-snmp/data_access/ipaddress.h>
+
+#include <inet/ip.h>
+#include <inet/mib2.h>
+
+#include "ip-forward-mib/data_access/route_ioctl.h"
+#include "ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_constants.h"
+#include "if-mib/data_access/interface_ioctl.h"
+
+static int _load_v4(netsnmp_container *container, u_long *count);
+static int _load_v6(netsnmp_container *container, u_long *count);
+
+/** arch specific load
+ * @internal
+ *
+ * @retval  0 success
+ * @retval -1 no container specified
+ * @retval -2 could not open data file
+ */
+int
+netsnmp_access_route_container_arch_load(netsnmp_container* container,
+                                         u_int load_flags)
+{
+    u_long          count = 0;
+    int             rc;
+
+    DEBUGMSGTL(("access:route:container",
+                "route_container_arch_load (flags %x)\n", load_flags));
+
+    if (NULL == container) {
+        snmp_log(LOG_ERR, "no container specified/found for access_route\n");
+        return -1;
+    }
+
+    rc = _load_v4(container, &count);
+    
+#ifdef NETSNMP_ENABLE_IPV6
+    if((0 != rc) || (load_flags & NETSNMP_ACCESS_ROUTE_LOAD_IPV4_ONLY))
+        return rc;
+
+    /*
+     * load ipv6. ipv6 module might not be loaded,
+     * so ignore -2 err (file not found)
+     */
+    rc = _load_v6(container, &count);
+    if (-2 == rc)
+        rc = 0;
+#endif
+
+    return rc;
+}
+
+/*
+ * create a new entry
+ */
+int
+netsnmp_arch_route_create(netsnmp_route_entry *entry)
+{
+    if (NULL == entry)
+        return -1;
+
+    if (4 != entry->rt_dest_len) {
+        DEBUGMSGT(("access:route:create", "only ipv4 supported\n"));
+        return -2;
+    }
+
+    /* return _netsnmp_ioctl_route_set_v4(entry); */
+    return -2;
+}
+
+/*
+ * create a new entry
+ */
+int
+netsnmp_arch_route_delete(netsnmp_route_entry *entry)
+{
+    if (NULL == entry)
+        return -1;
+
+    if (4 != entry->rt_dest_len) {
+        DEBUGMSGT(("access:route:create", "only ipv4 supported\n"));
+        return -2;
+    }
+
+    /* return _netsnmp_ioctl_route_delete_v4(entry); */
+    return -2;
+}
+
+
+static int
+IP_Cmp_Route(void *addr, void *ep)
+{
+    mib2_ipRouteEntry_t *Ep = ep, *Addr = addr;
+
+    if ((Ep->ipRouteDest == Addr->ipRouteDest) &&
+        (Ep->ipRouteNextHop == Addr->ipRouteNextHop) &&
+        (Ep->ipRouteType == Addr->ipRouteType) &&
+        (Ep->ipRouteProto == Addr->ipRouteProto) &&
+        (Ep->ipRouteMask == Addr->ipRouteMask) &&
+        (Ep->ipRouteInfo.re_max_frag == Addr->ipRouteInfo.re_max_frag) &&
+        (Ep->ipRouteInfo.re_rtt == Addr->ipRouteInfo.re_rtt) &&
+        (Ep->ipRouteInfo.re_ref == Addr->ipRouteInfo.re_ref) &&
+        (Ep->ipRouteInfo.re_frag_flag == Addr->ipRouteInfo.re_frag_flag) &&
+        (Ep->ipRouteInfo.re_src_addr == Addr->ipRouteInfo.re_src_addr) &&
+        (Ep->ipRouteInfo.re_ire_type == Addr->ipRouteInfo.re_ire_type) &&
+        (Ep->ipRouteInfo.re_obpkt == Addr->ipRouteInfo.re_obpkt) &&
+        (Ep->ipRouteInfo.re_ibpkt == Addr->ipRouteInfo.re_ibpkt)
+        )
+        return (0);
+    else
+        return (1);             /* Not found */
+}
+
+
+static int
+IP6_Cmp_Route(void *addr, void *ep)
+{
+    mib2_ipv6RouteEntry_t *Ep = ep, *Addr = addr;
+
+    if ((memcmp(&Ep->ipv6RouteDest, &Addr->ipv6RouteDest, 16) == 0) &&
+        (memcmp(&Ep->ipv6RouteNextHop, &Addr->ipv6RouteNextHop, 16) == 0) &&
+        (Ep->ipv6RouteType == Addr->ipv6RouteType) &&
+        (Ep->ipv6RouteInfo.re_max_frag == Addr->ipv6RouteInfo.re_max_frag) &&
+        (Ep->ipv6RouteInfo.re_rtt == Addr->ipv6RouteInfo.re_rtt) &&
+        (Ep->ipv6RouteInfo.re_ref == Addr->ipv6RouteInfo.re_ref) &&
+        (Ep->ipv6RouteInfo.re_frag_flag == Addr->ipv6RouteInfo.re_frag_flag) &&
+        (memcmp(&Ep->ipv6RouteInfo.re_src_addr, &Addr->ipv6RouteInfo.re_src_addr, 16) == 0) &&
+        (Ep->ipv6RouteInfo.re_ire_type == Addr->ipv6RouteInfo.re_ire_type) &&
+        (Ep->ipv6RouteInfo.re_obpkt == Addr->ipv6RouteInfo.re_obpkt) &&
+        (Ep->ipv6RouteInfo.re_ibpkt == Addr->ipv6RouteInfo.re_ibpkt)
+        )
+        return (0);
+    else
+        return (1);             /* Not found */
+}
+
+
+static int _load_v4(netsnmp_container *container, u_long *count)
+{
+    netsnmp_route_entry *entry;
+    mib2_ipRouteEntry_t Curentry, Nextentry;
+    int req_type;
+
+    for (Nextentry.ipRouteDest = (u_long) -2, req_type = GET_FIRST;;
+             Nextentry = Curentry, req_type = GET_NEXT) {
+	if (getMibstat(MIB_IP_ROUTE, &Curentry, sizeof(mib2_ipRouteEntry_t),
+		       req_type, &IP_Cmp_Route, &Nextentry) != 0)
+	    break;
+#ifdef HAVE_DEFINED_IRE_CACHE
+	if (Curentry.ipRouteInfo.re_ire_type & IRE_CACHE)
+	    continue;
+#endif /* HAVE_DEFINED_IRE_CACHE */
+	if (Curentry.ipRouteInfo.re_ire_type & IRE_BROADCAST)
+	    continue;
+	entry = netsnmp_access_route_entry_create();
+	Curentry.ipRouteIfIndex.o_bytes[Curentry.ipRouteIfIndex.o_length] = '\0';
+	entry->if_index = netsnmp_access_interface_index_find(
+                Curentry.ipRouteIfIndex.o_bytes);
+	entry->ns_rt_index = entry->if_index;
+
+	entry->rt_dest_type = INETADDRESSTYPE_IPV4;
+	entry->rt_dest_len = 4;
+	memcpy(entry->rt_dest, &Curentry.ipRouteDest, 4);
+	memcpy(&entry->rt_mask, &Curentry.ipRouteMask, 4);
+
+	entry->rt_nexthop_type = INETADDRESSTYPE_IPV4;
+	entry->rt_nexthop_len = 4;
+	memcpy(entry->rt_nexthop, &Curentry.ipRouteNextHop, 4);
+
+	entry->rt_pfx_len = netsnmp_ipaddress_ipv4_prefix_len(Curentry.ipRouteMask);
+	entry->rt_type = Curentry.ipRouteType;
+	entry->rt_proto = Curentry.ipRouteProto;
+	entry->rt_age = Curentry.ipRouteAge;
+	entry->rt_metric1 = Curentry.ipRouteMetric1;
+	entry->rt_metric2 = Curentry.ipRouteMetric2;
+	entry->rt_metric3 = Curentry.ipRouteMetric3;
+	entry->rt_metric4 = Curentry.ipRouteMetric4;
+
+	/*
+	 * insert into container
+	 */
+	if (CONTAINER_INSERT(container, entry) < 0) {
+	    DEBUGMSGTL(("access:route:container", "error with route_entry: insert into container failed.\n"));
+	    netsnmp_access_route_entry_free(entry);
+	    continue;
+	}
+	*count++;
+    }
+    return 0;
+}
+
+
+static int _load_v6(netsnmp_container *container, u_long *count)
+{
+    netsnmp_route_entry *entry;
+    mib2_ipv6RouteEntry_t Curentry, Nextentry;
+    int req_type;
+
+    memset(&Nextentry, 0, sizeof(Nextentry));
+    for (req_type = GET_FIRST;;
+             Nextentry = Curentry, req_type = GET_NEXT) {
+	if (getMibstat(MIB_IP6_ROUTE, &Curentry, sizeof(mib2_ipv6RouteEntry_t),
+		       req_type, &IP6_Cmp_Route, &Nextentry) != 0)
+	    break;
+#ifdef HAVE_DEFINED_IRE_CACHE
+	if (Curentry.ipv6RouteInfo.re_ire_type & IRE_CACHE)
+	    continue;
+#endif /* HAVE_DEFINED_IRE_CACHE */
+	if (Curentry.ipv6RouteInfo.re_ire_type & IRE_BROADCAST)
+	    continue;
+	entry = netsnmp_access_route_entry_create();
+	Curentry.ipv6RouteIfIndex.o_bytes[Curentry.ipv6RouteIfIndex.o_length] = '\0';
+	entry->if_index = netsnmp_access_interface_index_find(
+                Curentry.ipv6RouteIfIndex.o_bytes);
+	entry->ns_rt_index = entry->if_index;
+
+	entry->rt_dest_type = INETADDRESSTYPE_IPV6;
+	entry->rt_dest_len = 16;
+	memcpy(entry->rt_dest, &Curentry.ipv6RouteDest, 16);
+
+	entry->rt_nexthop_type = INETADDRESSTYPE_IPV6;
+	entry->rt_nexthop_len = 16;
+	memcpy(entry->rt_nexthop, &Curentry.ipv6RouteNextHop, 16);
+
+	entry->rt_pfx_len = Curentry.ipv6RoutePfxLength;
+	entry->rt_type = Curentry.ipv6RouteType;
+	entry->rt_proto = Curentry.ipv6RouteProtocol;
+	entry->rt_age = Curentry.ipv6RouteAge;
+	entry->rt_policy = calloc(3, sizeof(oid));
+	entry->rt_policy_len = 3;
+	entry->rt_policy[2] = Curentry.ipv6RoutePolicy;
+	entry->rt_metric1 = Curentry.ipv6RouteMetric;
+	entry->rt_metric2 = Curentry.ipv6RouteWeight;
+
+	/*
+	 * insert into container
+	 */
+	if (CONTAINER_INSERT(container, entry) < 0) {
+	    DEBUGMSGTL(("access:route:container", "error with route_entry: insert into container failed.\n"));
+	    netsnmp_access_route_entry_free(entry);
+	    continue;
+	}
+	*count++;
+    }
+    return 0;
+}
diff --git a/agent/mibgroup/ip-forward-mib/data_access/route_sysctl.c b/agent/mibgroup/ip-forward-mib/data_access/route_sysctl.c
new file mode 100644
index 0000000..d4f926b
--- /dev/null
+++ b/agent/mibgroup/ip-forward-mib/data_access/route_sysctl.c
@@ -0,0 +1,436 @@
+/*
+ *  Interface MIB architecture support
+ *
+ * $Id$
+ */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include "mibII/mibII_common.h"
+
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+#include <net-snmp/data_access/interface.h>
+#include <net-snmp/data_access/route.h>
+#include <net-snmp/data_access/ipaddress.h>
+#include <net/if_dl.h>
+
+#include "ip-forward-mib/data_access/route_sysctl.h"
+#include "ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_constants.h"
+#include "if-mib/data_access/interface_ioctl.h"
+
+static int _load_ipv4(netsnmp_container*, int*);
+static int _load_ipv6(netsnmp_container*, int*);
+static int _create_ipv4(netsnmp_route_entry *);
+static int _create_ipv6(netsnmp_route_entry *);
+static int _delete_ipv4(netsnmp_route_entry *);
+static int _delete_ipv6(netsnmp_route_entry *);
+
+#if !defined(SA_SIZE) && !defined(RT_ROUNDUP)
+#define RT_ROUNDUP(a)  \
+        ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
+#endif
+#ifndef SA_SIZE
+#define SA_SIZE(x) RT_ROUNDUP(((struct sockaddr *)(x))->sa_len)
+#endif
+
+/** arch specific load
+ * @internal
+ *
+ * @retval  0 success
+ * @retval -1 no container specified
+ * @retval -2 could not access data source
+ */
+int
+netsnmp_access_route_container_arch_load(netsnmp_container* container,
+					 u_int load_flags)
+{
+    int count, err;
+
+    err = 0;
+
+    DEBUGMSGTL(("access:route:container", "route_container_arch_load\n"));
+
+    if (container == NULL) {
+        snmp_log(LOG_ERR, "no container specified/found for access_route\n");
+        return -1;
+    }
+
+    err = _load_ipv4(container, &count);
+    if (err != 0) {
+        NETSNMP_LOGONCE((LOG_ERR, "_load_ipv4 failed %d\n", err));
+        goto out;
+    }
+
+    if (err != 0 || load_flags & NETSNMP_ACCESS_ROUTE_LOAD_IPV4_ONLY)
+	return err;
+
+    err = _load_ipv6(container, &count);
+    if (err != 0) {
+        NETSNMP_LOGONCE((LOG_ERR, "_load_ipv6 failed %d\n", err));
+        goto out;
+    }
+
+out:
+    return (err == 0 ? 0 : -3);
+}
+
+/** arch specific new route entry creation
+ * @internal
+ *
+ * @retval  0 success
+ * @retval -1 invalid entry specified
+ * @retval -2 could not create route entry
+ */
+int
+netsnmp_arch_route_create(netsnmp_route_entry *entry)
+{
+    int err;
+
+    if (NULL == entry)
+        return -1;
+
+    switch (entry->rt_dest_type) {
+    case INETADDRESSTYPE_IPV4:
+        err = _create_ipv4(entry);
+        break;
+#ifdef NETSNMP_ENABLE_IPV6
+    case INETADDRESSTYPE_IPV6:
+        err = _create_ipv6(entry);
+        break;
+#endif
+    default:
+        err = 0;
+    }
+
+    return (err == 0 ? 0 : -2);
+}
+
+/** arch specific new route entry deletion
+ * @internal
+ *
+ * @retval  0 success
+ * @retval -1 invalid entry specified
+ * @retval -2 could not delete route entry
+ */
+int
+netsnmp_arch_route_delete(netsnmp_route_entry *entry)
+{
+    int err;
+
+    DEBUGMSGTL(("access:route:container",
+                "route_container_arch_delete\n"));
+
+    if (NULL == entry)
+        return -1;
+
+    switch (entry->rt_dest_type) {
+    case INETADDRESSTYPE_IPV4:
+        err = _delete_ipv4(entry);
+        break;
+#ifdef NETSNMP_ENABLE_IPV6
+    case INETADDRESSTYPE_IPV6:
+        err = _delete_ipv6(entry);
+        break;
+#endif
+    default:
+        err = 0;
+    }
+
+    return (err == 0 ? 0 : -2);
+}
+
+#if defined(freebsd4) || defined(netbsd4) || defined(openbsd) || defined(darwin)
+static int
+_type_from_flags(int flags)
+{
+    if (flags & RTF_UP) {
+        if (flags & RTF_BLACKHOLE)
+            return INETCIDRROUTETYPE_REJECT;
+#ifdef RTF_LOCAL
+        else if (flags & RTF_LOCAL)
+            return INETCIDRROUTETYPE_LOCAL;
+#endif
+        else if (flags & RTF_GATEWAY)
+            return INETCIDRROUTETYPE_REMOTE;
+        else
+            return INETCIDRROUTETYPE_OTHER;
+    }
+    return 0;
+}
+
+
+static int
+_load_routing_table_from_sysctl(netsnmp_container* container, int *index,
+    int family)
+{
+    char *buf, *lim, *next;
+    int mib[6];
+    size_t needed;
+    int err;
+    u_char dest_len, dest_type;
+    struct rt_msghdr *rtm;
+
+    buf = NULL;
+    err = 0;
+
+    if (family == AF_INET) {
+        dest_len = 4;
+        dest_type = INETADDRESSTYPE_IPV4;
+    } else if (family == AF_INET6) {
+        dest_len = 16;
+        dest_type = INETADDRESSTYPE_IPV6;
+    } else {
+        err = EINVAL;
+        goto out;
+    }
+
+    mib[0] = CTL_NET;
+    mib[1] = PF_ROUTE;
+    mib[2] = 0;
+    mib[3] = family;
+    mib[4] = NET_RT_DUMP;
+    mib[5] = 0;
+
+    if (sysctl(mib, (sizeof(mib) / sizeof(mib[0])), NULL, &needed, NULL,
+        0) == -1) {
+        err = errno;
+        goto out;
+    }
+
+    if ((buf = malloc(needed)) == NULL) {
+        err = ENOMEM;
+        goto out;
+    }
+
+    if (sysctl(mib, (sizeof(mib) / sizeof(mib[0])), buf, &needed, NULL,
+        0) == -1) {
+        err = errno;
+        goto out;
+    }
+
+    lim = buf + needed;
+
+    for (next = buf; next < lim; next += rtm->rtm_msglen) {    
+	struct sockaddr *if_name = NULL, *if_addr = NULL;
+	struct sockaddr *dest_sa = NULL, *gateway_sa = NULL, *netmask_sa = NULL;
+	netsnmp_route_entry *entry;
+	char *addr_ptr;
+
+        rtm = (struct rt_msghdr*)next;
+
+        /* 
+         * Some code in netstat checks for this ("netmasks done" case).
+         * Filter this out (I don't know why it should exist).
+         */
+        if (rtm->rtm_addrs == RTA_DST)
+            continue;
+
+        entry = netsnmp_access_route_entry_create();
+        if (entry == NULL)
+            return -3;
+        memset(entry->rt_dest, 0, dest_len);
+        entry->rt_mask = 0;
+        memset(entry->rt_nexthop, 0, dest_len);
+
+        addr_ptr = (char *)(rtm + 1);
+
+	if (rtm->rtm_addrs &  RTA_DST) {
+	    dest_sa = (struct sockaddr *)addr_ptr;
+	    addr_ptr += SA_SIZE(dest_sa);
+	}
+	if (rtm->rtm_addrs &  RTA_GATEWAY) {
+	    gateway_sa = (struct sockaddr *)addr_ptr;
+	    addr_ptr += SA_SIZE(gateway_sa);
+	}
+	if (rtm->rtm_addrs &  RTA_NETMASK) {
+	    netmask_sa = (struct sockaddr *)addr_ptr;
+	    addr_ptr += SA_SIZE(netmask_sa);
+	}
+	if (rtm->rtm_addrs &  RTA_IFP) {
+	    if_name = (struct sockaddr *)addr_ptr;
+	    addr_ptr += SA_SIZE(if_name);
+	}
+	if (rtm->rtm_addrs &  RTA_IFA) {
+	    if_addr = (struct sockaddr *)addr_ptr;
+	    addr_ptr += SA_SIZE(if_addr);
+	}
+
+        entry->if_index = rtm->rtm_index;
+
+        /* arbitrary index */
+        entry->ns_rt_index = ++(*index);
+
+        /* copy dest & next hop */
+        entry->rt_dest_type = dest_type;
+        entry->rt_dest_len = dest_len;
+        if (rtm->rtm_addrs & RTA_DST) {
+            if (family == AF_INET)
+                memcpy(entry->rt_dest,
+                    &((struct sockaddr_in*)dest_sa)->sin_addr, dest_len);
+#ifdef NETSNMP_ENABLE_IPV6
+            if (family == AF_INET6)
+                memcpy(entry->rt_dest,
+                    &((struct sockaddr_in6*)dest_sa)->sin6_addr, dest_len);
+#endif
+        }
+
+        entry->rt_nexthop_type = dest_type;
+        entry->rt_nexthop_len = dest_len;
+        if (rtm->rtm_addrs & RTA_GATEWAY) {
+            if (family == AF_INET)
+                memcpy(entry->rt_nexthop,
+                    &((struct sockaddr_in*)gateway_sa)->sin_addr, dest_len);
+#ifdef NETSNMP_ENABLE_IPV6
+            if (family == AF_INET6)
+                memcpy(entry->rt_nexthop,
+                    &((struct sockaddr_in6*)gateway_sa)->sin6_addr, dest_len);
+#endif
+        }
+        else {
+            if (family == AF_INET)
+                memcpy(entry->rt_nexthop,
+                    &((struct sockaddr_in*)if_addr)->sin_addr, dest_len);
+#ifdef NETSNMP_ENABLE_IPV6
+            if (family == AF_INET6)
+                memcpy(entry->rt_nexthop,
+                    &((struct sockaddr_in6*)if_addr)->sin6_addr, dest_len);
+#endif
+        }
+
+        if (family == AF_INET) {
+	    if (netmask_sa) {
+            /* count bits in mask */
+		entry->rt_pfx_len = netsnmp_ipaddress_ipv4_prefix_len(
+			((struct sockaddr_in *)netmask_sa)->sin_addr.s_addr);
+		memcpy(&entry->rt_mask, &((struct sockaddr_in *)netmask_sa)->sin_addr, 4);
+	    }
+	    else {
+		entry->rt_pfx_len = 32;
+	    }
+        }
+#ifdef NETSNMP_ENABLE_IPV6
+        if (family == AF_INET6) {
+	    if (netmask_sa) {
+            /* count bits in mask */
+		entry->rt_pfx_len = netsnmp_ipaddress_ipv6_prefix_len(
+			((struct sockaddr_in6 *)netmask_sa)->sin6_addr);
+		memcpy(&entry->rt_mask, &((struct sockaddr_in6 *)netmask_sa)->sin6_addr, 16);
+	    }
+	    else {
+		entry->rt_pfx_len = 128;
+	    }
+        }
+#endif
+
+#ifdef USING_IP_FORWARD_MIB_INETCIDRROUTETABLE_INETCIDRROUTETABLE_MODULE
+        /*
+    inetCidrRoutePolicy OBJECT-TYPE 
+        SYNTAX     OBJECT IDENTIFIER 
+        MAX-ACCESS not-accessible 
+        STATUS     current 
+        DESCRIPTION 
+               "This object is an opaque object without any defined 
+                semantics.  Its purpose is to serve as an additional 
+                index which may delineate between multiple entries to 
+                the same destination.  The value { 0 0 } shall be used 
+                as the default value for this object."
+        */
+	entry->rt_policy = calloc(3, sizeof(oid));
+	entry->rt_policy[2] = entry->if_index;
+	entry->rt_policy_len = sizeof(oid)*3;
+#endif
+
+        entry->rt_type = _type_from_flags(rtm->rtm_flags);
+	entry->rt_age = rtm->rtm_rmx.rmx_expire;
+	entry->rt_nexthop_as = 0;
+	/* entry->rt_metric1 = rtm->rtm_rmx.rmx_hopcount; */
+
+        if (rtm->rtm_flags & RTF_DYNAMIC)
+            entry->rt_proto = IANAIPROUTEPROTOCOL_ICMP;
+        else if (rtm->rtm_flags & RTF_STATIC)
+            entry->rt_proto = IANAIPROUTEPROTOCOL_NETMGMT;
+#ifdef RTF_LOCAL
+        else if (rtm->rtm_flags & RTF_LOCAL)
+            entry->rt_proto = IANAIPROUTEPROTOCOL_LOCAL;
+#endif
+        else
+            entry->rt_proto = IANAIPROUTEPROTOCOL_OTHER;
+
+        if (CONTAINER_INSERT(container, entry) < 0) {
+            DEBUGMSGTL(("access:route:container",
+                "error with route_entry: insert into container failed.\n"));
+            netsnmp_access_route_entry_free(entry);
+            continue;
+        }
+    }
+
+out:
+    free(buf);
+
+    return err;
+}
+
+/**
+ * netsnmp_access_route_container_arch_load* functions.
+ */
+static int
+_load_ipv4(netsnmp_container* container, int *index)
+{
+
+    DEBUGMSGTL(("access:route:container",
+                "route_container_arch_load ipv4\n"));
+    return _load_routing_table_from_sysctl(container, index, AF_INET);
+}
+
+static int
+_load_ipv6(netsnmp_container* container, int *index)
+{
+
+#ifdef NETSNMP_ENABLE_IPV6
+    DEBUGMSGTL(("access:route:container",
+                "route_container_arch_load ipv6\n"));
+    return _load_routing_table_from_sysctl(container, index, AF_INET6);
+#else
+    return 0;
+#endif
+}
+
+/**
+ * netsnmp_access_route_create* functions.
+ *
+ * TODO: add logic similar to newroute(..) in sbin/route/route.c .
+ */
+static int
+_create_ipv4(netsnmp_route_entry *entry)
+{
+
+    return 0;
+}
+
+static int
+_create_ipv6(netsnmp_route_entry *entry)
+{
+
+    return 0;
+}
+
+/**
+ * netsnmp_access_route_delete* functions.
+ *
+ * TODO: add logic similar to newroute(..) in sbin/route/route.c .
+ */
+static int
+_delete_ipv4(netsnmp_route_entry *entry)
+{
+
+    return 0;
+}
+
+static int
+_delete_ipv6(netsnmp_route_entry *entry)
+{
+#ifdef NETSNMP_ENABLE_IPV6
+
+#endif
+    return 0;
+}
+#endif /* defined(freebsd7) || defined(netbsd) || defined(openbsd) */
diff --git a/agent/mibgroup/ip-forward-mib/data_access/route_sysctl.h b/agent/mibgroup/ip-forward-mib/data_access/route_sysctl.h
new file mode 100644
index 0000000..65eccc7
--- /dev/null
+++ b/agent/mibgroup/ip-forward-mib/data_access/route_sysctl.h
@@ -0,0 +1,9 @@
+#include <sys/param.h>
+#include <sys/socket.h>
+#include <sys/sysctl.h>
+#include <sys/time.h>
+#include <net/if.h>
+#include <net/route.h>
+#include <netinet/in.h>
+#include <errno.h>
+#include <ifaddrs.h>
diff --git a/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface.c b/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface.c
index 0dba9d2..5df46b6 100644
--- a/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface.c
+++ b/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface.c
@@ -1228,6 +1228,8 @@ _inetCidrRouteTable_check_indexes(inetCidrRouteTable_rowreq_ctx *
     if (MFD_SUCCESS != rc)
         return SNMP_ERR_NOCREATION;
 
+    /* MORE CHECKING REQUIRED */
+
     /*
      * (INDEX) inetCidrRouteDest(2)/InetAddress/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/h 
      */
diff --git a/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.c b/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.c
index 323c1bc..0ff00c1 100644
--- a/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.c
+++ b/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.c
@@ -314,10 +314,10 @@ ipCidrRouteTable_release_data(ipCidrRouteTable_data * data)
  */
 int
 ipCidrRouteTable_indexes_set_tbl_idx(ipCidrRouteTable_mib_index * tbl_idx,
-                                     u_long ipCidrRouteDest_val,
-                                     u_long ipCidrRouteMask_val,
+                                     in_addr_t ipCidrRouteDest_val,
+                                     in_addr_t ipCidrRouteMask_val,
                                      long ipCidrRouteTos_val,
-                                     u_long ipCidrRouteNextHop_val)
+                                     in_addr_t ipCidrRouteNextHop_val)
 {
     DEBUGMSGTL(("verbose:ipCidrRouteTable:ipCidrRouteTable_indexes_set_tbl_idx", "called\n"));
 
@@ -360,10 +360,10 @@ ipCidrRouteTable_indexes_set_tbl_idx(ipCidrRouteTable_mib_index * tbl_idx,
  */
 int
 ipCidrRouteTable_indexes_set(ipCidrRouteTable_rowreq_ctx * rowreq_ctx,
-                             u_long ipCidrRouteDest_val,
-                             u_long ipCidrRouteMask_val,
+                             in_addr_t ipCidrRouteDest_val,
+                             in_addr_t ipCidrRouteMask_val,
                              long ipCidrRouteTos_val,
-                             u_long ipCidrRouteNextHop_val)
+                             in_addr_t ipCidrRouteNextHop_val)
 {
     DEBUGMSGTL(("verbose:ipCidrRouteTable:ipCidrRouteTable_indexes_set",
                 "called\n"));
diff --git a/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h b/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h
index 95767e0..2ce30be 100644
--- a/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h
+++ b/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h
@@ -270,18 +270,18 @@ config_require(ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access)
     int
         ipCidrRouteTable_indexes_set_tbl_idx(ipCidrRouteTable_mib_index *
                                              tbl_idx,
-                                             u_long ipCidrRouteDest_val,
-                                             u_long ipCidrRouteMask_val,
+                                             in_addr_t ipCidrRouteDest_val,
+                                             in_addr_t ipCidrRouteMask_val,
                                              long ipCidrRouteTos_val,
-                                             u_long
+                                             in_addr_t
                                              ipCidrRouteNextHop_val);
     int
         ipCidrRouteTable_indexes_set(ipCidrRouteTable_rowreq_ctx *
                                      rowreq_ctx,
-                                     u_long ipCidrRouteDest_val,
-                                     u_long ipCidrRouteMask_val,
+                                     in_addr_t ipCidrRouteDest_val,
+                                     in_addr_t ipCidrRouteMask_val,
                                      long ipCidrRouteTos_val,
-                                     u_long ipCidrRouteNextHop_val);
+                                     in_addr_t ipCidrRouteNextHop_val);
 
 
 
diff --git a/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access.c b/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access.c
index 3955519..bb27675 100644
--- a/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access.c
+++ b/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access.c
@@ -156,9 +156,10 @@ _snarf_route_entry(netsnmp_route_entry *route_entry,
     rowreq_ctx = ipCidrRouteTable_allocate_rowreq_ctx(route_entry, NULL);
     if ((NULL != rowreq_ctx) &&
         (MFD_SUCCESS == ipCidrRouteTable_indexes_set
-         (rowreq_ctx, *((u_long *) route_entry->rt_dest),
+         (rowreq_ctx, *((in_addr_t *) route_entry->rt_dest),
           route_entry->rt_mask, route_entry->rt_tos,
-          *((u_long *) route_entry->rt_nexthop)))) {
+          *((in_addr_t *) route_entry->rt_nexthop)))) {
+        
         CONTAINER_INSERT(container, rowreq_ctx);
         rowreq_ctx->ipCidrRouteStatus = ROWSTATUS_ACTIVE;
     } else {
diff --git a/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_interface.c b/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_interface.c
index 5e855d4..45f8483 100644
--- a/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_interface.c
+++ b/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_interface.c
@@ -886,7 +886,7 @@ _ipCidrRouteTable_get_column(ipCidrRouteTable_rowreq_ctx * rowreq_ctx,
     case COLUMN_IPCIDRROUTEDEST:
         var->type = ASN_IPADDRESS;
         var->val_len = sizeof(in_addr_t);
-        (*var->val.integer) = rowreq_ctx->tbl_idx.ipCidrRouteDest;
+        memcpy(var->val.integer, &rowreq_ctx->tbl_idx.ipCidrRouteDest, sizeof(in_addr_t));
         break;
 
         /*
@@ -895,7 +895,7 @@ _ipCidrRouteTable_get_column(ipCidrRouteTable_rowreq_ctx * rowreq_ctx,
     case COLUMN_IPCIDRROUTEMASK:
         var->type = ASN_IPADDRESS;
         var->val_len = sizeof(in_addr_t);
-        (*var->val.integer) = rowreq_ctx->tbl_idx.ipCidrRouteMask;
+        memcpy(var->val.integer, &rowreq_ctx->tbl_idx.ipCidrRouteMask, sizeof(in_addr_t));
         break;
 
         /*
@@ -913,7 +913,7 @@ _ipCidrRouteTable_get_column(ipCidrRouteTable_rowreq_ctx * rowreq_ctx,
     case COLUMN_IPCIDRROUTENEXTHOP:
         var->type = ASN_IPADDRESS;
         var->val_len = sizeof(in_addr_t);
-        (*var->val.integer) = rowreq_ctx->tbl_idx.ipCidrRouteNextHop;
+        memcpy(var->val.integer, &rowreq_ctx->tbl_idx.ipCidrRouteNextHop, sizeof(in_addr_t));
         break;
 
         /*
diff --git a/agent/mibgroup/ip-mib/data_access/arp.h b/agent/mibgroup/ip-mib/data_access/arp.h
index 0f536c3..648cb28 100644
--- a/agent/mibgroup/ip-mib/data_access/arp.h
+++ b/agent/mibgroup/ip-mib/data_access/arp.h
@@ -22,6 +22,8 @@ config_require(ip-mib/data_access/arp_common)
 config_require(ip-mib/data_access/arp_netlink)
 #elif defined( 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)
 #else
 /*
  * couldn't determine the correct file!
diff --git a/agent/mibgroup/ip-mib/data_access/arp_sysctl.c b/agent/mibgroup/ip-mib/data_access/arp_sysctl.c
new file mode 100644
index 0000000..24e9cda
--- /dev/null
+++ b/agent/mibgroup/ip-mib/data_access/arp_sysctl.c
@@ -0,0 +1,330 @@
+/*
+ *  Interface MIB architecture support
+ */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+#include <net-snmp/data_access/arp.h>
+#include <net-snmp/data_access/interface.h>
+
+#include <sys/param.h>
+#include <sys/socket.h>
+#include <sys/sysctl.h>
+#include <net/if.h>
+#include <net/if_dl.h>
+#include <net/if_types.h>
+#include <net/route.h>
+#include <netinet/if_ether.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <errno.h>
+
+#if !defined(SA_SIZE) && !defined(RT_ROUNDUP)
+#define RT_ROUNDUP(a)  \
+	((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
+#endif
+
+static int _load_arp_table_from_sysctl(netsnmp_arp_access *);
+static int _load_ndp_table_from_sysctl(netsnmp_arp_access *);
+
+netsnmp_arp_access *
+netsnmp_access_arp_create(u_int init_flags,
+                          NetsnmpAccessArpUpdate *update_hook,
+                          NetsnmpAccessArpGC *gc_hook,
+                          int *cache_timeout, int *cache_flags,
+                          char *cache_expired)
+{
+    netsnmp_arp_access *access;
+
+    access = SNMP_MALLOC_TYPEDEF(netsnmp_arp_access);
+    if (NULL == access) {
+        snmp_log(LOG_ERR, "malloc error in netsnmp_access_arp_create\n");
+        return NULL;
+    }
+
+    access->arch_magic = NULL;
+    access->magic = NULL;
+    access->update_hook = update_hook;
+    access->gc_hook = gc_hook;
+    access->synchronized = 0;
+
+    if (cache_timeout != NULL)
+        *cache_timeout = 5;
+    if (cache_flags != NULL)
+        *cache_flags |= NETSNMP_CACHE_DONT_FREE_BEFORE_LOAD
+                        | NETSNMP_CACHE_AUTO_RELOAD;
+    access->cache_expired = cache_expired;
+
+    return access;
+}
+
+int netsnmp_access_arp_delete(netsnmp_arp_access *access)
+{
+    if (NULL == access)
+        return 0;
+
+    netsnmp_access_arp_unload(access);
+    free(access);
+
+    return 0;
+}
+
+int netsnmp_access_arp_load(netsnmp_arp_access *access)
+{
+    int err = 0;
+
+    access->generation++;
+    DEBUGMSGTL(("access:route:container",
+                "route_container_arch_load ipv4\n"));
+    err = _load_arp_table_from_sysctl(access);
+    if (err != 0) {
+        NETSNMP_LOGONCE((LOG_ERR,
+            "netsnmp_access_arp_ipv4 failed %d\n", err));
+        goto out;
+    }
+    access->gc_hook(access);
+    access->synchronized = (err == 0);
+
+#ifdef NETSNMP_ENABLE_IPV6
+    DEBUGMSGTL(("access:route:container",
+                "route_container_arch_load ipv6\n"));
+    err = _load_ndp_table_from_sysctl(access);
+    if (err != 0) {
+        NETSNMP_LOGONCE((LOG_ERR,
+            "netsnmp_access_arp_ipv6 failed %d\n", err));
+        goto out;
+    }
+    access->gc_hook(access);
+    access->synchronized = (err == 0);
+#endif
+
+out:
+    return (err == 0 ? 0 : -1);
+}
+
+int netsnmp_access_arp_unload(netsnmp_arp_access *access)
+{
+    access->synchronized = 0;
+
+    return 0;
+}
+
+static int
+_load_arp_table_from_sysctl(netsnmp_arp_access *access)
+{
+    netsnmp_arp_entry *entry;
+    struct rt_msghdr *rtm;
+    struct sockaddr_inarp *sin2;
+    struct sockaddr_dl *sdl;
+    char *buf, *lim, *newbuf, *next;
+    int mib[6];
+    size_t needed;
+    int err, st;
+
+    netsnmp_assert(NULL != access);
+
+    mib[0] = CTL_NET;
+    mib[1] = PF_ROUTE;
+    mib[2] = 0;
+    mib[3] = AF_INET;
+    mib[4] = NET_RT_FLAGS;
+    mib[5] = RTF_LLINFO;
+
+    err = 0;
+    buf = newbuf = NULL;
+
+    /* The following logic was adapted from search(..) in usr.sbin/arp/arp.c */
+
+    if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0) {
+        err = errno;
+        goto out;
+    }
+
+    /* Empty arp table. */
+    if (needed == 0)
+        goto out;
+
+    for (;;) {
+        newbuf = realloc(buf, needed);
+        if (newbuf == NULL) {
+            err = ENOMEM;
+            goto out;
+        }
+        buf = newbuf;
+        st = sysctl(mib, 6, buf, &needed, NULL, 0);
+        if (st == 0 || errno != ENOMEM)
+            break;
+        else
+            needed += needed / 8; /* XXX: why 8? */
+    }
+    if (st == -1) {
+        err = errno;
+        goto out;
+    }
+
+    lim = buf + needed;
+    for (next = buf; next < lim; next += rtm->rtm_msglen) {
+
+        rtm = (struct rt_msghdr *)next;
+        sin2 = (struct sockaddr_inarp*)(rtm + 1);
+#ifdef SA_SIZE
+        sdl = (struct sockaddr_dl*)((char *)sin2 + SA_SIZE(sin2));
+#else
+	sdl = (struct sockaddr_dl*)(void *)(RT_ROUNDUP(sin2->sin_len) + (char *)(void *)sin2);
+#endif
+
+        entry = netsnmp_access_arp_entry_create();
+        if (NULL == entry) {
+            err = ENOMEM;
+            break;
+        }
+
+        entry->generation = access->generation;
+        entry->if_index = rtm->rtm_index;
+
+        entry->arp_ipaddress_len = 4;
+
+        memcpy(entry->arp_ipaddress, &sin2->sin_addr.s_addr,
+            entry->arp_ipaddress_len);
+
+        /* HW Address */
+        entry->arp_physaddress_len = 6;
+        if (0 < sdl->sdl_alen &&
+            sdl->sdl_alen <= NETSNMP_ACCESS_ARP_PHYSADDR_BUF_SIZE) {
+            memcpy(entry->arp_physaddress, LLADDR(sdl), sdl->sdl_alen);
+            /* Process status */
+            /* XXX: setting this value for all states is wrong. */
+            entry->arp_state = INETNETTOMEDIASTATE_REACHABLE;
+        } else {
+            entry->arp_physaddress[0] = '\0';
+            entry->arp_state = INETNETTOMEDIASTATE_INCOMPLETE;
+        }
+
+        /* Process type */
+        /* XXX: more states should be handled here, probably.. */
+        if (rtm->rtm_rmx.rmx_expire == 0)
+            entry->arp_type = INETNETTOMEDIATYPE_STATIC;
+        else
+            entry->arp_type = INETNETTOMEDIATYPE_DYNAMIC;
+
+        access->update_hook(access, entry);
+
+    }
+
+out:
+    free(buf);
+    return err;
+}
+
+static int
+_load_ndp_table_from_sysctl(netsnmp_arp_access *access)
+{
+#if 1
+    netsnmp_arp_entry *entry;
+    struct rt_msghdr *rtm;
+    struct sockaddr_in6 *sin2;
+    struct sockaddr_dl *sdl;
+    size_t needed;
+    int err, mib[6], st;
+    char *buf, *lim, *newbuf, *next;
+
+    netsnmp_assert(NULL != access);
+
+    mib[0] = CTL_NET;
+    mib[1] = PF_ROUTE;
+    mib[2] = 0;
+    mib[3] = AF_INET6;
+    mib[4] = NET_RT_FLAGS;
+    mib[5] = RTF_LLINFO;
+
+    err = 0;
+    buf = newbuf = NULL;
+
+    if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0) {
+        err = errno;
+        goto out;
+    }
+
+    /* Empty arp table. */
+    if (needed == 0)
+        goto out;
+
+    for (;;) {
+        newbuf = realloc(buf, needed);
+        if (newbuf == NULL) {
+            err = ENOMEM;
+            goto out;
+        }
+        buf = newbuf;
+        st = sysctl(mib, 6, buf, &needed, NULL, 0);
+        if (st == 0 || errno != ENOMEM)
+            break;
+        else
+            needed += needed / 8; /* XXX: why 8? */
+    }
+    if (st == -1) {
+        err = errno;
+        goto out;
+    }
+
+    lim = buf + needed;
+    for (next = buf; next < lim; next += rtm->rtm_msglen) {
+
+        rtm = (struct rt_msghdr *)next;
+        sin2 = (struct sockaddr_in6*)(rtm + 1);
+#ifdef SA_SIZE
+        sdl = (struct sockaddr_dl*)((char *)sin2 + SA_SIZE(sin2));
+#else
+	sdl = (struct sockaddr_dl*)(void *)(RT_ROUNDUP(sin2->sin6_len) + (char *)(void *)sin2);
+#endif
+
+        if (!(rtm->rtm_flags & RTF_HOST) ||
+            IN6_IS_ADDR_MULTICAST(&sin2->sin6_addr))
+            continue;
+
+        entry = netsnmp_access_arp_entry_create();
+        if (NULL == entry) {
+            err = ENOMEM;
+            break;
+        }
+
+        entry->generation = access->generation;
+        entry->if_index = rtm->rtm_index;
+
+        entry->arp_ipaddress_len = 16;
+
+        memcpy(entry->arp_ipaddress, &sin2->sin6_addr.s6_addr,
+            entry->arp_ipaddress_len);
+
+        /* HW Address */
+        entry->arp_physaddress_len = sdl->sdl_alen;
+        if (0 < sdl->sdl_alen &&
+            sdl->sdl_alen <= NETSNMP_ACCESS_ARP_PHYSADDR_BUF_SIZE) {
+            memcpy(entry->arp_physaddress, LLADDR(sdl), sdl->sdl_alen);
+            /* Process status */
+            /* XXX: setting this value for all states is wrong. */
+            entry->arp_state = INETNETTOMEDIASTATE_REACHABLE;
+        } else {
+            entry->arp_physaddress[0] = '\0';
+            entry->arp_state = INETNETTOMEDIASTATE_INCOMPLETE;
+        }
+
+        /* Process type */
+        /* XXX: more states should be handled here, probably.. */
+        if (rtm->rtm_rmx.rmx_expire == 0)
+            entry->arp_type = INETNETTOMEDIATYPE_STATIC;
+        else
+            entry->arp_type = INETNETTOMEDIATYPE_DYNAMIC;
+
+        access->update_hook(access, entry);
+
+    }
+
+out:
+    free(buf);
+    return err;
+#else
+    return 0;
+#endif
+}
diff --git a/agent/mibgroup/ip-mib/data_access/defaultrouter.h b/agent/mibgroup/ip-mib/data_access/defaultrouter.h
index a4dfbb1..49b9927 100644
--- a/agent/mibgroup/ip-mib/data_access/defaultrouter.h
+++ b/agent/mibgroup/ip-mib/data_access/defaultrouter.h
@@ -20,6 +20,8 @@
 config_require(ip-mib/data_access/defaultrouter_common)
 #if defined( 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)
 #else
 /*
  * couldn't determine the correct file!
diff --git a/agent/mibgroup/ip-mib/data_access/defaultrouter_linux.c b/agent/mibgroup/ip-mib/data_access/defaultrouter_linux.c
index 5a1fa46..038016a 100644
--- a/agent/mibgroup/ip-mib/data_access/defaultrouter_linux.c
+++ b/agent/mibgroup/ip-mib/data_access/defaultrouter_linux.c
@@ -94,16 +94,16 @@ _load(netsnmp_container *container)
     int nlsk;
     struct sockaddr_nl addr;
     int rcvbuf_size = RCVBUF_SIZE;
-    unsigned char rcvbufmem[RCVBUF_SIZE + sizeof(intmax_t)];
-    unsigned char sndbufmem[SNDBUF_SIZE + sizeof(intmax_t)];
-    /*
-     * Buffers must be memory aligned.
-     * Message structure internal alignment is maintained by the netlink API.
-     */
-    unsigned char *rcvbuf = rcvbufmem +
-          sizeof(intmax_t) - (((intptr_t)rcvbufmem) % sizeof(intmax_t));
-    unsigned char *sndbuf = sndbufmem +
-          sizeof(intmax_t) - (((intptr_t)sndbufmem) % sizeof(intmax_t));
+    union {
+        struct nlmsghdr hdr;
+        unsigned char rcvbuf[RCVBUF_SIZE];
+    } rcvbuf_union;
+    union {
+        struct nlmsghdr hdr;
+        unsigned char sndbuf[SNDBUF_SIZE];
+    } sndbuf_union;
+    unsigned char *const rcvbuf = rcvbuf_union.rcvbuf;
+    unsigned char *const sndbuf = sndbuf_union.sndbuf;
     struct nlmsghdr *hdr;
     struct rtmsg *rthdr;
     int count;
@@ -134,7 +134,7 @@ _load(netsnmp_container *container)
     addr.nl_family = AF_NETLINK;
 
     memset(sndbuf, '\0', SNDBUF_SIZE);
-    hdr = (struct nlmsghdr *)sndbuf;
+    hdr = &sndbuf_union.hdr;
     hdr->nlmsg_type = RTM_GETROUTE;
     hdr->nlmsg_pid = getpid();
     hdr->nlmsg_seq = 0;
@@ -184,7 +184,7 @@ _load(netsnmp_container *container)
         /*
          * Walk all of the returned messages
          */
-        nlmhp = (struct nlmsghdr *)rcvbuf;
+        nlmhp = &rcvbuf_union.hdr;
         while (NLMSG_OK(nlmhp, count)) {
             u_char addresstype;
             char   address[NETSNMP_ACCESS_DEFAULTROUTER_BUF_SIZE + 1];
diff --git a/agent/mibgroup/ip-mib/data_access/defaultrouter_sysctl.c b/agent/mibgroup/ip-mib/data_access/defaultrouter_sysctl.c
new file mode 100644
index 0000000..dc46eb8
--- /dev/null
+++ b/agent/mibgroup/ip-mib/data_access/defaultrouter_sysctl.c
@@ -0,0 +1,230 @@
+/*
+ *  Interface MIB architecture support
+ *
+ * $Id:$
+ */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+#include <net-snmp/data_access/defaultrouter.h>
+
+#include "ip-mib/ipDefaultRouterTable/ipDefaultRouterTable.h"
+
+#include <sys/param.h>
+#include <sys/socket.h>
+#include <sys/sysctl.h>
+#include <net/route.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <errno.h>
+#include <unistd.h>
+
+#if !defined(SA_SIZE) && !defined(RT_ROUNDUP)
+#define RT_ROUNDUP(a)  \
+        ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
+#endif
+
+/**---------------------------------------------------------------------*/
+/*
+ * local static prototypes
+ */
+static int _load_defaultrouter_from_sysctl(netsnmp_container *, int);
+
+static int idx_offset;
+
+/*
+ * initialize arch specific storage
+ *
+ * @retval  0: success
+ * @retval <0: error
+ */
+int
+netsnmp_arch_defaultrouter_entry_init(netsnmp_defaultrouter_entry *entry)
+{
+    /*
+     * init
+     */
+    return 0;
+}
+
+/**
+ *
+ * @retval  0 no errors
+ * @retval !0 errors
+ */
+int
+netsnmp_arch_defaultrouter_container_load(netsnmp_container *container,
+                                          u_int load_flags)
+{
+    int err;
+
+    err = 0;
+    idx_offset = 0;
+
+    DEBUGMSGTL(("access:defaultrouter:entry:arch", "load\n"));
+    if (NULL == container) {
+        snmp_log(LOG_ERR,
+            "netsnmp_arch_defaultrouter_container_load: container invalid\n");
+        return 1;
+    }
+
+    err = _load_defaultrouter_from_sysctl(container, AF_INET);
+    if (err != 0) {
+        u_int flags = NETSNMP_ACCESS_DEFAULTROUTER_FREE_KEEP_CONTAINER;
+        netsnmp_access_defaultrouter_container_free(container, flags);
+        goto out;
+    }
+
+#ifdef NETSNMP_ENABLE_IPV6
+    err = _load_defaultrouter_from_sysctl(container, AF_INET6);
+    if (err != 0) {
+        u_int flags = NETSNMP_ACCESS_DEFAULTROUTER_FREE_KEEP_CONTAINER;
+        netsnmp_access_defaultrouter_container_free(container, flags);
+        goto out;
+    }
+#endif
+
+out:
+    return err;
+}
+
+/**
+ *
+ * @retval  0 no errors
+ * @retval !0 errors
+ */
+static int
+_load_defaultrouter_from_sysctl(netsnmp_container *container, int family)
+{
+    netsnmp_defaultrouter_entry *entry;
+    struct rt_msghdr *rtm;
+    struct sockaddr *dst_sa, *gw_sa;
+    char *buf, *lim, *newbuf, *next;
+    char address[NETSNMP_ACCESS_DEFAULTROUTER_BUF_SIZE];
+    int mib[6];
+    size_t address_len, needed;
+    int address_type, err, preference, st;
+
+    netsnmp_assert(NULL != container);
+
+    mib[0] = CTL_NET;
+    mib[1] = PF_ROUTE;
+    mib[2] = 0;
+    mib[3] = family;
+    mib[4] = NET_RT_DUMP;
+    mib[5] = 0;
+
+    err = 0;
+
+    buf = newbuf = NULL;
+
+    if (family == AF_INET) {
+        address_len = 4;
+        address_type = INETADDRESSTYPE_IPV4;
+#ifdef NETSNMP_ENABLE_IPV6
+    } else if (family == AF_INET6) {
+        address_len = 16;
+        address_type = INETADDRESSTYPE_IPV6;
+#endif
+    } else {
+        err = EINVAL;
+        goto out;
+    }
+
+    if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0) {
+        err = errno;
+        goto out;
+    }
+
+    /* Empty arp table. */
+    if (needed == 0)
+        goto out;
+
+    for (;;) {
+        newbuf = realloc(buf, needed);
+        if (newbuf == NULL) {
+            err = ENOMEM;
+            goto out;
+        }
+        buf = newbuf;
+        st = sysctl(mib, sizeof(mib) / sizeof(mib[0]), buf, &needed, NULL, 0);
+        if (st == 0 || errno != ENOMEM)
+            break;
+        else
+            needed += needed / 8; /* XXX: why 8? */
+    }
+    if (st == -1) {
+        err = errno;
+        goto out;
+    }
+
+    lim = buf + needed;
+    for (next = buf; next < lim; next += rtm->rtm_msglen) {
+#ifdef NETSNMP_ENABLE_IPV6
+	struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
+#endif
+
+        rtm = (struct rt_msghdr *)next;
+
+        if (!(rtm->rtm_addrs & RTA_GATEWAY))
+            continue;
+
+        dst_sa = (struct sockaddr*)(rtm + 1);
+#ifdef SA_SIZE
+        gw_sa = (struct sockaddr*)(SA_SIZE(dst_sa) + (char*)dst_sa);
+#else
+        gw_sa = (struct sockaddr*)(RT_ROUNDUP(dst_sa->sa_len) + (char*)dst_sa);
+#endif
+
+        switch (family) {
+        case AF_INET:
+            if (((struct sockaddr_in*)dst_sa)->sin_addr.s_addr != INADDR_ANY)
+                continue;
+	    memcpy(address, &((struct sockaddr_in*)gw_sa)->sin_addr.s_addr,
+	           address_len);
+            break;
+#ifdef NETSNMP_ENABLE_IPV6
+        case AF_INET6:
+            if (memcmp(((struct sockaddr_in6*)dst_sa)->sin6_addr.s6_addr,
+			&in6addr_any, sizeof in6addr_any) != 0)
+		continue; /* XXX: need to determine qualifying criteria for
+                       * default gateways in IPv6. */
+            memcpy(address, &((struct sockaddr_in6*)dst_sa)->sin6_addr.s6_addr,
+		   address_len);
+            break;
+#endif
+        default:
+            break;
+        }
+
+        entry = netsnmp_access_defaultrouter_entry_create();
+        if (NULL == entry) {
+            err = ENOMEM;
+            break;
+        }
+
+        /* XXX: this is wrong (hardcoding the router preference to medium). */
+        preference = 0;
+
+        entry->ns_dr_index    = ++idx_offset;
+        entry->dr_addresstype = address_type;
+        entry->dr_address_len = address_len;
+        memcpy(entry->dr_address, address, sizeof(address));
+        entry->dr_if_index = rtm->rtm_index;
+        entry->dr_lifetime    = rtm->rtm_rmx.rmx_expire;
+        entry->dr_preference  = preference;
+
+        if (CONTAINER_INSERT(container, entry) < 0) {
+            DEBUGMSGTL(("access:arp:container",
+                        "error with defaultrouter_entry: "
+                        "insert into container failed.\n"));
+            netsnmp_access_defaultrouter_entry_free(entry);
+            goto out;
+        }
+    }
+
+out:
+    free(buf);
+    return err;
+}
diff --git a/agent/mibgroup/ip-mib/data_access/ipaddress.h b/agent/mibgroup/ip-mib/data_access/ipaddress.h
index 9cf8181..d79c7c2 100644
--- a/agent/mibgroup/ip-mib/data_access/ipaddress.h
+++ b/agent/mibgroup/ip-mib/data_access/ipaddress.h
@@ -22,6 +22,8 @@ config_require(ip-mib/data_access/ipaddress_common)
 config_require(ip-mib/data_access/ipaddress_linux)
 #elif defined( 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)
 #else
 config_error(the ipaddress data access library is not available in this environment.)
 #endif
diff --git a/agent/mibgroup/ip-mib/data_access/ipaddress_common.c b/agent/mibgroup/ip-mib/data_access/ipaddress_common.c
index e305c9f..a663985 100644
--- a/agent/mibgroup/ip-mib/data_access/ipaddress_common.c
+++ b/agent/mibgroup/ip-mib/data_access/ipaddress_common.c
@@ -414,25 +414,72 @@ netsnmp_ipaddress_prefix_copy(u_char *dst, u_char *src, int addr_len, int pfx_le
 
 
 /**
- * copy the prefix portion of an ip address
+ * Compute the prefix length of a network mask
  *
- * @param  mask  network byte order make
+ * @param  mask  network byte order mask
  *
  * @returns number of prefix bits
  */
 int
 netsnmp_ipaddress_ipv4_prefix_len(in_addr_t mask)
 {
-    int len = 0;
+    int i, len = 0;
+    unsigned char *mp = (unsigned char *)&mask;
+
+    for (i = 0; i < 4; i++)
+	if (mp[i] == 0xFF) len += 8;
+	else break;
+
+    if (i == 4)
+	return len;
+
+    while(0x80 & mp[i]) {
+        ++len;
+        mp[i] <<= 1;
+    }
+
+    return len;
+}
+
+in_addr_t netsnmp_ipaddress_ipv4_mask(int len)
+{
+    int i = 0, m = 0x80;
+    in_addr_t mask;
+    unsigned char *mp = (unsigned char *)&mask;
+
+    if (len < 0 || len > 32) abort();
+
+    memset(mp, 0, sizeof(mask));
 
-    while((0xff000000 & mask) == 0xff000000) {
-        len += 8;
-        mask = mask << 8;
+    while (len >= 8) {
+        mp[i] = 0xFF;
+	len -= 8;
+	i++;
     }
+    while (len) {
+        mp[i] |= m;
+	m >>= 1;
+	len--;
+    }
+    return mask;
+}
+
+int
+netsnmp_ipaddress_ipv6_prefix_len(struct in6_addr mask)
+{
+    int i, len = 0;
+    unsigned char *mp = (unsigned char *)&mask.s6_addr;
+
+    for (i = 0; i < 16; i++)
+	if (mp[i] == 0xFF) len += 8;
+	else break;
+
+    if (i == 16)
+	return len;
 
-    while(0x80000000 & mask) {
+    while(0x80 & mp[i]) {
         ++len;
-        mask = mask << 1;
+        mp[i] <<= 1;
     }
 
     return len;
diff --git a/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c b/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c
index cf65013..6025f05 100644
--- a/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c
+++ b/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c
@@ -267,7 +267,7 @@ _netsnmp_ioctl_ipaddress_container_load_v4(netsnmp_container *container,
         netsnmp_assert(AF_INET == ifrp->ifr_addr.sa_family);
         si = (struct sockaddr_in *) &ifrp->ifr_addr;
         entry->ia_prefix_len =
-            netsnmp_ipaddress_ipv4_prefix_len(ntohl(si->sin_addr.s_addr));
+            netsnmp_ipaddress_ipv4_prefix_len(si->sin_addr.s_addr);
         if(bcastentry)
            bcastentry->ia_prefix_len = entry->ia_prefix_len;
 
diff --git a/agent/mibgroup/ip-mib/data_access/ipaddress_sysctl.c b/agent/mibgroup/ip-mib/data_access/ipaddress_sysctl.c
new file mode 100644
index 0000000..0a6221b
--- /dev/null
+++ b/agent/mibgroup/ip-mib/data_access/ipaddress_sysctl.c
@@ -0,0 +1,272 @@
+/*
+ *  Interface MIB architecture support
+ *
+ * $Id$
+ */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-features.h>
+#include <net-snmp/net-snmp-includes.h>
+#include "mibII/mibII_common.h"
+
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+#include <net-snmp/data_access/ipaddress.h>
+#include <net-snmp/data_access/interface.h>
+
+#include "ip-mib/ipAddressTable/ipAddressTable_constants.h"
+#include "ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_constants.h"
+#include "mibgroup/util_funcs.h"
+
+#include <errno.h>
+#include <sys/ioctl.h>
+#include <arpa/inet.h>
+
+netsnmp_feature_require(prefix_info)
+netsnmp_feature_require(find_prefix_info)
+
+netsnmp_feature_child_of(ipaddress_arch_entry_copy, ipaddress_common)
+
+#ifdef NETSNMP_FEATURE_REQUIRE_IPADDRESS_ARCH_ENTRY_COPY
+netsnmp_feature_require(ipaddress_ioctl_entry_copy)
+#endif /* NETSNMP_FEATURE_REQUIRE_IPADDRESS_ARCH_ENTRY_COPY */
+
+#include "ipaddress_ioctl.h"
+#ifdef SUPPORT_PREFIX_FLAGS
+extern prefix_cbx *prefix_head_list;
+#endif
+
+#define ROUNDUP(a) \
+  ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
+
+/*
+ * initialize arch specific storage
+ *
+ * @retval  0: success
+ * @retval <0: error
+ */
+int
+netsnmp_arch_ipaddress_entry_init(netsnmp_ipaddress_entry *entry)
+{
+    /*
+     * init ipv4 stuff
+     */
+    /* if (NULL == netsnmp_ioctl_ipaddress_entry_init(entry)) */
+    /*     return -1; */
+
+    /*
+     * init ipv6 stuff
+     *   so far, we can just share the ipv4 stuff, so nothing to do
+     */
+    
+    return 0;
+}
+
+/*
+ * cleanup arch specific storage
+ */
+void
+netsnmp_arch_ipaddress_entry_cleanup(netsnmp_ipaddress_entry *entry)
+{
+    /*
+     * cleanup ipv4 stuff
+     */
+    /*netsnmp_ioctl_ipaddress_entry_cleanup(entry); */
+
+    /*
+     * cleanup ipv6 stuff
+     *   so far, we can just share the ipv4 stuff, so nothing to do
+     */
+}
+
+#ifndef NETSNMP_FEATURE_REMOVE_IPADDRESS_ARCH_ENTRY_COPY
+/*
+ * copy arch specific storage
+ */
+int
+netsnmp_arch_ipaddress_entry_copy(netsnmp_ipaddress_entry *lhs,
+                                  netsnmp_ipaddress_entry *rhs)
+{
+    int rc;
+
+    rc = 0;
+
+    /*
+     * copy ipv4 stuff
+     */
+    /*rc = netsnmp_ioctl_ipaddress_entry_copy(lhs, rhs); */
+    if (rc)
+        return rc;
+
+    /*
+     * copy ipv6 stuff
+     *   so far, we can just share the ipv4 stuff, so nothing to do
+     */
+
+    return rc;
+}
+#endif /* NETSNMP_FEATURE_REMOVE_IPADDRESS_ARCH_ENTRY_COPY */
+
+/*
+ * create a new entry
+ */
+int
+netsnmp_arch_ipaddress_create(netsnmp_ipaddress_entry *entry)
+{
+    if (NULL == entry)
+        return -1;
+
+    if (4 == entry->ia_address_len) {
+        return -1;
+    } else if (16 == entry->ia_address_len) {
+        return -1;
+    } else {
+        DEBUGMSGT(("access:ipaddress:create", "wrong length of IP address\n"));
+        return -2;
+    }
+}
+
+/*
+ * create a new entry
+ */
+int
+netsnmp_arch_ipaddress_delete(netsnmp_ipaddress_entry *entry)
+{
+    if (NULL == entry)
+        return -1;
+
+    if (4 == entry->ia_address_len) {
+        return -2;
+    } else if (16 == entry->ia_address_len) {
+        return -3;
+    } else {
+        DEBUGMSGT(("access:ipaddress:create", "only ipv4 supported\n"));
+        return -2;
+    }
+}
+
+/**
+ *
+ * @retval  0 no errors
+ * @retval !0 errors
+ */
+int
+netsnmp_arch_ipaddress_container_load(netsnmp_container *container,
+                                      u_int load_flags)
+{
+    netsnmp_ipaddress_entry *entry = NULL;
+    u_char *if_list = NULL, *cp;
+    size_t if_list_size = 0;
+    int sysctl_oid[] = { CTL_NET, PF_ROUTE, 0, 0, NET_RT_IFLIST, 0 };
+    struct ifa_msghdr *ifa;
+    struct sockaddr *a;
+    int amask;
+    int rc = 0;
+    int idx_offset = 0;
+
+    DEBUGMSGTL(("access:ipaddress:container:sysctl",
+                "load (flags %u)\n", load_flags));
+
+    if (NULL == container) {
+        snmp_log(LOG_ERR, "no container specified/found for interface\n");
+        return -1;
+    }
+
+    if (sysctl(sysctl_oid, sizeof(sysctl_oid)/sizeof(int), 0,
+               &if_list_size, 0, 0) == -1) {
+        snmp_log(LOG_ERR, "could not get interface info (size)\n");
+        return -2;
+    }
+
+    if_list = (u_char*)malloc(if_list_size);
+    if (if_list == NULL) {
+        snmp_log(LOG_ERR, "could not allocate memory for interface info "
+                 "(%zu bytes)\n", if_list_size);
+        return -3;
+    } else {
+        DEBUGMSGTL(("access:ipaddress:container:sysctl",
+                    "allocated %zu bytes for if_list\n", if_list_size));
+    }
+
+    if (sysctl(sysctl_oid, sizeof(sysctl_oid)/sizeof(int), if_list,
+               &if_list_size, 0, 0) == -1) {
+        snmp_log(LOG_ERR, "could not get interface info\n");
+        free(if_list);
+        return -2;
+    }
+
+    /* 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;
+
+        if (ifa->ifam_type != RTM_NEWADDR)
+            continue;
+
+        DEBUGMSGTL(("access:ipaddress:container:sysctl",
+                    "received 0x%x in RTM_NEWADDR for ifindex %u\n",
+                    ifa->ifam_addrs, ifa->ifam_index));
+
+        entry = netsnmp_access_ipaddress_entry_create();
+        if (entry == NULL) {
+            rc = -3;
+            break;
+        }
+
+        a = (struct sockaddr *) (ifa + 1);
+        entry->ia_status = IPADDRESSSTATUSTC_UNKNOWN;
+        entry->ia_origin = IPADDRESSORIGINTC_OTHER;
+	entry->ia_address_len = 0;
+        for (amask = ifa->ifam_addrs, rtax = 0; amask != 0; amask >>= 1, rtax++) {
+            if ((amask & 1) != 0) {
+                entry->ns_ia_index = ++idx_offset;
+                entry->if_index = ifa->ifam_index;
+                DEBUGMSGTL(("access:ipaddress:container:sysctl",
+                            "%d: a=%p, sa_len=%d, sa_family=0x%x\n",
+                            (int)entry->if_index, a, a->sa_len, a->sa_family));
+
+                if (a->sa_family == AF_INET || a->sa_family == 0) {
+                    struct sockaddr_in *a4 = (struct sockaddr_in *)a;
+		    char str[128];
+		    DEBUGMSGTL(("access:ipaddress:container:sysctl",
+		                "IPv4 addr %s\n", inet_ntop(AF_INET, &a4->sin_addr.s_addr, str, 128)));
+                    if (rtax == RTAX_IFA) {
+			entry->ia_address_len = 4;
+                        memcpy(entry->ia_address, &a4->sin_addr.s_addr, entry->ia_address_len);
+		    }
+                    else if (rtax == RTAX_NETMASK)
+                        entry->ia_prefix_len = netsnmp_ipaddress_ipv4_prefix_len(a4->sin_addr.s_addr);
+                }
+                else if (a->sa_family == AF_INET6) {
+                    struct sockaddr_in6 *a6 = (struct sockaddr_in6 *)a;
+		    char str[128];
+		    DEBUGMSGTL(("access:ipaddress:container:sysctl",
+		                "IPv6 addr %s\n", inet_ntop(AF_INET6, &a6->sin6_addr.s6_addr, str, 128)));
+                    if (rtax == RTAX_IFA) {
+			entry->ia_address_len = 16;
+                        memcpy(entry->ia_address, &a6->sin6_addr, entry->ia_address_len);
+		    }
+                    else if (rtax == RTAX_NETMASK) {
+                        entry->ia_prefix_len = netsnmp_ipaddress_ipv6_prefix_len(a6->sin6_addr);
+			DEBUGMSGTL(("access:ipaddress:container:sysctl",
+			            "prefix_len=%d\n", entry->ia_prefix_len));
+		    }
+                }
+                a = (struct sockaddr *) ( ((char *) a) + ROUNDUP(a->sa_len) );
+            }
+        }
+	if (entry->ia_address_len == 0) {
+	    DEBUGMSGTL(("access:ipaddress:container:sysctl",
+	                "entry skipped\n"));
+	    netsnmp_access_ipaddress_entry_free(entry);
+	}
+	else if (CONTAINER_INSERT(container, entry) < 0) {
+            DEBUGMSGTL(("access:ipaddress:container","error with ipaddress_entry: insert into container failed.\n"));
+            netsnmp_access_ipaddress_entry_free(entry);
+            continue;
+        }
+    }
+
+    if (if_list != NULL)
+        free(if_list);
+
+    return 0;
+}
diff --git a/agent/mibgroup/ip-mib/data_access/scalars_common.h b/agent/mibgroup/ip-mib/data_access/scalars_common.h
index 2f0a63a..ebea21d 100644
--- a/agent/mibgroup/ip-mib/data_access/scalars_common.h
+++ b/agent/mibgroup/ip-mib/data_access/scalars_common.h
@@ -19,6 +19,8 @@
  */
 #if defined( 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)
 #else
 /*
  * couldn't determine the correct file!
@@ -26,4 +28,3 @@ config_require(ip-mib/data_access/scalars_linux)
  */
 config_require(ip-mib/data_access/scalars-unknown-arch)
 #endif
-
diff --git a/agent/mibgroup/ip-mib/data_access/scalars_linux.c b/agent/mibgroup/ip-mib/data_access/scalars_linux.c
index 6ba356b..85e912a 100644
--- a/agent/mibgroup/ip-mib/data_access/scalars_linux.c
+++ b/agent/mibgroup/ip-mib/data_access/scalars_linux.c
@@ -5,11 +5,16 @@
  */
 #include <net-snmp/net-snmp-config.h>
 #include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
 
 #include <net-snmp/data_access/ip_scalars.h>
 
+netsnmp_feature_require(register_num_file_instance)
+
 static const char ipfw_name[] = "/proc/sys/net/ipv4/conf/all/forwarding";
+static const char ipttl_name[] = "/proc/sys/net/ipv4/ip_default_ttl";
 static const char ipfw6_name[] = "/proc/sys/net/ipv6/conf/all/forwarding";
+static const char iphop6_name[] = "/proc/sys/net/ipv6/conf/all/hop_limit";
 
 int
 netsnmp_arch_ip_scalars_ipForwarding_get(u_long *value)
@@ -80,6 +85,70 @@ netsnmp_arch_ip_scalars_ipForwarding_set(u_long value)
 }
 
 int
+netsnmp_arch_ip_scalars_ipDefaultTTL_get(u_long *value)
+{
+    FILE *filep;
+    int rc;
+
+    if (NULL == value)
+        return -1;
+
+
+    filep = fopen(ipttl_name, "r");
+    if (NULL == filep) {
+        DEBUGMSGTL(("access:ipDefaultTTL", "could not open %s\n",
+                    ipttl_name));
+        return -2;
+    }
+
+    rc = fscanf(filep, "%lu", value);
+    fclose(filep);
+    if (1 != rc) {
+        DEBUGMSGTL(("access:ipDefaultTTL", "could not read %s\n",
+                    ipttl_name));
+        return -3;
+    }
+
+    if ((0 == *value) || (255 < *value)) {
+        DEBUGMSGTL(("access:ipDefaultTTL", "unexpected value %ld in %s\n",
+                    *value, ipttl_name));
+        return -4;
+    }
+
+    return 0;
+}
+
+int
+netsnmp_arch_ip_scalars_ipDefaultTTL_set(u_long value)
+{
+    FILE *filep;
+    int rc;
+
+    if (value == 0 || value > 255) {
+        DEBUGMSGTL(("access:ipDefaultTTL", "bad value %ld for %s\n",
+                    value, ipttl_name));
+        return SNMP_ERR_WRONGVALUE;
+    }
+
+    filep = fopen(ipttl_name, "w");
+    if (NULL == filep) {
+        DEBUGMSGTL(("access:ipDefaultTTL", "could not open %s\n",
+                    ipttl_name));
+        return SNMP_ERR_RESOURCEUNAVAILABLE;
+    }
+
+    rc = fprintf(filep, "%ld", value);
+    fclose(filep);
+    if (1 != rc) {
+        DEBUGMSGTL(("access:ipDefaultTTL", "could not write %s\n",
+                    ipttl_name));
+        return SNMP_ERR_GENERR;
+    }
+
+    return 0;
+}
+
+int
 netsnmp_arch_ip_scalars_ipv6IpForwarding_get(u_long *value)
 {
     FILE *filep;
@@ -146,3 +215,80 @@ netsnmp_arch_ip_scalars_ipv6IpForwarding_set(u_long value)
 
     return 0;
 }
+
+int
+netsnmp_arch_ip_scalars_ipv6IpDefaultHopLimit_get(u_long *value)
+{
+    FILE *filep;
+    int rc;
+
+    if (NULL == value)
+        return -1;
+
+
+    filep = fopen(iphop6_name, "r");
+    if (NULL == filep) {
+        DEBUGMSGTL(("access:ipDefaultHopLimit", "could not open %s\n",
+                    iphop6_name));
+        return -2;
+    }
+
+    rc = fscanf(filep, "%lu", value);
+    fclose(filep);
+    if (1 != rc) {
+        DEBUGMSGTL(("access:ipDefaultHopLimit", "could not read %s\n",
+                    iphop6_name));
+        return -3;
+    }
+
+    if ((0 == *value) || (255 < *value)) {
+        DEBUGMSGTL(("access:ipDefaultHopLimit", "unexpected value %ld in %s\n",
+                    *value, iphop6_name));
+        return -4;
+    }
+
+    return 0;
+}
+
+int
+netsnmp_arch_ip_scalars_ipv6IpDefaultHopLimit_set(u_long value)
+{
+    FILE *filep;
+    int rc;
+
+    if (value == 0 || value > 255) {
+        DEBUGMSGTL(("access:ipDefaultHopLimit", "bad value %ld for %s\n",
+                    value, iphop6_name));
+        return SNMP_ERR_WRONGVALUE;
+    }
+
+    filep = fopen(iphop6_name, "w");
+    if (NULL == filep) {
+        DEBUGMSGTL(("access:ipDefaultHopLimit", "could not open %s\n",
+                    iphop6_name));
+        return SNMP_ERR_RESOURCEUNAVAILABLE;
+    }
+
+    rc = fprintf(filep, "%ld", value);
+    fclose(filep);
+    if (1 != rc) {
+        DEBUGMSGTL(("access:ipDefaultHopLimit", "could not write %s\n",
+                    iphop6_name));
+        return SNMP_ERR_GENERR;
+    }
+
+    return 0;
+}
+
+void
+netsnmp_arch_ip_scalars_register_handlers(void)
+{
+    static oid ipReasmTimeout_oid[] = { 1, 3, 6, 1, 2, 1, 4, 13, 0 };
+
+    netsnmp_register_num_file_instance
+        ("ipReasmTimeout",
+         ipReasmTimeout_oid, OID_LENGTH(ipReasmTimeout_oid),
+         "/proc/sys/net/ipv4/ipfrag_time", ASN_INTEGER,
+         HANDLER_CAN_RONLY, NULL, NULL);
+
+}
diff --git a/agent/mibgroup/ip-mib/data_access/scalars_sysctl.c b/agent/mibgroup/ip-mib/data_access/scalars_sysctl.c
new file mode 100644
index 0000000..569c743
--- /dev/null
+++ b/agent/mibgroup/ip-mib/data_access/scalars_sysctl.c
@@ -0,0 +1,291 @@
+/*
+ *  IP-MIB architecture support
+ *
+ * $Id$
+ */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+#include <net-snmp/data_access/ip_scalars.h>
+
+#include <sys/types.h>
+#include <sys/protosw.h>
+#include <sys/sysctl.h>
+#include <netinet/in_systm.h>
+#include <netinet/ip.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* XXX: the values passed to netsnmp_arch_ip_scalars(..) may or may not be
+ * portable to the other BSDs -- it seems to be portable back to FreeBSD 4.x
+ * (Darwin 10.8.0) at least.
+ */
+
+static int
+netsnmp_arch_ip_scalars_sysctl(const char *access_module,
+                               int mib[], size_t mib_len,
+                               u_long *old_value, u_long *new_value)
+{
+    int newint, oldint;
+    size_t needed;
+    int rc;
+
+    needed = sizeof(oldint);
+    if (new_value)
+        newint = *new_value;
+
+    rc = sysctl(mib, mib_len, &oldint, &needed,
+                new_value ? &newint : NULL, (new_value ? sizeof(newint) : 0));
+    if (rc == -1) {
+        DEBUGMSGTL((access_module, "sysctl %s failed - %s\n",
+                    (new_value == NULL ? "get" : "set"),
+                    strerror(errno)));
+    }
+    *old_value = oldint;
+    return rc;
+}
+
+int ipDefaultTTL_mib[] = {
+    CTL_NET,
+    PF_INET,
+    IPPROTO_IP,
+    IPCTL_DEFTTL
+};
+
+int ipForwarding_mib[] = {
+    CTL_NET,
+    PF_INET,
+    IPPROTO_IP,
+    IPCTL_FORWARDING
+};
+
+int ipv6IpDefaultHopLimit_mib[] = {
+    CTL_NET,
+    PF_INET6,
+    IPPROTO_IP,
+    IPV6CTL_DEFHLIM
+};
+
+int ipv6IpForwarding_mib[] = {
+    CTL_NET,
+    PF_INET6,
+    IPPROTO_IP,
+    IPV6CTL_FORWARDING
+};
+
+#define MIB_LEN(a)		(sizeof(a) / sizeof(*a))
+
+#define IPDEFAULTTTL_LEN	MIB_LEN(ipDefaultTTL_mib)
+#define IPFORWARDING_LEN	MIB_LEN(ipForwarding_mib)
+#define IPV6IPDEFAULTHOPLIMIT_LEN	MIB_LEN(ipv6IpDefaultHopLimit_mib)
+#define IPV6IPFORWARDING_LEN	MIB_LEN(ipv6IpForwarding_mib)
+
+int
+netsnmp_arch_ip_scalars_ipDefaultTTL_get(u_long *value)
+{
+    int rc;
+
+    if (NULL == value)
+        return -1;
+
+    rc = netsnmp_arch_ip_scalars_sysctl("access:ipDefaultTTL",
+                                        ipDefaultTTL_mib,
+                                        IPDEFAULTTTL_LEN,
+                                        value, NULL);
+    if (rc != 0)
+        return -2;
+
+    return 0;
+}
+
+int
+netsnmp_arch_ip_scalars_ipDefaultTTL_set(u_long value)
+{
+    int rc;
+
+    if (1 == value)
+        ;
+    else if (2 == value)
+        value = 0;
+    else {
+        DEBUGMSGTL(("access:ipDefaultTTL", "bad value %ld\n",
+                    value));
+        return SNMP_ERR_WRONGVALUE;
+    }
+
+    rc = netsnmp_arch_ip_scalars_sysctl("access:ipForwarding",
+                                        ipForwarding_mib,
+                                        IPFORWARDING_LEN,
+                                        NULL, &value);
+    if (rc != 0)
+        return -1;
+
+    return 0;
+}
+
+int
+netsnmp_arch_ip_scalars_ipForwarding_get(u_long *value)
+{
+    int rc;
+
+    if (NULL == value)
+        return -1;
+
+    rc = netsnmp_arch_ip_scalars_sysctl("access:ipForwarding",
+                                        ipForwarding_mib,
+                                        IPFORWARDING_LEN,
+                                        value, NULL);
+    if (rc != 0)
+        return -2;
+
+    /* On FreeBSD 7.2 at least, the value passed to the sysctl can be coerced
+     * into a non-zero value; convert it into a value that's sane per the
+     * IP-MIB definition.
+     */
+    if (*value != 0)
+        *value = 1;
+
+    return 0;
+}
+
+int
+netsnmp_arch_ip_scalars_ipForwarding_set(u_long value)
+{
+    int rc;
+
+    if (1 == value)
+        ;
+    else if (2 == value)
+        value = 0;
+    else {
+        DEBUGMSGTL(("access:ipForwarding", "bad value %ld\n",
+                    value));
+        return SNMP_ERR_WRONGVALUE;
+    }
+
+    rc = netsnmp_arch_ip_scalars_sysctl("access:ipForwarding",
+                                        ipForwarding_mib,
+                                        IPFORWARDING_LEN,
+                                        NULL, &value);
+    if (rc != 0)
+        return -1;
+
+    return 0;
+}
+
+int
+netsnmp_arch_ip_scalars_ipv6IpDefaultHopLimit_get(u_long *value)
+{
+    int rc;
+
+    if (NULL == value)
+        return -1;
+
+    rc = netsnmp_arch_ip_scalars_sysctl("access:ipv6IpDefaultHopLimit",
+                                        ipv6IpDefaultHopLimit_mib,
+                                        IPV6IPDEFAULTHOPLIMIT_LEN,
+                                        value, NULL);
+    if (rc != 0)
+        return -2;
+
+    return 0;
+}
+
+int
+netsnmp_arch_ip_scalars_ipv6IpDefaultHopLimit_set(u_long value)
+{
+    int rc;
+
+    if (1 == value)
+        ;
+    else if (2 == value)
+        value = 0;
+    else {
+        DEBUGMSGTL(("access:ipv6IpDefaultHopLimit", "bad value %ld\n",
+                    value));
+        return SNMP_ERR_WRONGVALUE;
+    }
+
+    rc = netsnmp_arch_ip_scalars_sysctl("access:ipForwarding",
+                                        ipv6IpDefaultHopLimit_mib,
+                                        IPV6IPDEFAULTHOPLIMIT_LEN,
+                                        NULL, &value);
+    if (rc != 0)
+        return -1;
+
+    return 0;
+}
+
+int
+netsnmp_arch_ip_scalars_ipv6IpForwarding_get(u_long *value)
+{
+    int rc;
+
+    if (NULL == value)
+        return -1;
+
+    rc = netsnmp_arch_ip_scalars_sysctl("access:ipv6IpForwarding",
+                                        ipv6IpForwarding_mib,
+                                        IPV6IPFORWARDING_LEN,
+                                        value, NULL);
+    if (rc != 0)
+        return -2;
+
+    /* On FreeBSD 7.2 at least, the value passed to the sysctl can be coerced
+     * into a non-zero value; convert it into a value that's sane per the
+     * IP-MIB definition.
+     */
+    if (*value != 0)
+        *value = 1;
+
+    return 0;
+}
+
+int
+netsnmp_arch_ip_scalars_ipv6IpForwarding_set(u_long value)
+{
+    int rc;
+
+    if (1 == value)
+        ;
+    else if (2 == value)
+        value = 0;
+    else {
+        DEBUGMSGTL(("access:ipForwarding", "bad value %ld\n",
+                    value));
+        return SNMP_ERR_WRONGVALUE;
+    }
+
+    rc = netsnmp_arch_ip_scalars_sysctl("access:ipv6IpForwarding",
+                                        ipv6IpForwarding_mib,
+                                        IPV6IPFORWARDING_LEN,
+                                        NULL, &value);
+    if (rc != 0)
+        return -1;
+
+    return 0;
+}
+
+static long ipReasmTimeout_val;
+
+void
+netsnmp_arch_ip_scalars_register_handlers(void)
+{
+    static oid ipReasmTimeout_oid[] = { 1, 3, 6, 1, 2, 1, 4, 13, 0 };
+
+    /* 
+     * 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
+     * the runtime value compiled into the kernel can vary.
+     *
+     * Please refer to sys/protosw.h for more details on what this value is (in
+     * particular PR_SLOWHZ).
+     */
+    ipReasmTimeout_val = IPFRAGTTL / PR_SLOWHZ;
+
+    netsnmp_register_long_instance("ipReasmTimeout",
+                                   ipReasmTimeout_oid,
+                                   OID_LENGTH(ipReasmTimeout_oid),
+                                   &ipReasmTimeout_val, NULL);
+}
diff --git a/agent/mibgroup/ip-mib/data_access/systemstats.h b/agent/mibgroup/ip-mib/data_access/systemstats.h
index 28810e3..514807a 100644
--- a/agent/mibgroup/ip-mib/data_access/systemstats.h
+++ b/agent/mibgroup/ip-mib/data_access/systemstats.h
@@ -22,6 +22,8 @@ config_require(ip-mib/data_access/systemstats_common)
 config_require(ip-mib/data_access/systemstats_linux)
 #elif defined( 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)
 #else
 config_error(the systemstats data access library is not available in this environment.)
 #endif
diff --git a/agent/mibgroup/ip-mib/data_access/systemstats_common.c b/agent/mibgroup/ip-mib/data_access/systemstats_common.c
index f60caab..29109bd 100644
--- a/agent/mibgroup/ip-mib/data_access/systemstats_common.c
+++ b/agent/mibgroup/ip-mib/data_access/systemstats_common.c
@@ -339,7 +339,7 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
                                        &new_vals->stats.HCInNoRoutes,
                                        &prev_vals->old_stats->HCInNoRoutes,
                                        &need_wrap_check))
-                DEBUGMSGTL(("access:systemstats",
+                NETSNMP_LOGONCE((LOG_ERR,
                         "Error expanding HCInNoRoutes to 64bits in %s\n",
                         prev_vals->tableName));
 
@@ -349,7 +349,7 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
                                        &new_vals->stats.HCOutNoRoutes,
                                        &prev_vals->old_stats->HCOutNoRoutes,
                                        &need_wrap_check))
-                DEBUGMSGTL(("access:systemstats",
+                NETSNMP_LOGONCE((LOG_ERR,
                         "Error expanding HCOutNoRoutes to 64bits in %s\n",
                         prev_vals->tableName));
 
@@ -359,7 +359,7 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
                                        &new_vals->stats.HCOutDiscards,
                                        &prev_vals->old_stats->HCOutDiscards,
                                        &need_wrap_check))
-                DEBUGMSGTL(("access:systemstats",
+                NETSNMP_LOGONCE((LOG_ERR,
                         "Error expanding HCOutDiscards to 64bits in %s\n",
                         prev_vals->tableName));
 
@@ -369,7 +369,7 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
                                        &new_vals->stats.HCOutFragReqds,
                                        &prev_vals->old_stats->HCOutFragReqds,
                                        &need_wrap_check))
-                DEBUGMSGTL(("access:systemstats",
+                NETSNMP_LOGONCE((LOG_ERR,
                         "Error expanding HCOutFragReqds to 64bits in %s\n",
                         prev_vals->tableName));
 
@@ -379,7 +379,7 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
                                        &new_vals->stats.HCOutFragOKs,
                                        &prev_vals->old_stats->HCOutFragOKs,
                                        &need_wrap_check))
-                DEBUGMSGTL(("access:systemstats",
+                NETSNMP_LOGONCE((LOG_ERR,
                         "Error expanding HCOutFragOKs to 64bits in %s\n",
                         prev_vals->tableName));
 
@@ -389,7 +389,7 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
                                        &new_vals->stats.HCOutFragFails,
                                        &prev_vals->old_stats->HCOutFragFails,
                                        &need_wrap_check))
-                DEBUGMSGTL(("access:systemstats",
+                NETSNMP_LOGONCE((LOG_ERR,
                         "Error expanding HCOutFragFails to 64bits in %s\n",
                         prev_vals->tableName));
 
@@ -399,7 +399,7 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
                                        &new_vals->stats.HCOutFragCreates,
                                        &prev_vals->old_stats->HCOutFragCreates,
                                        &need_wrap_check))
-                DEBUGMSGTL(("access:systemstats",
+                NETSNMP_LOGONCE((LOG_ERR,
                         "Error expanding HCOutFragCreates to 64bits in %s\n",
                         prev_vals->tableName));
 
@@ -409,7 +409,7 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
                                        &new_vals->stats.HCInReceives,
                                        &prev_vals->old_stats->HCInReceives,
                                        &need_wrap_check))
-                DEBUGMSGTL(("access:systemstats",
+                NETSNMP_LOGONCE((LOG_ERR,
                         "Error expanding HCInReceives to 64bits in %s\n",
                         prev_vals->tableName));
 
@@ -419,7 +419,7 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
                                        &new_vals->stats.HCInOctets,
                                        &prev_vals->old_stats->HCInOctets,
                                        &need_wrap_check))
-                DEBUGMSGTL(("access:systemstats",
+                NETSNMP_LOGONCE((LOG_ERR,
                         "Error expanding HCInOctets to 64bits in %s\n",
                         prev_vals->tableName));
 
@@ -429,7 +429,7 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
                                        &new_vals->stats.HCInForwDatagrams,
                                        &prev_vals->old_stats->HCInForwDatagrams,
                                        &need_wrap_check))
-                DEBUGMSGTL(("access:systemstats",
+                NETSNMP_LOGONCE((LOG_ERR,
                         "Error expanding HCInForwDatagrams to 64bits in %s\n",
                         prev_vals->tableName));
 
@@ -439,7 +439,7 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
                                        &new_vals->stats.HCInDelivers,
                                        &prev_vals->old_stats->HCInDelivers,
                                        &need_wrap_check))
-                DEBUGMSGTL(("access:systemstats",
+                NETSNMP_LOGONCE((LOG_ERR,
                         "Error expanding HCInDelivers to 64bits in %s\n",
                         prev_vals->tableName));
 
@@ -449,7 +449,7 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
                                        &new_vals->stats.HCOutRequests,
                                        &prev_vals->old_stats->HCOutRequests,
                                        &need_wrap_check))
-                DEBUGMSGTL(("access:systemstats",
+                NETSNMP_LOGONCE((LOG_ERR,
                         "Error expanding HCOutRequests to 64bits in %s\n",
                         prev_vals->tableName));
 
@@ -459,7 +459,7 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
                                        &new_vals->stats.HCOutForwDatagrams,
                                        &prev_vals->old_stats->HCOutForwDatagrams,
                                        &need_wrap_check))
-                DEBUGMSGTL(("access:systemstats",
+                NETSNMP_LOGONCE((LOG_ERR,
                         "Error expanding HCOutForwDatagrams to 64bits in %s\n",
                         prev_vals->tableName));
 
@@ -469,7 +469,7 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
                                        &new_vals->stats.HCOutTransmits,
                                        &prev_vals->old_stats->HCOutTransmits,
                                        &need_wrap_check))
-                DEBUGMSGTL(("access:systemstats",
+                NETSNMP_LOGONCE((LOG_ERR,
                         "Error expanding HCOutTransmits to 64bits in %s\n",
                         prev_vals->tableName));
 
@@ -479,7 +479,7 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
                                        &new_vals->stats.HCOutOctets,
                                        &prev_vals->old_stats->HCOutOctets,
                                        &need_wrap_check))
-                DEBUGMSGTL(("access:systemstats",
+                NETSNMP_LOGONCE((LOG_ERR,
                         "Error expanding HCOutOctets to 64bits in %s\n",
                         prev_vals->tableName));
 
@@ -489,7 +489,7 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
                                        &new_vals->stats.HCInMcastPkts,
                                        &prev_vals->old_stats->HCInMcastPkts,
                                        &need_wrap_check))
-                DEBUGMSGTL(("access:systemstats",
+                NETSNMP_LOGONCE((LOG_ERR,
                         "Error expanding HCInMcastPkts to 64bits in %s\n",
                         prev_vals->tableName));
 
@@ -499,7 +499,7 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
                                        &new_vals->stats.HCInMcastOctets,
                                        &prev_vals->old_stats->HCInMcastOctets,
                                        &need_wrap_check))
-                DEBUGMSGTL(("access:systemstats",
+                NETSNMP_LOGONCE((LOG_ERR,
                         "Error expanding HCInMcastOctets to 64bits in %s\n",
                         prev_vals->tableName));
 
@@ -509,7 +509,7 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
                                        &new_vals->stats.HCOutMcastPkts,
                                        &prev_vals->old_stats->HCOutMcastPkts,
                                        &need_wrap_check))
-                DEBUGMSGTL(("access:systemstats",
+                NETSNMP_LOGONCE((LOG_ERR,
                         "Error expanding HCOutMcastPkts to 64bits in %s\n",
                         prev_vals->tableName));
 
@@ -519,7 +519,7 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
                                        &new_vals->stats.HCOutMcastOctets,
                                        &prev_vals->old_stats->HCOutMcastOctets,
                                        &need_wrap_check))
-                DEBUGMSGTL(("access:systemstats",
+                NETSNMP_LOGONCE((LOG_ERR,
                         "Error expanding HCOutMcastOctets to 64bits in %s\n",
                         prev_vals->tableName));
 
@@ -529,7 +529,7 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
                                        &new_vals->stats.HCInBcastPkts,
                                        &prev_vals->old_stats->HCInBcastPkts,
                                        &need_wrap_check))
-                DEBUGMSGTL(("access:systemstats",
+                NETSNMP_LOGONCE((LOG_ERR,
                         "Error expanding HCInBcastPkts to 64bits in %s\n",
                         prev_vals->tableName));
 
@@ -539,7 +539,7 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
                                        &new_vals->stats.HCOutBcastPkts,
                                        &prev_vals->old_stats->HCOutBcastPkts,
                                        &need_wrap_check))
-                DEBUGMSGTL(("access:systemstats",
+                NETSNMP_LOGONCE((LOG_ERR,
                         "Error expanding HCOutBcastPkts to 64bits in %s\n",
                         prev_vals->tableName));
     }
diff --git a/agent/mibgroup/ip-mib/data_access/systemstats_linux.c b/agent/mibgroup/ip-mib/data_access/systemstats_linux.c
index 275b0bd..4a26e41 100644
--- a/agent/mibgroup/ip-mib/data_access/systemstats_linux.c
+++ b/agent/mibgroup/ip-mib/data_access/systemstats_linux.c
@@ -272,7 +272,7 @@ _additional_systemstats_v4(netsnmp_systemstats_entry* entry,
     FILE           *devin;
     char            line[1024];
     int             scan_count;
-    unsigned long long scan_vals[6];
+    unsigned long long scan_vals[12];
     int             retval = 0;
 
     DEBUGMSGTL(("access:systemstats:container:arch",
@@ -303,9 +303,11 @@ _additional_systemstats_v4(netsnmp_systemstats_entry* entry,
             memset(scan_vals, 0x0, sizeof(scan_vals));
             scan_count = sscanf(line,
                                 "%*s"   /* ignore `IpExt:' */
-                                "%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[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]);
             if (scan_count < 6) {
                 snmp_log(LOG_ERR,
                         "error scanning addtional systemstats data"
@@ -333,6 +335,21 @@ _additional_systemstats_v4(netsnmp_systemstats_entry* entry,
             entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTMCASTPKTS] = 1;
             entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINBCASTPKTS] = 1;
             entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTBCASTPKTS] = 1;
+	    if (scan_count >= 12) {
+		entry->stats.HCInOctets.low        = scan_vals[6] & 0xffffffff;
+		entry->stats.HCInOctets.high       = scan_vals[6] >> 32;
+		entry->stats.HCOutOctets.low       = scan_vals[7] & 0xffffffff;
+		entry->stats.HCOutOctets.high      = scan_vals[7] >> 32;
+		entry->stats.HCInMcastOctets.low   = scan_vals[8] & 0xffffffff;
+		entry->stats.HCInMcastOctets.high  = scan_vals[8] >> 32;
+		entry->stats.HCOutMcastOctets.low  = scan_vals[9] & 0xffffffff;
+		entry->stats.HCOutMcastOctets.high = scan_vals[9] >> 32;
+		/* 10 and 11 are In/OutBcastOctets */
+		entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINOCTETS] = 1;
+		entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTOCTETS] = 1;
+		entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINMCASTOCTETS] = 1;
+		entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTMCASTOCTETS] = 1;
+	    }
         }
     }
 
diff --git a/agent/mibgroup/ip-mib/data_access/systemstats_sysctl.c b/agent/mibgroup/ip-mib/data_access/systemstats_sysctl.c
new file mode 100644
index 0000000..a1ca16d
--- /dev/null
+++ b/agent/mibgroup/ip-mib/data_access/systemstats_sysctl.c
@@ -0,0 +1,791 @@
+/*
+ *  ipSystemStatsTable and ipIfStatsTable interface MIB architecture support
+ *
+ * $Id$
+ */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+#include <net-snmp/data_access/ipstats.h>
+#include <net-snmp/data_access/systemstats.h>
+
+#include "../ipSystemStatsTable/ipSystemStatsTable.h"
+
+#if defined(NETSNMP_IFNET_NEEDS_KERNEL) && !defined(_KERNEL)
+#define _KERNEL 1
+#define _I_DEFINED_KERNEL
+#endif
+#if NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES
+#define _KERNEL_STRUCTURES
+#endif
+
+#include <sys/types.h>
+#include <dirent.h>
+#include <ctype.h>
+
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#include <sys/protosw.h>
+
+#include <net/if.h>
+#include <netinet/in.h>
+#include <netinet/in_systm.h>
+#include <netinet/ip.h>
+#include <netinet/ip_icmp.h>
+#include <netinet/ip_var.h>
+#if HAVE_NETINET6_IP6_VAR_H
+#include <netinet6/ip6_var.h>
+#endif
+#ifndef freebsd7
+#include <netinet6/in6_var.h>
+#endif
+
+#ifdef darwin
+
+/* This struct is in netinet6/ip6_var.h which Apple for obscure reasons
+ * do not distribute as part of /usr/include :-(
+ */
+
+struct	ip6stat {
+	u_quad_t ip6s_total;		/* total packets received */
+	u_quad_t ip6s_tooshort;		/* packet too short */
+	u_quad_t ip6s_toosmall;		/* not enough data */
+	u_quad_t ip6s_fragments;	/* fragments received */
+	u_quad_t ip6s_fragdropped;	/* frags dropped(dups, out of space) */
+	u_quad_t ip6s_fragtimeout;	/* fragments timed out */
+	u_quad_t ip6s_fragoverflow;	/* fragments that exceeded limit */
+	u_quad_t ip6s_forward;		/* packets forwarded */
+	u_quad_t ip6s_cantforward;	/* packets rcvd for unreachable dest */
+	u_quad_t ip6s_redirectsent;	/* packets forwarded on same net */
+	u_quad_t ip6s_delivered;	/* datagrams delivered to upper level*/
+	u_quad_t ip6s_localout;		/* total ip packets generated here */
+	u_quad_t ip6s_odropped;		/* lost packets due to nobufs, etc. */
+	u_quad_t ip6s_reassembled;	/* total packets reassembled ok */
+	u_quad_t ip6s_fragmented;	/* datagrams sucessfully fragmented */
+	u_quad_t ip6s_ofragments;	/* output fragments created */
+	u_quad_t ip6s_cantfrag;		/* don't fragment flag was set, etc. */
+	u_quad_t ip6s_badoptions;	/* error in option processing */
+	u_quad_t ip6s_noroute;		/* packets discarded due to no route */
+	u_quad_t ip6s_badvers;		/* ip6 version != 6 */
+	u_quad_t ip6s_rawout;		/* total raw ip packets generated */
+	u_quad_t ip6s_badscope;		/* scope error */
+	u_quad_t ip6s_notmember;	/* don't join this multicast group */
+	u_quad_t ip6s_nxthist[256];	/* next header history */
+	u_quad_t ip6s_m1;		/* one mbuf */
+	u_quad_t ip6s_m2m[32];		/* two or more mbuf */
+	u_quad_t ip6s_mext1;		/* one ext mbuf */
+	u_quad_t ip6s_mext2m;		/* two or more ext mbuf */
+	u_quad_t ip6s_exthdrtoolong;	/* ext hdr are not continuous */
+	u_quad_t ip6s_nogif;		/* no match gif found */
+	u_quad_t ip6s_toomanyhdr;	/* discarded due to too many headers */
+
+	/*
+	 * statistics for improvement of the source address selection
+	 * algorithm:
+	 * XXX: hardcoded 16 = # of ip6 multicast scope types + 1
+	 */
+	/* number of times that address selection fails */
+	u_quad_t ip6s_sources_none;
+	/* number of times that an address on the outgoing I/F is chosen */
+	u_quad_t ip6s_sources_sameif[16];
+	/* number of times that an address on a non-outgoing I/F is chosen */
+	u_quad_t ip6s_sources_otherif[16];
+	/*
+	 * number of times that an address that has the same scope
+	 * from the destination is chosen.
+	 */
+	u_quad_t ip6s_sources_samescope[16];
+	/*
+	 * number of times that an address that has a different scope
+	 * from the destination is chosen.
+	 */
+	u_quad_t ip6s_sources_otherscope[16];
+	/* number of times that an deprecated address is chosen */
+	u_quad_t ip6s_sources_deprecated[16];
+
+	u_quad_t ip6s_forward_cachehit;
+	u_quad_t ip6s_forward_cachemiss;
+};
+
+#endif /* darwin*/
+
+static int _systemstats_v4(netsnmp_container* container, u_int load_flags);
+
+#if defined (NETSNMP_ENABLE_IPV6)
+static int _systemstats_v6(netsnmp_container* container, u_int load_flags);
+#endif
+
+static int ncpus;
+
+void
+netsnmp_access_systemstats_arch_init(void)
+{
+    int    ncpu_mib[]  = { CTL_HW, HW_NCPU };
+    size_t siz = sizeof(ncpus);
+    if (sysctl(ncpu_mib, 2, &ncpus, &siz, NULL, 0) < 0) {
+	snmp_log_perror("hw.ncpu");
+        ncpus = 1;
+    }
+}
+
+/*
+ *
+ * @retval  0 success
+ * @retval -1 no container specified
+ * @retval -2 could not open file
+ * @retval -3 could not create entry (probably malloc)
+ * @retval -4 file format error
+ */
+int
+netsnmp_access_systemstats_container_arch_load(netsnmp_container* container,
+                                             u_int load_flags)
+{
+    int rc1;
+#if defined (NETSNMP_ENABLE_IPV6)
+    int rc2;
+#endif
+
+    if (NULL == container) {
+        snmp_log(LOG_ERR, "no container specified/found for access_systemstats_\n");
+        return -1;
+    }
+    
+    /*
+     * load v4 and v6 stats. Even if one fails, try the other.
+     * If they have the same rc, return it. if the differ, return
+     * the smaller one. No log messages, since each individual function
+     * would have logged its own message.
+     */
+    rc1 = _systemstats_v4(container, load_flags);
+#if defined (NETSNMP_ENABLE_IPV6)
+    rc2 = _systemstats_v6(container, load_flags);
+    if ((rc1 == rc2) || (rc1 < rc2))
+        return rc1;
+        
+    return rc2;
+#else
+    return rc1;
+#endif
+}
+
+/*
+ * Based on load_flags, load ipSystemStatsTable or ipIfStatsTable for ipv4 entries. 
+ */
+#ifdef __NetBSD__
+
+static int
+_systemstats_v4(netsnmp_container* container, u_int load_flags)
+{
+    netsnmp_systemstats_entry *entry = NULL;
+    uint64_t ipstat[IP_NSTATS];
+    size_t len = sizeof(ipstat);
+
+    if (sysctlbyname("net.inet.ip.stats", &ipstat, &len, NULL, 0) < 0) {
+	NETSNMP_LOGONCE((LOG_ERR, "Cannot sysctlbyname net.inet.ip.stats\n"));
+	return -2;
+    }
+
+    DEBUGMSGTL(("access:systemstats:container:arch", "load v4 (flags %x)\n",
+                load_flags));
+
+    netsnmp_assert(container != NULL); /* load function shoulda checked this */
+
+    if (load_flags & NETSNMP_ACCESS_SYSTEMSTATS_LOAD_IFTABLE) {
+        /* we do not support ipIfStatsTable for ipv4 */
+        return 0;
+    }
+
+    entry = netsnmp_access_systemstats_entry_create(1, 0,
+		"ipSystemStatsTable.ipv4");
+    if(NULL == entry) {
+	snmp_log(LOG_ERR, "systemstats_v4: cannot create entry\n");
+	netsnmp_access_systemstats_container_free(container,
+						  NETSNMP_ACCESS_SYSTEMSTATS_FREE_NOFLAGS);
+	return -3;
+    }
+
+    /*
+     * OK - we've now got (or created) the data structure for
+     *      this systemstats, including any "static" information.
+     * Now parse the rest of the line (i.e. starting from 'stats')
+     *      to extract the relevant statistics, and populate
+     *      data structure accordingly.
+     */
+
+    entry->stats.HCInReceives.low = ipstat[IP_STAT_TOTAL] & 0xffffffff;
+    entry->stats.HCInReceives.high = ipstat[IP_STAT_TOTAL] >> 32;
+    entry->stats.InHdrErrors = ipstat[IP_STAT_BADSUM]
+		    + ipstat[IP_STAT_TOOSHORT] + ipstat[IP_STAT_TOOSMALL]
+	            + ipstat[IP_STAT_BADHLEN] + ipstat[IP_STAT_BADLEN];
+    entry->stats.InAddrErrors = ipstat[IP_STAT_CANTFORWARD];
+    entry->stats.HCOutForwDatagrams.low = ipstat[IP_STAT_FORWARD] & 0xffffffff;
+    entry->stats.HCOutForwDatagrams.high = ipstat[IP_STAT_FORWARD] >> 32;
+    entry->stats.InUnknownProtos = ipstat[IP_STAT_NOPROTO];
+    entry->stats.InDiscards = ipstat[IP_STAT_FRAGDROPPED];
+    entry->stats.HCInDelivers.low = ipstat[IP_STAT_DELIVERED] & 0xffffffff;
+    entry->stats.HCInDelivers.high = ipstat[IP_STAT_DELIVERED] >> 32;
+    entry->stats.HCOutRequests.low = ipstat[IP_STAT_LOCALOUT] & 0xffffffff;
+    entry->stats.HCOutRequests.high = ipstat[IP_STAT_LOCALOUT] >> 32;
+    entry->stats.HCOutDiscards.low = ipstat[IP_STAT_ODROPPED] & 0xffffffff;
+    entry->stats.HCOutDiscards.high = ipstat[IP_STAT_ODROPPED] >> 32;
+    entry->stats.HCOutNoRoutes.low = ipstat[IP_STAT_NOGIF] & 0xffffffff;
+    entry->stats.HCOutNoRoutes.high = ipstat[IP_STAT_NOGIF] >> 32;
+    /* entry->stats. = scan_vals[12]; / * ReasmTimeout */
+    entry->stats.ReasmReqds = ipstat[IP_STAT_FRAGMENTS];
+    entry->stats.ReasmOKs = ipstat[IP_STAT_REASSEMBLED];
+    entry->stats.ReasmFails = ipstat[IP_STAT_FRAGDROPPED]
+		    + ipstat[IP_STAT_FRAGTIMEOUT];
+    entry->stats.HCOutFragOKs.low = ipstat[IP_STAT_FRAGMENTS] & 0xffffffff;
+    entry->stats.HCOutFragOKs.high = ipstat[IP_STAT_FRAGMENTS] >> 32;
+    entry->stats.HCOutFragFails.low = ipstat[IP_STAT_CANTFRAG] & 0xffffffff;
+    entry->stats.HCOutFragFails.high = ipstat[IP_STAT_CANTFRAG] >> 32;
+    entry->stats.HCOutFragCreates.low = ipstat[IP_STAT_OFRAGMENTS] & 0xffffffff;
+    entry->stats.HCOutFragCreates.high = ipstat[IP_STAT_OFRAGMENTS] >> 32;
+
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINRECEIVES] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INHDRERRORS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INADDRERRORS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFORWDATAGRAMS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INUNKNOWNPROTOS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INDISCARDS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINDELIVERS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTREQUESTS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTDISCARDS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTNOROUTES] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_REASMREQDS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_REASMOKS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_REASMFAILS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGOKS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGFAILS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGCREATES] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_DISCONTINUITYTIME] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_REFRESHRATE] = 1;
+
+    /*
+     * add to container
+     */
+    if (CONTAINER_INSERT(container, entry) < 0)
+    {
+	snmp_log(LOG_ERR, "error with systemstats_v4: insert into container failed.\n");
+	netsnmp_access_systemstats_entry_free(entry);
+    }
+
+    return 0;
+}
+
+
+#if defined (NETSNMP_ENABLE_IPV6)
+
+static int
+_systemstats_v6_load_systemstats(netsnmp_container* container, u_int load_flags)
+{
+    netsnmp_systemstats_entry *entry = NULL;
+    uint64_t ipstat[IP6_NSTATS];
+    size_t len = sizeof(ipstat);
+
+    if (sysctlbyname("net.inet6.ip6.stats", &ipstat, &len, NULL, 0) < 0) {
+	NETSNMP_LOGONCE((LOG_ERR, "Cannot sysctlbyname net.inet6.ip6.stats\n"));
+	return -2;
+    }
+
+    DEBUGMSGTL(("access:systemstats:container:arch", "load v6 (flags %x)\n",
+                load_flags));
+
+    netsnmp_assert(container != NULL); /* load function shoulda checked this */
+
+    entry = netsnmp_access_systemstats_entry_create(2, 0,
+		"ipSystemStatsTable.ipv6");
+    if(NULL == entry) {
+	snmp_log(LOG_ERR, "systemstats_v6_load_systemstats: cannot create entry\n");
+	netsnmp_access_systemstats_container_free(container,
+						  NETSNMP_ACCESS_SYSTEMSTATS_FREE_NOFLAGS);
+	return -3;
+    }
+
+    /*
+     * OK - we've now got (or created) the data structure for
+     *      this systemstats, including any "static" information.
+     */
+
+    entry->stats.HCInReceives.low = ipstat[IP6_STAT_TOTAL] & 0xffffffff;
+    entry->stats.HCInReceives.high = ipstat[IP6_STAT_TOTAL] >> 32;
+    entry->stats.InHdrErrors = ipstat[IP6_STAT_BADOPTIONS]
+		    + ipstat[IP6_STAT_TOOSHORT] + ipstat[IP6_STAT_TOOSMALL]
+		    + ipstat[IP6_STAT_TOOMANYHDR] + ipstat[IP6_STAT_EXTHDRTOOLONG];
+    entry->stats.InAddrErrors = ipstat[IP6_STAT_CANTFORWARD];
+    entry->stats.HCOutForwDatagrams.low = ipstat[IP6_STAT_FORWARD] & 0xffffffff;
+    entry->stats.HCOutForwDatagrams.high = ipstat[IP6_STAT_FORWARD] >> 32;
+    entry->stats.InDiscards = ipstat[IP6_STAT_FRAGDROPPED];
+    entry->stats.HCInDelivers.low = ipstat[IP6_STAT_DELIVERED] & 0xffffffff;
+    entry->stats.HCInDelivers.high = ipstat[IP6_STAT_DELIVERED] >> 32;
+    entry->stats.HCOutRequests.low = ipstat[IP6_STAT_LOCALOUT] & 0xffffffff;
+    entry->stats.HCOutRequests.high = ipstat[IP6_STAT_LOCALOUT] >> 32;
+    entry->stats.HCOutDiscards.low = ipstat[IP6_STAT_ODROPPED] & 0xffffffff;
+    entry->stats.HCOutDiscards.high = ipstat[IP6_STAT_ODROPPED] >> 32;
+    entry->stats.HCOutNoRoutes.low = ipstat[IP6_STAT_NOGIF] & 0xffffffff;
+    entry->stats.HCOutNoRoutes.high = ipstat[IP6_STAT_NOGIF] >> 32;
+    /* entry->stats. = scan_vals[12]; / * ReasmTimeout */
+    entry->stats.ReasmReqds = ipstat[IP6_STAT_FRAGMENTS];
+    entry->stats.ReasmOKs = ipstat[IP6_STAT_REASSEMBLED];
+    entry->stats.ReasmFails = ipstat[IP6_STAT_FRAGDROPPED]
+		    + ipstat[IP6_STAT_FRAGTIMEOUT];
+    entry->stats.HCOutFragOKs.low = ipstat[IP6_STAT_FRAGMENTS] & 0xffffffff;
+    entry->stats.HCOutFragOKs.high = ipstat[IP6_STAT_FRAGMENTS] >> 32;
+    entry->stats.HCOutFragFails.low = ipstat[IP6_STAT_CANTFRAG] & 0xffffffff;
+    entry->stats.HCOutFragFails.high = ipstat[IP6_STAT_CANTFRAG] >> 32;
+    entry->stats.HCOutFragCreates.low = ipstat[IP6_STAT_OFRAGMENTS] & 0xffffffff;
+    entry->stats.HCOutFragCreates.high = ipstat[IP6_STAT_OFRAGMENTS] >> 32;
+
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINRECEIVES] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INHDRERRORS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INADDRERRORS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFORWDATAGRAMS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INDISCARDS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINDELIVERS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTREQUESTS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTDISCARDS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTNOROUTES] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_REASMREQDS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_REASMOKS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_REASMFAILS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGOKS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGFAILS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGCREATES] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_DISCONTINUITYTIME] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_REFRESHRATE] = 1;
+
+    /*
+     * add to container
+     */
+    if (CONTAINER_INSERT(container, entry) < 0)
+    {
+	snmp_log(LOG_ERR, "systemstats_v6_load_systemstats: cannot insert entry\n");
+	DEBUGMSGTL(("access:systemstats:container","error with systemstats_entry: insert into container failed.\n"));
+	netsnmp_access_systemstats_entry_free(entry);
+    }
+
+    return 0;
+}
+
+
+/*
+ * load ipIfStatsTable for ipv6 entries
+ */
+static int 
+_systemstats_v6_load_ifstats(netsnmp_container* container, u_int load_flags)
+{
+    struct if_nameindex *ifs = if_nameindex();
+    int ix;
+    int rc = 0;
+
+    for (ix = 0; ifs[ix].if_index; ix++) {
+	struct in6_ifstat *ifs6;
+	struct in6_ifreq ifr;
+	int s;
+
+	memset(&ifr, 0, sizeof(ifr));
+	strncpy(ifr.ifr_name, ifs[ix].if_name, sizeof(ifr.ifr_name)-1);
+	if ((s = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) {
+	    rc = -1;
+	    break;
+	}
+	if (ioctl(s, SIOCGIFSTAT_IN6, (caddr_t)&ifr) < 0) {
+	    rc = -2;
+	    close(s);
+	    break;
+	}
+	close(s);
+	ifs6 = &ifr.ifr_ifru.ifru_stat;
+    }
+    if_freenameindex(ifs);
+    return rc;
+}
+#endif
+
+#else
+
+static int
+_systemstats_v4(netsnmp_container* container, u_int load_flags)
+{
+    netsnmp_systemstats_entry *entry = NULL;
+#ifdef __DragonFly__
+    size_t len = ncpus*sizeof(struct ip_stats);
+    struct ip_stats *ipstat = malloc(len);
+    int c;
+#else
+    size_t len = sizeof(struct ipstat);
+    struct ipstat *ipstat = malloc(len);
+#endif
+    int mib[] = { CTL_NET, PF_INET, IPPROTO_IP, IPCTL_STATS };
+
+    if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), ipstat, &len, NULL, 0) == -1) {
+	snmp_log_perror("Cannot sysctlbyname net.inet.ip.stats");
+	free(ipstat);
+	return -2;
+    }
+
+    DEBUGMSGTL(("access:systemstats:container:arch", "load v4 (flags %x)\n",
+                load_flags));
+
+    netsnmp_assert(container != NULL); /* load function shoulda checked this */
+
+    if (load_flags & NETSNMP_ACCESS_SYSTEMSTATS_LOAD_IFTABLE) {
+        /* we do not support ipIfStatsTable for ipv4 */
+	free(ipstat);
+        return 0;
+    }
+
+    entry = netsnmp_access_systemstats_entry_create(1, 0,
+		"ipSystemStatsTable.ipv4");
+    if(NULL == entry) {
+	netsnmp_access_systemstats_container_free(container,
+						  NETSNMP_ACCESS_SYSTEMSTATS_FREE_NOFLAGS);
+	free(ipstat);
+	return -3;
+    }
+
+    /*
+     * OK - we've now got (or created) the data structure for
+     *      this systemstats, including any "static" information.
+     * Now parse the rest of the line (i.e. starting from 'stats')
+     *      to extract the relevant statistics, and populate
+     *      data structure accordingly.
+     */
+
+#ifdef dragonfly
+    for (c = 1; c < ncpus; c++) {
+	int i, n = sizeof(struct ip_stats)/sizeof(u_long);
+	u_long *up = (u_long *)ipstat;
+	u_long *cp = (u_long *)(ipstat+c);
+	for (i = 0; i < n; i++) {
+	    *up += *cp;
+	    up++;
+	    cp++;
+	}
+    }
+#endif
+    entry->stats.HCInReceives.low = ipstat->ips_total & 0xffffffff;
+#ifndef darwin
+    entry->stats.HCInReceives.high = ipstat->ips_total >> 32;
+#endif
+    entry->stats.InHdrErrors = ipstat->ips_badsum + ipstat->ips_tooshort
+		            + ipstat->ips_toosmall + ipstat->ips_badhlen
+			    + ipstat->ips_badlen;
+    entry->stats.InAddrErrors = ipstat->ips_cantforward;
+    entry->stats.HCOutForwDatagrams.low = ipstat->ips_forward & 0xffffffff;
+#ifndef darwin
+    entry->stats.HCOutForwDatagrams.high = ipstat->ips_forward >> 32;
+#endif
+    entry->stats.InUnknownProtos = ipstat->ips_noproto;
+    entry->stats.InDiscards = ipstat->ips_fragdropped;
+    entry->stats.HCInDelivers.low = ipstat->ips_delivered & 0xffffffff;
+#ifndef darwin
+    entry->stats.HCInDelivers.high = ipstat->ips_delivered >> 32;
+#endif
+    entry->stats.HCOutRequests.low = ipstat->ips_localout & 0xffffffff;
+#ifndef darwin
+    entry->stats.HCOutRequests.high = ipstat->ips_localout >> 32;
+#endif
+    entry->stats.HCOutDiscards.low = ipstat->ips_odropped & 0xffffffff;
+#ifndef darwin
+    entry->stats.HCOutDiscards.high = ipstat->ips_odropped >> 32;
+#endif
+    entry->stats.HCOutNoRoutes.low = ipstat->ips_nogif & 0xffffffff;
+#ifndef darwin
+    entry->stats.HCOutNoRoutes.high = ipstat->ips_nogif >> 32;
+#endif
+    /* entry->stats. = scan_vals[12]; / * ReasmTimeout */
+    entry->stats.ReasmReqds = ipstat->ips_fragments;
+    entry->stats.ReasmOKs = ipstat->ips_reassembled;
+    entry->stats.ReasmFails = ipstat->ips_fragdropped + ipstat->ips_fragtimeout;
+    entry->stats.HCOutFragOKs.low = ipstat->ips_fragments & 0xffffffff;
+#ifndef darwin
+    entry->stats.HCOutFragOKs.high = ipstat->ips_fragments >> 32;
+#endif
+    entry->stats.HCOutFragFails.low = ipstat->ips_cantfrag & 0xffffffff;
+#ifndef darwin
+    entry->stats.HCOutFragFails.high = ipstat->ips_cantfrag >> 32;
+#endif
+    entry->stats.HCOutFragCreates.low = ipstat->ips_ofragments & 0xffffffff;
+#ifndef darwin
+    entry->stats.HCOutFragCreates.high = ipstat->ips_ofragments >> 32;
+#endif
+
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINRECEIVES] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INHDRERRORS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INADDRERRORS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFORWDATAGRAMS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INUNKNOWNPROTOS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INDISCARDS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINDELIVERS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTREQUESTS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTDISCARDS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTNOROUTES] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_REASMREQDS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_REASMOKS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_REASMFAILS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGOKS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGFAILS] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGCREATES] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_DISCONTINUITYTIME] = 1;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_REFRESHRATE] = 1;
+
+    /*
+     * add to container
+     */
+    if (CONTAINER_INSERT(container, entry) < 0)
+    {
+	DEBUGMSGTL(("access:systemstats:container","error with systemstats_entry: insert into container failed.\n"));
+	netsnmp_access_systemstats_entry_free(entry);
+    }
+
+    free(ipstat);
+    return 0;
+}
+
+
+#if defined (NETSNMP_ENABLE_IPV6)
+
+/*
+ * load ipSystemStatsTable for ipv6 entries
+ */
+static int 
+_systemstats_v6_load_systemstats(netsnmp_container* container, u_int load_flags)
+{
+    struct ip6stat ip6stat;
+    int mib[] = { CTL_NET, AF_INET6, IPPROTO_IPV6, IPV6CTL_STATS };
+    size_t len = sizeof(ip6stat);
+    netsnmp_systemstats_entry *entry = NULL;
+
+    if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), &ip6stat, &len, NULL, 0) == -1) {
+  	NETSNMP_LOGONCE((LOG_ERR, "Cannot sysctl(CTL_NET, AF_INET6, IPPROTO_IPV6, IPV6CTL_STATS)\n"));
+	return -1;
+    }
+    
+    entry = netsnmp_access_systemstats_entry_create(2, 0,
+            "ipSystemStatsTable.ipv6");
+    if(NULL == entry)
+        return -3;
+    
+    entry->stats.HCInReceives.low = ip6stat.ip6s_total & 0xffffffff;
+    entry->stats.HCInReceives.high = ip6stat.ip6s_total >> 32;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINRECEIVES] = 1;
+    /*
+    entry->stats.HCInOctets.low = scan_val & 0xffffffff;
+    entry->stats.HCInOctets.high = scan_val  >> 32;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINOCTETS] = 1;
+    */
+    entry->stats.InHdrErrors = ip6stat.ip6s_badoptions + ip6stat.ip6s_tooshort
+                             + ip6stat.ip6s_toosmall + ip6stat.ip6s_badvers
+			     + ip6stat.ip6s_toomanyhdr;
+#if HAVE_STRUCT_IP6STAT_IP6S_EXTHDRTOOLONG
+    entry->stats.InHdrErrors += ip6stat.ip6s_exthdrtoolong;
+#endif
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INHDRERRORS] = 1;
+    entry->stats.HCInNoRoutes.low = ip6stat.ip6s_cantforward & 0xffffffff;
+    entry->stats.HCInNoRoutes.high = ip6stat.ip6s_cantforward >> 32;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINNOROUTES] = 1;
+    /*
+    entry->stats.inAddrErrors = 0;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INADDRERRORS] = 1;
+    entry->stats.InUnknownProtos = scan_val;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INUNKNOWNPROTOS] = 1;
+    entry->stats.InTruncatedPkts = scan_val  & 0xffffffff;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INTRUNCATEDPKTS] = 1;
+    */
+    entry->stats.HCInForwDatagrams.low = ip6stat.ip6s_forward & 0xffffffff;
+    entry->stats.HCInForwDatagrams.high = ip6stat.ip6s_forward >> 32;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINFORWDATAGRAMS] = 1;
+    entry->stats.ReasmReqds = ip6stat.ip6s_fragments;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_REASMREQDS] = 1;
+    entry->stats.ReasmOKs = ip6stat.ip6s_reassembled;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_REASMOKS] = 1;
+    entry->stats.ReasmFails = ip6stat.ip6s_fragdropped + ip6stat.ip6s_fragtimeout;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_REASMFAILS] = 1;
+    entry->stats.InDiscards = ip6stat.ip6s_fragdropped;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INDISCARDS] = 1;
+    entry->stats.HCInDelivers.low = ip6stat.ip6s_delivered  & 0xffffffff;
+    entry->stats.HCInDelivers.high = ip6stat.ip6s_delivered >> 32;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINDELIVERS] = 1;
+    entry->stats.HCOutRequests.low = ip6stat.ip6s_localout & 0xffffffff;
+    entry->stats.HCOutRequests.high = ip6stat.ip6s_localout >> 32;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTREQUESTS] = 1;
+    entry->stats.HCOutNoRoutes.low = ip6stat.ip6s_noroute & 0xffffffff;
+    entry->stats.HCOutNoRoutes.high = ip6stat.ip6s_noroute >> 32;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTNOROUTES] = 1;
+    entry->stats.HCOutForwDatagrams.low = ip6stat.ip6s_forward & 0xffffffff;
+    entry->stats.HCOutForwDatagrams.high = ip6stat.ip6s_forward >> 32;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFORWDATAGRAMS] = 1;
+    entry->stats.HCOutDiscards.low = ip6stat.ip6s_odropped & 0xffffffff;
+    entry->stats.HCOutDiscards.high = ip6stat.ip6s_odropped >> 32;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTDISCARDS] = 1;
+    entry->stats.HCOutFragReqds.low = (ip6stat.ip6s_fragmented + ip6stat.ip6s_cantfrag) & 0xffffffff;
+    entry->stats.HCOutFragReqds.high = (ip6stat.ip6s_fragmented + ip6stat.ip6s_cantfrag) >> 32;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGREQDS] = 1;
+    entry->stats.HCOutFragOKs.low = ip6stat.ip6s_fragmented & 0xffffffff;
+    entry->stats.HCOutFragOKs.high = ip6stat.ip6s_fragmented >> 32;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGOKS] = 1;
+    entry->stats.HCOutFragFails.low = ip6stat.ip6s_cantfrag & 0xffffffff;
+    entry->stats.HCOutFragFails.high = ip6stat.ip6s_cantfrag >> 32;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGFAILS] = 1;
+    entry->stats.HCOutFragCreates.low = ip6stat.ip6s_ofragments & 0xffffffff;
+    entry->stats.HCOutFragCreates.high = ip6stat.ip6s_ofragments >> 32;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGCREATES] = 1;
+    /*
+    entry->stats.HCOutTransmits.low = scan_val & 0xffffffff;
+    entry->stats.HCOutTransmits.high = scan_val >> 32;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTTRANSMITS] = 1;
+    entry->stats.HCOutMcastOctets.low = scan_val & 0xffffffff;
+    entry->stats.HCOutMcastOctets.high = scan_val >> 32;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTMCASTOCTETS] = 1;
+    entry->stats.HCInMcastPkts.low = scan_val  & 0xffffffff;
+    entry->stats.HCInMcastPkts.high = scan_val >> 32;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINMCASTPKTS] = 1;
+    entry->stats.HCInMcastOctets.low = scan_val  & 0xffffffff;
+    entry->stats.HCInMcastOctets.high = scan_val >> 32;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINMCASTOCTETS] = 1;
+    entry->stats.HCOutMcastPkts.low = scan_val & 0xffffffff;
+    entry->stats.HCOutMcastPkts.high = scan_val >> 32;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTMCASTPKTS] = 1;
+    entry->stats.HCOutOctets.low = scan_val & 0xffffffff;
+    entry->stats.HCOutOctets.high = scan_val >> 32;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTOCTETS] = 1;
+    entry->stats.HCInBcastPkts.low = scan_val  & 0xffffffff;
+    entry->stats.HCInBcastPkts.high = scan_val >> 32;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINBCASTPKTS] = 1;
+    entry->stats.HCOutBcastPkts.low = scan_val  & 0xffffffff;
+    entry->stats.HCOutBcastPkts.high = scan_val >> 32;
+    entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTBCASTPKTS] = 1;
+    */
+
+    /*
+     * add to container
+     */
+    if (CONTAINER_INSERT(container, entry) < 0) {
+	DEBUGMSGTL(("access:systemstats:container","error with systemstats_entry: insert into container failed.\n"));
+	netsnmp_access_systemstats_entry_free(entry);
+    }
+
+    return 1;
+}
+
+#define DEV_SNMP6_DIRNAME   "/proc/net/dev_snmp6"
+#define IFINDEX_LINE        "ifIndex"
+#define DEV_FILENAME_LEN    64
+
+/*
+ * load ipIfStatsTable for ipv6 entries
+ */
+static int 
+_systemstats_v6_load_ifstats(netsnmp_container* container, u_int load_flags)
+{
+    DIR            *dev_snmp6_dir;
+    struct dirent  *dev_snmp6_entry;
+    char           dev_filename[DEV_FILENAME_LEN];
+    FILE           *devin;
+    char           line[1024];
+    char           *start = line;
+    int            rc;
+    char           *scan_str;
+    uintmax_t       scan_val;
+    netsnmp_systemstats_entry *entry = NULL;
+            
+    /*
+     * try to open /proc/net/dev_snmp6 directory. If we can't, that' ok -
+     * maybe it is not supported by the current running kernel.
+     */
+    if ((dev_snmp6_dir = opendir(DEV_SNMP6_DIRNAME)) == NULL) {
+        DEBUGMSGTL(("access:ifstats",
+        "Failed to load IPv6 IfStats Table (linux)\n"));
+        return 0;
+    }
+    
+    /*
+     * 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;
+    
+        if (snprintf(dev_filename, DEV_FILENAME_LEN, "%s/%s", DEV_SNMP6_DIRNAME,
+                dev_snmp6_entry->d_name) > DEV_FILENAME_LEN) {
+            snmp_log(LOG_ERR, "Interface name %s is too long\n",
+                    dev_snmp6_entry->d_name);
+            continue;
+        }
+        if (NULL == (devin = fopen(dev_filename, "r"))) {
+            snmp_log(LOG_ERR, "Failed to open %s\n", dev_filename);
+            continue;
+        }
+    
+        /*
+         * If a stat file name is made of digits, the name is interface index.
+         * If it is an interface name, the file includes a line labeled ifIndex.
+         */
+        if (isdigit(dev_snmp6_entry->d_name[0])) {
+            scan_val = strtoull(dev_snmp6_entry->d_name, NULL, 0);
+        } else {
+            if (NULL == (start = fgets(line, sizeof(line), devin))) {
+                snmp_log(LOG_ERR, "%s doesn't include any lines\n",
+                        dev_filename);
+                fclose(devin);
+                continue;
+            }
+    
+            if (0 != strncmp(start, IFINDEX_LINE, 7)) {
+                snmp_log(LOG_ERR, "%s doesn't include ifIndex line",
+                        dev_filename);
+                fclose(devin);
+                continue;
+            }
+
+            scan_str = strrchr(line, ' ');
+            if (NULL == scan_str) {
+                snmp_log(LOG_ERR, "%s is wrong format", dev_filename);
+                fclose(devin);
+                continue;
+            }
+            scan_val = strtoull(scan_str, NULL, 0);
+        }
+        
+        entry = netsnmp_access_systemstats_entry_create(2, scan_val,
+                "ipIfStatsTable.ipv6");
+        if(NULL == entry) {
+            fclose(devin);
+            closedir(dev_snmp6_dir);
+            return -3;
+        }
+        
+        /* _systemstats_v6_load_file(entry, devin); */
+        CONTAINER_INSERT(container, entry);
+        fclose(devin);
+    }
+    closedir(dev_snmp6_dir);
+    return 0;
+}
+#endif /* NETSNMP_ENABLE_IPV6 */
+#endif
+
+#ifdef NETSNMP_ENABLE_IPV6
+/*
+ * Based on load_flags, load ipSystemStatsTable or ipIfStatsTable for ipv6 entries. 
+ */
+static int
+_systemstats_v6(netsnmp_container* container, u_int load_flags)
+{
+    DEBUGMSGTL(("access:systemstats:container:arch", "load v6 (flags %u)\n",
+                load_flags));
+
+    netsnmp_assert(container != NULL); /* load function shoulda checked this */
+
+    if (load_flags & NETSNMP_ACCESS_SYSTEMSTATS_LOAD_IFTABLE) {
+        /* load ipIfStatsTable */
+        return _systemstats_v6_load_ifstats(container, load_flags);
+    } else {
+        /* load ipSystemStatsTable */
+        return _systemstats_v6_load_systemstats(container, load_flags);
+    }
+}
+#endif /* NETSNMP_ENABLE_IPV6 */
diff --git a/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access.c b/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access.c
index d877f8b..1ec8cc6 100644
--- a/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access.c
+++ b/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access.c
@@ -102,8 +102,8 @@ _add_or_update_arp_entry(netsnmp_arp_entry *arp_entry,
         break;
 
     default:
+        snmp_log(LOG_ERR, "inetNetToMediaTable:_add_or_update_arpentry: unsupported address type, len = %d\n", arp_entry->arp_ipaddress_len);
         netsnmp_access_arp_entry_free(arp_entry);
-        snmp_log(LOG_ERR, "unsupported address type\n");
         return;
     }
 
diff --git a/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access.c b/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access.c
index d41bb25..300ed7a 100644
--- a/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access.c
+++ b/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access.c
@@ -65,6 +65,7 @@ ipSystemStatsTable_init_data(ipSystemStatsTable_registration *
      * TODO:303:o: Initialize ipSystemStatsTable data.
      */
 
+    netsnmp_access_systemstats_init();
     return MFD_SUCCESS;
 }                               /* ipSystemStatsTable_init_data */
 
diff --git a/agent/mibgroup/ip-mib/ip_scalars.c b/agent/mibgroup/ip-mib/ip_scalars.c
index b697a75..9096269 100644
--- a/agent/mibgroup/ip-mib/ip_scalars.c
+++ b/agent/mibgroup/ip-mib/ip_scalars.c
@@ -10,31 +10,35 @@
 
 #include <net-snmp/data_access/ip_scalars.h>
 
-netsnmp_feature_require(register_num_file_instance)
-
 #include "ip_scalars.h"
 
-int
+static int
 handle_ipForwarding(netsnmp_mib_handler *handler,
                     netsnmp_handler_registration *reginfo,
                     netsnmp_agent_request_info *reqinfo,
                     netsnmp_request_info *requests);
 
-int
+static int
 handle_ipDefaultTTL(netsnmp_mib_handler *handler,
-                          netsnmp_handler_registration *reginfo,
-                          netsnmp_agent_request_info *reqinfo,
-                          netsnmp_request_info *requests);
+                    netsnmp_handler_registration *reginfo,
+                    netsnmp_agent_request_info *reqinfo,
+                    netsnmp_request_info *requests);
 
-int
+static int
 handle_ipv6IpForwarding(netsnmp_mib_handler *handler,
                         netsnmp_handler_registration *reginfo,
                         netsnmp_agent_request_info *reqinfo,
                         netsnmp_request_info *requests);
 
-int ipAddressSpinLockValue;
+static int
+handle_ipv6IpDefaultHopLimit(netsnmp_mib_handler *handler,
+                             netsnmp_handler_registration *reginfo,
+                             netsnmp_agent_request_info *reqinfo,
+                             netsnmp_request_info *requests);
+
+static int ipAddressSpinLockValue;
 
-int
+static int
 handle_ipAddressSpinLock(netsnmp_mib_handler *handler,
                          netsnmp_handler_registration *reginfo,
                          netsnmp_agent_request_info *reqinfo,
@@ -45,26 +49,24 @@ void
 init_ip_scalars(void)
 {
     static oid 	    ipForwarding_oid[] = { 1, 3, 6, 1, 2, 1, 4, 1 };
-    static oid 	    ipDefaultTTL_oid[] = { 1, 3, 6, 1, 2, 1, 4, 2, 0 };
-    static oid      ipReasmTimeout_oid[] = { 1, 3, 6, 1, 2, 1, 4, 13, 0 };
+    static oid 	    ipDefaultTTL_oid[] = { 1, 3, 6, 1, 2, 1, 4, 2 };
     static oid      ipv6IpForwarding_oid[] = { 1, 3, 6, 1, 2, 1, 4, 25 };
-    static oid      ipv6IpDefaultHopLimit_oid[] =
-        { 1, 3, 6, 1, 2, 1, 4, 26, 0 };
+    static oid      ipv6IpDefaultHopLimit_oid[] = { 1, 3, 6, 1, 2, 1, 4, 26 };
     static oid      ipAddressSpinLock_oid[] = { 1, 3, 6, 1, 2, 1, 4, 33 };
 
     DEBUGMSGTL(("ip_scalar", "Initializing\n"));
 
-    netsnmp_register_num_file_instance
-        ("ipReasmTimeout",
-         ipReasmTimeout_oid, OID_LENGTH(ipReasmTimeout_oid),
-         "/proc/sys/net/ipv4/ipfrag_time", ASN_INTEGER,
-         HANDLER_CAN_RONLY, NULL, NULL);
-                                       
     netsnmp_register_scalar(netsnmp_create_handler_registration
                              ("ipForwarding", handle_ipForwarding,
                               ipForwarding_oid,
                               OID_LENGTH(ipForwarding_oid),
                               HANDLER_CAN_RWRITE));
+                                       
+    netsnmp_register_scalar(netsnmp_create_handler_registration
+                             ("ipDefaultTTL", handle_ipDefaultTTL,
+                              ipDefaultTTL_oid,
+                              OID_LENGTH(ipDefaultTTL_oid),
+                              HANDLER_CAN_RWRITE));
 
     netsnmp_register_scalar(netsnmp_create_handler_registration
                             ("ipv6IpForwarding", handle_ipv6IpForwarding,
@@ -73,6 +75,12 @@ init_ip_scalars(void)
                              HANDLER_CAN_RWRITE));
 
     netsnmp_register_scalar(netsnmp_create_handler_registration
+                            ("ipv6IpDefaultHopLimit", handle_ipv6IpDefaultHopLimit,
+                             ipv6IpDefaultHopLimit_oid,
+                             OID_LENGTH(ipv6IpDefaultHopLimit_oid),
+                             HANDLER_CAN_RWRITE));
+
+    netsnmp_register_scalar(netsnmp_create_handler_registration
                             ("ipAddressSpinLock", handle_ipAddressSpinLock,
                              ipAddressSpinLock_oid,
                              OID_LENGTH(ipAddressSpinLock_oid),
@@ -81,21 +89,9 @@ init_ip_scalars(void)
     /* Initialize spin lock with random value */
     ipAddressSpinLockValue = (int) random();
 
-    netsnmp_register_num_file_instance
-        ("ipv6IpDefaultHopLimit",
-         ipv6IpDefaultHopLimit_oid, OID_LENGTH(ipv6IpDefaultHopLimit_oid),
-         "/proc/sys/net/ipv6/conf/default/hop_limit", ASN_INTEGER,
-         HANDLER_CAN_RWRITE, NULL, NULL);
-
-     netsnmp_register_num_file_instance
-        ("ipDefaultTTL",
-         ipDefaultTTL_oid, OID_LENGTH(ipDefaultTTL_oid),
-         "/proc/sys/net/ipv4/ip_default_ttl", ASN_INTEGER,
-         HANDLER_CAN_RWRITE, NULL, NULL);
-                                       
 }
 
-int
+static int
 handle_ipForwarding(netsnmp_mib_handler *handler,
                           netsnmp_handler_registration *reginfo,
                           netsnmp_agent_request_info   *reqinfo,
@@ -145,8 +141,7 @@ handle_ipForwarding(netsnmp_mib_handler *handler,
                                           SNMP_ERR_NOCREATION);
             } else {
                 u_long *value_save;
-                memdup((u_char **) & value_save, (u_char *) &value,
-                       sizeof(value));
+                value_save = netsnmp_memdup(&value, sizeof(value));
                 if ( NULL == value_save )
                     netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_RESOURCEUNAVAILABLE);
                 else
@@ -196,7 +191,106 @@ handle_ipForwarding(netsnmp_mib_handler *handler,
 }
 
 
-int
+static int
+handle_ipDefaultTTL(netsnmp_mib_handler *handler,
+                    netsnmp_handler_registration *reginfo,
+                    netsnmp_agent_request_info   *reqinfo,
+                    netsnmp_request_info         *requests)
+{
+    int      rc;
+    u_long   value;
+
+    /* We are never called for a GETNEXT if it's registered as a
+       "instance", as it's "magically" handled for us.  */
+
+    /* a instance handler also only hands us one request at a time, so
+       we don't need to loop over a list of requests; we'll only get one. */
+
+    switch(reqinfo->mode) {
+
+        case MODE_GET:
+            rc = netsnmp_arch_ip_scalars_ipDefaultTTL_get(&value);
+            if (rc != 0) {
+                netsnmp_set_request_error(reqinfo, requests,
+                                      SNMP_NOSUCHINSTANCE);
+            }
+            else {
+                snmp_set_var_typed_value(requests->requestvb, ASN_INTEGER,
+                                     (u_char *)&value, sizeof(value));
+            }
+            break;
+
+#ifndef NETSNMP_NO_WRITE_SUPPORT
+        /*
+         * SET REQUEST
+         *
+         * multiple states in the transaction.  See:
+         * http://www.net-snmp.org/tutorial-5/toolkit/mib_module/set-actions.jpg
+         */
+        case MODE_SET_RESERVE1:
+            break;
+
+        case MODE_SET_RESERVE2:
+            /*
+             * store old info for undo later
+             */
+            rc = netsnmp_arch_ip_scalars_ipDefaultTTL_get(&value);
+            if (rc < 0) {
+                netsnmp_set_request_error(reqinfo, requests,
+                                          SNMP_ERR_NOCREATION);
+            } else {
+                u_long *value_save;
+                value_save = netsnmp_memdup(&value, sizeof(value));
+                if ( NULL == value_save )
+                    netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_RESOURCEUNAVAILABLE);
+                else
+                    netsnmp_request_add_list_data(requests,
+                                                  netsnmp_create_data_list
+                                                  ("ipttl", value_save,
+                                                  free));
+	    }
+            break;
+
+        case MODE_SET_FREE:
+            /* XXX: free resources allocated in RESERVE1 and/or
+               RESERVE2.  Something failed somewhere, and the states
+               below won't be called. */
+            break;
+
+        case MODE_SET_ACTION:
+            /* XXX: perform the value change here */
+            value =  *(requests->requestvb->val.integer);
+            rc = netsnmp_arch_ip_scalars_ipDefaultTTL_set(value);
+            if ( 0 != rc ) {
+                netsnmp_set_request_error(reqinfo, requests, rc);
+            }
+            break;
+
+        case MODE_SET_COMMIT:
+            break;
+
+        case MODE_SET_UNDO:
+             value =
+                 *((u_long *) netsnmp_request_get_list_data(requests,
+                                                            "ipttl"));
+             rc = netsnmp_arch_ip_scalars_ipDefaultTTL_set(value);
+             if ( 0 != rc ) {
+                 netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_UNDOFAILED);
+             }
+             break;
+#endif /* !NETSNMP_NO_WRITE_SUPPORT */
+
+        default:
+            /* we should never get here, so this is a really bad error */
+            snmp_log(LOG_ERR, "unknown mode (%d) in handle_ipDefaultTTL\n", reqinfo->mode );
+            return SNMP_ERR_GENERR;
+    }
+
+    return SNMP_ERR_NOERROR;
+}
+
+
+static int
 handle_ipv6IpForwarding(netsnmp_mib_handler *handler,
                         netsnmp_handler_registration *reginfo,
                         netsnmp_agent_request_info *reqinfo,
@@ -250,8 +344,8 @@ handle_ipv6IpForwarding(netsnmp_mib_handler *handler,
         }
         else {
             u_long *value_save;
-            memdup((u_char **) & value_save, (u_char *) &value,
-                   sizeof(value));
+
+            value_save = netsnmp_memdup(&value, sizeof(value));
             if ( NULL == value_save ) {
                 netsnmp_set_request_error(reqinfo, requests,
                                           SNMP_ERR_RESOURCEUNAVAILABLE);
@@ -259,7 +353,7 @@ handle_ipv6IpForwarding(netsnmp_mib_handler *handler,
             else {
                 netsnmp_request_add_list_data(requests,
                                               netsnmp_create_data_list
-                                              ("ipfw", value_save,
+                                              ("ip6fw", value_save,
                                                free));
             }
         }
@@ -282,7 +376,7 @@ handle_ipv6IpForwarding(netsnmp_mib_handler *handler,
     case MODE_SET_UNDO:
         value =
             *((u_long *) netsnmp_request_get_list_data(requests,
-                                                       "ipfw"));
+                                                       "ip6fw"));
         rc = netsnmp_arch_ip_scalars_ipv6IpForwarding_set(value);
         if ( 0 != rc ) {
             netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_UNDOFAILED);
@@ -302,7 +396,8 @@ handle_ipv6IpForwarding(netsnmp_mib_handler *handler,
     return SNMP_ERR_NOERROR;
 }
 
-int
+
+static int
 handle_ipAddressSpinLock(netsnmp_mib_handler *handler,
                           netsnmp_handler_registration *reginfo,
                           netsnmp_agent_request_info   *reqinfo,
@@ -370,3 +465,123 @@ handle_ipAddressSpinLock(netsnmp_mib_handler *handler,
 
     return SNMP_ERR_NOERROR;
 }
+
+
+static int
+handle_ipv6IpDefaultHopLimit(netsnmp_mib_handler *handler,
+                             netsnmp_handler_registration *reginfo,
+                             netsnmp_agent_request_info *reqinfo,
+                             netsnmp_request_info *requests)
+{
+    u_long          value;
+    int             rc;
+    /*
+     * We are never called for a GETNEXT if it's registered as a
+     * "instance", as it's "magically" handled for us.  
+     */
+
+    /*
+     * a instance handler also only hands us one request at a time, so
+     * we don't need to loop over a list of requests; we'll only get one. 
+     */
+
+    switch (reqinfo->mode) {
+
+    case MODE_GET:
+
+        rc = netsnmp_arch_ip_scalars_ipv6IpDefaultHopLimit_get(&value);
+        if (rc != 0) {
+            netsnmp_set_request_error(reqinfo, requests,
+                                  SNMP_NOSUCHINSTANCE);
+        }
+        else {
+            snmp_set_var_typed_value(requests->requestvb, ASN_INTEGER,
+                                 (u_char *)&value, sizeof(value));
+        }
+
+        break;
+
+#ifdef NOTYET
+        /*
+         * SET REQUEST
+         *
+         * multiple states in the transaction.  See:
+         * http://www.net-snmp.org/tutorial-5/toolkit/mib_module/set-actions.jpg
+         */
+    case MODE_SET_RESERVE1:
+        /*
+         * or you could use netsnmp_check_vb_type_and_size instead 
+         */
+        rc = netsnmp_check_vb_type(requests->requestvb, ASN_INTEGER);
+        if (rc != SNMP_ERR_NOERROR) {
+            netsnmp_set_request_error(reqinfo, requests, rc);
+        }
+        break;
+
+    case MODE_SET_RESERVE2:
+        /*
+         * XXX malloc "undo" storage buffer 
+         */
+        if ( /* XXX if malloc, or whatever, failed: */ ) {
+            netsnmp_set_request_error(reqinfo, requests,
+                                      SNMP_ERR_RESOURCEUNAVAILABLE);
+        }
+        break;
+
+    case MODE_SET_FREE:
+        /*
+         * XXX: free resources allocated in RESERVE1 and/or
+         * RESERVE2.  Something failed somewhere, and the states
+         * below won't be called. 
+         */
+        break;
+
+    case MODE_SET_ACTION:
+        /*
+         * XXX: perform the value change here 
+         */
+        if ( /* XXX: error? */ ) {
+            netsnmp_set_request_error(reqinfo, requests, /* some error */
+                                      );
+        }
+        break;
+
+    case MODE_SET_COMMIT:
+        /*
+         * XXX: delete temporary storage 
+         */
+        if ( /* XXX: error? */ ) {
+            /*
+             * try _really_really_ hard to never get to this point 
+             */
+            netsnmp_set_request_error(reqinfo, requests,
+                                      SNMP_ERR_COMMITFAILED);
+        }
+        break;
+
+    case MODE_SET_UNDO:
+        /*
+         * XXX: UNDO and return to previous value for the object 
+         */
+        if ( /* XXX: error? */ ) {
+            /*
+             * try _really_really_ hard to never get to this point 
+             */
+            netsnmp_set_request_error(reqinfo, requests,
+                                      SNMP_ERR_UNDOFAILED);
+        }
+        break;
+#endif
+
+    default:
+        /*
+         * we should never get here, so this is a really bad error 
+         */
+        snmp_log(LOG_ERR,
+                 "unknown mode (%d) in handle_ipv6IpDefaultHopLimit\n",
+                 reqinfo->mode);
+        return SNMP_ERR_GENERR;
+    }
+
+    return SNMP_ERR_NOERROR;
+}
diff --git a/agent/mibgroup/kernel_sunos5.c b/agent/mibgroup/kernel_sunos5.c
index 9ee0284..331ee6d 100644
--- a/agent/mibgroup/kernel_sunos5.c
+++ b/agent/mibgroup/kernel_sunos5.c
@@ -112,6 +112,8 @@ mibcache        Mibcache[MIBCACHE_SIZE+1] = {
     {MIB_IP6, 20 * sizeof(mib2_ipv6IfStatsEntry_t), (void *)-1, 0, 30, 0, 0},
 #endif
     {MIB_IP6_ADDR, 20 * sizeof(mib2_ipv6AddrEntry_t), (void *)-1, 0, 30, 0, 0},
+    {MIB_IP6_ROUTE, 200 * sizeof(mib2_ipv6AddrEntry_t), (void *)-1, 0, 30, 0, 0},
+    {MIB_ICMP6, 20 * sizeof(mib2_ipv6IfIcmpEntry_t), (void *)-1, 0, 30, 0, 0},
     {MIB_TCP6_CONN, 1000 * sizeof(mib2_tcp6ConnEntry_t), (void *) -1, 0, 30,
      0, 0},
     {MIB_UDP6_ENDPOINT, 1000 * sizeof(mib2_udp6Entry_t), (void *) -1, 0, 30,
@@ -152,6 +154,8 @@ mibmap          Mibmap[MIBCACHE_SIZE+1] = {
 #endif
     {MIB2_IP6, 0},
     {MIB2_IP6, MIB2_IP6_ADDR},
+    {MIB2_IP6, MIB2_IP6_ROUTE},
+    {MIB2_ICMP6, 0},
     {MIB2_TCP6, MIB2_TCP6_CONN},
     {MIB2_UDP6, MIB2_UDP6_ENTRY},
 #endif
@@ -1002,27 +1006,31 @@ getmib(int groupname, int subgroupname, void **statbuf, size_t *size,
 	    rc = getmsg(sd, NULL, &strbuf, &flags);
 	    switch (rc) {
 	    case -1:
-		rc = -ENOSR;
+		ret = -ENOSR;
+		snmp_perror("getmsg");
 		goto Return;
 
 	    default:
-		rc = -ENODATA;
+		snmp_log(LOG_ERR, "kernel_sunos5/getmib: getmsg returned %d\n", rc);
+		ret = -ENODATA;
 		goto Return;
 
 	    case MOREDATA:
-		oldsize = ( ((void *)strbuf.buf) - *statbuf) + strbuf.len;
-		strbuf.buf = (void *)realloc(*statbuf,oldsize+4096);
+		DEBUGMSGTL(("kernel_sunos5", "...... getmib increased buffer size\n"));
+		oldsize = ( strbuf.buf - (char *)*statbuf) + strbuf.len;
+		strbuf.buf = (char *)realloc(*statbuf, oldsize+4096);
 		if(strbuf.buf != NULL) {
 		    *statbuf = strbuf.buf;
 		    *size = oldsize + 4096;
-		    strbuf.buf = *statbuf + oldsize;
+		    strbuf.buf = (char *)*statbuf + oldsize;
 		    strbuf.maxlen = 4096;
+		    result = NOT_FOUND;
 		    break;
 		}
-		strbuf.buf = *statbuf + (oldsize - strbuf.len);
+		strbuf.buf = (char *)*statbuf + (oldsize - strbuf.len);
 	    case 0:
 		/* fix buffer to real size & position */
-		strbuf.len += ((void *)strbuf.buf) - *statbuf;
+		strbuf.len += strbuf.buf - (char*)*statbuf;
 		strbuf.buf = *statbuf;
 		strbuf.maxlen = *size;
 
@@ -1649,6 +1657,8 @@ set_if_info(mib2_ifEntry_t *ifp, unsigned index, char *name, uint64_t flags,
          * this is good 
          */
 	havespeed = B_TRUE;
+    } else if (getKstatInt("link", name, "ifspeed", &ifp->ifSpeed) == 0) {
+	havespeed = B_TRUE;
     }
 
     /* make ifOperStatus depend on link status if available */
diff --git a/agent/mibgroup/kernel_sunos5.h b/agent/mibgroup/kernel_sunos5.h
index 0bffcb9..bf337ae 100644
--- a/agent/mibgroup/kernel_sunos5.h
+++ b/agent/mibgroup/kernel_sunos5.h
@@ -76,6 +76,8 @@ typedef enum {
 #endif
     MIB_IP6,
     MIB_IP6_ADDR,
+    MIB_IP6_ROUTE,
+    MIB_ICMP6,
     MIB_TCP6_CONN,
     MIB_UDP6_ENDPOINT,
 #endif
diff --git a/agent/mibgroup/mibII.h b/agent/mibgroup/mibII.h
index 1b94a59..35cb544 100644
--- a/agent/mibgroup/mibII.h
+++ b/agent/mibgroup/mibII.h
@@ -4,15 +4,17 @@
 
 config_require(mibII/system_mib)
 config_require(mibII/sysORTable)
+config_version_require((mibII/snmp_mib, 5.5, mibII/snmp_mib_5_5))
+config_require(mibII/vacm_vars)
+config_require(mibII/setSerialNo)
+#if !defined(cygwin) || defined(HAVE_IPHLPAPI_H)
 config_require(mibII/at)
 config_require(mibII/ifTable)
 config_require(mibII/ip)
-config_version_require((mibII/snmp_mib, 5.5, mibII/snmp_mib_5_5))
 config_require(mibII/tcp)
 config_require(mibII/icmp)
 config_require(mibII/udp)
-config_require(mibII/vacm_vars)
-config_require(mibII/setSerialNo)
+#endif
 
 /* 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)) 
@@ -25,15 +27,16 @@ config_require(if-mib)
 
 /*
  * these new module re-rewrites have only been implemented for
- * linux.
+ * Linux and *BSD.
  */
-#if defined( linux )
+#if defined(linux)
+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)
 #elif defined(solaris2)
 config_require(tcp-mib udp-mib)
-#elif defined(freebsd4) || defined(dragonfly)
-config_require(tcp-mib udp-mib)
-#elif defined(openbsd4)
+#elif defined(freebsd4)
 config_require(tcp-mib udp-mib)
 #elif defined(netbsd1)
 config_require(tcp-mib udp-mib)
@@ -44,4 +47,5 @@ config_require(tcp-mib udp-mib)
  */
 #if defined( solaris2 ) && defined( HAVE_MIB2_IPIFSTATSENTRY_T )
 config_require(ip-mib/ipSystemStatsTable ip-mib/ipAddressTable)
+config_require(ip-forward-mib)
 #endif
diff --git a/agent/mibgroup/mibII/at.c b/agent/mibgroup/mibII/at.c
index e968074..f57ba2a 100644
--- a/agent/mibgroup/mibII/at.c
+++ b/agent/mibgroup/mibII/at.c
@@ -525,7 +525,6 @@ static mib_ipNetToMediaEnt *at = (mib_ipNetToMediaEnt *) 0;
  */
 #define ARP_CACHE_INCR 1024
 static struct arptab *at = NULL;
-static int      arptab_curr_max_size = 0;
 
 #endif
 #endif                          /* NETSNMP_CAN_USE_SYSCTL */
@@ -631,8 +630,10 @@ ARP_Scan_Init(void)
 
     i = 0;
     while (fgets(line, sizeof(line), in)) {
+        static int      arptab_curr_max_size;
         u_long          tmp_a;
         unsigned int    tmp_flags;
+
         if (i >= arptab_curr_max_size) {
             struct arptab  *newtab = (struct arptab *)
                 realloc(at, (sizeof(struct arptab) *
diff --git a/agent/mibgroup/mibII/icmp.c b/agent/mibgroup/mibII/icmp.c
index 6d10426..be803ee 100644
--- a/agent/mibgroup/mibII/icmp.c
+++ b/agent/mibgroup/mibII/icmp.c
@@ -71,6 +71,95 @@ perfstat_id_t ps_name;
 	 *********************/
 
 
+#ifdef hpux11
+#define ICMP_STAT_STRUCTURE	int
+#endif
+
+#ifdef linux
+#define ICMP_STAT_STRUCTURE	struct icmp_mib
+#define USES_SNMP_DESIGNED_ICMPSTAT
+#undef ICMPSTAT_SYMBOL
+#endif
+
+#ifdef solaris2
+#define USES_SNMP_DESIGNED_ICMPSTAT
+#define ICMP_STAT_STRUCTURE	mib2_icmp_t
+#include "kernel_mib.h"
+static int
+solaris_read_icmp_stat(ICMP_STAT_STRUCTURE *);
+static int
+solaris_read_icmp_msg_stat(ICMP_STAT_STRUCTURE *, struct icmp4_msg_mib *, int *);
+#ifdef NETSNMP_ENABLE_IPV6
+static int
+solaris_read_icmp6_stat(struct icmp6_mib *);
+static int
+solaris_read_icmp6_msg_stat(struct icmp6_mib *, struct icmp6_msg_mib *, int *);
+#endif
+#endif
+
+#ifdef NETBSD_STATS_VIA_SYSCTL
+#define ICMP_STAT_STRUCTURE     struct icmp_mib
+#define USES_SNMP_DESIGNED_ICMPSTAT
+#undef ICMP_NSTATS
+#endif
+
+#ifdef HAVE_IPHLPAPI_H
+#include <iphlpapi.h>
+#define ICMP_STAT_STRUCTURE MIB_ICMP
+#endif
+
+#if (defined(NETSNMP_CAN_USE_SYSCTL) && defined(ICMPCTL_STATS))
+#define ICMP_STAT_STRUCTURE	struct icmp_mib
+#define USES_SNMP_DESIGNED_ICMPSTAT
+#undef ICMPSTAT_SYMBOL
+#endif
+
+#ifdef HAVE_SYS_ICMPIPSTATS_H
+/* or #ifdef		HAVE_SYS_TCPIPSTATS_H  ??? */
+#define ICMP_STAT_STRUCTURE	struct kna
+#define USES_TRADITIONAL_ICMPSTAT
+#endif
+
+#if !defined(ICMP_STAT_STRUCTURE)
+#define ICMP_STAT_STRUCTURE	struct icmpstat
+#define USES_TRADITIONAL_ICMPSTAT
+#endif
+
+ICMP_STAT_STRUCTURE icmpstat;
+#if defined(solaris2) && defined(NETSNMP_ENABLE_IPV6)
+static struct icmp6_mib icmp6stat;
+#endif
+
+/* If they just all agreed ... */
+
+#ifndef ICMP_DEST_UNREACH
+#define ICMP_DEST_UNREACH ICMP_UNREACH
+#endif
+#ifndef ICMP_SOURCE_QUENCH
+#define ICMP_SOURCE_QUENCH ICMP_SOURCEQUENCH
+#endif
+#ifndef ICMP_TIME_EXCEEDED
+#define ICMP_TIME_EXCEEDED ICMP_TIMXCEED
+#endif
+#ifndef ICMP_PARAMETERPROB
+#define ICMP_PARAMETERPROB ICMP_PARAMPROB
+#endif
+#ifndef ICMP_TIMESTAMP
+#define ICMP_TIMESTAMP ICMP_TSTAMP
+#endif
+#ifndef ICMP_TIMESTAMPREPLY
+#define ICMP_TIMESTAMPREPLY ICMP_TSTAMPREPLY
+#endif
+#ifndef ICMP_ADDRESS
+#define ICMP_ADDRESS ICMP_MASKREQ
+#endif
+#ifndef ICMP_ADDRESSREPLY
+#define ICMP_ADDRESSREPLY ICMP_MASKREPLY
+#endif
+#ifndef MLD_LISTENER_REDUCTION
+#define MLD_LISTENER_REDUCTION MLD_LISTENER_DONE
+#endif
+
 /*
  * Define the OID pointer to the top of the mib tree that we're
  * registering underneath 
@@ -84,7 +173,7 @@ extern int      ip_module_oid_len;
 extern int      ip_module_count;
 #endif
 
-#ifdef linux
+#ifdef USES_SNMP_DESIGNED_ICMPSTAT
 struct icmp_stats_table_entry {
 	uint32_t ipVer;
         uint32_t icmpStatsInMsgs;
@@ -130,54 +219,79 @@ int
 icmp_stats_load(netsnmp_cache *cache, void *vmagic)
 {
 
-	/*
-         * note don't bother using the passed in cache
-	 * and vmagic pointers.  They are useless as they 
-	 * currently point to the icmp system stats cache	
-	 * since I see little point in registering another
-	 * cache for this table.  Its not really needed
-	 */
+    /*
+     * note don't bother using the passed in cache
+     * and vmagic pointers.  They are useless as they 
+     * currently point to the icmp system stats cache	
+     * since I see little point in registering another
+     * cache for this table.  Its not really needed
+     */
 
-	int i;
-	struct icmp_mib v4icmp;
-	struct icmp6_mib v6icmp;
-	for(i=0;i<2;i++) {
-		switch(i) {
-			case 0:
-				linux_read_icmp_stat(&v4icmp);
-				icmp_stats_table[i].icmpStatsInMsgs = v4icmp.icmpInMsgs;
-				icmp_stats_table[i].icmpStatsInErrors = v4icmp.icmpInErrors;
-				icmp_stats_table[i].icmpStatsOutMsgs = v4icmp.icmpOutMsgs;
-				icmp_stats_table[i].icmpStatsOutErrors = v4icmp.icmpOutErrors;
-				break;
-			default:
-				memset(&icmp_stats_table[i],0,
-					sizeof(struct icmp_stats_table_entry));
-				linux_read_icmp6_stat(&v6icmp);
-				icmp_stats_table[i].icmpStatsInMsgs = v6icmp.icmp6InMsgs;
-				icmp_stats_table[i].icmpStatsInErrors = v6icmp.icmp6InErrors;
-				icmp_stats_table[i].icmpStatsOutMsgs = v6icmp.icmp6OutMsgs;
-				icmp_stats_table[i].icmpStatsOutErrors = v6icmp.icmp6OutDestUnreachs +
-					v6icmp.icmp6OutPktTooBigs +  v6icmp.icmp6OutTimeExcds +
-					v6icmp.icmp6OutParmProblems;
-				break;
-		}
-		icmp_stats_table[i].ipVer=i+1;
-	}
+    int i;
+    ICMP_STAT_STRUCTURE v4icmp;
+#ifdef NETSNMP_ENABLE_IPV6
+    struct icmp6_mib v6icmp;
+#endif
+    for(i = 0; i < 2; i++) {
+        switch(i) {
+        case 0:
+#ifdef linux
+            linux_read_icmp_stat(&v4icmp);
+#elif defined(NETBSD_STATS_VIA_SYSCTL)
+	    netbsd_read_icmp_stat(&v4icmp);
+#elif (defined(NETSNMP_CAN_USE_SYSCTL) && defined(ICMPCTL_STATS))
+	    sysctl_read_icmp_stat(&v4icmp);
+#elif defined(solaris2)
+	    solaris_read_icmp_stat(&v4icmp);
+#else
+	    return -1;
+#endif
+            icmp_stats_table[i].icmpStatsInMsgs = v4icmp.icmpInMsgs;
+            icmp_stats_table[i].icmpStatsInErrors = v4icmp.icmpInErrors;
+            icmp_stats_table[i].icmpStatsOutMsgs = v4icmp.icmpOutMsgs;
+            icmp_stats_table[i].icmpStatsOutErrors = v4icmp.icmpOutErrors;
+            break;
+        case 1:
+#ifdef NETSNMP_ENABLE_IPV6
+            memset(&icmp_stats_table[i],0,
+                    sizeof(struct icmp_stats_table_entry));
+#ifdef linux
+            linux_read_icmp6_stat(&v6icmp);
+#elif defined(NETBSD_STATS_VIA_SYSCTL)
+	    netbsd_read_icmp6_stat(&v6icmp);
+#elif (defined(NETSNMP_CAN_USE_SYSCTL) && defined(ICMPCTL_STATS))
+	    sysctl_read_icmp6_stat(&v6icmp);
+#elif defined(solaris2)
+	    solaris_read_icmp6_stat(&v6icmp);
+#else
+	    return -1;
+#endif
+            icmp_stats_table[i].icmpStatsInMsgs = v6icmp.icmp6InMsgs;
+            icmp_stats_table[i].icmpStatsInErrors = v6icmp.icmp6InErrors;
+            icmp_stats_table[i].icmpStatsOutMsgs = v6icmp.icmp6OutMsgs;
+            icmp_stats_table[i].icmpStatsOutErrors =
+                        v6icmp.icmp6OutDestUnreachs +
+                        v6icmp.icmp6OutPktTooBigs +  v6icmp.icmp6OutTimeExcds +
+                        v6icmp.icmp6OutParmProblems;
+#endif	/* NETSNMP_ENABLE_IPV6 */
+            break;
+        }
+        icmp_stats_table[i].ipVer = i + 1;
+    }
 
-	return 0;
+    return 0;
 }
 
 int
 icmp_msg_stats_load(netsnmp_cache *cache, void *vmagic)
 {
-    struct icmp_mib v4icmp;
+    ICMP_STAT_STRUCTURE v4icmp;
     struct icmp4_msg_mib v4icmpmsg;
 #ifdef NETSNMP_ENABLE_IPV6
     struct icmp6_mib v6icmp;
     struct icmp6_msg_mib v6icmpmsg;
 #endif
-    int i, j, k, flag, inc;
+    int i, k, flag, inc;
 
     memset(&icmp_msg_stats_table, 0, sizeof(icmp_msg_stats_table));
 
@@ -185,7 +299,17 @@ icmp_msg_stats_load(netsnmp_cache *cache, void *vmagic)
     flag = 0;
     k = 0;
     inc = 0;
+#ifdef linux
     linux_read_icmp_msg_stat(&v4icmp, &v4icmpmsg, &flag);
+#elif defined(NETBSD_STATS_VIA_SYSCTL)
+    netbsd_read_icmp_msg_stat(&v4icmp, &v4icmpmsg, &flag);
+#elif (defined(NETSNMP_CAN_USE_SYSCTL) && defined(ICMPCTL_STATS))
+    sysctl_read_icmp_msg_stat(&v4icmp, &v4icmpmsg, &flag);
+#elif defined(solaris2)
+    solaris_read_icmp_msg_stat(&v4icmp, &v4icmpmsg, &flag);
+#else
+    return -1;
+#endif
     if (flag) {
         while (255 >= k) {
             if (v4icmpmsg.vals[k].InType) {
@@ -212,70 +336,96 @@ icmp_msg_stats_load(netsnmp_cache *cache, void *vmagic)
         icmp_msg_stats_table[i].icmpMsgStatsType = ICMP_ECHOREPLY;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v4icmp.icmpInEchoReps;
         icmp_msg_stats_table[i].icmpMsgStatsOutPkts = v4icmp.icmpOutEchoReps;
+        icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
+        icmp_msg_stats_table[i].ipVer = 1;
         i++;
 
         icmp_msg_stats_table[i].icmpMsgStatsType = ICMP_DEST_UNREACH;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v4icmp.icmpInDestUnreachs;
         icmp_msg_stats_table[i].icmpMsgStatsOutPkts = v4icmp.icmpOutDestUnreachs;
+        icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
+        icmp_msg_stats_table[i].ipVer = 1;
         i++;
 
         icmp_msg_stats_table[i].icmpMsgStatsType = ICMP_SOURCE_QUENCH;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v4icmp.icmpInSrcQuenchs;
         icmp_msg_stats_table[i].icmpMsgStatsOutPkts = v4icmp.icmpOutSrcQuenchs;
+        icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
+        icmp_msg_stats_table[i].ipVer = 1;
         i++;
 
         icmp_msg_stats_table[i].icmpMsgStatsType = ICMP_REDIRECT;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v4icmp.icmpInRedirects;
         icmp_msg_stats_table[i].icmpMsgStatsOutPkts = v4icmp.icmpOutRedirects;
+        icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
+        icmp_msg_stats_table[i].ipVer = 1;
         i++;
 
         icmp_msg_stats_table[i].icmpMsgStatsType = ICMP_ECHO;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v4icmp.icmpInEchos;
         icmp_msg_stats_table[i].icmpMsgStatsOutPkts = v4icmp.icmpOutEchos;
+        icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
+        icmp_msg_stats_table[i].ipVer = 1;
         i++;
 
         icmp_msg_stats_table[i].icmpMsgStatsType = ICMP_TIME_EXCEEDED;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v4icmp.icmpInTimeExcds;
         icmp_msg_stats_table[i].icmpMsgStatsOutPkts = v4icmp.icmpOutTimeExcds;
+        icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
+        icmp_msg_stats_table[i].ipVer = 1;
         i++;
 
         icmp_msg_stats_table[i].icmpMsgStatsType = ICMP_PARAMETERPROB;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v4icmp.icmpInParmProbs;
         icmp_msg_stats_table[i].icmpMsgStatsOutPkts = v4icmp.icmpOutParmProbs;
+        icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
+        icmp_msg_stats_table[i].ipVer = 1;
         i++;
 
         icmp_msg_stats_table[i].icmpMsgStatsType = ICMP_TIMESTAMP;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v4icmp.icmpInTimestamps;
         icmp_msg_stats_table[i].icmpMsgStatsOutPkts = v4icmp.icmpOutTimestamps;
+        icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
+        icmp_msg_stats_table[i].ipVer = 1;
         i++;
 
         icmp_msg_stats_table[i].icmpMsgStatsType = ICMP_TIMESTAMPREPLY;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v4icmp.icmpInTimestampReps;
         icmp_msg_stats_table[i].icmpMsgStatsOutPkts = v4icmp.icmpOutTimestampReps;
+        icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
+        icmp_msg_stats_table[i].ipVer = 1;
         i++;
 
         icmp_msg_stats_table[i].icmpMsgStatsType = ICMP_ADDRESS;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v4icmp.icmpInAddrMasks;
         icmp_msg_stats_table[i].icmpMsgStatsOutPkts = v4icmp.icmpOutAddrMasks;
+        icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
+        icmp_msg_stats_table[i].ipVer = 1;
         i++;
 
         icmp_msg_stats_table[i].icmpMsgStatsType = ICMP_ADDRESSREPLY;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v4icmp.icmpInAddrMaskReps;
         icmp_msg_stats_table[i].icmpMsgStatsOutPkts = v4icmp.icmpOutAddrMaskReps;
+        icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
+        icmp_msg_stats_table[i].ipVer = 1;
         i++;
-
-        /* set the IP version and default flags */
-        for (j = 0; j < ICMP_MSG_STATS_IPV4_COUNT; j++) {
-            icmp_msg_stats_table[j].ipVer = 1;
-            icmp_msg_stats_table[j].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
-        }
     }
 
 #ifdef NETSNMP_ENABLE_IPV6
     flag = 0;
     k = 0;
     inc = 0;
+#ifdef linux
     linux_read_icmp6_msg_stat(&v6icmp, &v6icmpmsg, &flag);
+#elif defined(NETBSD_STATS_VIA_SYSCTL)
+    netbsd_read_icmp6_msg_stat(&v6icmp, &v6icmpmsg, &flag);
+#elif (defined(NETSNMP_CAN_USE_SYSCTL) && defined(ICMPCTL_STATS))
+    sysctl_read_icmp6_msg_stat(&v6icmp, &v6icmpmsg, &flag);
+#elif defined(solaris2)
+    solaris_read_icmp6_msg_stat(&v6icmp, &v6icmpmsg, &flag);
+#else
+    return -1;
+#endif
     if (flag) {
         while (255 >= k) {
             if (v6icmpmsg.vals[k].InType) {
@@ -302,80 +452,101 @@ icmp_msg_stats_load(netsnmp_cache *cache, void *vmagic)
         icmp_msg_stats_table[i].icmpMsgStatsType = ICMP6_DST_UNREACH;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v6icmp.icmp6InDestUnreachs;
         icmp_msg_stats_table[i].icmpMsgStatsOutPkts = v6icmp.icmp6OutDestUnreachs;
+        icmp_msg_stats_table[i].ipVer = 2;
+        icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
         i++;
 
         icmp_msg_stats_table[i].icmpMsgStatsType = ICMP6_PACKET_TOO_BIG;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v6icmp.icmp6InPktTooBigs;
         icmp_msg_stats_table[i].icmpMsgStatsOutPkts = v6icmp.icmp6OutPktTooBigs;
+        icmp_msg_stats_table[i].ipVer = 2;
+        icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
         i++;
 
         icmp_msg_stats_table[i].icmpMsgStatsType = ICMP6_TIME_EXCEEDED;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v6icmp.icmp6InTimeExcds;
         icmp_msg_stats_table[i].icmpMsgStatsOutPkts = v6icmp.icmp6OutTimeExcds;
+        icmp_msg_stats_table[i].ipVer = 2;
+        icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
         i++;
 
         icmp_msg_stats_table[i].icmpMsgStatsType = ICMP6_PARAM_PROB;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v6icmp.icmp6InParmProblems;
         icmp_msg_stats_table[i].icmpMsgStatsOutPkts = v6icmp.icmp6OutParmProblems;
+        icmp_msg_stats_table[i].ipVer = 2;
+        icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
         i++;
 
         icmp_msg_stats_table[i].icmpMsgStatsType = ICMP6_ECHO_REQUEST;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v6icmp.icmp6InEchos;
-        icmp_msg_stats_table[i].icmpMsgStatsOutPkts = 0;
-        icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN;
+        icmp_msg_stats_table[i].icmpMsgStatsOutPkts = v6icmp.icmp6OutEchos;
+        icmp_msg_stats_table[i].ipVer = 2;
+        icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
         i++;
 
         icmp_msg_stats_table[i].icmpMsgStatsType = ICMP6_ECHO_REPLY;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v6icmp.icmp6InEchoReplies;
         icmp_msg_stats_table[i].icmpMsgStatsOutPkts = v6icmp.icmp6OutEchoReplies;
+        icmp_msg_stats_table[i].ipVer = 2;
+        icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
         i++;
 
 #ifdef MLD_LISTENER_QUERY
         icmp_msg_stats_table[i].icmpMsgStatsType = MLD_LISTENER_QUERY;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v6icmp.icmp6InGroupMembQueries;
         icmp_msg_stats_table[i].icmpMsgStatsOutPkts = 0;
+        icmp_msg_stats_table[i].ipVer = 2;
         icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN;
         i++;
+
         icmp_msg_stats_table[i].icmpMsgStatsType = MLD_LISTENER_REPORT;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v6icmp.icmp6InGroupMembResponses;
         icmp_msg_stats_table[i].icmpMsgStatsOutPkts = v6icmp.icmp6OutGroupMembResponses;
+        icmp_msg_stats_table[i].ipVer = 2;
+        icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
         i++;
 
         icmp_msg_stats_table[i].icmpMsgStatsType = MLD_LISTENER_REDUCTION;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v6icmp.icmp6InGroupMembReductions;
         icmp_msg_stats_table[i].icmpMsgStatsOutPkts = v6icmp.icmp6OutGroupMembReductions;
+        icmp_msg_stats_table[i].ipVer = 2;
+        icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
         i++;
-#endif
 
         icmp_msg_stats_table[i].icmpMsgStatsType = ND_ROUTER_SOLICIT;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v6icmp.icmp6InRouterSolicits;
         icmp_msg_stats_table[i].icmpMsgStatsOutPkts = v6icmp.icmp6OutRouterSolicits;
+        icmp_msg_stats_table[i].ipVer = 2;
+        icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
         i++;
 
         icmp_msg_stats_table[i].icmpMsgStatsType = ND_ROUTER_ADVERT;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v6icmp.icmp6InRouterAdvertisements;
         icmp_msg_stats_table[i].icmpMsgStatsOutPkts = 0;
+        icmp_msg_stats_table[i].ipVer = 2;
         icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN;
         i++;
 
         icmp_msg_stats_table[i].icmpMsgStatsType = ND_NEIGHBOR_SOLICIT;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v6icmp.icmp6InNeighborSolicits;
         icmp_msg_stats_table[i].icmpMsgStatsOutPkts = v6icmp.icmp6OutNeighborSolicits;
+        icmp_msg_stats_table[i].ipVer = 2;
+        icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
         i++;
 
         icmp_msg_stats_table[i].icmpMsgStatsType = ND_NEIGHBOR_ADVERT;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v6icmp.icmp6InNeighborAdvertisements;
         icmp_msg_stats_table[i].icmpMsgStatsOutPkts = v6icmp.icmp6OutNeighborAdvertisements;
+        icmp_msg_stats_table[i].ipVer = 2;
+        icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
         i++;
 
         icmp_msg_stats_table[i].icmpMsgStatsType = ND_REDIRECT;
         icmp_msg_stats_table[i].icmpMsgStatsInPkts = v6icmp.icmp6InRedirects;
         icmp_msg_stats_table[i].icmpMsgStatsOutPkts = v6icmp.icmp6OutRedirects;
-
-        for (j = 0; j < ICMP_MSG_STATS_IPV6_COUNT; j++) {
-            icmp_msg_stats_table[ICMP_MSG_STATS_IPV4_COUNT + j].ipVer = 2;
-            icmp_msg_stats_table[ICMP_MSG_STATS_IPV4_COUNT + j].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
-        }
+        icmp_msg_stats_table[i].ipVer = 2;
+        icmp_msg_stats_table[i].flags = ICMP_MSG_STATS_HAS_IN | ICMP_MSG_STATS_HAS_OUT;
+#endif
     }
 #endif /* NETSNMP_ENABLE_IPV6 */
     return 0;
@@ -387,25 +558,25 @@ icmp_stats_next_entry( void **loop_context,
                      netsnmp_variable_list *index,
                      netsnmp_iterator_info *data)
 {
-	int i = (int)(intptr_t)(*loop_context);
-	netsnmp_variable_list *idx = index;
+    int i = (int)(intptr_t)(*loop_context);
+    netsnmp_variable_list *idx = index;
 
-	if(i > 1)
-		return NULL;
+    if(i > 1)
+        return NULL;
 
 
-	/*
-	 *set IP version
-	 */
-	snmp_set_var_typed_value(idx, ASN_INTEGER, (u_char *)&icmp_stats_table[i].ipVer,
-                                sizeof(uint32_t));
-	idx = idx->next_variable;
+    /*
+     *set IP version
+     */
+    snmp_set_var_typed_value(idx, ASN_INTEGER, (u_char *)&icmp_stats_table[i].ipVer,
+                            sizeof(uint32_t));
+    idx = idx->next_variable;
 
-	*data_context = &icmp_stats_table[i];
+    *data_context = &icmp_stats_table[i];
 
-	*loop_context = (void *)(intptr_t)(++i);
-	
-	return index;
+    *loop_context = (void *)(intptr_t)(++i);
+    
+    return index;
 }
 
 
@@ -415,10 +586,9 @@ icmp_stats_first_entry( void **loop_context,
                      netsnmp_variable_list *index,
                      netsnmp_iterator_info *data)
 {
-
-        *loop_context = NULL;
-        *data_context = NULL;
-        return icmp_stats_next_entry(loop_context, data_context, index, data);
+    *loop_context = NULL;
+    *data_context = NULL;
+    return icmp_stats_next_entry(loop_context, data_context, index, data);
 }
 
 netsnmp_variable_list *
@@ -466,7 +636,7 @@ icmp_msg_stats_first_entry(void **loop_context,
 void
 init_icmp(void)
 {
-#ifdef linux
+#ifdef USES_SNMP_DESIGNED_ICMPSTAT
     netsnmp_handler_registration *msg_stats_reginfo = NULL;
     netsnmp_handler_registration *table_reginfo = NULL;
     netsnmp_iterator_info *iinfo;
@@ -498,7 +668,7 @@ init_icmp(void)
     if (rc != SNMPERR_SUCCESS)
 	goto bail;
 #endif
-#ifdef linux
+#ifdef USES_SNMP_DESIGNED_ICMPSTAT
 
     /* register icmpStatsTable */
     table_info = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info);
@@ -526,9 +696,9 @@ init_icmp(void)
         goto bail;
     }
     netsnmp_inject_handler( table_reginfo,
-		    netsnmp_get_cache_handler(ICMP_STATS_CACHE_TIMEOUT,
-			   		icmp_load, icmp_free,
-					icmp_stats_tbl_oid, OID_LENGTH(icmp_stats_tbl_oid)));
+            netsnmp_get_cache_handler(ICMP_STATS_CACHE_TIMEOUT,
+                        icmp_load, icmp_free,
+                        icmp_stats_tbl_oid, OID_LENGTH(icmp_stats_tbl_oid)));
 
     /* register icmpMsgStatsTable */
     msg_stats_table_info = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info);
@@ -559,7 +729,7 @@ init_icmp(void)
             netsnmp_get_cache_handler(ICMP_STATS_CACHE_TIMEOUT,
                 icmp_load, icmp_free,
                 icmp_msg_stats_tbl_oid, OID_LENGTH(icmp_msg_stats_tbl_oid)));
-#endif /* linux */
+#endif /* USES_SNMP_DESIGNED_ICMPSTAT */
 
 #ifdef USING_MIBII_IP_MODULE
     if (++ip_module_count == 2)
@@ -580,7 +750,7 @@ init_icmp(void)
 #ifndef hpux11
 bail:
 #endif
-#ifdef linux
+#ifdef USES_SNMP_DESIGNED_ICMPSTAT
     if (msg_stats_reginfo)
         netsnmp_handler_registration_free(msg_stats_reginfo);
     if (table_reginfo)
@@ -597,48 +767,6 @@ bail:
 	 *
 	 *********************/
 
-#ifdef hpux11
-#define ICMP_STAT_STRUCTURE	int
-#endif
-
-#ifdef linux
-#define ICMP_STAT_STRUCTURE	struct icmp_mib
-#define USES_SNMP_DESIGNED_ICMPSTAT
-#undef ICMPSTAT_SYMBOL
-#endif
-
-#ifdef solaris2
-#define ICMP_STAT_STRUCTURE	mib2_icmp_t
-#define USES_SNMP_DESIGNED_ICMPSTAT
-#endif
-
-#ifdef NETBSD_STATS_VIA_SYSCTL
-#define ICMP_STAT_STRUCTURE     struct icmp_mib
-#define USES_SNMP_DESIGNED_ICMPSTAT
-#undef ICMP_NSTATS
-#endif
-
-#ifdef HAVE_IPHLPAPI_H
-#include <iphlpapi.h>
-#define ICMP_STAT_STRUCTURE MIB_ICMP
-#endif
-
-/* ?? #if (defined(NETSNMP_CAN_USE_SYSCTL) && defined(ICMPCTL_STATS)) ?? */
-
-#ifdef HAVE_SYS_ICMPIPSTATS_H
-/* or #ifdef		HAVE_SYS_TCPIPSTATS_H  ??? */
-#define ICMP_STAT_STRUCTURE	struct kna
-#define USES_TRADITIONAL_ICMPSTAT
-#endif
-
-#if !defined(ICMP_STAT_STRUCTURE)
-#define ICMP_STAT_STRUCTURE	struct icmpstat
-#define USES_TRADITIONAL_ICMPSTAT
-#endif
-
-ICMP_STAT_STRUCTURE icmpstat;
-
-
         /*********************
 	 *
 	 *  System independent handler
@@ -656,9 +784,6 @@ icmp_handler(netsnmp_mib_handler          *handler,
     netsnmp_variable_list *requestvb;
     long     ret_value;
     oid      subid;
-#ifdef USES_TRADITIONAL_ICMPSTAT
-    int      i;
-#endif
 
     /*
      * The cached data should already have been loaded by the
@@ -766,13 +891,16 @@ icmp_handler(netsnmp_mib_handler          *handler,
         ret_value = icmpstat.icmpOutAddrMaskReps;
         break;
 #elif defined(USES_TRADITIONAL_ICMPSTAT) && !defined(_USE_PERFSTAT_PROTOCOL)
-    case ICMPINMSGS:
+    case ICMPINMSGS: {
+        int i;
+
         ret_value = icmpstat.icps_badcode +
             icmpstat.icps_tooshort +
             icmpstat.icps_checksum + icmpstat.icps_badlen;
         for (i = 0; i <= ICMP_MAXTYPE; i++)
             ret_value += icmpstat.icps_inhist[i];
         break;
+    }
     case ICMPINERRORS:
         ret_value = icmpstat.icps_badcode +
             icmpstat.icps_tooshort +
@@ -811,11 +939,14 @@ icmp_handler(netsnmp_mib_handler          *handler,
     case ICMPINADDRMASKREPS:
         ret_value = icmpstat.icps_inhist[ICMP_MASKREPLY];
         break;
-    case ICMPOUTMSGS:
+    case ICMPOUTMSGS: {
+        int i;
+
         ret_value = icmpstat.icps_oldshort + icmpstat.icps_oldicmp;
         for (i = 0; i <= ICMP_MAXTYPE; i++)
             ret_value += icmpstat.icps_outhist[i];
         break;
+    }
     case ICMPOUTERRORS:
         ret_value = icmpstat.icps_oldshort + icmpstat.icps_oldicmp;
         break;
@@ -1038,7 +1169,7 @@ icmp_handler(netsnmp_mib_handler          *handler,
 }
 
 
-#ifdef linux
+#ifdef USES_SNMP_DESIGNED_ICMPSTAT
 int
 icmp_stats_table_handler(netsnmp_mib_handler  *handler,
                  netsnmp_handler_registration *reginfo,
@@ -1183,7 +1314,7 @@ icmp_msg_stats_table_handler(netsnmp_mib_handler          *handler,
 
     return SNMP_ERR_NOERROR;
 }
-#endif		/* linux */
+#endif		/* USES_SNMP_DESIGNED_ICMPSTAT */
 
         /*********************
 	 *
@@ -1322,7 +1453,11 @@ icmp_load(netsnmp_cache *cache, void *vmagic)
 int
 icmp_load(netsnmp_cache *cache, void *vmagic)
 {
-    long            ret_value = -1;
+    int ret_value = -1;
+#ifdef NETSNMP_ENABLE_IPV6
+    mib2_ipv6IfIcmpEntry_t ifstat;
+    int req = GET_FIRST;
+#endif
 
     ret_value =
         getMibstat(MIB_ICMP, &icmpstat, sizeof(mib2_icmp_t), GET_FIRST,
@@ -1333,8 +1468,85 @@ icmp_load(netsnmp_cache *cache, void *vmagic)
     } else {
         DEBUGMSGTL(("mibII/icmp", "Loaded ICMP Group (solaris)\n"));
     }
+
+#ifdef NETSNMP_ENABLE_IPV6
+    memset(&icmp6stat, 0, sizeof(icmp6stat));
+    while ((ret_value = getMibstat(MIB_ICMP6, &ifstat, sizeof(ifstat), req,
+                   &Get_everything, NULL)) == 0) {
+	if ( ret_value < 0 ) {
+	    DEBUGMSGTL(("mibII/icmp", "Failed to load ICMP6 Group (solaris)\n"));
+	} else {
+	    DEBUGMSGTL(("mibII/icmp", "Loaded ICMP6 Group (solaris)\n"));
+	}
+	icmp6stat.icmp6OutMsgs += ifstat.ipv6IfIcmpOutMsgs;
+	icmp6stat.icmp6InMsgs += ifstat.ipv6IfIcmpInMsgs;
+	icmp6stat.icmp6InErrors += ifstat.ipv6IfIcmpInErrors;
+	icmp6stat.icmp6OutDestUnreachs += ifstat.ipv6IfIcmpOutDestUnreachs;
+	icmp6stat.icmp6InDestUnreachs += ifstat.ipv6IfIcmpInDestUnreachs;
+	icmp6stat.icmp6OutPktTooBigs += ifstat.ipv6IfIcmpOutPktTooBigs;
+	icmp6stat.icmp6InPktTooBigs += ifstat.ipv6IfIcmpInPktTooBigs;
+	icmp6stat.icmp6OutTimeExcds += ifstat.ipv6IfIcmpOutTimeExcds;
+	icmp6stat.icmp6InTimeExcds += ifstat.ipv6IfIcmpInTimeExcds;
+	icmp6stat.icmp6OutParmProblems += ifstat.ipv6IfIcmpOutParmProblems;
+	icmp6stat.icmp6InParmProblems += ifstat.ipv6IfIcmpInParmProblems;
+	icmp6stat.icmp6OutEchos += ifstat.ipv6IfIcmpOutEchos;
+	icmp6stat.icmp6InEchos += ifstat.ipv6IfIcmpInEchos;
+	icmp6stat.icmp6OutEchoReplies += ifstat.ipv6IfIcmpOutEchoReplies;
+	icmp6stat.icmp6InEchoReplies += ifstat.ipv6IfIcmpInEchoReplies;
+	icmp6stat.icmp6OutRouterSolicits += ifstat.ipv6IfIcmpOutRouterSolicits;
+	icmp6stat.icmp6InRouterSolicits += ifstat.ipv6IfIcmpInRouterSolicits;
+	icmp6stat.icmp6OutNeighborAdvertisements += ifstat.ipv6IfIcmpOutNeighborAdvertisements;
+	icmp6stat.icmp6InNeighborAdvertisements += ifstat.ipv6IfIcmpInNeighborAdvertisements;
+	icmp6stat.icmp6OutNeighborSolicits += ifstat.ipv6IfIcmpOutNeighborSolicits;
+	icmp6stat.icmp6InNeighborSolicits += ifstat.ipv6IfIcmpInNeighborSolicits;
+	icmp6stat.icmp6OutRedirects += ifstat.ipv6IfIcmpOutRedirects;
+	icmp6stat.icmp6InRedirects += ifstat.ipv6IfIcmpInRedirects;
+	icmp6stat.icmp6InGroupMembQueries += ifstat.ipv6IfIcmpInGroupMembQueries;
+	icmp6stat.icmp6OutGroupMembResponses += ifstat.ipv6IfIcmpOutGroupMembResponses;
+	icmp6stat.icmp6InGroupMembResponses += ifstat.ipv6IfIcmpInGroupMembResponses;
+	icmp6stat.icmp6OutGroupMembReductions += ifstat.ipv6IfIcmpOutGroupMembReductions;
+	icmp6stat.icmp6InGroupMembReductions += ifstat.ipv6IfIcmpInGroupMembReductions;
+	req = GET_NEXT;
+    }
+#endif
+
+    icmp_stats_load(cache, vmagic);
+    icmp_msg_stats_load(cache, vmagic);
     return ret_value;
 }
+
+static int
+solaris_read_icmp_stat(ICMP_STAT_STRUCTURE *mib)
+{
+    *mib = icmpstat;
+    return 0;
+}
+
+static int
+solaris_read_icmp_msg_stat(ICMP_STAT_STRUCTURE *mib, struct icmp4_msg_mib *msg_mib, int *flag)
+{
+    *mib = icmpstat;
+    *flag = 0;
+    return 0;
+}
+
+#ifdef NETSNMP_ENABLE_IPV6
+static int
+solaris_read_icmp6_stat(struct icmp6_mib *mib)
+{
+    *mib = icmp6stat;
+    return 0;
+}
+
+static int
+solaris_read_icmp6_msg_stat(struct icmp6_mib *mib, struct icmp6_msg_mib *msg_mib, int *flag)
+{
+    *mib = icmp6stat;
+    *flag = 0;
+    return 0;
+}
+#endif
+
 #elif defined(NETBSD_STATS_VIA_SYSCTL)
 int
 icmp_load(netsnmp_cache *cache, void *vmagic)
@@ -1348,6 +1560,8 @@ icmp_load(netsnmp_cache *cache, void *vmagic)
     } else {
 	DEBUGMSGTL(("mibII/icmp", "Loaded ICMP Group (netbsd)\n"));
     }
+    icmp_stats_load(cache, vmagic);
+    icmp_msg_stats_load(cache, vmagic);
     return ret_value;
 }
 #elif defined (WIN32) || defined (cygwin)
@@ -1387,17 +1601,16 @@ int
 icmp_load(netsnmp_cache *cache, void *vmagic)
 {
     long            ret_value = -1;
-    static int      sname[4] =
-        { CTL_NET, PF_INET, IPPROTO_ICMP, ICMPCTL_STATS };
-    size_t          len = sizeof(icmpstat);
 
-    ret_value = sysctl(sname, 4, &icmpstat, &len, 0, 0);
+    ret_value = sysctl_read_icmp_stat(&icmpstat);
 
     if ( ret_value < 0 ) {
-        DEBUGMSGTL(("mibII/icmp", "Failed to load ICMP Group (sysctl)\n"));
+	DEBUGMSGTL(("mibII/icmp", "Failed to load ICMP Group (netbsd)\n"));
     } else {
-        DEBUGMSGTL(("mibII/icmp", "Loaded ICMP Group (sysctl)\n"));
+	DEBUGMSGTL(("mibII/icmp", "Loaded ICMP Group (netbsd)\n"));
     }
+    icmp_stats_load(cache, vmagic);
+    icmp_msg_stats_load(cache, vmagic);
     return ret_value;
 }
 #elif defined(HAVE_SYS_TCPIPSTATS_H)
diff --git a/agent/mibgroup/mibII/icmp.h b/agent/mibgroup/mibII/icmp.h
index 9307654..d07841a 100644
--- a/agent/mibgroup/mibII/icmp.h
+++ b/agent/mibgroup/mibII/icmp.h
@@ -5,10 +5,25 @@
 #ifndef _MIBGROUP_ICMP_H
 #define _MIBGROUP_ICMP_H
 
-config_arch_require(solaris2,        kernel_sunos5)
+config_arch_require(solaris2,  kernel_sunos5)
 config_arch_require(linux,     mibII/kernel_linux)
+config_arch_require(freebsd4,  mibII/kernel_sysctl)
+config_arch_require(freebsd5,  mibII/kernel_sysctl)
+config_arch_require(freebsd6,  mibII/kernel_sysctl)
+config_arch_require(freebsd7,  mibII/kernel_sysctl)
+config_arch_require(freebsd8,  mibII/kernel_sysctl)
+config_arch_require(freebsd9,  mibII/kernel_sysctl)
+config_arch_require(freebsd10, mibII/kernel_sysctl)
 config_arch_require(netbsd,    mibII/kernel_netbsd)
 config_arch_require(netbsdelf, mibII/kernel_netbsd)
+config_arch_require(openbsd4,  mibII/kernel_sysctl)
+config_arch_require(openbsd5,  mibII/kernel_sysctl)
+config_arch_require(dragonfly2, mibII/kernel_sysctl)
+config_arch_require(dragonfly3, mibII/kernel_sysctl)
+config_arch_require(darwin10,  mibII/kernel_sysctl)
+config_arch_require(darwin11,  mibII/kernel_sysctl)
+config_arch_require(darwin12,  mibII/kernel_sysctl)
+config_arch_require(darwin13,  mibII/kernel_sysctl)
 
 #include <net-snmp/agent/cache_handler.h>
 
diff --git a/agent/mibgroup/mibII/interfaces.c b/agent/mibgroup/mibII/interfaces.c
index 9dff4aa..26ffebb 100644
--- a/agent/mibgroup/mibII/interfaces.c
+++ b/agent/mibgroup/mibII/interfaces.c
@@ -198,6 +198,7 @@ netsnmp_feature_provide(interface_legacy)
 
 #include "interfaces.h"
 #include "struct.h"
+#include "util_funcs.h"
 #include "util_funcs/header_generic.h"
 
 /* if you want caching enabled for speed retrieval purposes, set this to 5?*/
@@ -777,9 +778,6 @@ var_ifEntry(struct variable *vp,
     static char     Name[16];
     char           *cp;
     conf_if_list   *if_ptr;
-#if HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_SEC
-    struct timeval  now;
-#endif
 
     interface =
         header_ifEntry(vp, name, length, exact, var_len, write_method);
diff --git a/agent/mibgroup/mibII/ip.c b/agent/mibgroup/mibII/ip.c
index 40b5d2f..f39d322 100644
--- a/agent/mibgroup/mibII/ip.c
+++ b/agent/mibgroup/mibII/ip.c
@@ -144,7 +144,7 @@ oid             ipaddr_variables_oid[]  = { SNMP_OID_MIB2, 4, 20, 1 };
 oid             iproute_variables_oid[] = { SNMP_OID_MIB2, 4, 21, 1 };
 oid             ipmedia_variables_oid[] = { SNMP_OID_MIB2, 4, 22, 1 };
 oid             ip_module_oid[] = { SNMP_OID_MIB2, 4 };
-oid             ip_module_oid_len = sizeof(ip_module_oid) / sizeof(oid);
+int             ip_module_oid_len = sizeof(ip_module_oid) / sizeof(oid);
 int             ip_module_count = 0;    /* Need to liaise with icmp.c */
 
 void
diff --git a/agent/mibgroup/mibII/ipCidrRouteTable.c b/agent/mibgroup/mibII/ipCidrRouteTable.c
index c9ad6e7..8609bb0 100644
--- a/agent/mibgroup/mibII/ipCidrRouteTable.c
+++ b/agent/mibgroup/mibII/ipCidrRouteTable.c
@@ -655,8 +655,7 @@ ipCidrRouteTable_handler(netsnmp_mib_handler *handler,
                     if (retval) {
                         ui = SNMP_MALLOC_STRUCT(undoInfo);
                         ui->len = retval_len;
-                        memdup((u_char **) & ui->ptr,
-                               (u_char *) retval, ui->len);
+                        ui->ptr = netsnmp_memdup(retval, ui->len);
                         netsnmp_oid_stash_add_data(&undoStorage,
                                                    suffix, suffix_len, ui);
                     }
@@ -672,8 +671,7 @@ ipCidrRouteTable_handler(netsnmp_mib_handler *handler,
                     if (retval) {
                         ui = SNMP_MALLOC_STRUCT(undoInfo);
                         ui->len = retval_len;
-                        memdup((u_char **) & ui->ptr,
-                               (u_char *) retval, ui->len);
+                        ui->ptr = netsnmp_memdup(retval, ui->len);
                         netsnmp_oid_stash_add_data(&undoStorage,
                                                    suffix, suffix_len, ui);
                     }
@@ -689,8 +687,7 @@ ipCidrRouteTable_handler(netsnmp_mib_handler *handler,
                     if (retval) {
                         ui = SNMP_MALLOC_STRUCT(undoInfo);
                         ui->len = retval_len;
-                        memdup((u_char **) & ui->ptr,
-                               (u_char *) retval, ui->len);
+                        ui->ptr = netsnmp_memdup(retval, ui->len);
                         netsnmp_oid_stash_add_data(&undoStorage,
                                                    suffix, suffix_len, ui);
                     }
@@ -707,8 +704,7 @@ ipCidrRouteTable_handler(netsnmp_mib_handler *handler,
                     if (retval) {
                         ui = SNMP_MALLOC_STRUCT(undoInfo);
                         ui->len = retval_len;
-                        memdup((u_char **) & ui->ptr,
-                               (u_char *) retval, ui->len);
+                        ui->ptr = netsnmp_memdup(retval, ui->len);
                         netsnmp_oid_stash_add_data(&undoStorage,
                                                    suffix, suffix_len, ui);
                     }
@@ -724,8 +720,7 @@ ipCidrRouteTable_handler(netsnmp_mib_handler *handler,
                     if (retval) {
                         ui = SNMP_MALLOC_STRUCT(undoInfo);
                         ui->len = retval_len;
-                        memdup((u_char **) & ui->ptr,
-                               (u_char *) retval, ui->len);
+                        ui->ptr = netsnmp_memdup(retval, ui->len);
                         netsnmp_oid_stash_add_data(&undoStorage,
                                                    suffix, suffix_len, ui);
                     }
@@ -741,8 +736,7 @@ ipCidrRouteTable_handler(netsnmp_mib_handler *handler,
                     if (retval) {
                         ui = SNMP_MALLOC_STRUCT(undoInfo);
                         ui->len = retval_len;
-                        memdup((u_char **) & ui->ptr,
-                               (u_char *) retval, ui->len);
+                        ui->ptr = netsnmp_memdup(retval, ui->len);
                         netsnmp_oid_stash_add_data(&undoStorage,
                                                    suffix, suffix_len, ui);
                     }
@@ -758,8 +752,7 @@ ipCidrRouteTable_handler(netsnmp_mib_handler *handler,
                     if (retval) {
                         ui = SNMP_MALLOC_STRUCT(undoInfo);
                         ui->len = retval_len;
-                        memdup((u_char **) & ui->ptr,
-                               (u_char *) retval, ui->len);
+                        ui->ptr = netsnmp_memdup(retval, ui->len);
                         netsnmp_oid_stash_add_data(&undoStorage,
                                                    suffix, suffix_len, ui);
                     }
@@ -775,8 +768,7 @@ ipCidrRouteTable_handler(netsnmp_mib_handler *handler,
                     if (retval) {
                         ui = SNMP_MALLOC_STRUCT(undoInfo);
                         ui->len = retval_len;
-                        memdup((u_char **) & ui->ptr,
-                               (u_char *) retval, ui->len);
+                        ui->ptr = netsnmp_memdup(retval, ui->len);
                         netsnmp_oid_stash_add_data(&undoStorage,
                                                    suffix, suffix_len, ui);
                     }
@@ -792,8 +784,7 @@ ipCidrRouteTable_handler(netsnmp_mib_handler *handler,
                     if (retval) {
                         ui = SNMP_MALLOC_STRUCT(undoInfo);
                         ui->len = retval_len;
-                        memdup((u_char **) & ui->ptr,
-                               (u_char *) retval, ui->len);
+                        ui->ptr = netsnmp_memdup(retval, ui->len);
                         netsnmp_oid_stash_add_data(&undoStorage,
                                                    suffix, suffix_len, ui);
                     }
@@ -809,8 +800,7 @@ ipCidrRouteTable_handler(netsnmp_mib_handler *handler,
                     if (retval) {
                         ui = SNMP_MALLOC_STRUCT(undoInfo);
                         ui->len = retval_len;
-                        memdup((u_char **) & ui->ptr,
-                               (u_char *) retval, ui->len);
+                        ui->ptr = netsnmp_memdup(retval, ui->len);
                         netsnmp_oid_stash_add_data(&undoStorage,
                                                    suffix, suffix_len, ui);
                     }
diff --git a/agent/mibgroup/mibII/kernel_linux.c b/agent/mibgroup/mibII/kernel_linux.c
index ba320c7..99314df 100644
--- a/agent/mibgroup/mibII/kernel_linux.c
+++ b/agent/mibgroup/mibII/kernel_linux.c
@@ -50,7 +50,7 @@ netsnmp_feature_child_of(linux_ip6_stat_all, libnetsnmpmibs)
 
 netsnmp_feature_child_of(linux_read_ip6_stat, linux_ip6_stat_all)
 
-int
+static int
 decode_icmp_msg(char *line, char *data, struct icmp4_msg_mib *msg)
 {
     char *token, *saveptr, *lineptr, *saveptr1, *dataptr, *delim = NULL;
@@ -108,7 +108,7 @@ decode_icmp_msg(char *line, char *data, struct icmp4_msg_mib *msg)
     return 0;
 }
 
-int
+static int
 linux_read_mibII_stats(void)
 {
     FILE           *in = fopen("/proc/net/snmp", "r");
@@ -386,7 +386,7 @@ linux_read_icmp_stat(struct icmp_mib *icmpstat)
     return 0;
 }
 
-int
+static int
 linux_read_icmp6_parse(struct icmp6_mib *icmp6stat,
                        struct icmp6_msg_mib *icmp6msgstat,
                        int *support)
@@ -486,6 +486,8 @@ linux_read_icmp6_parse(struct icmp6_mib *icmp6stat,
         } else if (0 == strncmp(line + 5, "Out", 3)) {  /* Out */
             if (0 == strcmp(line + 8, "DestUnreachs")) {
                 cached_icmp6_mib.icmp6OutDestUnreachs = stats;
+            } else if (0 == strcmp(line + 8, "Echos")) {
+                cached_icmp6_mib.icmp6OutEchos = stats;
             } else if (0 == strcmp(line + 8, "EchoReplies")) {
                 cached_icmp6_mib.icmp6OutEchoReplies = stats;
             } else if (0 == strcmp(line + 8, "GroupMembReductions")) {
diff --git a/agent/mibgroup/mibII/kernel_linux.h b/agent/mibgroup/mibII/kernel_linux.h
index c6dfca9..b3c58d3 100644
--- a/agent/mibgroup/mibII/kernel_linux.h
+++ b/agent/mibgroup/mibII/kernel_linux.h
@@ -6,161 +6,7 @@
 #ifndef _MIBGROUP_KERNEL_LINUX_H
 #define _MIBGROUP_KERNEL_LINUX_H
 
-struct ip_mib {
-    unsigned long   ipForwarding;
-    unsigned long   ipDefaultTTL;
-    unsigned long   ipInReceives;
-    unsigned long   ipInHdrErrors;
-    unsigned long   ipInAddrErrors;
-    unsigned long   ipForwDatagrams;
-    unsigned long   ipInUnknownProtos;
-    unsigned long   ipInDiscards;
-    unsigned long   ipInDelivers;
-    unsigned long   ipOutRequests;
-    unsigned long   ipOutDiscards;
-    unsigned long   ipOutNoRoutes;
-    unsigned long   ipReasmTimeout;
-    unsigned long   ipReasmReqds;
-    unsigned long   ipReasmOKs;
-    unsigned long   ipReasmFails;
-    unsigned long   ipFragOKs;
-    unsigned long   ipFragFails;
-    unsigned long   ipFragCreates;
-    unsigned long   ipRoutingDiscards;
-};
-
-struct ip6_mib {
-    unsigned long ip6InReceives;
-    unsigned long ip6InHdrErrors;
-    unsigned long ip6InTooBigErrors;
-    unsigned long ip6InNoRoutes;
-    unsigned long ip6InAddrErrors;
-    unsigned long ip6InUnknownProtos;
-    unsigned long ip6InTruncatedPkts;
-    unsigned long ip6InDiscards;
-    unsigned long ip6InDelivers;
-    unsigned long ip6OutForwDatagrams;
-    unsigned long ip6OutRequests;
-    unsigned long ip6OutDiscards;
-    unsigned long ip6OutNoRoutes;
-    unsigned long ip6ReasmTimeout;
-    unsigned long ip6ReasmReqds;
-    unsigned long ip6ReasmOKs;
-    unsigned long ip6ReasmFails;
-    unsigned long ip6FragOKs;
-    unsigned long ip6FragFails;
-    unsigned long ip6FragCreates;
-    unsigned long ip6InMcastPkts;
-    unsigned long ip6OutMcastPkts;
-};
-
-struct icmp_mib {
-    unsigned long   icmpInMsgs;
-    unsigned long   icmpInErrors;
-    unsigned long   icmpInDestUnreachs;
-    unsigned long   icmpInTimeExcds;
-    unsigned long   icmpInParmProbs;
-    unsigned long   icmpInSrcQuenchs;
-    unsigned long   icmpInRedirects;
-    unsigned long   icmpInEchos;
-    unsigned long   icmpInEchoReps;
-    unsigned long   icmpInTimestamps;
-    unsigned long   icmpInTimestampReps;
-    unsigned long   icmpInAddrMasks;
-    unsigned long   icmpInAddrMaskReps;
-    unsigned long   icmpOutMsgs;
-    unsigned long   icmpOutErrors;
-    unsigned long   icmpOutDestUnreachs;
-    unsigned long   icmpOutTimeExcds;
-    unsigned long   icmpOutParmProbs;
-    unsigned long   icmpOutSrcQuenchs;
-    unsigned long   icmpOutRedirects;
-    unsigned long   icmpOutEchos;
-    unsigned long   icmpOutEchoReps;
-    unsigned long   icmpOutTimestamps;
-    unsigned long   icmpOutTimestampReps;
-    unsigned long   icmpOutAddrMasks;
-    unsigned long   icmpOutAddrMaskReps;
-};
-
-struct icmp6_mib {
-    unsigned long icmp6InMsgs;
-    unsigned long icmp6InErrors;
-    unsigned long icmp6InDestUnreachs;
-    unsigned long icmp6InPktTooBigs;
-    unsigned long icmp6InTimeExcds;
-    unsigned long icmp6InParmProblems;
-    unsigned long icmp6InEchos;
-    unsigned long icmp6InEchoReplies;
-    unsigned long icmp6InGroupMembQueries;
-    unsigned long icmp6InGroupMembResponses;
-    unsigned long icmp6InGroupMembReductions;
-    unsigned long icmp6InRouterSolicits;
-    unsigned long icmp6InRouterAdvertisements;
-    unsigned long icmp6InNeighborSolicits;
-    unsigned long icmp6InNeighborAdvertisements;
-    unsigned long icmp6InRedirects;
-    unsigned long icmp6OutMsgs;
-    unsigned long icmp6OutDestUnreachs;
-    unsigned long icmp6OutPktTooBigs;
-    unsigned long icmp6OutTimeExcds;
-    unsigned long icmp6OutParmProblems;
-    unsigned long icmp6OutEchoReplies;
-    unsigned long icmp6OutRouterSolicits;
-    unsigned long icmp6OutNeighborSolicits;
-    unsigned long icmp6OutNeighborAdvertisements;
-    unsigned long icmp6OutRedirects;
-    unsigned long icmp6OutGroupMembResponses;
-    unsigned long icmp6OutGroupMembReductions;
-};
-
-struct icmp_msg_mib {
-    unsigned long InType;
-    unsigned long OutType;
-};
-
-/* Lets use wrapper structures for future expansion */
-struct icmp4_msg_mib {
-    struct icmp_msg_mib vals[256];
-};
-
-struct icmp6_msg_mib {
-    struct icmp_msg_mib vals[256];
-};
-
-struct udp_mib {
-    unsigned long   udpInDatagrams;
-    unsigned long   udpNoPorts;
-    unsigned long   udpInErrors;
-    unsigned long   udpOutDatagrams;
-};
-
-struct udp6_mib {
-    unsigned long udp6InDatagrams;
-    unsigned long udp6NoPorts;
-    unsigned long udp6InErrors;
-    unsigned long udp6OutDatagrams;
-};
-
-struct tcp_mib {
-    unsigned long   tcpRtoAlgorithm;
-    unsigned long   tcpRtoMin;
-    unsigned long   tcpRtoMax;
-    unsigned long   tcpMaxConn;
-    unsigned long   tcpActiveOpens;
-    unsigned long   tcpPassiveOpens;
-    unsigned long   tcpAttemptFails;
-    unsigned long   tcpEstabResets;
-    unsigned long   tcpCurrEstab;
-    unsigned long   tcpInSegs;
-    unsigned long   tcpOutSegs;
-    unsigned long   tcpRetransSegs;
-    unsigned long   tcpInErrs;
-    unsigned long   tcpOutRsts;
-    short           tcpInErrsValid;
-    short           tcpOutRstsValid;
-};
-
+#include "kernel_mib.h"
 
 int             linux_read_ip_stat(struct ip_mib *);
 int             linux_read_ip6_stat(struct ip6_mib *);
diff --git a/agent/mibgroup/mibII/kernel_linux.h b/agent/mibgroup/mibII/kernel_mib.h
similarity index 83%
copy from agent/mibgroup/mibII/kernel_linux.h
copy to agent/mibgroup/mibII/kernel_mib.h
index c6dfca9..8b8639f 100644
--- a/agent/mibgroup/mibII/kernel_linux.h
+++ b/agent/mibgroup/mibII/kernel_mib.h
@@ -1,10 +1,9 @@
 /*
- *  MIB statistics gathering routines
- *      for Linux architecture
+ *  MIB statistics gathering structures
  */
 
-#ifndef _MIBGROUP_KERNEL_LINUX_H
-#define _MIBGROUP_KERNEL_LINUX_H
+#ifndef _MIBGROUP_KERNEL_MIB_H
+#define _MIBGROUP_KERNEL_MIB_H
 
 struct ip_mib {
     unsigned long   ipForwarding;
@@ -105,6 +104,7 @@ struct icmp6_mib {
     unsigned long icmp6OutPktTooBigs;
     unsigned long icmp6OutTimeExcds;
     unsigned long icmp6OutParmProblems;
+    unsigned long icmp6OutEchos;
     unsigned long icmp6OutEchoReplies;
     unsigned long icmp6OutRouterSolicits;
     unsigned long icmp6OutNeighborSolicits;
@@ -161,19 +161,4 @@ struct tcp_mib {
     short           tcpOutRstsValid;
 };
 
-
-int             linux_read_ip_stat(struct ip_mib *);
-int             linux_read_ip6_stat(struct ip6_mib *);
-int             linux_read_icmp_stat(struct icmp_mib *);
-int             linux_read_icmp6_stat(struct icmp6_mib *);
-int             linux_read_udp_stat(struct udp_mib *);
-int             linux_read_udp6_stat(struct udp6_mib *);
-int             linux_read_tcp_stat(struct tcp_mib *);
-int             linux_read_icmp_msg_stat(struct icmp_mib *,
-                                         struct icmp4_msg_mib *,
-                                         int *flag);
-int             linux_read_icmp6_msg_stat(struct icmp6_mib *,
-                                          struct icmp6_msg_mib *,
-                                          int *support);
-
-#endif                          /* _MIBGROUP_KERNEL_LINUX_H */
+#endif  /* _MIBGROUP_KERNEL_MIB_H */
diff --git a/agent/mibgroup/mibII/kernel_netbsd.c b/agent/mibgroup/mibII/kernel_netbsd.c
index 93f38b7..0806180 100644
--- a/agent/mibgroup/mibII/kernel_netbsd.c
+++ b/agent/mibgroup/mibII/kernel_netbsd.c
@@ -15,6 +15,7 @@
 #include <netinet/ip_icmp.h>
 #include <netinet/ip_var.h>
 #include <netinet/icmp_var.h>
+#include <netinet/icmp6.h>
 #include <netinet/tcp.h>
 #include <netinet/tcp_timer.h>
 #include <netinet/tcp_var.h>
@@ -38,8 +39,10 @@ netbsd_read_icmp_stat(struct icmp_mib *mib)
 
     (void)memset(mib, 0, sizeof(*mib));
 
-    if (-1 == sysctlbyname("net.inet.icmp.stats", icmpstat, &size, NULL, 0))
+    if (-1 == sysctlbyname("net.inet.icmp.stats", icmpstat, &size, NULL, 0)) {
+	snmp_perror("netbsd_read_icmp_stat: net.inet.icmp.stats");
         return -1;
+    }
 
     mib->icmpInMsgs = icmpstat[ICMP_STAT_BADCODE]
         + icmpstat[ICMP_STAT_TOOSHORT]
@@ -86,6 +89,104 @@ netbsd_read_icmp_stat(struct icmp_mib *mib)
     return 0;
 }
 
+
+int
+netbsd_read_icmp6_stat(struct icmp6_mib *mib)
+{
+    uint64_t icmpstat[ICMP6_NSTATS];
+    size_t   size = sizeof(icmpstat);
+    int      i;
+
+    (void)memset(mib, 0, sizeof(*mib));
+
+    if (-1 == sysctlbyname("net.inet6.icmp6.stats", icmpstat, &size, NULL, 0)) {
+	snmp_perror("netbsd_read_icmp6_stat: net.inet6.icmp6.stats");
+        return -1;
+    }
+
+    mib->icmp6InMsgs = icmpstat[ICMP6_STAT_BADCODE]
+            + icmpstat[ICMP_STAT_TOOSHORT]
+	    + icmpstat[ICMP_STAT_CHECKSUM]
+            + icmpstat[ICMP_STAT_BADLEN];
+    for (i = 0; i <= ICMP6_MAXTYPE; i++)
+        mib->icmp6InMsgs  += icmpstat[ICMP6_STAT_INHIST + i];
+    mib->icmp6InErrors = icmpstat[ICMP6_STAT_BADCODE]
+        + icmpstat[ICMP6_STAT_TOOSHORT]
+        + icmpstat[ICMP6_STAT_CHECKSUM]
+        + icmpstat[ICMP6_STAT_BADLEN];
+    mib->icmp6InDestUnreachs = icmpstat[ICMP6_STAT_INHIST + ICMP6_DST_UNREACH];
+    mib->icmp6InPktTooBigs = icmpstat[ICMP6_STAT_INHIST + ICMP6_PACKET_TOO_BIG];
+    mib->icmp6InTimeExcds = icmpstat[ICMP6_STAT_INHIST + ICMP6_TIME_EXCEEDED];
+    mib->icmp6InParmProblems = icmpstat[ICMP6_STAT_INHIST + ICMP6_PARAM_PROB];
+    mib->icmp6InEchos = icmpstat[ICMP6_STAT_INHIST + ICMP6_ECHO_REQUEST];
+    mib->icmp6InEchoReplies = icmpstat[ICMP6_STAT_INHIST + ICMP6_ECHO_REPLY];
+    mib->icmp6InGroupMembQueries = icmpstat[ICMP6_STAT_INHIST + MLD_LISTENER_QUERY];
+    mib->icmp6InGroupMembResponses = icmpstat[ICMP6_STAT_INHIST + MLD_LISTENER_REPORT];
+    mib->icmp6InRouterSolicits = icmpstat[ICMP6_STAT_INHIST + ND_ROUTER_SOLICIT];
+    mib->icmp6InRouterAdvertisements = icmpstat[ICMP6_STAT_INHIST + ND_ROUTER_ADVERT];
+    mib->icmp6InNeighborSolicits = icmpstat[ICMP6_STAT_INHIST + ND_NEIGHBOR_SOLICIT];
+    mib->icmp6InNeighborAdvertisements = icmpstat[ICMP6_STAT_INHIST + ND_NEIGHBOR_ADVERT];
+    mib->icmp6InRedirects = icmpstat[ICMP6_STAT_INHIST + ND_REDIRECT];
+
+    mib->icmp6OutMsgs = icmpstat[ICMP6_STAT_BADCODE]
+        + icmpstat[ICMP6_STAT_TOOSHORT]
+        + icmpstat[ICMP6_STAT_CHECKSUM]
+        + icmpstat[ICMP6_STAT_BADLEN];
+    for (i = 0; i <= ICMP6_MAXTYPE; i++)
+        mib->icmp6OutMsgs += icmpstat[ICMP6_STAT_OUTHIST + i];
+    mib->icmp6OutDestUnreachs = icmpstat[ICMP6_STAT_OUTHIST + ICMP6_DST_UNREACH];
+    mib->icmp6OutPktTooBigs =  icmpstat[ICMP6_STAT_OUTHIST + ICMP6_PACKET_TOO_BIG];
+    mib->icmp6OutTimeExcds = icmpstat[ICMP6_STAT_OUTHIST + ICMP6_TIME_EXCEEDED];
+    mib->icmp6OutParmProblems = icmpstat[ICMP6_STAT_OUTHIST + ICMP6_PARAM_PROB];
+    mib->icmp6OutEchos = icmpstat[ICMP6_STAT_OUTHIST + ICMP6_ECHO_REQUEST];
+    mib->icmp6OutEchoReplies = icmpstat[ICMP6_STAT_OUTHIST + ICMP6_ECHO_REPLY];
+    mib->icmp6OutRouterSolicits =  icmpstat[ICMP6_STAT_OUTHIST + ND_ROUTER_SOLICIT];
+    mib->icmp6OutNeighborSolicits =  icmpstat[ICMP6_STAT_OUTHIST + ND_NEIGHBOR_SOLICIT];
+    mib->icmp6OutNeighborAdvertisements =  icmpstat[ICMP6_STAT_OUTHIST + ND_NEIGHBOR_ADVERT];
+    mib->icmp6OutRedirects = icmpstat[ICMP6_STAT_OUTHIST + ND_REDIRECT];
+    mib->icmp6OutGroupMembResponses =  icmpstat[ICMP6_STAT_OUTHIST + MLD_LISTENER_REPORT];
+    mib->icmp6OutGroupMembReductions =  icmpstat[ICMP6_STAT_OUTHIST + MLD_LISTENER_DONE];
+
+    return 0;
+}
+
+
+int
+netbsd_read_icmp_msg_stat(struct icmp_mib *mib,
+                          struct icmp4_msg_mib *msgmib,
+			  int *flag)
+{
+    netbsd_read_icmp_stat(mib);
+    *flag = 0;
+    return 0;
+}
+
+
+int
+netbsd_read_icmp6_msg_stat(struct icmp6_mib *mib,
+                           struct icmp6_msg_mib *msgmib,
+			   int *support)
+{
+    uint64_t icmpstat[ICMP6_NSTATS];
+    size_t   size = sizeof(icmpstat);
+    int      i;
+
+    netbsd_read_icmp6_stat(mib);
+
+    if (-1 == sysctlbyname("net.inet6.icmp6.stats", icmpstat, &size, NULL, 0)) {
+	snmp_perror("netbsd_read_icmp6_stat: net.inet6.icmp6.stats");
+        return -1;
+    }
+
+    for (i = 0; i < 256; i++) {
+	msgmib->vals[i].InType = icmpstat[ICMP6_STAT_INHIST+i];
+	msgmib->vals[i].OutType = icmpstat[ICMP6_STAT_OUTHIST+i];
+    }
+    *support = 1;
+    return 0;
+}
+
+
 int
 netbsd_read_ip_stat(struct ip_mib *mib)
 {
@@ -97,8 +198,10 @@ netbsd_read_ip_stat(struct ip_mib *mib)
 
     (void)memset(mib, 0, sizeof(*mib));
 
-    if (-1 == sysctlbyname("net.inet.ip.stats", ipstat, &size, NULL, 0))
+    if (-1 == sysctlbyname("net.inet.ip.stats", ipstat, &size, NULL, 0)) {
+	snmp_perror("netbsd_read_ip_stat: net.inet.ip.stats");
         return -1;
+    }
 
     mib->ipForwarding = 0;
     len = sizeof i;
@@ -138,6 +241,7 @@ netbsd_read_ip_stat(struct ip_mib *mib)
     return 0;
 }
 
+
 int
 netbsd_read_tcp_stat(struct tcp_mib *mib)
 {
@@ -146,8 +250,10 @@ netbsd_read_tcp_stat(struct tcp_mib *mib)
 
     (void)memset(mib, 0, sizeof(*mib));
 
-    if (-1 == sysctlbyname("net.inet.tcp.stats", tcpstat, &size, NULL, 0))
+    if (-1 == sysctlbyname("net.inet.tcp.stats", tcpstat, &size, NULL, 0)) {
+	snmp_perror("netbsd_read_tcp_stat: net.inet.tcp.stats");
         return -1;
+    }
 
     mib->tcpRtoAlgorithm = 4; /* Assume Van Jacobsen's algorithm */
     mib->tcpRtoMin = TCPTV_MIN;
@@ -174,6 +280,7 @@ netbsd_read_tcp_stat(struct tcp_mib *mib)
     return 0;
 }
 
+
 int
 netbsd_read_udp_stat(struct udp_mib *mib)
 {
@@ -182,14 +289,16 @@ netbsd_read_udp_stat(struct udp_mib *mib)
 
     (void)memset(mib, 0, sizeof(*mib));
 
-    if (-1 == sysctlbyname("net.inet.udp.stats", udpstat, &size, NULL, 0))
+    if (-1 == sysctlbyname("net.inet.udp.stats", udpstat, &size, NULL, 0)) {
+	snmp_perror("netbsd_read_udp_stat: net.inet.udp.stats");
         return -1;
+    }
 
     mib->udpInDatagrams = udpstat[UDP_STAT_IPACKETS];
     mib->udpNoPorts = udpstat[UDP_STAT_NOPORT];
     mib->udpOutDatagrams = udpstat[UDP_STAT_OPACKETS];
     mib->udpInErrors = udpstat[UDP_STAT_HDROPS]
-        + udpstat[UDP_STAT_BADSUM] /* + udpstat[UDP_STAT_DISCARD] /* FIXME */
+        + udpstat[UDP_STAT_BADSUM] /* + udpstat[UDP_STAT_DISCARD] */ /* FIXME */
         + udpstat[UDP_STAT_FULLSOCK] + udpstat[UDP_STAT_BADLEN];
 
     return 0;
diff --git a/agent/mibgroup/mibII/kernel_netbsd.h b/agent/mibgroup/mibII/kernel_netbsd.h
index 9000682..accb9a7 100644
--- a/agent/mibgroup/mibII/kernel_netbsd.h
+++ b/agent/mibgroup/mibII/kernel_netbsd.h
@@ -3,85 +3,16 @@
 
 #if defined(NETBSD_STATS_VIA_SYSCTL)
 
-struct icmp_mib {
-    unsigned long   icmpInMsgs;
-    unsigned long   icmpInErrors;
-    unsigned long   icmpInDestUnreachs;
-    unsigned long   icmpInTimeExcds;
-    unsigned long   icmpInParmProbs;
-    unsigned long   icmpInSrcQuenchs;
-    unsigned long   icmpInRedirects;
-    unsigned long   icmpInEchos;
-    unsigned long   icmpInEchoReps;
-    unsigned long   icmpInTimestamps;
-    unsigned long   icmpInTimestampReps;
-    unsigned long   icmpInAddrMasks;
-    unsigned long   icmpInAddrMaskReps;
-    unsigned long   icmpOutMsgs;
-    unsigned long   icmpOutErrors;
-    unsigned long   icmpOutDestUnreachs;
-    unsigned long   icmpOutTimeExcds;
-    unsigned long   icmpOutParmProbs;
-    unsigned long   icmpOutSrcQuenchs;
-    unsigned long   icmpOutRedirects;
-    unsigned long   icmpOutEchos;
-    unsigned long   icmpOutEchoReps;
-    unsigned long   icmpOutTimestamps;
-    unsigned long   icmpOutTimestampReps;
-    unsigned long   icmpOutAddrMasks;
-    unsigned long   icmpOutAddrMaskReps;
-};
-
-struct ip_mib {
-    unsigned long   ipForwarding;
-    unsigned long   ipDefaultTTL;
-    unsigned long   ipInReceives;
-    unsigned long   ipInHdrErrors;
-    unsigned long   ipInAddrErrors;
-    unsigned long   ipForwDatagrams;
-    unsigned long   ipInUnknownProtos;
-    unsigned long   ipInDiscards;
-    unsigned long   ipInDelivers;
-    unsigned long   ipOutRequests;
-    unsigned long   ipOutDiscards;
-    unsigned long   ipOutNoRoutes;
-    unsigned long   ipReasmTimeout;
-    unsigned long   ipReasmReqds;
-    unsigned long   ipReasmOKs;
-    unsigned long   ipReasmFails;
-    unsigned long   ipFragOKs;
-    unsigned long   ipFragFails;
-    unsigned long   ipFragCreates;
-    unsigned long   ipRoutingDiscards;
-};
-
-struct tcp_mib {
-    unsigned long   tcpRtoAlgorithm;
-    unsigned long   tcpRtoMin;
-    unsigned long   tcpRtoMax;
-    unsigned long   tcpMaxConn;
-    unsigned long   tcpActiveOpens;
-    unsigned long   tcpPassiveOpens;
-    unsigned long   tcpAttemptFails;
-    unsigned long   tcpEstabResets;
-    unsigned long   tcpCurrEstab;
-    unsigned long   tcpInSegs;
-    unsigned long   tcpOutSegs;
-    unsigned long   tcpRetransSegs;
-    unsigned long   tcpInErrs;
-    unsigned long   tcpOutRsts;
-    short           tcpInErrsValid;
-    short           tcpOutRstsValid;
-};
-
-struct udp_mib {
-    unsigned long   udpInDatagrams;
-    unsigned long   udpNoPorts;
-    unsigned long   udpInErrors;
-    unsigned long   udpOutDatagrams;
-};
+#include "kernel_mib.h"
 
 int      netbsd_read_icmp_stat(struct icmp_mib *);
+int      netbsd_read_icmp6_stat(struct icmp6_mib *);
+int      netbsd_read_icmp_msg_stat(struct icmp_mib *,
+                                   struct icmp4_msg_mib *,
+		 		  int *flag);
+int      netbsd_read_icmp6_msg_stat(struct icmp6_mib *,
+                                    struct icmp6_msg_mib *,
+				    int *support);
 int      netbsd_read_ip_stat(struct ip_mib *);
 int      netbsd_read_tcp_stat(struct tcp_mib *);
 int      netbsd_read_udp_stat(struct udp_mib *);
diff --git a/agent/mibgroup/mibII/kernel_sysctl.c b/agent/mibgroup/mibII/kernel_sysctl.c
new file mode 100644
index 0000000..166f664
--- /dev/null
+++ b/agent/mibgroup/mibII/kernel_sysctl.c
@@ -0,0 +1,175 @@
+/*
+ * sysctl interface for icmp stats for others than NetBSD
+ */
+
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#include <sys/protosw.h>
+
+#include <netinet/in.h>
+#include <netinet/in_systm.h>
+#include <netinet/ip.h>
+#include <netinet/ip_icmp.h>
+#include <netinet/ip_var.h>
+#include <netinet/icmp_var.h>
+#include <netinet/icmp6.h>
+
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+
+#include "kernel_sysctl.h"
+
+#if defined(NETSNMP_CAN_USE_SYSCTL)
+
+int
+sysctl_read_icmp_stat(struct icmp_mib *mib)
+{
+    struct icmpstat icmpstat;
+    size_t   size = sizeof(icmpstat);
+    int      i;
+    static int      sname[4] =
+        { CTL_NET, PF_INET, IPPROTO_ICMP, ICMPCTL_STATS };
+
+    (void)memset(mib, 0, sizeof(*mib));
+
+    if (-1 == sysctl(sname, 4, &icmpstat, &size, NULL, 0)) {
+	snmp_perror("sysctl_read_icmp_stat: net.inet.icmp.stats");
+        return -1;
+    }
+
+    mib->icmpInMsgs = icmpstat.icps_badcode
+        + icmpstat.icps_tooshort
+        + icmpstat.icps_checksum
+        + icmpstat.icps_badlen;
+    mib->icmpInErrors = mib->icmpInMsgs;
+    for (i = 0; i <= ICMP_MAXTYPE; i++)
+        mib->icmpInMsgs  += icmpstat.icps_inhist[i];
+    mib->icmpInDestUnreachs = icmpstat.icps_inhist[ICMP_UNREACH];
+    mib->icmpInTimeExcds = icmpstat.icps_inhist[ICMP_TIMXCEED];
+    mib->icmpInParmProbs = icmpstat.icps_inhist[ICMP_PARAMPROB];
+    mib->icmpInSrcQuenchs = icmpstat.icps_inhist[ICMP_SOURCEQUENCH];
+    mib->icmpInRedirects = icmpstat.icps_inhist[ICMP_REDIRECT];
+    mib->icmpInEchos = icmpstat.icps_inhist[ICMP_ECHO];
+    mib->icmpInEchoReps = icmpstat.icps_inhist[ICMP_ECHOREPLY];
+    mib->icmpInTimestamps = icmpstat.icps_inhist[ICMP_TSTAMP];
+    mib->icmpInTimestampReps = icmpstat.icps_inhist[ICMP_TSTAMPREPLY];
+    mib->icmpInAddrMasks = icmpstat.icps_inhist[ICMP_MASKREQ];
+    mib->icmpInAddrMaskReps = icmpstat.icps_inhist[ICMP_MASKREPLY];
+    mib->icmpOutMsgs = icmpstat.icps_oldshort + icmpstat.icps_oldicmp;
+    for (i = 0; i <= ICMP_MAXTYPE; i++)
+        mib->icmpOutMsgs += icmpstat.icps_outhist[i];
+    mib->icmpOutErrors = icmpstat.icps_oldshort + icmpstat.icps_oldicmp;
+    mib->icmpOutDestUnreachs = icmpstat.icps_outhist[ICMP_UNREACH];
+    mib->icmpOutTimeExcds = icmpstat.icps_outhist[ICMP_TIMXCEED];
+    mib->icmpOutParmProbs = icmpstat.icps_outhist[ICMP_PARAMPROB];
+    mib->icmpOutSrcQuenchs = icmpstat.icps_outhist[ICMP_SOURCEQUENCH];
+    mib->icmpOutRedirects = icmpstat.icps_outhist[ICMP_REDIRECT];
+    mib->icmpOutEchos = icmpstat.icps_outhist[ICMP_ECHO];
+    mib->icmpOutEchoReps = icmpstat.icps_outhist[ICMP_ECHOREPLY];
+    mib->icmpOutTimestamps = icmpstat.icps_outhist[ICMP_TSTAMP];
+    mib->icmpOutTimestampReps = icmpstat.icps_outhist[ICMP_TSTAMPREPLY];
+    mib->icmpOutAddrMasks = icmpstat.icps_outhist[ICMP_MASKREQ];
+    mib->icmpOutAddrMaskReps = icmpstat.icps_outhist[ICMP_MASKREPLY];
+
+    return 0;
+}
+
+
+int
+sysctl_read_icmp6_stat(struct icmp6_mib *mib)
+{
+    struct icmp6stat icmpstat;
+    size_t   size = sizeof(icmpstat);
+    int      i;
+    static int      sname[4] =
+        { CTL_NET, PF_INET6, IPPROTO_ICMPV6, ICMPV6CTL_STATS };
+
+    (void)memset(mib, 0, sizeof(*mib));
+
+    if (-1 == sysctl(sname, 4, &icmpstat, &size, NULL, 0)) {
+	snmp_perror("sysctl_read_icmp6_stat: net.inet6.icmp6.stats");
+        return -1;
+    }
+
+    mib->icmp6InMsgs = icmpstat.icp6s_badcode
+            + icmpstat.icp6s_tooshort
+	    + icmpstat.icp6s_checksum
+            + icmpstat.icp6s_badlen;
+    mib->icmp6InErrors = mib->icmp6InMsgs;
+    for (i = 0; i <= ICMP6_MAXTYPE; i++)
+        mib->icmp6InMsgs  += icmpstat.icp6s_inhist[i];
+    mib->icmp6InDestUnreachs = icmpstat.icp6s_inhist[ICMP6_DST_UNREACH];
+    mib->icmp6InPktTooBigs = icmpstat.icp6s_inhist[ICMP6_PACKET_TOO_BIG];
+    mib->icmp6InTimeExcds = icmpstat.icp6s_inhist[ICMP6_TIME_EXCEEDED];
+    mib->icmp6InParmProblems = icmpstat.icp6s_inhist[ICMP6_PARAM_PROB];
+    mib->icmp6InEchos = icmpstat.icp6s_inhist[ICMP6_ECHO_REQUEST];
+    mib->icmp6InEchoReplies = icmpstat.icp6s_inhist[ICMP6_ECHO_REPLY];
+    mib->icmp6InGroupMembQueries = icmpstat.icp6s_inhist[MLD_LISTENER_QUERY];
+    mib->icmp6InGroupMembResponses = icmpstat.icp6s_inhist[MLD_LISTENER_REPORT];
+    mib->icmp6InRouterSolicits = icmpstat.icp6s_inhist[ND_ROUTER_SOLICIT];
+    mib->icmp6InRouterAdvertisements = icmpstat.icp6s_inhist[ND_ROUTER_ADVERT];
+    mib->icmp6InNeighborSolicits = icmpstat.icp6s_inhist[ND_NEIGHBOR_SOLICIT];
+    mib->icmp6InNeighborAdvertisements = icmpstat.icp6s_inhist[ND_NEIGHBOR_ADVERT];
+    mib->icmp6InRedirects = icmpstat.icp6s_inhist[ND_REDIRECT];
+
+    mib->icmp6OutMsgs = icmpstat.icp6s_canterror
+        + icmpstat.icp6s_toofreq;
+    for (i = 0; i <= ICMP6_MAXTYPE; i++)
+        mib->icmp6OutMsgs += icmpstat.icp6s_outhist[i];
+    mib->icmp6OutDestUnreachs = icmpstat.icp6s_outhist[ICMP6_DST_UNREACH];
+    mib->icmp6OutPktTooBigs =  icmpstat.icp6s_outhist[ICMP6_PACKET_TOO_BIG];
+    mib->icmp6OutTimeExcds = icmpstat.icp6s_outhist[ICMP6_TIME_EXCEEDED];
+    mib->icmp6OutParmProblems = icmpstat.icp6s_outhist[ICMP6_PARAM_PROB];
+    mib->icmp6OutEchos = icmpstat.icp6s_outhist[ICMP6_ECHO_REQUEST];
+    mib->icmp6OutEchoReplies = icmpstat.icp6s_outhist[ICMP6_ECHO_REPLY];
+    mib->icmp6OutRouterSolicits =  icmpstat.icp6s_outhist[ND_ROUTER_SOLICIT];
+    mib->icmp6OutNeighborSolicits =  icmpstat.icp6s_outhist[ND_NEIGHBOR_SOLICIT];
+    mib->icmp6OutNeighborAdvertisements =  icmpstat.icp6s_outhist[ND_NEIGHBOR_ADVERT];
+    mib->icmp6OutRedirects = icmpstat.icp6s_outhist[ND_REDIRECT];
+    mib->icmp6OutGroupMembResponses =  icmpstat.icp6s_outhist[MLD_LISTENER_REPORT];
+    mib->icmp6OutGroupMembReductions =  icmpstat.icp6s_outhist[MLD_LISTENER_DONE];
+
+    return 0;
+}
+
+
+int
+sysctl_read_icmp_msg_stat(struct icmp_mib *mib,
+                          struct icmp4_msg_mib *msgmib,
+			  int *flag)
+{
+    sysctl_read_icmp_stat(mib);
+    *flag = 0;
+    return 0;
+}
+
+
+int
+sysctl_read_icmp6_msg_stat(struct icmp6_mib *mib,
+                           struct icmp6_msg_mib *msgmib,
+			   int *support)
+{
+    struct icmp6stat icmpstat;
+    size_t   size = sizeof(icmpstat);
+    int      i;
+    static int      sname[4] =
+        { CTL_NET, PF_INET6, IPPROTO_ICMPV6, ICMPV6CTL_STATS };
+
+    sysctl_read_icmp6_stat(mib);
+
+    if (-1 == sysctl(sname, 4, &icmpstat, &size, NULL, 0)) {
+	snmp_perror("sysctl_read_icmp6_stat: net.inet6.icmp6.stats");
+        return -1;
+    }
+
+    for (i = 0; i < 256; i++) {
+	msgmib->vals[i].InType = icmpstat.icp6s_inhist[i];
+	msgmib->vals[i].OutType = icmpstat.icp6s_outhist[i];
+    }
+    *support = 1;
+    return 0;
+}
+
+
+#endif
diff --git a/agent/mibgroup/mibII/kernel_sysctl.h b/agent/mibgroup/mibII/kernel_sysctl.h
new file mode 100644
index 0000000..7484973
--- /dev/null
+++ b/agent/mibgroup/mibII/kernel_sysctl.h
@@ -0,0 +1,19 @@
+#ifndef _MIBGROUP_KERNEL_SYSCTL_H
+#define _MIBGROUP_KERNEL_SYSCTL_H
+
+#if defined(NETSNMP_CAN_USE_SYSCTL)
+
+#include "kernel_mib.h"
+
+int      sysctl_read_icmp_stat(struct icmp_mib *);
+int      sysctl_read_icmp6_stat(struct icmp6_mib *);
+int      sysctl_read_icmp_msg_stat(struct icmp_mib *,
+                                   struct icmp4_msg_mib *,
+		 		  int *flag);
+int      sysctl_read_icmp6_msg_stat(struct icmp6_mib *,
+                                    struct icmp6_msg_mib *,
+				    int *support);
+
+#endif /* NETSNMP_CAN_USE_SYSCTL */
+
+#endif /* _MIBGROUP_KERNEL_SYSCTL_H */
diff --git a/agent/mibgroup/mibII/mibII_common.h b/agent/mibgroup/mibII/mibII_common.h
index 160ab82..87ef9d1 100644
--- a/agent/mibgroup/mibII/mibII_common.h
+++ b/agent/mibgroup/mibII/mibII_common.h
@@ -88,7 +88,6 @@
 #include <dmalloc.h>
 #endif
 
-
 #ifdef solaris2
 #include "kernel_sunos5.h"
 #else
@@ -100,6 +99,10 @@
 #ifdef NETBSD_STATS_VIA_SYSCTL
 #include "kernel_netbsd.h"
 #endif
+#if defined(NETSNMP_CAN_USE_SYSCTL) /* && defined(ICMPCTL_STATS) */
+#include "kernel_sysctl.h"
+#endif
+
 	/* or MIB_xxxCOUNTER_SYMBOL || hpux11 */
 #ifdef hpux
 #include <sys/mib.h>
diff --git a/agent/mibgroup/mibII/mta_sendmail.c b/agent/mibgroup/mibII/mta_sendmail.c
index 00397d3..c1edd07 100644
--- a/agent/mibgroup/mibII/mta_sendmail.c
+++ b/agent/mibgroup/mibII/mta_sendmail.c
@@ -754,7 +754,7 @@ read_sendmailcf(BOOL config)
 
             if (mailers < MAXMAILERS) {
                 for (i = 1;
-                     line[i] != ',' && !isspace(line[i]) && line[i] != '\0'
+                     line[i] != ',' && !isspace(line[i] & 0xFF) && line[i] != '\0'
                      && i <= MNAMELEN; i++) {
                     mailernames[mailers][i - 1] = line[i];
                 }
@@ -1025,7 +1025,7 @@ mta_sendmail_parse_config(const char *token, char *line)
     }
 
     if (strcasecmp(token, "sendmail_stats") == 0) {
-        while (isspace(*line)) {
+        while (isspace(*line & 0xFF)) {
             line++;
         }
         copy_nword(line, sendmailst_fn, sizeof(sendmailst_fn));
@@ -1041,7 +1041,7 @@ mta_sendmail_parse_config(const char *token, char *line)
                     "opened statistics file \"%s\"\n", sendmailst_fn));
         return;
     } else if (strcasecmp(token, "sendmail_config") == 0) {
-        while (isspace(*line)) {
+        while (isspace(*line & 0xFF)) {
             line++;
         }
         copy_nword(line, sendmailcf_fn, sizeof(sendmailcf_fn));
@@ -1052,14 +1052,14 @@ mta_sendmail_parse_config(const char *token, char *line)
                     "read config file \"%s\"\n", sendmailcf_fn));
         return;
     } else if (strcasecmp(token, "sendmail_queue") == 0) {
-        while (isspace(*line)) {
+        while (isspace(*line & 0xFF)) {
             line++;
         }
         add_queuegroup("mqueue", line);
 
         return;
     } else if (strcasecmp(token, "sendmail_index") == 0) {
-        while (isspace(*line)) {
+        while (isspace(*line & 0xFF)) {
             line++;
         }
         applindex = atol(line);
@@ -1068,7 +1068,7 @@ mta_sendmail_parse_config(const char *token, char *line)
             applindex = 1;
         }
     } else if (strcasecmp(token, "sendmail_stats_t") == 0) {
-        while (isspace(*line)) {
+        while (isspace(*line & 0xFF)) {
             line++;
         }
         stat_cache_time = atol(line);
@@ -1077,7 +1077,7 @@ mta_sendmail_parse_config(const char *token, char *line)
             applindex = 5;
         }
     } else if (strcasecmp(token, "sendmail_queue_t") == 0) {
-        while (isspace(*line)) {
+        while (isspace(*line & 0xFF)) {
             line++;
         }
         dir_cache_time = atol(line);
diff --git a/agent/mibgroup/mibII/snmp_mib.c b/agent/mibgroup/mibII/snmp_mib.c
index a056d99..1ebe64c 100644
--- a/agent/mibgroup/mibII/snmp_mib.c
+++ b/agent/mibgroup/mibII/snmp_mib.c
@@ -48,7 +48,11 @@ handle_truthvalue(netsnmp_mib_handler *handler,
 static netsnmp_mib_handler*
 netsnmp_get_truthvalue(void)
 {
-    return netsnmp_create_handler("truthvalue", handle_truthvalue);
+    netsnmp_mib_handler* hnd =
+        netsnmp_create_handler("truthvalue", handle_truthvalue);
+    if (hnd)
+        hnd->flags |= MIB_HANDLER_AUTO_NEXT;
+    return hnd;
 }
 
 static int
diff --git a/agent/mibgroup/mibII/snmp_mib_5_5.c b/agent/mibgroup/mibII/snmp_mib_5_5.c
index 6484e3c..c63efb6 100644
--- a/agent/mibgroup/mibII/snmp_mib_5_5.c
+++ b/agent/mibgroup/mibII/snmp_mib_5_5.c
@@ -53,7 +53,11 @@ handle_truthvalue(netsnmp_mib_handler *handler,
 static netsnmp_mib_handler*
 netsnmp_get_truthvalue(void)
 {
-    return netsnmp_create_handler("truthvalue", handle_truthvalue);
+    netsnmp_mib_handler* hnd =
+        netsnmp_create_handler("truthvalue", handle_truthvalue);
+    if (hnd)
+        hnd->flags |= MIB_HANDLER_AUTO_NEXT;
+    return hnd;
 }
 
 static int
diff --git a/agent/mibgroup/mibII/tcpTable.c b/agent/mibgroup/mibII/tcpTable.c
index 088dd06..03c85e5 100644
--- a/agent/mibgroup/mibII/tcpTable.c
+++ b/agent/mibgroup/mibII/tcpTable.c
@@ -565,12 +565,48 @@ tcpTable_load(netsnmp_cache *cache, void *vmagic)
 /*  see <netinet/tcp.h> */
 #define TCP_ALL ((1 << (TCP_CLOSING + 1)) - 1)
 
+const static int linux_states[12] = { 1, 5, 3, 4, 6, 7, 11, 1, 8, 9, 2, 10 };
+
 #if HAVE_NETLINK_NETLINK_H
+
+#if !defined(HAVE_LIBNL3)
+/* libnl3 API implemented on top of the libnl1 API */
+
+#define nl_sock nl_handle
+
+static const char *nl_geterror_compat(int e)
+{
+    return nl_geterror();
+}
+
+#define nl_geterror(e) nl_geterror_compat(e)
+
+static struct nl_handle *nl_socket_alloc(void)
+{
+    return nl_handle_alloc();
+}
+
+static void nl_socket_free(struct nl_handle *ns)
+{
+    nl_handle_destroy(ns);
+}
+#endif /* HAVE_LIBNL3 */
+
 static int
 tcpTable_load_netlink(void)
 {
-	/*  TODO: perhaps use permanent nl handle? */
-	struct nl_handle *nl = nl_handle_alloc();
+	/* TODO: perhaps use permanent nl socket ? */
+	struct nl_sock *nl = nl_socket_alloc();
+	struct inet_diag_req req = {
+		.idiag_family = AF_INET,
+		.idiag_states = TCP_ALL,
+	};
+
+	struct nl_msg *nm;
+
+	struct sockaddr_nl peer;
+	unsigned char *buf = NULL;
+	int running = 1, len, err;
 
 	if (nl == NULL) {
 		DEBUGMSGTL(("mibII/tcpTable", "Failed to allocate netlink handle\n"));
@@ -578,59 +614,53 @@ tcpTable_load_netlink(void)
 		return -1;
 	}
 
-	if (nl_connect(nl, NETLINK_INET_DIAG) < 0) {
-		DEBUGMSGTL(("mibII/tcpTable", "Failed to connect to netlink: %s\n", nl_geterror()));
-		snmp_log(LOG_ERR, "snmpd: Couldn't connect to netlink: %s\n", nl_geterror());
-		nl_handle_destroy(nl);
+	err = nl_connect(nl, NETLINK_INET_DIAG);
+	if (err < 0) {
+		DEBUGMSGTL(("mibII/tcpTable", "Failed to connect to netlink: %s\n", nl_geterror(err)));
+		snmp_log(LOG_ERR, "snmpd: Couldn't connect to netlink: %s\n", nl_geterror(err));
+		nl_socket_free(nl);
 		return -1;
 	}
 
-	struct inet_diag_req req = {
-		.idiag_family = AF_INET,
-		.idiag_states = TCP_ALL,
-	};
-
-	struct nl_msg *nm = nlmsg_alloc_simple(TCPDIAG_GETSOCK, NLM_F_ROOT|NLM_F_MATCH|NLM_F_REQUEST);
+	nm = nlmsg_alloc_simple(TCPDIAG_GETSOCK, NLM_F_ROOT|NLM_F_MATCH|NLM_F_REQUEST);
 	nlmsg_append(nm, &req, sizeof(struct inet_diag_req), 0);
 
-	if (nl_send_auto_complete(nl, nm) < 0) {
-		DEBUGMSGTL(("mibII/tcpTable", "nl_send_autocomplete(): %s\n", nl_geterror()));
-		snmp_log(LOG_ERR, "snmpd: nl_send_autocomplete(): %s\n", nl_geterror());
-		nl_handle_destroy(nl);
+	err = nl_send_auto_complete(nl, nm);
+	if (err < 0) {
+		DEBUGMSGTL(("mibII/tcpTable", "nl_send_autocomplete(): %s\n", nl_geterror(err)));
+		snmp_log(LOG_ERR, "snmpd: nl_send_autocomplete(): %s\n", nl_geterror(err));
+		nl_socket_free(nl);
 		return -1;
 	}
 	nlmsg_free(nm);
 
-	struct sockaddr_nl peer;
-	unsigned char *buf = NULL;
-	int running = 1, len;
-
 	while (running) {
+		struct nlmsghdr *h;
 		if ((len = nl_recv(nl, &peer, &buf, NULL)) <= 0) {
-			DEBUGMSGTL(("mibII/tcpTable", "nl_recv(): %s\n", nl_geterror()));
-			snmp_log(LOG_ERR, "snmpd: nl_recv(): %s\n", nl_geterror());
-			nl_handle_destroy(nl);
+			DEBUGMSGTL(("mibII/tcpTable", "nl_recv(): %s\n", nl_geterror(len)));
+			snmp_log(LOG_ERR, "snmpd: nl_recv(): %s\n", nl_geterror(len));
+			nl_socket_free(nl);
 			return -1;
 		}
 
-		struct nlmsghdr *h = (struct nlmsghdr*)buf;
+		h = (struct nlmsghdr*)buf;
+
 		while (nlmsg_ok(h, len)) {
+			struct inet_diag_msg *r = nlmsg_data(h);
+			struct inpcb    pcb, *nnew;
+
 			if (h->nlmsg_type == NLMSG_DONE) {
 				running = 0;
 				break;
 			}
 
-			struct inet_diag_msg *r = nlmsg_data(h);
+			r = nlmsg_data(h);
 
 			if (r->idiag_family != AF_INET) {
 				h = nlmsg_next(h, &len);
 				continue;
 			}
 
-			struct inpcb    pcb, *nnew;
-			static int      linux_states[12] =
-				{ 1, 5, 3, 4, 6, 7, 11, 1, 8, 9, 2, 10 };
-
 			memcpy(&pcb.inp_laddr.s_addr, r->id.idiag_src, r->idiag_family == AF_INET ? 4 : 6);
 			memcpy(&pcb.inp_faddr.s_addr, r->id.idiag_dst, r->idiag_family == AF_INET ? 4 : 6);
 
@@ -658,7 +688,7 @@ tcpTable_load_netlink(void)
 		free(buf);
 	}
 
-	nl_handle_destroy(nl);
+	nl_socket_free(nl);
 
 	if (tcp_head) {
 		DEBUGMSGTL(("mibII/tcpTable", "Loaded TCP Table using netlink\n"));
@@ -696,8 +726,6 @@ tcpTable_load(netsnmp_cache *cache, void *vmagic)
      */
     while (line == fgets(line, sizeof(line), in)) {
         struct inpcb    pcb, *nnew;
-        static int      linux_states[12] =
-            { 1, 5, 3, 4, 6, 7, 11, 1, 8, 9, 2, 10 };
         unsigned int    lp, fp;
         int             state, uid;
 
diff --git a/agent/mibgroup/mibII/udpTable.c b/agent/mibgroup/mibII/udpTable.c
index 6228710..2c88749 100644
--- a/agent/mibgroup/mibII/udpTable.c
+++ b/agent/mibgroup/mibII/udpTable.c
@@ -150,6 +150,7 @@ init_udpTable(void)
      */
     iinfo      = SNMP_MALLOC_TYPEDEF(netsnmp_iterator_info);
     if (!iinfo) {
+        netsnmp_table_registration_info_free(table_info);
         return;
     }
     iinfo->get_first_data_point = udpTable_first_entry;
diff --git a/agent/mibgroup/mibII/updates.c b/agent/mibgroup/mibII/updates.c
index 9d681cc..938ea29 100644
--- a/agent/mibgroup/mibII/updates.c
+++ b/agent/mibgroup/mibII/updates.c
@@ -8,13 +8,15 @@ handle_updates(netsnmp_mib_handler *handler,
                netsnmp_agent_request_info *reqinfo,
                netsnmp_request_info *requests)
 {
+#ifndef NETSNMP_NO_WRITE_SUPPORT
     int *set = (int*)handler->myvoid;
 
-#ifndef NETSNMP_NO_WRITE_SUPPORT
     if (reqinfo->mode == MODE_SET_RESERVE1 && *set < 0)
         netsnmp_request_set_error(requests, SNMP_ERR_NOTWRITABLE);
-    else if (reqinfo->mode == MODE_SET_COMMIT)
+    else if (reqinfo->mode == MODE_SET_COMMIT) {
         *set = 1;
+        snmp_store_needed(reginfo->handlerName);
+    }
 #endif /* NETSNMP_NO_WRITE_SUPPORT */
     return SNMP_ERR_NOERROR;
 }
@@ -23,11 +25,21 @@ netsnmp_handler_registration*
 netsnmp_create_update_handler_registration(
     const char* name, const oid* id, size_t idlen, int mode, int* set)
 {
-    netsnmp_handler_registration *res = NULL;
-    netsnmp_mib_handler *hnd = netsnmp_create_handler("update", handle_updates);
-    if (hnd) {
-        hnd->myvoid = set;
-        res = netsnmp_handler_registration_create(name, hnd, id, idlen, mode);
+    netsnmp_handler_registration *res;
+    netsnmp_mib_handler *hnd;
+
+    hnd = netsnmp_create_handler("update", handle_updates);
+    if (hnd == NULL)
+        return NULL;
+
+    hnd->flags |= MIB_HANDLER_AUTO_NEXT;
+    hnd->myvoid = set;
+
+    res = netsnmp_handler_registration_create(name, hnd, id, idlen, mode);
+    if (res == NULL) {
+        netsnmp_handler_free(hnd);
+        return NULL;
     }
+
     return res;
 }
diff --git a/agent/mibgroup/mibII/var_route.c b/agent/mibgroup/mibII/var_route.c
index 52fcd86..72a503f 100644
--- a/agent/mibgroup/mibII/var_route.c
+++ b/agent/mibgroup/mibII/var_route.c
@@ -62,6 +62,7 @@ PERFORMANCE OF THIS SOFTWARE.
 #include "kernel.h"
 #include "interfaces.h"
 #include "struct.h"
+#include "util_funcs.h"
 
 netsnmp_feature_child_of(get_routes, libnetsnmpmibs)
 
diff --git a/agent/mibgroup/notification/snmpNotifyFilterProfileTable.c b/agent/mibgroup/notification/snmpNotifyFilterProfileTable.c
index b12cdc8..e9b11d3 100644
--- a/agent/mibgroup/notification/snmpNotifyFilterProfileTable.c
+++ b/agent/mibgroup/notification/snmpNotifyFilterProfileTable.c
@@ -664,8 +664,8 @@ write_snmpNotifyFilterProfileRowStatus(int action,
                 SNMP_MALLOC_STRUCT(snmpNotifyFilterProfileTable_data);
             if (StorageNew == NULL)
                 return SNMP_ERR_GENERR;
-            memdup((u_char **) & (StorageNew->snmpTargetParamsName),
-                   vars->val.string, vars->val_len);
+            StorageNew->snmpTargetParamsName =
+                netsnmp_memdup(vars->val.string, vars->val_len);
             StorageNew->snmpTargetParamsNameLen = vars->val_len;
             StorageNew->snmpNotifyFilterProfileStorType = ST_NONVOLATILE;
 
diff --git a/agent/mibgroup/notification/snmpNotifyTable.c b/agent/mibgroup/notification/snmpNotifyTable.c
index 8d09c59..91adb2f 100644
--- a/agent/mibgroup/notification/snmpNotifyTable.c
+++ b/agent/mibgroup/notification/snmpNotifyTable.c
@@ -285,7 +285,7 @@ notifyTable_register_notifications(int major, int minor,
     struct targetAddrTable_struct *ptr;
     struct targetParamTable_struct *pptr;
     struct snmpNotifyTable_data *nptr;
-    int             confirm, i;
+    int             confirm, i, bufLen;
     char            buf[SNMP_MAXBUF_SMALL];
     netsnmp_transport *t = NULL;
     struct agent_add_trap_args *args =
@@ -302,8 +302,9 @@ notifyTable_register_notifications(int major, int minor,
      * XXX: START move target creation to target code 
      */
     for (i = 0; i < MAX_ENTRIES; i++) {
-        sprintf(buf, "internal%d", i);
-        if (get_addrForName(buf) == NULL && get_paramEntry(buf) == NULL)
+        bufLen = sprintf(buf, "internal%d", i);
+        if (get_addrForName2(buf, bufLen) == NULL &&
+            get_paramEntry(buf) == NULL)
             break;
     }
     if (i == MAX_ENTRIES) {
@@ -325,17 +326,18 @@ notifyTable_register_notifications(int major, int minor,
         return 0;
     }
     ptr = snmpTargetAddrTable_create();
-    ptr->name = strdup(buf);
+    ptr->nameData = netsnmp_memdup(buf, bufLen);
+    ptr->nameLen = bufLen;
     memcpy(ptr->tDomain, t->domain, t->domain_length * sizeof(oid));
     ptr->tDomainLen = t->domain_length;
     ptr->tAddressLen = t->remote_length;
     ptr->tAddress = t->remote;
 
-    ptr->timeout = ss->timeout / 1000;
+    ptr->timeout = ss->timeout / 10000;
     ptr->retryCount = ss->retries;
     SNMP_FREE(ptr->tagList);
-    ptr->tagList = strdup(ptr->name);
-    ptr->params = strdup(ptr->name);
+    ptr->tagList = strdup(buf); /* strdup ok since buf contains 'internal%d' */
+    ptr->params = strdup(buf);
     ptr->storageType = ST_READONLY;
     ptr->rowStatus = RS_ACTIVE;
     ptr->sess = ss;
diff --git a/agent/mibgroup/rmon-mib/data_access/etherstats_linux.c b/agent/mibgroup/rmon-mib/data_access/etherstats_linux.c
index d4b6e69..a6a42c3 100644
--- a/agent/mibgroup/rmon-mib/data_access/etherstats_linux.c
+++ b/agent/mibgroup/rmon-mib/data_access/etherstats_linux.c
@@ -38,7 +38,8 @@ etherstats_interface_name_list_get (struct ifname *list_head, int *retval)
     for (p = addrs; p; p = p->ifa_next) {
 
         if (!list_head) {
-            if ( (list_head = (struct ifname *) malloc (sizeof(struct ifname))) < 0) {
+            list_head = malloc(sizeof(struct ifname));
+            if (!list_head) {
                 DEBUGMSGTL(("access:etherStatsTable:interface_name_list_get",
                             "memory allocation failed\n"));
                 snmp_log (LOG_ERR, "access:etherStatsTable,interface_name_list_get, memory allocation failed\n");
@@ -57,7 +58,8 @@ etherstats_interface_name_list_get (struct ifname *list_head, int *retval)
         if (nameptr1)
             continue;
 
-        if ( (nameptr2->ifn_next = (struct ifname *) malloc (sizeof(struct ifname))) < 0) {
+        nameptr2->ifn_next = malloc(sizeof(struct ifname));
+        if (!nameptr2->ifn_next) {
             DEBUGMSGTL(("access:etherStatsTable:interface_name_list_get",
                         "memory allocation failed\n"));
             snmp_log (LOG_ERR, "access:etherStatsTable,interface_name_list_get, memory allocation failed\n");
diff --git a/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable_data_access.c b/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable_data_access.c
index 974636a..48d4aca 100644
--- a/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable_data_access.c
+++ b/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable_data_access.c
@@ -200,7 +200,6 @@ etherStatsTable_container_shutdown(netsnmp_container * container_ptr)
 int
 etherStatsTable_container_load(netsnmp_container * container)
 {
-    etherStatsTable_rowreq_ctx *rowreq_ctx;
     size_t          count = 0;
 
     DEBUGMSGTL(("verbose:etherStatsTable:etherStatsTable_container_load",
@@ -220,9 +219,7 @@ etherStatsTable_container_load(netsnmp_container * container)
      * etherStatsIndex(1)/INTEGER32/ASN_INTEGER/long(long)//l/A/w/e/R/d/h
      */
 
-    long            etherStatsIndex;
     int             fd;
-    int             rc = 0, retval = 0;
 
 #if defined(linux)
     struct ifname *list_head = NULL, *p = NULL;
@@ -244,7 +241,11 @@ etherStatsTable_container_load(netsnmp_container * container)
      */
 
 #if defined(linux)
-    list_head = etherstats_interface_name_list_get (list_head, &retval);
+    {
+        int retval;
+
+        list_head = etherstats_interface_name_list_get(list_head, &retval);
+    }
 
     if (!list_head) {
         snmp_log (LOG_ERR, "access:etherStatsTable, error getting the interface names present in the system\n");
@@ -258,6 +259,9 @@ etherStatsTable_container_load(netsnmp_container * container)
      */
 
     for (p = list_head; p; p = p->ifn_next) {
+        long            etherStatsIndex;
+        etherStatsTable_rowreq_ctx *rowreq_ctx;
+
         DEBUGMSGTL(("access:etherStatsTable", "processing '%s'\n", p->name));
 
         /*
@@ -296,23 +300,27 @@ etherStatsTable_container_load(netsnmp_container * container)
          */
 
         memset (&rowreq_ctx->data, 0, sizeof (rowreq_ctx->data));
-        rc = interface_ioctl_etherstats_get (rowreq_ctx, fd, p->name);
-
-        if (rc < 0) {
-            DEBUGMSGTL(("access:etherStatsTable", "error getting the statistics for interface |%s| "
-                        "etherStatsTable data, operation might not be supported\n", p->name));
-            etherStatsTable_release_rowreq_ctx(rowreq_ctx);
-            continue;
-        }
-
-        /*
-         * insert into table container
-         */
-        rc = CONTAINER_INSERT(container, rowreq_ctx);
-        if (rc < 0) {
-            DEBUGMSGTL(("access:etherStatsTable", "error inserting |%s| ", p->name));
-            etherStatsTable_release_rowreq_ctx(rowreq_ctx);
-            continue;
+        {
+            int rc;
+
+            rc = interface_ioctl_etherstats_get (rowreq_ctx, fd, p->name);
+
+            if (rc < 0) {
+                DEBUGMSGTL(("access:etherStatsTable", "error getting the statistics for interface |%s| "
+                            "etherStatsTable data, operation might not be supported\n", p->name));
+                etherStatsTable_release_rowreq_ctx(rowreq_ctx);
+                continue;
+            }
+
+            /*
+             * insert into table container
+             */
+            rc = CONTAINER_INSERT(container, rowreq_ctx);
+            if (rc < 0) {
+                DEBUGMSGTL(("access:etherStatsTable", "error inserting |%s| ", p->name));
+                etherStatsTable_release_rowreq_ctx(rowreq_ctx);
+                continue;
+            }
         }
 
         ++count;
diff --git a/agent/mibgroup/sctp-mib/sctpScalars_linux.c b/agent/mibgroup/sctp-mib/sctpScalars_linux.c
index 2e5b5af..6da5a6b 100644
--- a/agent/mibgroup/sctp-mib/sctpScalars_linux.c
+++ b/agent/mibgroup/sctp-mib/sctpScalars_linux.c
@@ -84,17 +84,17 @@ netsnmp_access_sctp_stats_arch_load(netsnmp_sctp_stats * sctp_stats)
             return -1;
         }
 
-        if (line[6] == 'r')
+        if (line[4] == 'C' && line[8] == 'E')
             sctp_stats->curr_estab = value;
-        else if (line[5] == 'c')
+        else if (line[4] == 'A' && line[10] == 'E')
             sctp_stats->active_estabs = value;
-        else if (line[4] == 'P')
+        else if (line[4] == 'P' && line[11] == 'E')
             sctp_stats->passive_estabs = value;
-        else if (line[5] == 'b')
+        else if (line[4] == 'A' && line[5] == 'b')
             sctp_stats->aborteds = value;
-        else if (line[4] == 'S')
+        else if (line[4] == 'S' && line[5] == 'h')
             sctp_stats->shutdowns = value;
-        else if (line[8] == 'f')
+        else if (line[4] == 'O' && line[9] == 'B')
             sctp_stats->out_of_blues = value;
         else if (line[6] == 'e')
             sctp_stats->checksum_errors = value;
@@ -113,7 +113,7 @@ netsnmp_access_sctp_stats_arch_load(netsnmp_sctp_stats * sctp_stats)
                 sctp_stats->out_sctp_packs.high = value >> 32;
             } else
                 ret = -1;
-        } else {
+        } else if (line[4] == 'I') {
             if (line[6] == 'C') {
                 sctp_stats->in_ctrl_chunks.low = value & 0xffffffff;
                 sctp_stats->in_ctrl_chunks.high = value >> 32;
@@ -123,24 +123,29 @@ netsnmp_access_sctp_stats_arch_load(netsnmp_sctp_stats * sctp_stats)
             } else if (line[6] == 'U') {
                 sctp_stats->in_unorder_chunks.low = value & 0xffffffff;
                 sctp_stats->in_unorder_chunks.high = value >> 32;
-            } else if (line[4] == 'F') {
-                sctp_stats->frag_usr_msgs.low = value & 0xffffffff;
-                sctp_stats->frag_usr_msgs.high = value >> 32;
-            } else if (line[4] == 'R') {
-                sctp_stats->reasm_usr_msgs.low = value & 0xffffffff;
-                sctp_stats->reasm_usr_msgs.high = value >> 32;
             } else if (line[6] == 'S') {
                 sctp_stats->in_sctp_packs.low = value & 0xffffffff;
                 sctp_stats->in_sctp_packs.high = value >> 32;
-            } else
-                ret = -1;
+            } else  {
+		ret = -1;
+	    }
+	} else if (line[4] == 'F' && line[8] == 'U') {
+	    sctp_stats->frag_usr_msgs.low = value & 0xffffffff;
+	    sctp_stats->frag_usr_msgs.high = value >> 32;
+	} else if (line[4] == 'R') {
+	    sctp_stats->reasm_usr_msgs.low = value & 0xffffffff;
+	    sctp_stats->reasm_usr_msgs.high = value >> 32;
+	} else if (line[4] == 'T') {
+	} else {
+	    ret = -1;
         }
 
         if (ret < 0) {
             DEBUGMSGTL(("sctp:scalars:stats:arch_load",
-                        "Unknown entry!'\n"));
-            fclose(f);
-            return ret;
+                        "Unknown entry: %s\n", line));
+            /* fclose(f); */
+            /* return ret; */
+	    ret = 0;
         }
     }
 
diff --git a/agent/mibgroup/sctp-mib/sctpTables_linux.c b/agent/mibgroup/sctp-mib/sctpTables_linux.c
index 6c4d81b..8e62860 100644
--- a/agent/mibgroup/sctp-mib/sctpTables_linux.c
+++ b/agent/mibgroup/sctp-mib/sctpTables_linux.c
@@ -150,13 +150,7 @@ parse_assoc_line(char *line, sctpTables_containers * containers)
     }
     entry->sctpAssocState = strtol(token, NULL, 10);
 
-    token = strtok(NULL, " ");  /* HBKT */
-    if (token == NULL) {
-        ret = SNMP_ERR_GENERR;
-        goto error;
-    }
-    entry->sctpAssocHeartBeatInterval = strtol(token, NULL, 10);
-
+    token = strtok(NULL, " ");  /* HBKT, ignore */
     token = strtok(NULL, " ");  /* ASSOC-ID, store */
     if (token == NULL) {
         ret = SNMP_ERR_GENERR;
diff --git a/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.c b/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.c
index ed3beaa..4040e3f 100644
--- a/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.c
+++ b/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.c
@@ -2044,7 +2044,7 @@ snmpNotifyFilterTable_container_init_persistence(netsnmp_container
     register_config_handler(NULL, row_token,
                             _snmpNotifyFilterTable_container_row_restore,
                             NULL, NULL);
-    memdup((u_char **)&container_p, &container, sizeof(container));
+    container_p = netsnmp_memdup(&container, sizeof(container));
     netsnmp_assert(container_p);
     rc = snmp_register_callback(SNMP_CALLBACK_LIBRARY,
                                 SNMP_CALLBACK_STORE_DATA,
diff --git a/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_set.c b/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_set.c
index 8536105..567d20e 100644
--- a/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_set.c
+++ b/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_set.c
@@ -100,7 +100,7 @@ usmDHSetKey(struct usmUser *user, int for_auth_key,
          * copy right most bits, per the object requirements 
          */
         SNMP_FREE(*replkey);
-        memdup(replkey, key + key_len - replkey_size, replkey_size);
+        *replkey = netsnmp_memdup(key + key_len - replkey_size, replkey_size);
 
         return MFD_SUCCESS;
     }
@@ -585,8 +585,8 @@ usmDHUserAuthKeyChange_undo_setup(usmDHUserKeyTable_rowreq_ctx *
     undouser = rowreq_ctx->undo;
 
     undouser->authKeyLen = rowreq_ctx->data->authKeyLen;
-    memdup(&undouser->authKey, rowreq_ctx->data->authKey,
-           rowreq_ctx->data->authKeyLen);
+    undouser->authKey = netsnmp_memdup(rowreq_ctx->data->authKey,
+                                       rowreq_ctx->data->authKeyLen);
 
     return MFD_SUCCESS;
 }                               /* usmDHUserAuthKeyChange_undo_setup */
@@ -970,8 +970,8 @@ usmDHUserPrivKeyChange_undo_setup(usmDHUserKeyTable_rowreq_ctx *
     undouser = rowreq_ctx->undo;
 
     undouser->privKeyLen = rowreq_ctx->data->privKeyLen;
-    memdup(&undouser->privKey, rowreq_ctx->data->privKey,
-           rowreq_ctx->data->privKeyLen);
+    undouser->privKey = netsnmp_memdup(rowreq_ctx->data->privKey,
+                                       rowreq_ctx->data->privKeyLen);
 
     return MFD_SUCCESS;
 }                               /* usmDHUserPrivKeyChange_undo_setup */
diff --git a/agent/mibgroup/snmpv3/usmUser.c b/agent/mibgroup/snmpv3/usmUser.c
index 41c525a..9f0503d 100644
--- a/agent/mibgroup/snmpv3/usmUser.c
+++ b/agent/mibgroup/snmpv3/usmUser.c
@@ -901,7 +901,7 @@ write_usmUserAuthKeyChange(int action,
         resetOnFail = 1;
         oldkey = uptr->authKey;
         oldkeylen = uptr->authKeyLen;
-        memdup(&uptr->authKey, buf, buflen);
+        uptr->authKey = netsnmp_memdup(buf, buflen);
         if (uptr->authKey == NULL) {
             return SNMP_ERR_RESOURCEUNAVAILABLE;
         }
@@ -1149,7 +1149,7 @@ write_usmUserPrivKeyChange(int action,
         resetOnFail = 1;
         oldkey = uptr->privKey;
         oldkeylen = uptr->privKeyLen;
-        memdup(&uptr->privKey, buf, buflen);
+        uptr->privKey = netsnmp_memdup(buf, buflen);
         if (uptr->privKey == NULL) {
             return SNMP_ERR_RESOURCEUNAVAILABLE;
         }
diff --git a/agent/mibgroup/target/snmpTargetAddrEntry.c b/agent/mibgroup/target/snmpTargetAddrEntry.c
index a77b467..b1eb00a 100644
--- a/agent/mibgroup/target/snmpTargetAddrEntry.c
+++ b/agent/mibgroup/target/snmpTargetAddrEntry.c
@@ -25,13 +25,17 @@
 #define snmpTargetAddrOIDLen 11 /*This is base+column, 
                                  * i.e. everything but index */
 
-oid             snmpTargetAddrOID[snmpTargetAddrOIDLen] =
+static oid      snmpTargetAddrOID[snmpTargetAddrOIDLen] =
     { 1, 3, 6, 1, 6, 3, 12, 1, 2, 1, 0 };
 
 static unsigned long snmpTargetSpinLock = 0;
 static struct targetAddrTable_struct *aAddrTable = NULL;
 
 
+static int
+store_snmpTargetAddrEntry(int majorID, int minorID, void *serverarg,
+                          void *clientarg);
+
 /*
  * Utility routines 
  */
@@ -42,11 +46,12 @@ get_addrTable(void)
 }
 
 struct targetAddrTable_struct *
-get_addrForName(char *name)
+get_addrForName2(const char *name, unsigned char nameLen)
 {
     struct targetAddrTable_struct *ptr;
     for (ptr = aAddrTable; ptr != NULL; ptr = ptr->next) {
-        if (ptr->name && strcmp(ptr->name, name) == 0)
+        if (ptr->nameLen == nameLen &&
+            memcmp(ptr->nameData, name, nameLen) == 0)
             return ptr;
     }
     return NULL;
@@ -57,17 +62,15 @@ get_addrForName(char *name)
  * TargetAddrTable_create creates and returns a pointer
  * to a targetAddrTable_struct with default values set 
  */
-struct targetAddrTable_struct
-               *
-snmpTargetAddrTable_create(void)
+struct targetAddrTable_struct *snmpTargetAddrTable_create(void)
 {
     struct targetAddrTable_struct *newEntry;
 
-    newEntry = (struct targetAddrTable_struct *)
-        malloc(sizeof(struct targetAddrTable_struct));
+    newEntry = malloc(sizeof(*newEntry));
 
     if (newEntry) {
-        newEntry->name = NULL;
+        newEntry->nameData = NULL;
+        newEntry->nameLen = 0;
 
         newEntry->tDomainLen = 0;
         newEntry->tAddress = NULL;
@@ -80,7 +83,7 @@ snmpTargetAddrTable_create(void)
 
         newEntry->storageType = SNMP_STORAGE_NONVOLATILE;
         newEntry->rowStatus = SNMP_ROW_NONEXISTENT;
-        newEntry->sess = (netsnmp_session *) NULL;
+        newEntry->sess = NULL;
         newEntry->next = NULL;
     }
 
@@ -99,7 +102,7 @@ snmpTargetAddrTable_dispose(struct targetAddrTable_struct *reaped)
         snmp_close(reaped->sess);
     else
         SNMP_FREE(reaped->tAddress);
-    SNMP_FREE(reaped->name);
+    SNMP_FREE(reaped->nameData);
     SNMP_FREE(reaped->tagList);
     SNMP_FREE(reaped->params);
 
@@ -119,8 +122,6 @@ snmpTargetAddrTable_addToList(struct targetAddrTable_struct *newEntry,
 {
     static struct targetAddrTable_struct *curr_struct, *prev_struct;
     int             i;
-    size_t          newOIDLen = 0, currOIDLen = 0;
-    oid             newOID[128], currOID[128];
 
     /*
      * if the list is empty, add the new entry to the top 
@@ -130,23 +131,19 @@ snmpTargetAddrTable_addToList(struct targetAddrTable_struct *newEntry,
         return;
     } else {
         /*
-         * get the 'OID' value of the new entry 
-         */
-        newOIDLen = strlen(newEntry->name);
-        for (i = 0; i < (int) newOIDLen; i++) {
-            newOID[i] = newEntry->name[i];
-        }
-
-        /*
          * search through the list for an equal or greater OID value 
          */
         while (curr_struct != NULL) {
-            currOIDLen = strlen(curr_struct->name);
-            for (i = 0; i < (int) currOIDLen; i++) {
-                currOID[i] = curr_struct->name[i];
+            i = memcmp(newEntry->nameData, curr_struct->nameData,
+                       newEntry->nameLen < curr_struct->nameLen ?
+                       newEntry->nameLen : curr_struct->nameLen);
+            if (i == 0) {
+                if (newEntry->nameLen < curr_struct->nameLen)
+                    i = -1;
+                else if (newEntry->nameLen > curr_struct->nameLen)
+                    i = 1;
             }
 
-            i = snmp_oid_compare(newOID, newOIDLen, currOID, currOIDLen);
             if (i == 0) {       /* Exact match, overwrite with new struct */
                 newEntry->next = curr_struct->next;
                 /*
@@ -236,10 +233,10 @@ search_snmpTargetAddrTable(oid * baseName,
 
     for (temp_struct = aAddrTable; temp_struct != NULL;
          temp_struct = temp_struct->next) {
-        for (i = 0; i < (int) strlen(temp_struct->name); i++) {
-            newNum[baseNameLen + i] = temp_struct->name[i];
+        for (i = 0; i < temp_struct->nameLen; i++) {
+            newNum[baseNameLen + i] = (unsigned char)temp_struct->nameData[i];
         }
-        myOIDLen = baseNameLen + strlen(temp_struct->name);
+        myOIDLen = baseNameLen + temp_struct->nameLen;
         i = snmp_oid_compare(name, *length, newNum, myOIDLen);
         /*
          * Assumes that the linked list sorted by OID, low to high 
@@ -257,18 +254,14 @@ search_snmpTargetAddrTable(oid * baseName,
 
 
 /*
- * snmpTargetAddr_rowStatusCheck is boolean funciton that  checks 
+ * snmpTargetAddr_rowStatusCheck is boolean function that checks
  * the status of a row's values in order to determine whether
- * the row should be notReady or notInService  
+ * the row should be notReady or notInService.
  */
-int
-snmpTargetAddr_rowStatusCheck(struct targetAddrTable_struct *entry)
+static int
+snmpTargetAddr_rowStatusCheck(const struct targetAddrTable_struct *entry)
 {
-    if ((entry->tDomainLen == 0) || (entry->tAddress == NULL) ||
-        (entry->params == NULL))
-        return 0;
-    else
-        return 1;
+    return entry->tDomainLen && entry->tAddress && entry->params;
 }                               /* snmtpTargetAddrTable_rowStatusCheck */
 
 
@@ -281,7 +274,7 @@ snmpTargetAddr_rowStatusCheck(struct targetAddrTable_struct *entry)
  * for the snmpTargetAddrEntry mib 
  */
 
-struct variable2 snmpTargetAddrEntry_variables[] = {
+static const struct variable2 snmpTargetAddrEntry_variables[] = {
     {SNMPTARGETADDRTDOMAIN, ASN_OBJECT_ID, NETSNMP_OLDAPI_RWRITE,
      var_snmpTargetAddrEntry, 1, {SNMPTARGETADDRTDOMAINCOLUMN}},
     {SNMPTARGETADDRTADDRESS, ASN_OCTET_STR, NETSNMP_OLDAPI_RWRITE,
@@ -301,17 +294,17 @@ struct variable2 snmpTargetAddrEntry_variables[] = {
 
 };
 
-struct variable2 snmpTargetSpinLock_var[] = {
+static const struct variable2 snmpTargetSpinLock_var[] = {
     {SNMPTARGETSPINLOCK, ASN_INTEGER, NETSNMP_OLDAPI_RWRITE,
      var_targetSpinLock, 1, {1}}
 };
 
-static oid      snmpTargetSpinLock_oid[] = { 1, 3, 6, 1, 6, 3, 12, 1 };
+static const oid snmpTargetSpinLock_oid[] = { 1, 3, 6, 1, 6, 3, 12, 1 };
 
 /*
  * now load this mib into the agents mib table 
  */
-oid             snmpTargetAddrEntry_variables_oid[] =
+static const oid snmpTargetAddrEntry_variables_oid[] =
     { 1, 3, 6, 1, 6, 3, 12, 1, 2, 1 };
 
 
@@ -355,30 +348,6 @@ shutdown_snmpTargetAddrEntry(void)
 }
 
 int
-snmpTargetAddr_addName(struct targetAddrTable_struct *entry, char *cptr)
-{
-    size_t          len;
-    if (cptr == NULL) {
-        DEBUGMSGTL(("snmpTargetAddrEntry",
-                    "ERROR snmpTargetAddrEntry: no name in config string\n"));
-        return (0);
-    } else {
-        len = strlen(cptr);
-        /*
-         * spec check for string 1-32 
-         */
-        if (len < 1 || len > 32) {
-            DEBUGMSGTL(("snmpTargetAddrEntry",
-                        "ERROR snmpTargetAddrEntry: name out of range in config string\n"));
-            return (0);
-        }
-        entry->name = strdup(cptr);
-    }
-    return (1);
-}                               /* addName */
-
-
-int
 snmpTargetAddr_addTDomain(struct targetAddrTable_struct *entry, char *cptr)
 {
     size_t          len = 128;
@@ -609,24 +578,42 @@ snmpTargetAddr_addRowStatus(struct targetAddrTable_struct *entry,
 void
 snmpd_parse_config_targetAddr(const char *token, char *char_ptr)
 {
-    char           *cptr = char_ptr, buff[1024];
+    const char     *cptr = char_ptr;
+    char            buff[1024], *bptr;
     struct targetAddrTable_struct *newEntry;
     int             i;
+    size_t          bufl;
 
     newEntry = snmpTargetAddrTable_create();
 
-    cptr = copy_nword(cptr, buff, sizeof(buff));
-    if (snmpTargetAddr_addName(newEntry, buff) == 0) {
+    cptr = skip_white_const(cptr);
+    if (cptr == NULL) {
+        DEBUGMSGTL(("snmpTargetAddrEntry",
+                    "ERROR snmpTargetAddrEntry: no name in config string\n"));
+        snmpTargetAddrTable_dispose(newEntry);
+        return;
+    }
+
+    bufl = 0;
+    cptr = read_config_read_octet_string_const(cptr,
+                                               (u_char**)&newEntry->nameData,
+                                               &bufl);
+    if (bufl < 1 || bufl > 32) {
+        DEBUGMSGTL(("snmpTargetAddrEntry",
+                    "ERROR snmpTargetAddrEntry: name out of range in config "
+                    "string\n"));
         snmpTargetAddrTable_dispose(newEntry);
         return;
     }
-    cptr = copy_nword(cptr, buff, sizeof(buff));
+    newEntry->nameLen = bufl;
+
+    cptr = copy_nword_const(cptr, buff, sizeof(buff));
     if (snmpTargetAddr_addTDomain(newEntry, buff) == 0) {
         snmpTargetAddrTable_dispose(newEntry);
         return;
     }
     cptr =
-        read_config_read_octet_string(cptr,
+        read_config_read_octet_string_const(cptr,
                                       (u_char **) & newEntry->tAddress,
                                       &newEntry->tAddressLen);
     if (!cptr || !(newEntry->tAddress)) {
@@ -635,50 +622,52 @@ snmpd_parse_config_targetAddr(const char *token, char *char_ptr)
         snmpTargetAddrTable_dispose(newEntry);
         return;
     }
-    cptr = copy_nword(cptr, buff, sizeof(buff));
+    cptr = copy_nword_const(cptr, buff, sizeof(buff));
     if (snmpTargetAddr_addTimeout(newEntry, buff) == 0) {
         snmpTargetAddrTable_dispose(newEntry);
         return;
     }
-    cptr = copy_nword(cptr, buff, sizeof(buff));
+    cptr = copy_nword_const(cptr, buff, sizeof(buff));
     if (snmpTargetAddr_addRetryCount(newEntry, buff) == 0) {
         snmpTargetAddrTable_dispose(newEntry);
         return;
     }
-    cptr = copy_nword(cptr, buff, sizeof(buff));
+    cptr = copy_nword_const(cptr, buff, sizeof(buff));
     if (snmpTargetAddr_addTagList(newEntry, buff) == 0) {
         snmpTargetAddrTable_dispose(newEntry);
         return;
     }
-    cptr = copy_nword(cptr, buff, sizeof(buff));
+    cptr = copy_nword_const(cptr, buff, sizeof(buff));
     if (snmpTargetAddr_addParams(newEntry, buff) == 0) {
         snmpTargetAddrTable_dispose(newEntry);
         return;
     }
-    cptr = copy_nword(cptr, buff, sizeof(buff));
+    cptr = copy_nword_const(cptr, buff, sizeof(buff));
     if (snmpTargetAddr_addStorageType(newEntry, buff) == 0) {
         snmpTargetAddrTable_dispose(newEntry);
         return;
     }
-    cptr = copy_nword(cptr, buff, sizeof(buff));
+    cptr = copy_nword_const(cptr, buff, sizeof(buff));
     if (snmpTargetAddr_addRowStatus(newEntry, buff) == 0) {
         snmpTargetAddrTable_dispose(newEntry);
         return;
     }
-    snprintf(buff, sizeof(buff), "snmp_parse_config_targetAddr, read: %s\n",
-            newEntry->name);
-    buff[ sizeof(buff)-1 ] = 0;
+    bptr = buff;
+    bptr += sprintf(bptr, "snmp_parse_config_targetAddr, read: ");
+    bptr = read_config_save_octet_string(bptr, (u_char*)newEntry->nameData,
+                                         newEntry->nameLen);
+    *bptr++ = '\n';
     for (i = 0; i < newEntry->tDomainLen; i++) {
-        snprintf(&buff[strlen(buff)], sizeof(buff)-strlen(buff)-1,
-                 ".%d", (int) newEntry->tDomain[i]);
-        buff[ sizeof(buff)-1 ] = 0;
+        bptr += snprintf(bptr, buff + sizeof(buff) - bptr,
+                         ".%d", (int) newEntry->tDomain[i]);
     }
-    snprintf(&buff[strlen(buff)], sizeof(buff)-strlen(buff)-1,
-            " %s %d %d %s %s %d %d\n",
-            newEntry->tAddress, newEntry->timeout, newEntry->retryCount,
-            newEntry->tagList, newEntry->params, newEntry->storageType,
-            newEntry->rowStatus);
-    buff[ sizeof(buff)-1 ] = 0;
+    bptr += snprintf(bptr, buff + sizeof(buff) - bptr,
+                     " %s %d %d %s %s %d %d\n",
+                     newEntry->tAddress, newEntry->timeout,
+                     newEntry->retryCount, newEntry->tagList,
+                     newEntry->params, newEntry->storageType,
+                     newEntry->rowStatus);
+    buff[ sizeof(buff) - 1 ] = 0;
     DEBUGMSGTL(("snmpTargetAddrEntry", "%s", buff));
 
     snmpTargetAddrTable_addToList(newEntry, &aAddrTable);
@@ -695,53 +684,48 @@ snmpd_parse_config_targetAddr(const char *token, char *char_ptr)
  * for this MIB table. It writes out all the non-volatile rows 
  * to permanent storage on a shutdown  
  */
-int
+static int
 store_snmpTargetAddrEntry(int majorID, int minorID, void *serverarg,
                           void *clientarg)
 {
-    struct targetAddrTable_struct *curr_struct;
-    char            line[1024];
+    const struct targetAddrTable_struct *curr_struct;
+    char            line[1024], *cur, *ep = line + sizeof(line);
     int             i;
 
-    if ((curr_struct = aAddrTable) != NULL) {
-        while (curr_struct != NULL) {
-            if ((curr_struct->storageType == SNMP_STORAGE_NONVOLATILE ||
-                 curr_struct->storageType == SNMP_STORAGE_PERMANENT)
-                &&
-                (curr_struct->rowStatus == SNMP_ROW_ACTIVE ||
-                 curr_struct->rowStatus == SNMP_ROW_NOTINSERVICE)) {
-                snprintf(line, sizeof(line),
-                        "targetAddr %s ", curr_struct->name);
-                line[ sizeof(line)-1 ] = 0;
-                for (i = 0; i < curr_struct->tDomainLen; i++) {
-                    snprintf(&line[strlen(line)],
-                            sizeof(line)-strlen(line)-1, ".%i",
-                            (int) curr_struct->tDomain[i]);
-                    line[ sizeof(line)-1 ] = 0;
-                }
-                strlcat(line, " ", sizeof(line));
-                read_config_save_octet_string(&line[strlen(line)],
-                                              curr_struct->tAddress,
-                                              curr_struct->tAddressLen);
-
-                snprintf(&line[strlen(line)], sizeof(line)-strlen(line)-1,
-                        " %i %i \"%s\" %s %i %i",
-                        curr_struct->timeout,
-                        curr_struct->retryCount, curr_struct->tagList,
-                        curr_struct->params, curr_struct->storageType,
-                        curr_struct->rowStatus);
-                line[ sizeof(line)-1 ] = 0;
-
-                /*
-                 * store to file 
-                 */
-                snmpd_store_config(line);
+    curr_struct = aAddrTable;
+    while (curr_struct != NULL) {
+        if ((curr_struct->storageType == SNMP_STORAGE_NONVOLATILE ||
+             curr_struct->storageType == SNMP_STORAGE_PERMANENT) &&
+            (curr_struct->rowStatus == SNMP_ROW_ACTIVE ||
+             curr_struct->rowStatus == SNMP_ROW_NOTINSERVICE)) {
+            cur = line + snprintf(line, sizeof(line), "targetAddr ");
+            cur = read_config_save_octet_string(
+                cur, (u_char*)curr_struct->nameData, curr_struct->nameLen);
+            *cur++ = ' ';
+            for (i = 0; i < curr_struct->tDomainLen; i++) {
+                cur += snprintf(cur, ep - cur, ".%i",
+                                (int) curr_struct->tDomain[i]);
             }
-            curr_struct = curr_struct->next;
+            *cur++ = ' ';
+            cur = read_config_save_octet_string(
+                cur, curr_struct->tAddress, curr_struct->tAddressLen);
+            cur += snprintf(cur, ep - cur, " %i %i \"%s\" %s %i %i",
+                            curr_struct->timeout,
+                            curr_struct->retryCount, curr_struct->tagList,
+                            curr_struct->params, curr_struct->storageType,
+                            curr_struct->rowStatus);
+            line[ sizeof(line)-1 ] = 0;
+
+            /*
+             * store to file
+             */
+            snmpd_store_config(line);
         }
+
+        curr_struct = curr_struct->next;
     }
-    return SNMPERR_SUCCESS;
 
+    return SNMPERR_SUCCESS;
 }                               /*  store_snmpTargetAddrEntry  */
 
 
@@ -948,6 +932,8 @@ write_snmpTargetAddrTDomain(int action,
                 target->rowStatus = SNMP_ROW_NOTINSERVICE;
             }
         }
+    } else if (action == COMMIT) {
+        snmp_store_needed(NULL);
     } else if (action == FREE || action == UNDO) {
         /*
          * Try to undo the SET here (abnormal usage of FREE clause)  
@@ -1035,6 +1021,7 @@ write_snmpTargetAddrTAddress(int action,
     } else if (action == COMMIT) {
         SNMP_FREE(old_addr);
         old_addr = NULL;
+        snmp_store_needed(NULL);
     } else if (action == FREE || action == UNDO) {
         /*
          * Try to undo the SET here (abnormal usage of FREE clause)  
@@ -1088,6 +1075,9 @@ write_snmpTargetAddrTimeout(int action,
             return SNMP_ERR_WRONGLENGTH;
         }
         long_ret = *((long *) var_val);
+        if (long_ret < 0 || long_ret > 2147483647) {
+            return SNMP_ERR_WRONGVALUE;
+        }
     } else if (action == RESERVE2) {
 
         /*
@@ -1127,6 +1117,7 @@ write_snmpTargetAddrTimeout(int action,
                                         1)) != NULL) {
             temp_struct->timeout = long_ret;
         }
+        snmp_store_needed(NULL);
     }
 
     return SNMP_ERR_NOERROR;
@@ -1184,6 +1175,7 @@ write_snmpTargetAddrRetryCount(int action,
                                                  1)) != NULL) {
             target->retryCount = long_ret;
         }
+        snmp_store_needed(NULL);
     }
 
     return SNMP_ERR_NOERROR;
@@ -1274,6 +1266,7 @@ write_snmpTargetAddrTagList(int action,
     } else if (action == COMMIT) {
         SNMP_FREE(old_tlist);
         old_tlist = NULL;
+        snmp_store_needed(NULL);
     } else if (action == FREE || action == UNDO) {
         snmpTargetAddrOID[snmpTargetAddrOIDLen - 1] =
             SNMPTARGETADDRTAGLISTCOLUMN;
@@ -1351,6 +1344,7 @@ write_snmpTargetAddrParams(int action,
     } else if (action == COMMIT) {
         SNMP_FREE(old_params);
         old_params = NULL;
+        snmp_store_needed(NULL);
     } else if (action == FREE || action == UNDO) {
         /*
          * Try to undo the SET here (abnormal usage of FREE clause)  
@@ -1437,6 +1431,7 @@ write_snmpTargetAddrStorageType(int action,
                                                  1)) != NULL) {
             target->storageType = long_ret;
         }
+        snmp_store_needed(NULL);
     }
 
     return SNMP_ERR_NOERROR;
@@ -1465,18 +1460,18 @@ snmpTargetAddr_createNewRow(oid * name, size_t name_len)
         temp_struct = snmpTargetAddrTable_create();
         if (!temp_struct)
             return SNMP_ERR_GENERR;
-        temp_struct->name = (char *) malloc(newNameLen + 1);
-        if (temp_struct->name == NULL) {
+        temp_struct->nameData = (char *) malloc(newNameLen);
+        if (temp_struct->nameData == NULL) {
             SNMP_FREE(temp_struct->tagList);
             SNMP_FREE(temp_struct);
             return 0;
         }
 
+        temp_struct->nameLen = newNameLen;
         for (i = 0; i < (int) newNameLen; i++) {
-            temp_struct->name[i] = (char) name[i + snmpTargetAddrOIDLen];
+            temp_struct->nameData[i] = (char) name[i + snmpTargetAddrOIDLen];
         }
 
-        temp_struct->name[newNameLen] = '\0';
         temp_struct->rowStatus = SNMP_ROW_NOTREADY;
 
         snmpTargetAddrTable_addToList(temp_struct, &aAddrTable);
diff --git a/agent/mibgroup/target/snmpTargetAddrEntry.h b/agent/mibgroup/target/snmpTargetAddrEntry.h
index 790ed66..0b70af5 100644
--- a/agent/mibgroup/target/snmpTargetAddrEntry.h
+++ b/agent/mibgroup/target/snmpTargetAddrEntry.h
@@ -46,12 +46,13 @@ config_add_mib(SNMPv2-TM)
      * structure definitions 
      */
      struct targetAddrTable_struct {
-         char           *name;
+         char           *nameData;
+         unsigned char   nameLen;
          oid             tDomain[MAX_OID_LEN];
          int             tDomainLen;
          unsigned char  *tAddress;
          size_t          tAddressLen;
-         int             timeout;
+         int             timeout;	/* Timeout in centiseconds */
          int             retryCount;
          char           *tagList;
          char           *params;
@@ -68,13 +69,11 @@ config_add_mib(SNMPv2-TM)
 
      void            init_snmpTargetAddrEntry(void);
      void            shutdown_snmpTargetAddrEntry(void);
-     int             store_snmpTargetAddrEntry(int majorID, int minorID,
-                                               void *serverarg,
-                                               void *clientarg);
      FindVarMethod   var_snmpTargetAddrEntry;
 
      struct targetAddrTable_struct *get_addrTable(void);
-     struct targetAddrTable_struct *get_addrForName(char *name);
+     struct targetAddrTable_struct *get_addrForName2(const char *name,
+                                                     unsigned char nameLen);
      struct targetAddrTable_struct *snmpTargetAddrTable_create(void);
      void            snmpTargetAddrTable_add(struct targetAddrTable_struct
                                              *newEntry);
diff --git a/agent/mibgroup/target/target.c b/agent/mibgroup/target/target.c
index e6aa07f..5619e35 100644
--- a/agent/mibgroup/target/target.c
+++ b/agent/mibgroup/target/target.c
@@ -71,7 +71,7 @@ get_target_sessions(char *taglist, TargetFilterFunction * filterfunct,
             (targaddrs->tDomain, targaddrs->tDomainLen, NULL, NULL) == 0) {
             snmp_log(LOG_ERR,
                      "unsupported domain for target address table entry %s\n",
-                     targaddrs->name);
+                     targaddrs->nameData);
         }
 
         /*
@@ -197,6 +197,7 @@ get_target_sessions(char *taglist, TargetFilterFunction * filterfunct,
                             if (!tls) {
                                 netsnmp_cert *cert;
                                 char         *server_id = NULL;
+                                char	      buf[33];
 
                                 DEBUGMSGTL(("target_sessions",
                                             "  looking up our id: %s\n",
@@ -213,13 +214,16 @@ get_target_sessions(char *taglist, TargetFilterFunction * filterfunct,
                                     t->f_config(t, "localCert",
                                                 cert->fingerprint);
                                 }
+                                memcpy(buf, targaddrs->nameData,
+                                       targaddrs->nameLen);
+                                buf[targaddrs->nameLen] = '\0';
                                 DEBUGMSGTL(("target_sessions",
                                             "  looking up their id: %s\n",
-                                            targaddrs->name));
+                                            buf));
                                 cert =
                                     netsnmp_cert_find(NS_CERT_REMOTE_PEER,
                                                       NS_CERTKEY_TARGET_ADDR,
-                                                      targaddrs->name);
+                                                      buf);
                                 if (cert) {
                                     DEBUGMSGTL(("target_sessions",
                                             "  found fingerprint: %s\n", 
@@ -228,8 +232,7 @@ get_target_sessions(char *taglist, TargetFilterFunction * filterfunct,
                                                 cert->fingerprint);
                                 }
 #ifndef NETSNMP_FEATURE_REMOVE_TLSTMADDR_GET_SERVERID
-                                server_id = netsnmp_tlstmAddr_get_serverId(
-                                    targaddrs->name);
+                                server_id = netsnmp_tlstmAddr_get_serverId(buf);
 #endif /* NETSNMP_FEATURE_REMOVE_TLSTMADDR_GET_SERVERID */
                                 if (server_id) {
                                     DEBUGMSGTL(("target_sessions",
@@ -240,7 +243,7 @@ get_target_sessions(char *taglist, TargetFilterFunction * filterfunct,
                             }
 #endif
                             memset(&thissess, 0, sizeof(thissess));
-                            thissess.timeout = (targaddrs->timeout) * 1000;
+                            thissess.timeout = (targaddrs->timeout) * 10000;
                             thissess.retries = targaddrs->retryCount;
                             DEBUGMSGTL(("target_sessions",
                                         "timeout: %d -> %ld\n",
@@ -253,7 +256,7 @@ get_target_sessions(char *taglist, TargetFilterFunction * filterfunct,
                                 snmp_log(LOG_ERR,
                                          "unsupported mpModel/secModel combo %d/%d for target %s\n",
                                          param->mpModel, param->secModel,
-                                         targaddrs->name);
+                                         targaddrs->nameData);
                                 /*
                                  * XXX: memleak 
                                  */
diff --git a/agent/mibgroup/tcp-mib/data_access/tcpConn.h b/agent/mibgroup/tcp-mib/data_access/tcpConn.h
index 0557102..0c13a0f 100644
--- a/agent/mibgroup/tcp-mib/data_access/tcpConn.h
+++ b/agent/mibgroup/tcp-mib/data_access/tcpConn.h
@@ -23,13 +23,13 @@ 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)
-#elif defined(freebsd4) || defined(dragonfly)
+#elif defined(freebsd4) || defined(dragonfly) || defined(darwin)
 config_require(tcp-mib/data_access/tcpConn_freebsd4)
 #elif defined(openbsd4)
 config_require(tcp-mib/data_access/tcpConn_openbsd)
 #elif defined(netbsd1)
 config_require(tcp-mib/data_access/tcpConn_netbsd)
 #else
-#   define NETSNMP_TCPCONN_COMMON_ONLY
+config_require(tcp-mib/data_access/tcpConn_unsup)
 #endif
 
diff --git a/agent/mibgroup/tcp-mib/data_access/tcpConn_linux.c b/agent/mibgroup/tcp-mib/data_access/tcpConn_linux.c
index 26c9a73..5f93be0 100644
--- a/agent/mibgroup/tcp-mib/data_access/tcpConn_linux.c
+++ b/agent/mibgroup/tcp-mib/data_access/tcpConn_linux.c
@@ -150,6 +150,8 @@ _load4(netsnmp_container *container, u_int load_flags)
             DEBUGMSGT(("access:tcpconn:container",
                        "error parsing line (%d != 6)\n", rc));
             DEBUGMSGT(("access:tcpconn:container"," line '%s'\n", line));
+	    snmp_log(LOG_ERR, "tcp:_load4: bad line in " PROCFILE ": %s\n", line);
+	    rc = 0;
             continue;
         }
         DEBUGMSGT(("verbose:access:tcpconn:container"," line '%s'\n", line));
@@ -259,7 +261,7 @@ _load6(netsnmp_container *container, u_int load_flags)
 {
     int             rc = 0;
     FILE           *in;
-    char            line[180];
+    char            line[360];
 
     netsnmp_assert(NULL != container);
 
@@ -292,6 +294,8 @@ _load6(netsnmp_container *container, u_int load_flags)
             DEBUGMSGT(("access:tcpconn:container",
                        "error parsing line (%d != 6)\n", rc));
             DEBUGMSGT(("access:tcpconn:container"," line '%s'\n", line));
+	    snmp_log(LOG_ERR, "tcp:_load6: bad line in " PROCFILE ": %s\n", line);
+	    rc = 0;
             continue;
         }
         DEBUGMSGT(("verbose:access:tcpconn:container"," line '%s'\n", line));
diff --git a/agent/mibgroup/tcp-mib/data_access/tcpConn_unsup.c b/agent/mibgroup/tcp-mib/data_access/tcpConn_unsup.c
new file mode 100644
index 0000000..7187219
--- /dev/null
+++ b/agent/mibgroup/tcp-mib/data_access/tcpConn_unsup.c
@@ -0,0 +1,60 @@
+/*
+ * tcpConnTable MIB architecture support
+ */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+#include <net-snmp/data_access/tcpConn.h>
+
+/*
+ * initialize arch specific storage
+ *
+ * @retval  0: success
+ * @retval <0: error
+ */
+int
+netsnmp_arch_tcpconn_entry_init(netsnmp_tcpconn_entry *entry)
+{
+    return 0;
+}
+
+/*
+ * cleanup arch specific storage
+ */
+void
+netsnmp_arch_tcpconn_entry_cleanup(netsnmp_tcpconn_entry *entry)
+{
+}
+
+/*
+ * copy arch specific storage
+ */
+int
+netsnmp_arch_tcpconn_entry_copy(netsnmp_tcpconn_entry *lhs,
+                                  netsnmp_tcpconn_entry *rhs)
+{
+    return 0;
+}
+
+#ifdef TCPCONN_DELETE_SUPPORTED
+/*
+ * delete an entry
+ */
+int
+netsnmp_arch_tcpconn_entry_delete(netsnmp_tcpconn_entry *entry)
+{
+    return -1;
+}
+#endif /* TCPCONN_DELETE_SUPPORTED */
+
+/**
+ *
+ * @retval  0 no errors
+ * @retval !0 errors
+ */
+int
+netsnmp_arch_tcpconn_container_load(netsnmp_container *container,
+                                    u_int load_flags )
+{
+    return -1;
+}
diff --git a/agent/mibgroup/testhandler.c b/agent/mibgroup/testhandler.c
index 8951319..f7468f0 100644
--- a/agent/mibgroup/testhandler.c
+++ b/agent/mibgroup/testhandler.c
@@ -346,8 +346,7 @@ my_test_instance_handler(netsnmp_mib_handler *handler,
         /*
          * store old info for undo later 
          */
-        memdup((u_char **) & accesses_cache,
-               (u_char *) & accesses, sizeof(accesses));
+        accesses_cache = netsnmp_memdup(&accesses, sizeof(accesses));
         if (accesses_cache == NULL) {
             netsnmp_set_request_error(reqinfo, requests,
                                       SNMP_ERR_RESOURCEUNAVAILABLE);
diff --git a/agent/mibgroup/ucd-snmp/disk.c b/agent/mibgroup/ucd-snmp/disk.c
index 324fbc4..1147eef 100644
--- a/agent/mibgroup/ucd-snmp/disk.c
+++ b/agent/mibgroup/ucd-snmp/disk.c
@@ -568,7 +568,6 @@ find_device(char *path)
   FILE           *mntfp;
 #elif HAVE_FSTAB_H
   struct fstab   *fstab;
-  struct stat     stat1;
 #elif HAVE_STATFS
   struct statfs   statf;
 #endif
@@ -622,7 +621,6 @@ find_device(char *path)
     strlcpy(device, mnttab.mnt_special, sizeof(device));
 #endif /* HAVE_SETMNTENT */
 #elif HAVE_FSTAB_H
-  stat(path, &stat1);
   setfsent();
   if ((fstab = getfsfile(path)))
     strlcpy(device, fstab->fs_spec, sizeof(device));
diff --git a/agent/mibgroup/ucd-snmp/disk_hw.c b/agent/mibgroup/ucd-snmp/disk_hw.c
index 93ecde3..ea37610 100644
--- a/agent/mibgroup/ucd-snmp/disk_hw.c
+++ b/agent/mibgroup/ucd-snmp/disk_hw.c
@@ -305,8 +305,11 @@ var_extensible_disk(struct variable *vp,
     unsigned long long val;
     static long     long_ret;
     static char     errmsg[300];
+    netsnmp_cache  *cache;
 
-    netsnmp_fsys_load( NULL, NULL );  /* Update the fsys H/W module */
+    /* Update the fsys H/W module */
+    cache = netsnmp_fsys_get_cache();
+    netsnmp_cache_check_and_reload(cache);
 
 tryAgain:
     if (header_simple_table
diff --git a/agent/mibgroup/ucd-snmp/diskio.c b/agent/mibgroup/ucd-snmp/diskio.c
index 4d6d05c..4ea8987 100644
--- a/agent/mibgroup/ucd-snmp/diskio.c
+++ b/agent/mibgroup/ucd-snmp/diskio.c
@@ -29,6 +29,7 @@
 
 #include <net-snmp/net-snmp-includes.h>
 #include <net-snmp/agent/net-snmp-agent-includes.h>
+#include <net-snmp/agent/agent_callbacks.h>
 
 #include "util_funcs/header_simple_table.h"
 
@@ -63,18 +64,22 @@ static perfstat_disk_t *ps_disk;	/* storage for all disk values */
 static int ps_numdisks;			/* number of disks in system, may change while running */
 #endif
 
-#if defined(bsdi3) || defined(bsdi4)
+#if defined(bsdi3) || defined(bsdi4) || defined(openbsd4)
 #include <string.h>
 #include <sys/param.h>
 #include <sys/sysctl.h>
+#ifdef openbsd4
+#include <sys/disk.h>
+#else
 #include <sys/diskstats.h>
+#endif
 #endif                          /* bsdi */
 
-#if defined (freebsd4) || defined(freebsd5)
+#if defined(HAVE_GETDEVS) || defined(HAVE_DEVSTAT_GETDEVS)
 #include <sys/param.h>
-#if __FreeBSD_version >= 500101
+#if HAVE_DEVSTAT_GETDEVS
 #include <sys/resource.h>       /* for CPUSTATES in devstat.h */
-#elif !defined(dragonfly)
+#elif HAVE_SYS_DKSTAT_H
 #include <sys/dkstat.h>
 #endif
 #include <devstat.h>
@@ -86,7 +91,7 @@ static int ps_numdisks;			/* number of disks in system, may change while running
 
 #endif                          /* freebsd */
 
-#if defined(freebsd5) && __FreeBSD_version >= 500107
+#if HAVE_DEVSTAT_GETDEVS
   #define GETDEVS(x) devstat_getdevs(NULL, (x))
 #else
   #define GETDEVS(x) getdevs((x))
@@ -107,18 +112,18 @@ void devla_getstats(unsigned int regno, void * dummy);
 static mach_port_t masterPort;		/* to communicate with I/O Kit	*/
 #endif                          /* darwin */
 
-#ifndef solaris2
+#if !defined(solaris2) && !(defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7))
 static int      getstats(void);
 #endif
 
-#if defined (freebsd4) || defined(freebsd5)
+#if defined (HAVE_GETDEVS) || defined(HAVE_DEVSTAT_GETDEVS)
 void		devla_getstats(unsigned int regno, void *dummy);
 #endif
 
 FILE           *file;
 
-#if 0
-static void	diskio_free_config(void);
+#ifdef linux
+static int	diskio_free_config(int, int, void *, void *);
 #endif
 
          /*********************
@@ -167,7 +172,7 @@ init_diskio(void)
          var_diskio, 1, {5}},
         {DISKIO_WRITES, ASN_COUNTER, NETSNMP_OLDAPI_RONLY,
          var_diskio, 1, {6}},
-#if defined(freebsd4) || defined(freebsd5) || defined(linux)
+#if defined(HAVE_GETDEVS) || defined(HAVE_DEVSTAT_GETDEVS) || defined(linux)
         {DISKIO_LA1, ASN_INTEGER, NETSNMP_OLDAPI_RONLY,
          var_diskio, 1, {9}},
         {DISKIO_LA5, ASN_INTEGER, NETSNMP_OLDAPI_RONLY,
@@ -224,7 +229,7 @@ init_diskio(void)
     ps_disk = NULL;
 #endif
 
-#if defined (freebsd4) || defined(freebsd5) || defined(linux)
+#if defined (HAVE_GETDEVS) || defined(HAVE_DEVSTAT_GETDEVS) || defined(linux)
     devla_getstats(0, NULL);
     /* collect LA data regularly */
     snmp_alarm_register(DISKIO_SAMPLE_INTERVAL, SA_REPEAT, devla_getstats, NULL);
@@ -245,20 +250,29 @@ init_diskio(void)
                                NETSNMP_DS_AGENT_DISKIO_NO_RAM);
 
         /* or possible an exclusion pattern? */
+
+    snmp_register_callback(SNMP_CALLBACK_APPLICATION,
+	                   SNMPD_CALLBACK_PRE_UPDATE_CONFIG,
+	                   diskio_free_config, NULL);
+
 #endif
 }
 
-#if 0
+#ifdef linux
 /* to do: make sure diskio_free_config() gets invoked upon SIGHUP. */
-static void
-diskio_free_config(void)
+static int
+diskio_free_config(int major, int minor, void *serverarg, void *clientarg)
 {
+    DEBUGMSGTL(("diskio", "free config %d\n",
+		netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
+				       NETSNMP_DS_AGENT_DISKIO_NO_RAM)));
     netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID, 
 			   NETSNMP_DS_AGENT_DISKIO_NO_FD,   0);
     netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID, 
 			   NETSNMP_DS_AGENT_DISKIO_NO_LOOP, 0);
     netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID, 
 			   NETSNMP_DS_AGENT_DISKIO_NO_RAM,  0);
+    return 0;
 }
 #endif
 
@@ -477,6 +491,132 @@ var_diskio(struct variable * vp,
 }
 #endif                          /* bsdi */
 
+#if defined(openbsd4)
+static int      ndisk;
+static struct diskstats *dk;
+static char   **dkname;
+
+static int
+getstats(void)
+{
+    time_t          now;
+    int             mib[2];
+    char           *t, *tp,*te;
+    size_t          size, dkn_size;
+    int             i;
+
+    now = time(NULL);
+    if (cache_time + CACHE_TIMEOUT > now) {
+        return 1;
+    }
+    mib[0] = CTL_HW;
+    mib[1] = HW_DISKSTATS;
+    size = 0;
+    if (sysctl(mib, 2, NULL, &size, NULL, 0) < 0) {
+        perror("Can't get size of HW_DISKSTATS mib");
+        return 0;
+    }
+    if (ndisk != size / sizeof(*dk)) {
+        if (dk)
+            free(dk);
+        if (dkname) {
+            for (i = 0; i < ndisk; i++)
+                if (dkname[i])
+                    free(dkname[i]);
+            free(dkname);
+        }
+        ndisk = size / sizeof(*dk);
+        if (ndisk == 0)
+            return 0;
+        dkname = malloc(ndisk * sizeof(char *));
+        mib[0] = CTL_HW;
+        mib[1] = HW_DISKNAMES;
+        if (sysctl(mib, 2, NULL, &dkn_size, NULL, 0) < 0) {
+            perror("Can't get size of HW_DISKNAMES mib");
+            return 0;
+        }
+        te = tp = t = malloc(dkn_size);
+        if (sysctl(mib, 2, t, &dkn_size, NULL, 0) < 0) {
+            perror("Can't get size of HW_DISKNAMES mib");
+            return 0;
+        }
+        for (i = 0; i < ndisk; i++) {
+	    while (te-t < dkn_size && *te != ',') te++;
+	    *te++ = '\0';
+            dkname[i] = strdup(tp);
+            tp = te;
+        }
+        free(t);
+        dk = malloc(ndisk * sizeof(*dk));
+    }
+    mib[0] = CTL_HW;
+    mib[1] = HW_DISKSTATS;
+    if (sysctl(mib, 2, dk, &size, NULL, 0) < 0) {
+        perror("Can't get HW_DISKSTATS mib");
+        return 0;
+    }
+    cache_time = now;
+    return 1;
+}
+
+u_char         *
+var_diskio(struct variable * vp,
+           oid * name,
+           size_t * length,
+           int exact, size_t * var_len, WriteMethod ** write_method)
+{
+    static long     long_ret;
+    static struct counter64 c64_ret;
+    unsigned int    indx;
+
+    if (getstats() == 0)
+        return 0;
+
+    if (header_simple_table
+        (vp, name, length, exact, var_len, write_method, ndisk))
+        return NULL;
+
+    indx = (unsigned int) (name[*length - 1] - 1);
+    if (indx >= ndisk)
+        return NULL;
+
+    switch (vp->magic) {
+    case DISKIO_INDEX:
+        long_ret = (long) indx + 1;
+        return (u_char *) & long_ret;
+    case DISKIO_DEVICE:
+        *var_len = strlen(dkname[indx]);
+        return (u_char *) dkname[indx];
+    case DISKIO_NREAD:
+        long_ret = (unsigned long) (dk[indx].ds_rbytes) & 0xffffffff;
+        return (u_char *) & long_ret;
+    case DISKIO_NWRITTEN:
+        long_ret = (unsigned long) (dk[indx].ds_wbytes) & 0xffffffff;
+        return (u_char *) & long_ret;
+    case DISKIO_READS:
+        long_ret = (unsigned long) dk[indx].ds_rxfer & 0xffffffff;
+        return (u_char *) & long_ret;
+    case DISKIO_WRITES:
+        long_ret = (unsigned long) dk[indx].ds_wxfer & 0xffffffff;
+        return (u_char *) & long_ret;
+    case DISKIO_NREADX:
+        *var_len = sizeof(struct counter64);
+        c64_ret.low = dk[indx].ds_rbytes & 0xffffffff;
+        c64_ret.high = dk[indx].ds_rbytes >> 32;
+        return (u_char *) & c64_ret;
+    case DISKIO_NWRITTENX:
+        *var_len = sizeof(struct counter64);
+        c64_ret.low = dk[indx].ds_rbytes & 0xffffffff;
+        c64_ret.high = dk[indx].ds_rbytes >> 32;
+        return (u_char *) & c64_ret;
+
+    default:
+        ERROR_MSG("diskio.c: don't know how to handle this request.");
+    }
+    return NULL;
+}
+#endif                          /* openbsd */
+
 #ifdef __NetBSD__
 #include <sys/sysctl.h>
 static int      ndisk;
@@ -628,12 +768,12 @@ var_diskio(struct variable * vp,
 }
 #endif /* __NetBSD__ */
 
-#if defined(freebsd4) || defined(freebsd5)
+#if defined(HAVE_GETDEVS) || defined(HAVE_DEVSTAT_GETDEVS)
 
 /* disk load average patch by Rojer */
 
 struct dev_la {
-#if ( defined(freebsd5) && __FreeBSD_version >= 500107 )
+#if HAVE_DEVSTAT_GETDEVS
         struct bintime prev;
 #else
         struct timeval prev;
@@ -645,7 +785,7 @@ struct dev_la {
 static struct dev_la *devloads = NULL;
 static int ndevs = 0;
 
-#if ! ( defined(freebsd5) && __FreeBSD_version >= 500107 )
+#if ! 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;
@@ -707,7 +847,7 @@ void devla_getstats(unsigned int regno, void *dummy) {
                 }
 
         for (i=0; i<ndevs; i++) {
-#if defined(freebsd5) && __FreeBSD_version >= 500107
+#if HAVE_DEVSTAT_GETDEVS
                 busy_time = devstat_compute_etime(&lastat->dinfo->devices[i].busy_time, &devloads[i].prev);
 #else
                 busy_time = devla_timeval_diff(&devloads[i].prev, &lastat->dinfo->devices[i].busy_time);
@@ -803,14 +943,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 defined(freebsd5) && __FreeBSD_version >= 500107
+#if HAVE_DEVSTAT_GETDEVS
         long_ret = (signed long) stat->dinfo->devices[indx].bytes[DEVSTAT_READ];
 #else
         long_ret = (signed long) stat->dinfo->devices[indx].bytes_read;
 #endif
         return (u_char *) & long_ret;
     case DISKIO_NWRITTEN:
-#if defined(freebsd5) && __FreeBSD_version >= 500107
+#if HAVE_DEVSTAT_GETDEVS
         long_ret = (signed long) stat->dinfo->devices[indx].bytes[DEVSTAT_WRITE];
 #else
         long_ret = (signed long) stat->dinfo->devices[indx].bytes_written;
@@ -818,7 +958,7 @@ var_diskio(struct variable * vp,
         return (u_char *) & long_ret;
     case DISKIO_NREADX:
         *var_len = sizeof(struct counter64);
-#if defined(freebsd5) && __FreeBSD_version >= 500107
+#if HAVE_DEVSTAT_GETDEVS
         longlong_ret = stat->dinfo->devices[indx].bytes[DEVSTAT_READ];
 #else
         longlong_ret = stat->dinfo->devices[indx].bytes_read;
@@ -828,7 +968,7 @@ var_diskio(struct variable * vp,
         return (u_char *) & c64_ret;
     case DISKIO_NWRITTENX:
         *var_len = sizeof(struct counter64);
-#if defined(freebsd5) && __FreeBSD_version >= 500107
+#if HAVE_DEVSTAT_GETDEVS
         longlong_ret = stat->dinfo->devices[indx].bytes[DEVSTAT_WRITE];
 #else
         longlong_ret = stat->dinfo->devices[indx].bytes_written;
@@ -837,14 +977,14 @@ var_diskio(struct variable * vp,
         c64_ret.high = longlong_ret >> 32;
         return (u_char *) & c64_ret;
     case DISKIO_READS:
-#if defined(freebsd5) && __FreeBSD_version >= 500107
+#if HAVE_DEVSTAT_GETDEVS
         long_ret = (signed long) stat->dinfo->devices[indx].operations[DEVSTAT_READ];
 #else
         long_ret = (signed long) stat->dinfo->devices[indx].num_reads;
 #endif
         return (u_char *) & long_ret;
     case DISKIO_WRITES:
-#if defined(freebsd5) && __FreeBSD_version >= 500107
+#if HAVE_DEVSTAT_GETDEVS
         long_ret = (signed long) stat->dinfo->devices[indx].operations[DEVSTAT_WRITE];
 #else
         long_ret = (signed long) stat->dinfo->devices[indx].num_writes;
@@ -1145,7 +1285,11 @@ var_diskio(struct variable * vp,
 #define kIDXBytesWritten	1
 #define kIDXNumReads		2
 #define kIDXNumWrites		3
-#define kIDXLast		3
+#define kIDXBytesReadXhi	4
+#define kIDXBytesReadXlo	5
+#define kIDXBytesWrittenXhi	6
+#define kIDXBytesWrittenXlo	7
+#define kIDXLast		7
 
 struct drivestats {
     char name[MAXDRIVENAME + 1];
@@ -1166,6 +1310,7 @@ collect_drive_stats(io_registry_entry_t driver, long *stats)
     CFDictionaryRef properties;
     CFDictionaryRef statistics;
     long            value;
+    SInt64          value64;
     kern_return_t   status;
     int             i;
 
@@ -1215,6 +1360,21 @@ collect_drive_stats(io_registry_entry_t driver, long *stats)
 	    CFNumberGetValue(number, kCFNumberSInt32Type, &value);
 	    stats[kIDXNumWrites] = value;
 	}
+	/* grab the 64 bit versions of the bytes read */
+	if ((number = (CFNumberRef)CFDictionaryGetValue(statistics,
+						 CFSTR(kIOBlockStorageDriverStatisticsBytesReadKey)))) {
+	    CFNumberGetValue(number, kCFNumberSInt64Type, &value64);
+	    stats[kIDXBytesReadXhi] = (long)(value64 >> 32);
+	    stats[kIDXBytesReadXlo] = (long)(value64 & 0xffffffff);	
+	}
+		
+	/* grab the 64 bit versions of the bytes written */
+	if ((number = (CFNumberRef)CFDictionaryGetValue(statistics,
+						 CFSTR(kIOBlockStorageDriverStatisticsBytesWrittenKey)))) {
+	    CFNumberGetValue(number, kCFNumberSInt64Type, &value64);
+	    stats[kIDXBytesWrittenXhi] = (long)(value64 >> 32);
+	    stats[kIDXBytesWrittenXlo] = (long)(value64 & 0xffffffff);	
+	}
     }
     /* we're done with the properties, release them */
     CFRelease(properties);
@@ -1298,7 +1458,7 @@ getstats(void)
     if (status != KERN_SUCCESS) {
 	snmp_log(LOG_ERR, "diskio: couldn't match whole IOMedia devices\n");
 /*	fprintf(stderr,"Couldn't match whole IOMedia devices\n"); */
-	return(1);
+	return -1;
     }
 
     num_drives = 0;  /* NB: Incremented by handle_drive */
@@ -1309,7 +1469,7 @@ getstats(void)
     IOObjectRelease(drivelist);
 
     cache_time = now;
-    return (0);
+    return 0;
 }
 
 u_char         *
@@ -1319,6 +1479,7 @@ var_diskio(struct variable * vp,
            int exact, size_t * var_len, WriteMethod ** write_method)
 {
     static long     long_ret;
+    static struct   counter64 c64_ret;
     unsigned int    indx;
 
     if (getstats() == 1) {
@@ -1355,7 +1516,16 @@ var_diskio(struct variable * vp,
 	case DISKIO_WRITES:
 	    long_ret = (signed long) drivestat[indx].stats[kIDXNumWrites];
 	    return (u_char *) & long_ret;
-
+	case DISKIO_NREADX:
+	    *var_len = 8;
+	    c64_ret.low = (signed long) drivestat[indx].stats[kIDXBytesReadXlo];
+	    c64_ret.high = (signed long) drivestat[indx].stats[kIDXBytesReadXhi];
+	    return (u_char *) & c64_ret;
+	case DISKIO_NWRITTENX:
+	    *var_len = 8;
+	    c64_ret.low = (signed long) drivestat[indx].stats[kIDXBytesWrittenXlo];
+	    c64_ret.high = (signed long) drivestat[indx].stats[kIDXBytesWrittenXhi];
+	    return (u_char *) & c64_ret;
 	default:
 	    ERROR_MSG("diskio.c: don't know how to handle this request.");
     }
diff --git a/agent/mibgroup/ucd-snmp/dlmod.c b/agent/mibgroup/ucd-snmp/dlmod.c
index e9742f2..0b711fb 100644
--- a/agent/mibgroup/ucd-snmp/dlmod.c
+++ b/agent/mibgroup/ucd-snmp/dlmod.c
@@ -5,6 +5,7 @@
 #include <net-snmp/net-snmp-config.h>
 #include <net-snmp/net-snmp-features.h>
 
+#include <ctype.h>
 #if HAVE_STDLIB_H
 #include <stdlib.h>
 #endif
@@ -18,7 +19,11 @@
 #include <net-snmp/net-snmp-includes.h>
 #include <net-snmp/agent/net-snmp-agent-includes.h>
 
+#if defined(WIN32)
+#include <windows.h>
+#else
 #include <dlfcn.h>
+#endif
 #include "dlmod.h"
 
 #ifndef SNMPDLMODPATH
@@ -43,7 +48,7 @@ struct dlmod {
 #define DLMOD_CREATE		6
 #define DLMOD_DELETE		7
 
-static struct dlmod *dlmods = NULL;
+static struct dlmod *dlmods;
 static unsigned int dlmod_next_index = 1;
 static char     dlmod_path[1024];
 
@@ -53,15 +58,16 @@ dlmod_create_module(void)
     struct dlmod  **pdlmod, *dlm;
 
     DEBUGMSGTL(("dlmod", "dlmod_create_module\n"));
-    dlm = (struct dlmod *) calloc(1, sizeof(struct dlmod));
+    dlm = calloc(1, sizeof(struct dlmod));
     if (dlm == NULL)
         return NULL;
 
-    dlm->index = (int)dlmod_next_index++;
+    dlm->index = dlmod_next_index++;
     dlm->status = DLMOD_UNLOADED;
 
-    for (pdlmod = &dlmods; *pdlmod != NULL; pdlmod = &((*pdlmod)->next));
-    (*pdlmod) = dlm;
+    for (pdlmod = &dlmods; *pdlmod != NULL; pdlmod = &((*pdlmod)->next))
+        ;
+    *pdlmod = dlm;
 
     return dlm;
 }
@@ -83,6 +89,96 @@ dlmod_delete_module(struct dlmod *dlm)
         }
 }
 
+#if defined(WIN32)
+/*
+ * See also Microsoft, "Overview of x64 Calling Conventions", MSDN
+ * (http://msdn.microsoft.com/en-us/library/ms235286.aspx).
+ */
+#ifdef _M_X64
+typedef int (*dl_function_ptr)(void);
+#else
+typedef int (__stdcall *dl_function_ptr)(void);
+#endif
+#else
+typedef int (*dl_function_ptr)(void);
+#endif
+
+#if defined(WIN32)
+static const char dlmod_dl_suffix[] = "dll";
+#else
+static const char dlmod_dl_suffix[] = "so";
+#endif
+
+static void* dlmod_dlopen(const char *path)
+{
+#if defined(WIN32)
+    return LoadLibrary(path);
+#elif defined(RTLD_NOW)
+    return dlopen(path, RTLD_NOW);
+#else
+    return dlopen(path, RTLD_LAZY);
+#endif
+}
+
+static void dlmod_dlclose(void *handle)
+{
+#if defined(WIN32)
+    FreeLibrary(handle);
+#else
+    dlclose(handle);
+#endif
+}
+
+static void *dlmod_dlsym(void *handle, const char *symbol)
+{
+#if defined(WIN32)
+    return GetProcAddress(handle, symbol);
+#else
+    return dlsym(handle, symbol);
+#endif
+}
+
+static const char *dlmod_dlerror(void)
+{
+#if defined(WIN32)
+    static char errstr[256];
+    const DWORD dwErrorcode = GetLastError();
+    LPTSTR      lpMsgBuf;
+
+    FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+                  NULL, dwErrorcode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+                  (LPTSTR) &lpMsgBuf, 0, NULL);
+    if (lpMsgBuf) {
+        LPTSTR          p;
+
+        /*
+         * Remove trailing "\r\n".
+         */
+        p = strchr(lpMsgBuf, '\r');
+        if (p)
+            *p = '\0';
+        snprintf(errstr, sizeof(errstr), "%s", lpMsgBuf);
+        LocalFree(lpMsgBuf);
+    } else {
+        snprintf(errstr, sizeof(errstr), "error code %ld", dwErrorcode);
+    }
+    return errstr;
+#else
+    return dlerror();
+#endif
+}
+
+static int dlmod_is_abs_path(const char *path)
+{
+#if defined(WIN32)
+    return (strncmp(path, "//", 2) == 0 || strncmp(path, "\\\\", 2) == 0) ||
+        (isalpha((u_char)path[0]) && path[1] == ':' &&
+         (path[2] == '/' || path[2] == '\\'));
+#else
+    return path[0] == '/';
+#endif
+}
+
 static void
 dlmod_load_module(struct dlmod *dlm)
 {
@@ -93,32 +189,26 @@ dlmod_load_module(struct dlmod *dlm)
         (dlm->status != DLMOD_UNLOADED && dlm->status != DLMOD_ERROR))
         return;
 
-    if (dlm->path[0] == '/') {
-#ifdef RTLD_NOW
-        dlm->handle = dlopen(dlm->path, RTLD_NOW);
-#else
-        dlm->handle = dlopen(dlm->path, RTLD_LAZY);
-#endif
+    if (dlmod_is_abs_path(dlm->path)) {
+        dlm->handle = dlmod_dlopen(dlm->path);
         if (dlm->handle == NULL) {
             snprintf(dlm->error, sizeof(dlm->error),
-                     "dlopen failed: %s", dlerror());
+                     "dlopen(%s) failed: %s", dlm->path, dlmod_dlerror());
             dlm->status = DLMOD_ERROR;
             return;
         }
     } else {
         char *st, *p, tmp_path[255];
 
-        for (p = strtok_r(dlmod_path, ":", &st); p; p = strtok_r(NULL, ":", &st)) {
-            snprintf(tmp_path, sizeof(tmp_path), "%s/%s.so", p, dlm->path);
+        for (p = strtok_r(dlmod_path, ENV_SEPARATOR, &st); p;
+             p = strtok_r(NULL, ENV_SEPARATOR, &st)) {
+            snprintf(tmp_path, sizeof(tmp_path), "%s/%s.%s", p, dlm->path,
+                     dlmod_dl_suffix);
             DEBUGMSGTL(("dlmod", "p: %s tmp_path: %s\n", p, tmp_path));
-#ifdef RTLD_NOW
-            dlm->handle = dlopen(tmp_path, RTLD_NOW);
-#else
-            dlm->handle = dlopen(tmp_path, RTLD_LAZY);
-#endif
+            dlm->handle = dlmod_dlopen(tmp_path);
             if (dlm->handle == NULL) {
                 snprintf(dlm->error, sizeof(dlm->error),
-                         "dlopen failed: %s", dlerror());
+                         "dlopen(%s) failed: %s", tmp_path, dlmod_dlerror());
                 dlm->status = DLMOD_ERROR;
             }
         }
@@ -128,12 +218,12 @@ dlmod_load_module(struct dlmod *dlm)
     }
     {
         char sym_init[64 + sizeof("init_")];
-        int  (*dl_init) (void);
+        dl_function_ptr dl_init;
 
         snprintf(sym_init, sizeof(sym_init), "init_%s", dlm->name);
-        dl_init = dlsym(dlm->handle, sym_init);
+        dl_init = dlmod_dlsym(dlm->handle, sym_init);
         if (dl_init == NULL) {
-            dlclose(dlm->handle);
+            dlmod_dlclose(dlm->handle);
             snprintf(dlm->error, sizeof(dlm->error),
                      "dlsym failed: can't find \'%s\'", sym_init);
             dlm->status = DLMOD_ERROR;
@@ -150,16 +240,16 @@ static void
 dlmod_unload_module(struct dlmod *dlm)
 {
     char            sym_deinit[64 + sizeof("shutdown_")];
-    int             (*dl_deinit) (void);
+    dl_function_ptr dl_deinit;
 
     if (!dlm || dlm->status != DLMOD_LOADED)
         return;
 
     snprintf(sym_deinit, sizeof(sym_deinit), "deinit_%s", dlm->name);
-    dl_deinit = dlsym(dlm->handle, sym_deinit);
+    dl_deinit = dlmod_dlsym(dlm->handle, sym_deinit);
     if (!dl_deinit) {
         snprintf(sym_deinit, sizeof(sym_deinit), "shutdown_%s", dlm->name);
-        dl_deinit = dlsym(dlm->handle, sym_deinit);
+        dl_deinit = dlmod_dlsym(dlm->handle, sym_deinit);
     }
     if (dl_deinit) {
         DEBUGMSGTL(("dlmod", "Calling %s()\n", sym_deinit));
@@ -167,7 +257,7 @@ dlmod_unload_module(struct dlmod *dlm)
     } else {
         DEBUGMSGTL(("dlmod", "No destructor for %s\n", dlm->name));
     }
-    dlclose(dlm->handle);
+    dlmod_dlclose(dlm->handle);
     dlm->status = DLMOD_UNLOADED;
     DEBUGMSGTL(("dlmod", "Module %s unloaded\n", dlm->name));
 }
@@ -280,18 +370,15 @@ header_dlmod(struct variable *vp,
     oid             newname[MAX_OID_LEN];
     int             result;
 
-    memcpy((char *) newname, (char *) vp->name,
-           (int) vp->namelen * sizeof(oid));
+    memcpy(newname, vp->name, vp->namelen * sizeof(oid));
     newname[DLMOD_NAME_LENGTH] = 0;
 
-    result =
-        snmp_oid_compare(name, *length, newname, (int) vp->namelen + 1);
+    result = snmp_oid_compare(name, *length, newname, vp->namelen + 1);
     if ((exact && (result != 0)) || (!exact && (result >= 0))) {
         return MATCH_FAILED;
     }
 
-    memcpy((char *) name, (char *) newname,
-           ((int) vp->namelen + 1) * sizeof(oid));
+    memcpy(name, newname, (vp->namelen + 1) * sizeof(oid));
     *length = vp->namelen + 1;
     *write_method = 0;
     *var_len = sizeof(long);    /* default to 'long' results */
@@ -310,9 +397,8 @@ var_dlmod(struct variable * vp,
      * variables we may use later
      */
 
-    *write_method = 0;          /* assume it isnt writable for the time being */
-    *var_len = sizeof(int);     /* assume an integer and change later
-                                 * if not */
+    *write_method = 0;         /* assume it isn't writable for the time being */
+    *var_len = sizeof(int);    /* assume an integer and change later if not */
 
     if (header_dlmod(vp, name, length, exact,
                      var_len, write_method) == MATCH_FAILED)
@@ -469,8 +555,7 @@ header_dlmodEntry(struct variable *vp,
     struct dlmod   *dlm = NULL;
     unsigned int    dlmod_index;
 
-    memcpy((char *) newname, (char *) vp->name,
-           (int) vp->namelen * sizeof(oid));
+    memcpy(newname, vp->name, vp->namelen * sizeof(oid));
     *write_method = 0;
 
     for (dlmod_index = 1; dlmod_index < dlmod_next_index; dlmod_index++) {
@@ -481,8 +566,7 @@ header_dlmodEntry(struct variable *vp,
 
         if (dlm) {
             newname[12] = dlmod_index;
-            result = snmp_oid_compare(name, *length, newname,
-                                      (int) vp->namelen + 1);
+            result = snmp_oid_compare(name, *length, newname, vp->namelen + 1);
 
             if ((exact && (result == 0)) || (!exact && (result < 0)))
                 break;
@@ -497,8 +581,7 @@ header_dlmodEntry(struct variable *vp,
         return NULL;
     }
 
-    memcpy((char *) name, (char *) newname,
-           ((int) vp->namelen + 1) * sizeof(oid));
+    memcpy(name, newname, (vp->namelen + 1) * sizeof(oid));
     *length = vp->namelen + 1;
     *var_len = sizeof(long);
     return dlm;
@@ -518,8 +601,7 @@ var_dlmodEntry(struct variable * vp,
     *var_len = sizeof(int);     /* assume an integer and change later
                                  * if not */
 
-    dlm =
-        header_dlmodEntry(vp, name, length, exact, var_len, write_method);
+    dlm = header_dlmodEntry(vp, name, length, exact, var_len, write_method);
     if (dlm == NULL)
         return NULL;
 
diff --git a/agent/mibgroup/ucd-snmp/dlmod.h b/agent/mibgroup/ucd-snmp/dlmod.h
index df8bef7..9592bdd 100644
--- a/agent/mibgroup/ucd-snmp/dlmod.h
+++ b/agent/mibgroup/ucd-snmp/dlmod.h
@@ -6,7 +6,7 @@
 #ifndef MIBGROUP_DLMOD_H
 #define MIBGROUP_DLMOD_H
 
-#if !defined(HAVE_DLFCN_H) || !defined(HAVE_DLOPEN)
+#if (!defined(HAVE_DLFCN_H) || !defined(HAVE_DLOPEN)) && !defined(WIN32)
 config_error(Dynamic modules not supported on this platform)
 #endif
 
diff --git a/agent/mibgroup/ucd-snmp/extensible.c b/agent/mibgroup/ucd-snmp/extensible.c
index d1752ef..14b084a 100644
--- a/agent/mibgroup/ucd-snmp/extensible.c
+++ b/agent/mibgroup/ucd-snmp/extensible.c
@@ -211,7 +211,7 @@ extensible_parse_config(const char *token, char *cptr)
 
     if (*cptr == '.')
         cptr++;
-    if (isdigit(*cptr)) {
+    if (isdigit((unsigned char) *cptr)) {
         /*
          * its a relocatable extensible mib 
          */
@@ -236,9 +236,9 @@ extensible_parse_config(const char *token, char *cptr)
         ptmp->type = SHPROC;
     else
         ptmp->type = EXECPROC;
-    if (isdigit(*cptr)) {
+    if (isdigit((unsigned char) *cptr)) {
         ptmp->miblen = parse_miboid(cptr, ptmp->miboid);
-        while (isdigit(*cptr) || *cptr == '.')
+        while (isdigit((unsigned char) *cptr) || *cptr == '.')
             cptr++;
     }
 
@@ -507,7 +507,7 @@ fixExecError(int action,
         }
         tmp = *((long *) var_val);
         if ((tmp == 1) && (action == COMMIT) && (exten->fixcmd[0] != 0)) {
-            sprintf(ex.command, exten->fixcmd);
+            strlcpy(ex.command, exten->fixcmd, sizeof(ex.command));
             if ((fd = get_exec_output(&ex)) != -1) {
                 file = fdopen(fd, "r");
                 while (fgets(ex.output, sizeof(ex.output), file) != NULL);
diff --git a/agent/mibgroup/ucd-snmp/lmsensorsMib.c b/agent/mibgroup/ucd-snmp/lmsensorsMib.c
index 5a50697..2557796 100644
--- a/agent/mibgroup/ucd-snmp/lmsensorsMib.c
+++ b/agent/mibgroup/ucd-snmp/lmsensorsMib.c
@@ -83,7 +83,7 @@ initialize_lmSensorsTable(const char *tableName, const oid *tableOID,
      * Register the table using the filtered container
      * Include an indicator of any scaling to be applied to the sensor value
      */
-    reg->my_reg_void = (void *)mult;
+    reg->my_reg_void = (void *)(uintptr_t)mult;
     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;
@@ -154,7 +154,7 @@ lmSensorsTables_handler(
     netsnmp_request_info       *request;
     netsnmp_table_request_info *table_info;
     netsnmp_sensor_info        *sensor_info;
-    int mult  = (int)reginfo->my_reg_void;
+    int mult  = (uintptr_t)reginfo->my_reg_void;
 
     DEBUGMSGTL(( "ucd-snmp/lmsensorsMib","lmSensorsTables_handler - root: "));
     DEBUGMSGOID(("ucd-snmp/lmsensorsMib", reginfo->rootoid, reginfo->rootoid_len));
diff --git a/agent/mibgroup/ucd-snmp/loadave.c b/agent/mibgroup/ucd-snmp/loadave.c
index 6efc5e9..3178330 100644
--- a/agent/mibgroup/ucd-snmp/loadave.c
+++ b/agent/mibgroup/ucd-snmp/loadave.c
@@ -258,12 +258,6 @@ loadave_free_config(void)
 int
 try_getloadavg(double *r_ave, size_t s_ave)
 {
-#if defined(HAVE_GETLOADAVG) || defined(linux) || defined(ultrix) \
-    || defined(sun) || defined(__alpha) || defined(dynix) \
-    || !defined(cygwin) && defined(NETSNMP_CAN_USE_NLIST) \
-       && defined(LOADAVE_SYMBOL)
-    double         *pave = r_ave;
-#endif
 #ifndef HAVE_GETLOADAVG
 #ifdef HAVE_SYS_FIXPOINT_H
     fix             favenrun[3];
@@ -278,7 +272,6 @@ try_getloadavg(double *r_ave, size_t s_ave)
 #endif
 #endif
 #if defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7)
-    int             favenrun[3];
     perfstat_cpu_total_t cs;
 #endif
 #if defined(hpux10) || defined(hpux11)
@@ -291,7 +284,7 @@ try_getloadavg(double *r_ave, size_t s_ave)
 #endif	/* !HAVE_GETLOADAVG */
 
 #ifdef HAVE_GETLOADAVG
-    if (getloadavg(pave, s_ave) == -1)
+    if (getloadavg(r_ave, s_ave) == -1)
         return (-1);
 #elif defined(linux)
     {
@@ -300,7 +293,7 @@ try_getloadavg(double *r_ave, size_t s_ave)
             NETSNMP_LOGONCE((LOG_ERR, "snmpd: cannot open /proc/loadavg\n"));
             return (-1);
         }
-        fscanf(in, "%lf %lf %lf", pave, (pave + 1), (pave + 2));
+        fscanf(in, "%lf %lf %lf", r_ave, (r_ave + 1), (r_ave + 2));
         fclose(in);
     }
 #elif (defined(ultrix) || defined(sun) || defined(__alpha) || defined(dynix))
@@ -308,7 +301,7 @@ try_getloadavg(double *r_ave, size_t s_ave)
         0)
         return (-1);
     for (i = 0; i < s_ave; i++)
-        *(pave + i) = FIX_TO_DBL(favenrun[i]);
+        *(r_ave + i) = FIX_TO_DBL(favenrun[i]);
 #elif defined(hpux10) || defined(hpux11)
     if (pstat_getdynamic(&pst_buf, sizeof(struct pst_dynamic), 1, 0) < 0)
         return(-1);
@@ -330,7 +323,7 @@ try_getloadavg(double *r_ave, size_t s_ave)
     DEBUGMSGTL(("ucd-snmp/loadave", "irix6: %d %d %d\n", favenrun[0], favenrun[1], favenrun[2]));
 #elif !defined(cygwin)
 #if defined(NETSNMP_CAN_USE_NLIST) && defined(LOADAVE_SYMBOL)
-    if (auto_nlist(LOADAVE_SYMBOL, (char *) pave, sizeof(double) * s_ave)
+    if (auto_nlist(LOADAVE_SYMBOL, (char *) r_ave, sizeof(double) * s_ave)
         == 0)
 #endif
         return (-1);
diff --git a/agent/mibgroup/ucd-snmp/logmatch.c b/agent/mibgroup/ucd-snmp/logmatch.c
index abca5ce..83b4e4a 100644
--- a/agent/mibgroup/ucd-snmp/logmatch.c
+++ b/agent/mibgroup/ucd-snmp/logmatch.c
@@ -432,17 +432,24 @@ logmatch_parse_config(const char *token, char *cptr)
          */
 
         logmatchTable[logmatchCount].myRegexError =
-            regcomp(&(logmatchTable[logmatchCount].regexBuffer),
+            regcomp(&logmatchTable[logmatchCount].regexBuffer,
                     logmatchTable[logmatchCount].regEx,
                     REG_EXTENDED | REG_NOSUB);
 
-        if (logmatchTable[logmatchCount].frequency > 0) {
+        if (logmatchTable[logmatchCount].myRegexError) {
+            char regexErrorString[100];
+            regerror(logmatchTable[logmatchCount].myRegexError,
+                     &logmatchTable[logmatchCount].regexBuffer,
+                     regexErrorString, 100);
+            snmp_log(LOG_ERR, "Could not process the logmatch regex - %s," \
+                     "\n since regcomp() failed with - %s\n",
+                     logmatchTable[logmatchCount].regEx, regexErrorString);
+        }
+        else if (logmatchTable[logmatchCount].frequency > 0) {
             snmp_alarm_register(logmatchTable[logmatchCount].frequency,
                                 SA_REPEAT,
-                                (SNMPAlarmCallback *)
-                                updateLogmatch_Scheduled,
-                                &(logmatchTable[logmatchCount])
-                );
+                                (SNMPAlarmCallback *) updateLogmatch_Scheduled,
+                                &logmatchTable[logmatchCount]);
         }
 
         logmatchCount++;
@@ -469,8 +476,8 @@ logmatch_free_config(void)
      */
 
     for (i = 0; i < logmatchCount; i++) {
-
-        regfree(&(logmatchTable[i].regexBuffer));
+        if (logmatchTable[i].myRegexError == 0)
+            regfree(&logmatchTable[i].regexBuffer);
     }
     logmatchCount = 0;
 }
@@ -516,14 +523,13 @@ var_logmatch_table(struct variable *vp,
             (vp, name, length, exact, var_len, write_method,
              logmatchCount))
             return (NULL);
-    }
 
+        iindex = name[*length - 1] - 1;
+        logmatch = &logmatchTable[iindex];
 
-    iindex = name[*length - 1] - 1;
-    logmatch = &logmatchTable[iindex];
-
-    if (logmatch->myRegexError == 0)
-        updateLogmatch(iindex);
+        if (logmatch->myRegexError == 0)
+            updateLogmatch(iindex);
+    }
 
     switch (vp->magic) {
     case LOGMATCH_INFO:
diff --git a/agent/mibgroup/ucd-snmp/pass.c b/agent/mibgroup/ucd-snmp/pass.c
index 4aae728..8d602c1 100644
--- a/agent/mibgroup/ucd-snmp/pass.c
+++ b/agent/mibgroup/ucd-snmp/pass.c
@@ -143,7 +143,7 @@ pass_parse_config(const char *token, char *cptr)
                  (*ppass)->miblen, (*ppass)->mibpriority);
 
     /*
-     * argggg -- pasthrus must be sorted 
+     * argggg -- passthrus must be sorted 
      */
     if (numpassthrus > 1) {
         etmp = (struct extensible **)
diff --git a/agent/mibgroup/ucd-snmp/pass_common.c b/agent/mibgroup/ucd-snmp/pass_common.c
index 38a0443..e3d9a01 100644
--- a/agent/mibgroup/ucd-snmp/pass_common.c
+++ b/agent/mibgroup/ucd-snmp/pass_common.c
@@ -122,6 +122,8 @@ netsnmp_internal_pass_parse(char * buf,
      */
     if (!strncasecmp(buf, "string", 6)) {
         buf2[strlen(buf2) - 1] = 0; /* zap the linefeed */
+        if (buf2[strlen(buf2) - 1] == '\r')
+            buf2[strlen(buf2) - 1] = 0; /* zap the carriage-return */
         *var_len = strlen(buf2);
         vp->type = ASN_OCTET_STR;
         return ((unsigned char *) buf2);
@@ -250,15 +252,15 @@ netsnmp_internal_pass_set_format(char *buf,
             sprintf(buf, "string \"\"\n");
         else if (netsnmp_internal_bin2asc(buf2, var_val_len) ==
                  (int) var_val_len)
-            snprintf(buf, sizeof(buf), "string \"%s\"\n", buf2);
+            snprintf(buf, SNMP_MAXBUF, "string \"%s\"\n", buf2);
         else
-            snprintf(buf, sizeof(buf), "octet \"%s\"\n", buf2);
-        buf[ sizeof(buf)-1 ] = 0;
+            snprintf(buf, SNMP_MAXBUF, "octet \"%s\"\n", buf2);
+        buf[ SNMP_MAXBUF-1 ] = 0;
         break;
     case ASN_OBJECT_ID:
         sprint_mib_oid(buf2, (const oid *) var_val, var_val_len/sizeof(oid));
-        snprintf(buf, sizeof(buf), "objectid \"%s\"\n", buf2);
-        buf[ sizeof(buf)-1 ] = 0;
+        snprintf(buf, SNMP_MAXBUF, "objectid \"%s\"\n", buf2);
+        buf[ SNMP_MAXBUF-1 ] = 0;
         break;
     }
 }
diff --git a/agent/mibgroup/ucd-snmp/pass_persist.c b/agent/mibgroup/ucd-snmp/pass_persist.c
index cc44232..8467e19 100644
--- a/agent/mibgroup/ucd-snmp/pass_persist.c
+++ b/agent/mibgroup/ucd-snmp/pass_persist.c
@@ -201,6 +201,7 @@ void
 pass_persist_free_config(void)
 {
     struct extensible *etmp, *etmp2;
+    int i;
 
     for (etmp = persistpassthrus; etmp != NULL;) {
         etmp2 = etmp;
@@ -208,6 +209,11 @@ pass_persist_free_config(void)
         unregister_mib_priority(etmp2->miboid, etmp2->miblen, etmp2->mibpriority);
         free(etmp2);
     }
+    if (persist_pipes) {
+        for (i = 0; i <= numpersistpassthrus; i++) {
+            close_persist_pipe(i);
+        }
+    }
     persistpassthrus = NULL;
     numpersistpassthrus = 0;
 }
@@ -716,6 +722,13 @@ close_persist_pipe(int iindex)
 #endif
 
     if (persist_pipes[iindex].pid != NETSNMP_NO_SUCH_PROCESS) {
+        /*
+         * kill the child, in case we got an error and the child is not
+         * cooperating.  Ignore the return code.
+         */
+#ifdef HAVE_SIGNAL
+        (void)kill(persist_pipes[iindex].pid, SIGKILL);
+#endif
 #if HAVE_SYS_WAIT_H
         waitpid(persist_pipes[iindex].pid, NULL, 0);
 #endif
diff --git a/agent/mibgroup/ucd-snmp/vmstat.c b/agent/mibgroup/ucd-snmp/vmstat.c
index d52a5b6..f76ce95 100644
--- a/agent/mibgroup/ucd-snmp/vmstat.c
+++ b/agent/mibgroup/ucd-snmp/vmstat.c
@@ -20,7 +20,7 @@ init_vmstat(void)
         netsnmp_create_handler_registration("vmstat", vmstat_handler,
                              vmstat_oid, OID_LENGTH(vmstat_oid),
                              HANDLER_CAN_RONLY),
-        MIBINDEX, CPURAWGUESTNICE);
+        MIBINDEX, CPUNUMCPUS);
 }
 
 
@@ -125,6 +125,10 @@ vmstat_handler(netsnmp_mib_handler          *handler,
              snmp_set_var_typed_integer(requests->requestvb, ASN_COUNTER,
                                         info->guestnice_ticks & 0xffffffff);
              break;
+        case CPUNUMCPUS:
+             snmp_set_var_typed_integer(requests->requestvb, ASN_INTEGER,
+                                        cpu_num & 0x7fffffff);
+             break;
 
         /*
          *  'Cooked' CPU statistics
diff --git a/agent/mibgroup/ucd-snmp/vmstat.h b/agent/mibgroup/ucd-snmp/vmstat.h
index eedb5b4..9fdf4f0 100644
--- a/agent/mibgroup/ucd-snmp/vmstat.h
+++ b/agent/mibgroup/ucd-snmp/vmstat.h
@@ -39,5 +39,6 @@ void              init_vmstat(void);
 #define CPURAWSTEAL 64
 #define CPURAWGUEST 65
 #define CPURAWGUESTNICE 66
+#define CPUNUMCPUS 67
 
 #endif                          /* _MIBGROUP_VMSTAT_H */
diff --git a/agent/mibgroup/udp-mib/data_access/udp_endpoint.h b/agent/mibgroup/udp-mib/data_access/udp_endpoint.h
index ce85be9..d9dec1d 100644
--- a/agent/mibgroup/udp-mib/data_access/udp_endpoint.h
+++ b/agent/mibgroup/udp-mib/data_access/udp_endpoint.h
@@ -23,12 +23,12 @@ 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)
-#elif defined(freebsd4) || defined(dragonfly)
+#elif defined(freebsd4) || defined(dragonfly) || defined(darwin)
 config_require(udp-mib/data_access/udp_endpoint_freebsd4)
 #elif defined(openbsd4)
 config_require(udp-mib/data_access/udp_endpoint_openbsd)
 #elif defined(netbsd1)
 config_require(udp-mib/data_access/udp_endpoint_netbsd)
 #else
-#   define NETSNMP_UDP_ENDPOINT_COMMON_ONLY
+config_require(udp-mib/data_access/udp_endpoint_unsup)
 #endif
diff --git a/agent/mibgroup/udp-mib/data_access/udp_endpoint_unsup.c b/agent/mibgroup/udp-mib/data_access/udp_endpoint_unsup.c
new file mode 100644
index 0000000..669cce0
--- /dev/null
+++ b/agent/mibgroup/udp-mib/data_access/udp_endpoint_unsup.c
@@ -0,0 +1,65 @@
+/*
+ * udpEndpointTable MIB architecture support
+ */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-features.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+#include <net-snmp/library/file_utils.h>
+#include <net-snmp/library/text_utils.h>
+#include <net-snmp/data_access/ipaddress.h>
+#include <net-snmp/data_access/udp_endpoint.h>
+
+/*
+ * initialize arch specific storage
+ *
+ * @retval  0: success
+ * @retval <0: error
+ */
+#ifndef NETSNMP_FEATURE_REMOVE_UDP_ENDPOINT_WRITABLE
+int
+netsnmp_arch_udp_endpoint_entry_init(netsnmp_udp_endpoint_entry *entry)
+{
+    return 0;
+}
+
+/*
+ * cleanup arch specific storage
+ */
+void
+netsnmp_arch_udp_endpoint_entry_cleanup(netsnmp_udp_endpoint_entry *entry)
+{
+}
+
+/*
+ * copy arch specific storage
+ */
+int
+netsnmp_arch_udp_endpoint_entry_copy(netsnmp_udp_endpoint_entry *lhs,
+                                  netsnmp_udp_endpoint_entry *rhs)
+{
+    return 0;
+}
+
+/*
+ * delete an entry
+ */
+int
+netsnmp_arch_udp_endpoint_delete(netsnmp_udp_endpoint_entry *entry)
+{
+    return -1;
+}
+#endif /* NETSNMP_FEATURE_REMOVE_UDP_ENDPOINT_WRITABLE */
+
+
+/**
+ *
+ * @retval  0 no errors
+ * @retval !0 errors
+ */
+int
+netsnmp_arch_udp_endpoint_container_load(netsnmp_container *container,
+                                    u_int load_flags )
+{
+    return -1;
+}
diff --git a/agent/mibgroup/util_funcs.c b/agent/mibgroup/util_funcs.c
index 4c34c32..54068c6 100644
--- a/agent/mibgroup/util_funcs.c
+++ b/agent/mibgroup/util_funcs.c
@@ -778,7 +778,7 @@ parse_miboid(const char *buf, oid * oidout)
          * so we need to use 'strtoul' rather than 'atoi'
          */
         oidout[i] = strtoul(buf, NULL, 10) & 0xffffffff;
-        while (isdigit((unsigned char)(*buf++)));
+        while (isdigit((unsigned char)(*buf))) buf++;
         if (*buf == '.')
             buf++;
     }
diff --git a/agent/mibgroup/util_funcs/get_pid_from_inode.h b/agent/mibgroup/util_funcs/get_pid_from_inode.h
index 7c58760..ad887a7 100644
--- a/agent/mibgroup/util_funcs/get_pid_from_inode.h
+++ b/agent/mibgroup/util_funcs/get_pid_from_inode.h
@@ -3,7 +3,7 @@
  * that controls a given inode on linux.
  */
 #ifndef NETSNMP_MIBGROUP_UTIL_FUNCS_GET_PID_FROM_INODE_H
-#define NETSNMP_MIBGROUP_UTIL_FUNCS_HEADER_SIMPLE_TABLE_H
+#define NETSNMP_MIBGROUP_UTIL_FUNCS_GET_PID_FROM_INODE_H
 
 #ifndef linux
 config_error(get_pid_from_inode is only suppored on linux)
@@ -31,4 +31,4 @@ config_error(get_pid_from_inode is only suppored on linux)
 void netsnmp_get_pid_from_inode_init(void);
 pid_t netsnmp_get_pid_from_inode(ino64_t);
 
-#endif /* NETSNMP_MIBGROUP_UTIL_FUNCS_HEADER_SIMPLE_TABLE_H */
+#endif /* NETSNMP_MIBGROUP_UTIL_FUNCS_GET_PID_FROM_INODE_H */
diff --git a/agent/mibgroup/utilities/iquery.c b/agent/mibgroup/utilities/iquery.c
index e2aea74..860590f 100644
--- a/agent/mibgroup/utilities/iquery.c
+++ b/agent/mibgroup/utilities/iquery.c
@@ -85,7 +85,7 @@ _tweak_default_iquery_session( int majorID, int minorID,
 
     if ( s && s->securityEngineIDLen == 0 ) {
         elen = snmpv3_get_engineID(eID, sizeof(eID));
-        memdup( &(s->securityEngineID), eID, elen );
+        s->securityEngineID = netsnmp_memdup(eID, elen);
         s->securityEngineIDLen = elen;
     }
     return SNMPERR_SUCCESS;
@@ -189,13 +189,13 @@ netsnmp_session *netsnmp_iquery_session(char* secName,   int   version,
         ss->version       = version;
         ss->securityModel = secModel;
         ss->securityLevel = secLevel;
-        memdup( &(ss->securityEngineID), engineID, engIDLen );
+        ss->securityEngineID = netsnmp_memdup(engineID, engIDLen);
         ss->securityEngineIDLen = engIDLen;
         if ( version == SNMP_VERSION_3 ) {
             ss->securityNameLen = strlen(secName);
-            memdup((u_char**)&(ss->securityName), (u_char*)secName, ss->securityNameLen);
+            ss->securityName = netsnmp_memdup(secName, ss->securityNameLen);
         } else {
-            memdup( &(ss->community), secName, strlen(secName));
+            ss->community = netsnmp_memdup(secName, strlen(secName));
             ss->community_len = strlen(secName);
         }
         ss->myvoid = netsnmp_check_outstanding_agent_requests;
diff --git a/agent/mibgroup/utilities/override.c b/agent/mibgroup/utilities/override.c
index 2b083a9..48ac281 100644
--- a/agent/mibgroup/utilities/override.c
+++ b/agent/mibgroup/utilities/override.c
@@ -57,9 +57,9 @@ override_handler(netsnmp_mib_handler *handler,
         break;
 
     case MODE_SET_RESERVE2:
-        if (memdup((u_char **) &data->set_space,
-                   requests->requestvb->val.string,
-                   requests->requestvb->val_len) == SNMPERR_GENERR)
+        data->set_space = netsnmp_memdup(requests->requestvb->val.string,
+                                         requests->requestvb->val_len);
+        if (!data->set_space)
             netsnmp_set_request_error(reqinfo, requests,
                                       SNMP_ERR_RESOURCEUNAVAILABLE);
         break;
diff --git a/agent/mibgroup/winExtDLL.c b/agent/mibgroup/winExtDLL.c
index c693913..e421412 100644
--- a/agent/mibgroup/winExtDLL.c
+++ b/agent/mibgroup/winExtDLL.c
@@ -95,7 +95,6 @@
 #include <time.h>
 #include <windows.h>
 #include "../../win32/Snmp-winExtDLL.h"
-#include "../../win32/MgmtApi-winExtDLL.h"
 
 #include <net-snmp/net-snmp-includes.h>
 #include <net-snmp/library/snmp_assert.h>
@@ -156,6 +155,9 @@ typedef         BOOL(WINAPI * PFNSNMPEXTENSIONTRAP) (AsnObjectIdentifier *
 
 typedef         VOID(WINAPI * PFNSNMPEXTENSIONCLOSE) (void);
 
+typedef BOOL (WINAPI *pfIsWow64Process)(HANDLE hProcess, BOOL *Wow64Process);
+
+
 /**
  * Extensible array, a data structure similar to the C++ STL class
  * std::vector<>.
@@ -179,6 +181,7 @@ typedef struct {
     HANDLE          dll_handle;                      /**< DLL handle. */
     PFNSNMPEXTENSIONINIT pfSnmpExtensionInit;
     PFNSNMPEXTENSIONINITEX pfSnmpExtensionInitEx;
+    PFNSNMPEXTENSIONCLOSE pfSnmpExtensionClose;
     PFNSNMPEXTENSIONQUERY pfSnmpExtensionQuery;
     PFNSNMPEXTENSIONQUERYEX pfSnmpExtensionQueryEx;
     PFNSNMPEXTENSIONTRAP pfSnmpExtensionTrap;
@@ -286,6 +289,8 @@ static void    *xarray_reserve(xarray * a, int reserved);
 #define WINEXTDLL_VIEW(i)       ((winextdll_view*)s_winextdll_view.p)[i]
 #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 OSVERSIONINFO s_versioninfo = { sizeof(s_versioninfo) };
 static xarray   s_winextdll = { 0, sizeof(winextdll) };
 static xarray   s_winextdll_view = { 0, sizeof(winextdll_view) };
 static xarray   s_trapevent = { 0, sizeof(HANDLE) };
@@ -301,11 +306,21 @@ static context_info *context_info_head;
 void
 init_winExtDLL(void)
 {
-    BOOL            result;
+    BOOL            result, is_wow64_process = FALSE;
     int             i;
+    uint32_t        uptime_reference;
+    pfIsWow64Process IsWow64Process;
 
     DEBUGMSG(("winExtDLL", "init_winExtDLL started.\n"));
 
+    GetVersionEx(&s_versioninfo);
+
+    IsWow64Process =
+      (pfIsWow64Process)GetProcAddress(GetModuleHandle("kernel32"),
+                                       "IsWow64Process");
+    if (IsWow64Process)
+        (*IsWow64Process)(GetCurrentProcess(), &is_wow64_process);
+
     SnmpSvcInitUptime();
 
     read_extension_dlls_from_registry();
@@ -367,6 +382,8 @@ init_winExtDLL(void)
         ext_dll_info->pfSnmpExtensionInitEx = (PFNSNMPEXTENSIONINITEX)
             GetProcAddress(ext_dll_info->dll_handle,
                            "SnmpExtensionInitEx");
+        ext_dll_info->pfSnmpExtensionClose = (PFNSNMPEXTENSIONCLOSE)
+            GetProcAddress(ext_dll_info->dll_handle, "SnmpExtensionClose");
         ext_dll_info->pfSnmpExtensionQuery = (PFNSNMPEXTENSIONQUERY)
             GetProcAddress(ext_dll_info->dll_handle, "SnmpExtensionQuery");
         ext_dll_info->pfSnmpExtensionQueryEx = (PFNSNMPEXTENSIONQUERYEX)
@@ -384,29 +401,60 @@ init_winExtDLL(void)
         }
 
         /*
+         * 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()
          * the first argument of this function should be ignored by extension
-         * DLLs, passing the value GetTickCount() / 10 is necessary to make
-         * inetmib1.dll work correctly. Passing zero as the first argument
-         * causes inetmib1.dll to report an incorrect value for sysUpTime.0
-         * and also causes the same DLL not to send linkUp or linkDown traps.
+         * DLLs, passing a correct value for this first argument is necessary
+         * to make inetmib1.dll work correctly. Passing zero as the first
+         * argument causes inetmib1.dll to report an incorrect value for
+         * sysUpTime.0 and also causes the same DLL not to send linkUp or
+         * linkDown traps.
          */
         ext_dll_info->subagentTrapEvent = NULL;
         view.idLength = 0;
-        view.ids = 0;
+        view.ids = NULL;
+        if (!is_wow64_process && s_versioninfo.dwMajorVersion >= 6)
+            uptime_reference = GetTickCount() - 10 * SnmpSvcGetUptime();
+        else
+            uptime_reference = GetTickCount() / 10;
         result =
-            ext_dll_info->pfSnmpExtensionInit(GetTickCount() / 10,
+            ext_dll_info->pfSnmpExtensionInit(uptime_reference,
                                               &ext_dll_info->
                                               subagentTrapEvent, &view);
 
         if (!result) {
-            snmp_log(LOG_ERR,
-                     "init_winExtDLL: initialization of DLL %s failed.\n",
-                     ext_dll_info->dll_name);
-            FreeLibrary(ext_dll_info->dll_handle);
-            ext_dll_info->dll_handle = 0;
-            continue;
+            DEBUGMSG(("winExtDLL",
+                      "init_winExtDLL: initialization of DLL %s failed.\n",
+                      ext_dll_info->dll_name));
+            /*
+             * At least on Windows 7 SnmpExtensionInit() in some extension
+             * agent DLLs returns "FALSE" although initialization
+             * succeeded. Hence ignore the SnmpExtensionInit() return value on
+             * Windows Vista and later.
+             */
+            if (s_versioninfo.dwMajorVersion < 6) {
+                snmp_log(LOG_ERR,
+                         "init_winExtDLL: initialization of DLL %s failed.\n",
+                         ext_dll_info->dll_name);
+                FreeLibrary(ext_dll_info->dll_handle);
+                ext_dll_info->dll_handle = 0;
+                continue;
+            }
         }
 
         if (ext_dll_info->subagentTrapEvent != NULL) {
@@ -417,6 +465,26 @@ init_winExtDLL(void)
 
         memset(&ext_dll_view_info, 0, sizeof(ext_dll_view_info));
         ext_dll_view_info.winextdll_info = ext_dll_info;
+        if (view.idLength == 0) {
+            DEBUGMSG(("winExtDLL",
+                      "init_winExtDLL: DLL %s did not register an OID range.\n",
+                      ext_dll_info->dll_name));
+            continue;
+        }
+        /*
+         * Skip the mib-2 system section on Windows Vista and later because
+         * at least on a 64-bit Windows 7 system all queries in that section
+         * fail with status "generic error".
+         */
+        if (s_versioninfo.dwMajorVersion >= 6
+            && snmp_oid_compare_w_n(view.ids, view.idLength, mibii_system_mib,
+                                    sizeof(mibii_system_mib) /
+                                    sizeof(mibii_system_mib[0])) == 0) {
+            DEBUGMSG(("winExtDLL",
+                      "init_winExtDLL: skipping system section of DLL %s.\n",
+                      ext_dll_info->dll_name));
+            continue;
+        }
         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);
@@ -485,16 +553,22 @@ shutdown_winExtDLL(void)
 
     for (i = s_winextdll.size - 1; i >= 0; i--) {
         winextdll      *const ext_dll_info = &WINEXTDLL(i);
-        /*
-         * Freeing the Broadcom SNMP extension libraries triggers a deadlock,
-         * so skip bcmif.dll and baspmgnt.dll. 
-         */
-        if (ext_dll_info->dll_handle != 0
-            && !basename_equals(ext_dll_info->dll_name, "bcmif.dll")
-            && !basename_equals(ext_dll_info->dll_name, "baspmgnt.dll")) {
-            DEBUGMSG(("winExtDLL", "unloading %s.\n",
-                      ext_dll_info->dll_name));
-            FreeLibrary(ext_dll_info->dll_handle);
+        if (ext_dll_info->dll_handle) {
+            if (ext_dll_info->pfSnmpExtensionClose) {
+                DEBUGMSG(("winExtDLL", "closing %s.\n",
+                          ext_dll_info->dll_name));
+                ext_dll_info->pfSnmpExtensionClose();
+            }
+            /*
+             * Freeing the Broadcom SNMP extension libraries triggers
+             * a deadlock, so skip bcmif.dll and baspmgnt.dll.
+             */
+            if (!basename_equals(ext_dll_info->dll_name, "bcmif.dll")
+                && !basename_equals(ext_dll_info->dll_name, "baspmgnt.dll")) {
+                DEBUGMSG(("winExtDLL", "unloading %s.\n",
+                          ext_dll_info->dll_name));
+                FreeLibrary(ext_dll_info->dll_handle);
+            }
         }
         free(ext_dll_info->dll_name);
     }
@@ -524,7 +598,7 @@ basename_equals(const char *path, const char *basename)
 
     return path_len >= basename_len + 1
         && path[path_len - basename_len - 1] == '\\'
-        && stricmp(path + path_len - basename_len, basename) == 0;
+        && strcasecmp(path + path_len - basename_len, basename) == 0;
 }
 
 /**
@@ -682,6 +756,79 @@ get_context_info(const int index)
     return NULL;
 }
 
+/*
+ * Translate Net-SNMP request mode into an SnmpExtensionQuery() PDU type
+ * or into an SnmpExtensionQueryEx() request type.
+ */
+static int
+get_request_type(int mode, int request_type, UINT *nRequestType)
+{
+    switch (request_type) {
+    case 0:
+        /* SnmpExtensionQuery() PDU type */
+        switch (mode) {
+        case MODE_GET:
+            *nRequestType = SNMP_PDU_GET;
+            return 1;
+        case MODE_GETNEXT:
+            *nRequestType = SNMP_PDU_GETNEXT;
+            return 1;
+        case MODE_SET_RESERVE1:
+            return 0;
+        case MODE_SET_RESERVE2:
+            return 0;
+        case MODE_SET_ACTION:
+            return 0;
+        case MODE_SET_UNDO:
+            return 0;
+        case MODE_SET_COMMIT:
+            *nRequestType = SNMP_PDU_SET;
+            return 1;
+        case MODE_SET_FREE:
+            return 0;
+        default:
+            DEBUGMSG(("winExtDLL", "internal error: invalid mode %d.\n", mode));
+            netsnmp_assert(0);
+            return 0;
+        }
+    case 1:
+        /* SnmpExtensionQueryEx() request type */
+        switch (mode) {
+        case MODE_GET:
+            *nRequestType = SNMP_EXTENSION_GET;
+            return 1;
+        case MODE_GETNEXT:
+            *nRequestType = SNMP_EXTENSION_GET_NEXT;
+            return 1;
+        case MODE_SET_RESERVE1:
+            *nRequestType = SNMP_EXTENSION_SET_TEST;
+            return 1;
+        case MODE_SET_RESERVE2:
+            return 0;
+        case MODE_SET_ACTION:
+            return 0;
+        case MODE_SET_UNDO:
+            *nRequestType = SNMP_EXTENSION_SET_UNDO;
+            return 1;
+        case MODE_SET_COMMIT:
+            *nRequestType = SNMP_EXTENSION_SET_COMMIT;
+            return 1;
+        case MODE_SET_FREE:
+            *nRequestType = SNMP_EXTENSION_SET_CLEANUP;
+            return 1;
+        default:
+            DEBUGMSG(("winExtDLL", "internal error: invalid mode %d.\n", mode));
+            netsnmp_assert(0);
+            return 0;
+        }
+    default:
+        DEBUGMSG(("winExtDLL", "internal error: invalid argument %d.\n",
+                  request_type));
+        netsnmp_assert(0);
+        return 0;
+    }
+}
+
 static int
 var_winExtDLL(netsnmp_mib_handler *handler,
               netsnmp_handler_registration *reginfo,
@@ -708,35 +855,8 @@ var_winExtDLL(netsnmp_mib_handler *handler,
         return SNMP_ERR_GENERR;
     }
 
-    switch (reqinfo->mode) {
-    case MODE_GET:
-        nRequestType = SNMP_EXTENSION_GET;
-        netsnmp_assert(!context_info_head);
-        break;
-    case MODE_GETNEXT:
-        nRequestType = SNMP_EXTENSION_GET_NEXT;
-        netsnmp_assert(!context_info_head);
-        break;
-    case MODE_SET_RESERVE1:
-        nRequestType = SNMP_EXTENSION_SET_TEST;
-        break;
-    case MODE_SET_RESERVE2:
-        return SNMP_ERR_NOERROR;
-    case MODE_SET_ACTION:
-        return SNMP_ERR_NOERROR;
-    case MODE_SET_UNDO:
-        nRequestType = SNMP_EXTENSION_SET_UNDO;
-        break;
-    case MODE_SET_COMMIT:
-        nRequestType = SNMP_EXTENSION_SET_COMMIT;
-        break;
-    case MODE_SET_FREE:
-        nRequestType = SNMP_EXTENSION_SET_CLEANUP;
-        break;
-    default:
-        DEBUGMSG(("winExtDLL",
-                  "internal error: invalid mode %d.\n", reqinfo->mode));
-        netsnmp_assert(0);
+    if (!get_request_type(reqinfo->mode, !!ext_dll_info->pfSnmpExtensionQueryEx,
+                          &nRequestType)) {
         return SNMP_ERR_NOERROR;
     }
 
@@ -784,6 +904,30 @@ var_winExtDLL(netsnmp_mib_handler *handler,
                                     win_varbinds.list[0].name.idLength,
                                     reginfo->rootoid,
                                     reginfo->rootoid_len) < 0) {
+            DEBUGIF("winExtDLL") {
+                size_t          oid1_namelen = 0, oid2_namelen = 0, outlen1 = 0,
+                                outlen2 = 0;
+                char           *oid1_name = NULL, *oid2_name = NULL;
+                int             overflow1 = 0, overflow2 = 0;
+
+                netsnmp_static_assert(sizeof(oid) == sizeof(UINT));
+                netsnmp_sprint_realloc_objid((u_char **) & oid1_name,
+                                             &oid1_namelen, &outlen1, 1,
+                                             &overflow1, (const oid *)
+                                             win_varbinds.list[0].name.ids,
+                                             win_varbinds.list[0].name.idLength);
+                netsnmp_sprint_realloc_objid((u_char **) & oid2_name,
+                                             &oid2_namelen, &outlen2, 1,
+                                             &overflow2, reginfo->rootoid,
+                                             reginfo->rootoid_len);
+                DEBUGMSG(("winExtDLL",
+                          "extension DLL %s: replacing OID %s%s by OID %s%s.\n",
+                          ext_dll_info->dll_name,
+                          oid1_name, overflow1 ? " [TRUNCATED]" : "",
+                          oid2_name, overflow2 ? " [TRUNCATED]" : ""));
+                free(oid2_name);
+                free(oid1_name);
+            }
 
             SnmpUtilOidFree(&win_varbinds.list[0].name);
             memset(&win_varbinds.list[0].name, 0,
@@ -823,9 +967,26 @@ var_winExtDLL(netsnmp_mib_handler *handler,
 
         rc = convert_win_snmp_err(ErrorStatus);
         if (rc != SNMP_ERR_NOERROR) {
-            DEBUGMSG(("winExtDLL",
-                      "extension DLL %s: SNMP query function returned error code %lu (Windows) / %d (Net-SNMP).\n",
-                      ext_dll_info->dll_name, ErrorStatus, rc));
+            DEBUGIF("winExtDLL") {
+                size_t          oid_namelen = 0, outlen = 0;
+                char           *oid_name = NULL;
+                int             overflow = 0;
+
+                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]" : "",
+                          win_varbinds.list[0].value.asnType,
+                          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
diff --git a/agent/snmp_agent.c b/agent/snmp_agent.c
index 0b44a81..b96d650 100644
--- a/agent/snmp_agent.c
+++ b/agent/snmp_agent.c
@@ -3124,6 +3124,9 @@ handle_getnext_loop(netsnmp_agent_session *asp)
             return status;      /* should never really happen */
         }
     }
+    if (!netsnmp_running) {
+        return SNMP_ERR_GENERR;
+    }
     return SNMP_ERR_NOERROR;
 }
 
diff --git a/agent/snmp_vars.c b/agent/snmp_vars.c
index c069ab0..2f9e6ef 100644
--- a/agent/snmp_vars.c
+++ b/agent/snmp_vars.c
@@ -145,7 +145,6 @@ PERFORMANCE OF THIS SOFTWARE.
 #include "agentx/subagent.h"
 #include "net-snmp/agent/all_helpers.h"
 #include "agent_module_includes.h"
-#include "mib_module_includes.h"
 #include "net-snmp/library/container.h"
 
 #if defined(NETSNMP_USE_OPENSSL) && defined(HAVE_LIBSSL)
diff --git a/agent/snmpd.c b/agent/snmpd.c
index b177d5b..cfc7bce 100644
--- a/agent/snmpd.c
+++ b/agent/snmpd.c
@@ -281,9 +281,11 @@ usage(char *prog)
            "  -C\t\t\tdo not read the default configuration files\n",
            get_configuration_directory(),
            "  -d\t\t\tdump sent and received SNMP packets\n"
+#ifndef NETSNMP_DISABLE_DEBUGGING
            "  -D[TOKEN[,...]]\tturn on debugging output for the given TOKEN(s)\n"
 	   "\t\t\t  (try ALL for extremely verbose output)\n"
 	   "\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
            "  -g GID\t\tchange to this numeric gid after opening\n"
@@ -580,8 +582,13 @@ main(int argc, char *argv[])
             break;
 
         case 'D':
+#ifdef NETSNMP_DISABLE_DEBUGGING
+            fprintf(stderr, "Debugging not configured\n");
+            exit(1);
+#else
             debug_register_tokens(optarg);
             snmp_set_do_debugging(1);
+#endif
             break;
 
         case 'f':
@@ -1266,12 +1273,14 @@ receive(void)
 #endif /* NETSNMP_FEATURE_REMOVE_FD_EVENT_MANAGER */
 
     reselect:
+#ifndef NETSNMP_FEATURE_REMOVE_REGISTER_SIGNAL
         for (i = 0; i < NUM_EXTERNAL_SIGS; i++) {
             if (external_signal_scheduled[i]) {
                 external_signal_scheduled[i]--;
                 external_signal_handler[i](i);
             }
         }
+#endif /* NETSNMP_FEATURE_REMOVE_REGISTER_SIGNAL */
 
         DEBUGMSGTL(("snmpd/select", "select( numfds=%d, ..., tvp=%p)\n",
                     numfds, tvp));
diff --git a/apps/Makefile.depend b/apps/Makefile.depend
index 16ac83c..d8057dc 100644
--- a/apps/Makefile.depend
+++ b/apps/Makefile.depend
@@ -4,10 +4,10 @@
 ./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/net-snmp-features.h 
-./agentxtrap.lo: ../include/net-snmp/net-snmp-includes.h 
-./agentxtrap.lo:  ../include/net-snmp/definitions.h
-./agentxtrap.lo: ../include/net-snmp/types.h 
+./agentxtrap.lo: ../include/net-snmp/net-snmp-features.h
+./agentxtrap.lo: ../include/net-snmp/net-snmp-includes.h
+./agentxtrap.lo: ../include/net-snmp/definitions.h
+./agentxtrap.lo: ../include/net-snmp/types.h
 ./agentxtrap.lo: ../include/net-snmp/library/oid.h
 ./agentxtrap.lo: ../include/net-snmp/library/types.h
 ./agentxtrap.lo: ../include/net-snmp/library/snmp_api.h
@@ -31,6 +31,7 @@
 ./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/ucd_compat.h
 ./agentxtrap.lo: ../include/net-snmp/library/mib.h
@@ -81,7 +82,7 @@
 ./encode_keychange.lo: ../include/net-snmp/net-snmp-config.h
 ./encode_keychange.lo: ../include/net-snmp/net-snmp-includes.h
 ./encode_keychange.lo: ../include/net-snmp/definitions.h
-./encode_keychange.lo: ../include/net-snmp/types.h 
+./encode_keychange.lo: ../include/net-snmp/types.h
 ./encode_keychange.lo: ../include/net-snmp/library/oid.h
 ./encode_keychange.lo: ../include/net-snmp/library/types.h
 ./encode_keychange.lo: ../include/net-snmp/library/snmp_api.h
@@ -105,6 +106,7 @@
 ./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/ucd_compat.h
 ./encode_keychange.lo: ../include/net-snmp/library/mib.h
@@ -149,8 +151,8 @@
 ./encode_keychange.lo: ../include/net-snmp/library/snmptsm.h
 ./encode_keychange.lo: ../include/net-snmp/library/snmpusm.h
 ./snmpbulkget.lo: ../include/net-snmp/net-snmp-config.h
-./snmpbulkget.lo:  ../include/net-snmp/utilities.h
-./snmpbulkget.lo: ../include/net-snmp/types.h 
+./snmpbulkget.lo: ../include/net-snmp/utilities.h
+./snmpbulkget.lo: ../include/net-snmp/types.h
 ./snmpbulkget.lo: ../include/net-snmp/library/oid.h
 ./snmpbulkget.lo: ../include/net-snmp/library/types.h
 ./snmpbulkget.lo: ../include/net-snmp/definitions.h
@@ -175,6 +177,7 @@
 ./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/ucd_compat.h
 ./snmpbulkget.lo: ../include/net-snmp/library/mib.h
@@ -184,7 +187,7 @@
 ./snmpbulkget.lo: ../include/net-snmp/net-snmp-features.h
 ./snmpbulkget.lo: ../include/net-snmp/library/snmp_impl.h
 ./snmpbulkget.lo: ../include/net-snmp/library/snmp.h
-./snmpbulkget.lo: ../include/net-snmp/library/snmp-tc.h 
+./snmpbulkget.lo: ../include/net-snmp/library/snmp-tc.h
 ./snmpbulkget.lo: ../include/net-snmp/library/system.h
 ./snmpbulkget.lo: ../include/net-snmp/library/tools.h
 ./snmpbulkget.lo: ../include/net-snmp/library/int64.h
@@ -199,7 +202,7 @@
 ./snmpbulkget.lo: ../include/net-snmp/library/container_iterator.h
 ./snmpbulkget.lo: ../include/net-snmp/library/container.h
 ./snmpbulkget.lo: ../include/net-snmp/library/snmp_assert.h
-./snmpbulkget.lo: ../include/net-snmp/version.h 
+./snmpbulkget.lo: ../include/net-snmp/version.h
 ./snmpbulkget.lo: ../include/net-snmp/net-snmp-includes.h
 ./snmpbulkget.lo: ../include/net-snmp/library/getopt.h
 ./snmpbulkget.lo: ../include/net-snmp/config_api.h
@@ -220,8 +223,8 @@
 ./snmpbulkget.lo: ../include/net-snmp/library/snmpusm.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
-./snmpbulkwalk.lo: ../include/net-snmp/types.h 
+./snmpbulkwalk.lo: ../include/net-snmp/definitions.h
+./snmpbulkwalk.lo: ../include/net-snmp/types.h
 ./snmpbulkwalk.lo: ../include/net-snmp/library/oid.h
 ./snmpbulkwalk.lo: ../include/net-snmp/library/types.h
 ./snmpbulkwalk.lo: ../include/net-snmp/library/snmp_api.h
@@ -245,6 +248,7 @@
 ./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/ucd_compat.h
 ./snmpbulkwalk.lo: ../include/net-snmp/library/mib.h
@@ -288,10 +292,10 @@
 ./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
-./snmpdelta.lo: ../include/net-snmp/net-snmp-config.h 
-./snmpdelta.lo:  ../include/net-snmp/net-snmp-includes.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
-./snmpdelta.lo:  ../include/net-snmp/library/oid.h
+./snmpdelta.lo: ../include/net-snmp/library/oid.h
 ./snmpdelta.lo: ../include/net-snmp/library/types.h
 ./snmpdelta.lo: ../include/net-snmp/library/snmp_api.h
 ./snmpdelta.lo: ../include/net-snmp/varbind_api.h
@@ -314,6 +318,7 @@
 ./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/ucd_compat.h
 ./snmpdelta.lo: ../include/net-snmp/library/mib.h
@@ -357,10 +362,10 @@
 ./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
-./snmpdf.lo: ../include/net-snmp/net-snmp-config.h 
-./snmpdf.lo:  ../include/net-snmp/net-snmp-includes.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
-./snmpdf.lo:  ../include/net-snmp/library/oid.h
+./snmpdf.lo: ../include/net-snmp/library/oid.h
 ./snmpdf.lo: ../include/net-snmp/library/types.h
 ./snmpdf.lo: ../include/net-snmp/library/snmp_api.h
 ./snmpdf.lo: ../include/net-snmp/varbind_api.h
@@ -368,7 +373,7 @@
 ./snmpdf.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h
 ./snmpdf.lo: ../include/net-snmp/output_api.h
 ./snmpdf.lo: ../include/net-snmp/library/snmp_debug.h
-./snmpdf.lo: ../include/net-snmp/library/snmp_logging.h 
+./snmpdf.lo: ../include/net-snmp/library/snmp_logging.h
 ./snmpdf.lo: ../include/net-snmp/session_api.h
 ./snmpdf.lo: ../include/net-snmp/library/callback.h
 ./snmpdf.lo: ../include/net-snmp/library/snmp_transport.h
@@ -382,6 +387,7 @@
 ./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/ucd_compat.h
 ./snmpdf.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h
@@ -423,10 +429,10 @@
 ./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
-./snmpget.lo: ../include/net-snmp/net-snmp-config.h 
-./snmpget.lo:  ../include/net-snmp/utilities.h
-./snmpget.lo: ../include/net-snmp/types.h 
-./snmpget.lo:  ../include/net-snmp/library/oid.h
+./snmpget.lo: ../include/net-snmp/net-snmp-config.h
+./snmpget.lo: ../include/net-snmp/utilities.h
+./snmpget.lo: ../include/net-snmp/types.h
+./snmpget.lo: ../include/net-snmp/library/oid.h
 ./snmpget.lo: ../include/net-snmp/library/types.h
 ./snmpget.lo: ../include/net-snmp/definitions.h
 ./snmpget.lo: ../include/net-snmp/library/snmp_api.h
@@ -450,6 +456,7 @@
 ./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/ucd_compat.h
 ./snmpget.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h
@@ -458,7 +465,7 @@
 ./snmpget.lo: ../include/net-snmp/net-snmp-features.h
 ./snmpget.lo: ../include/net-snmp/library/snmp_impl.h
 ./snmpget.lo: ../include/net-snmp/library/snmp.h
-./snmpget.lo: ../include/net-snmp/library/snmp-tc.h 
+./snmpget.lo: ../include/net-snmp/library/snmp-tc.h
 ./snmpget.lo: ../include/net-snmp/library/system.h
 ./snmpget.lo: ../include/net-snmp/library/tools.h
 ./snmpget.lo: ../include/net-snmp/library/int64.h
@@ -466,7 +473,7 @@
 ./snmpget.lo: ../include/net-snmp/library/snmp_alarm.h
 ./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/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
@@ -474,7 +481,7 @@
 ./snmpget.lo: ../include/net-snmp/library/container.h
 ./snmpget.lo: ../include/net-snmp/library/snmp_assert.h
 ./snmpget.lo: ../include/net-snmp/version.h
-./snmpget.lo: ../include/net-snmp/net-snmp-includes.h 
+./snmpget.lo: ../include/net-snmp/net-snmp-includes.h
 ./snmpget.lo: ../include/net-snmp/library/getopt.h
 ./snmpget.lo: ../include/net-snmp/config_api.h
 ./snmpget.lo: ../include/net-snmp/library/read_config.h
@@ -494,8 +501,8 @@
 ./snmpget.lo: ../include/net-snmp/library/snmpusm.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
-./snmpgetnext.lo: ../include/net-snmp/types.h 
+./snmpgetnext.lo: ../include/net-snmp/definitions.h
+./snmpgetnext.lo: ../include/net-snmp/types.h
 ./snmpgetnext.lo: ../include/net-snmp/library/oid.h
 ./snmpgetnext.lo: ../include/net-snmp/library/types.h
 ./snmpgetnext.lo: ../include/net-snmp/library/snmp_api.h
@@ -519,6 +526,7 @@
 ./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/ucd_compat.h
 ./snmpgetnext.lo: ../include/net-snmp/library/mib.h
@@ -562,10 +570,10 @@
 ./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
-./snmpset.lo: ../include/net-snmp/net-snmp-config.h 
-./snmpset.lo:  ../include/net-snmp/net-snmp-includes.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
-./snmpset.lo:  ../include/net-snmp/library/oid.h
+./snmpset.lo: ../include/net-snmp/library/oid.h
 ./snmpset.lo: ../include/net-snmp/library/types.h
 ./snmpset.lo: ../include/net-snmp/library/snmp_api.h
 ./snmpset.lo: ../include/net-snmp/varbind_api.h
@@ -588,6 +596,7 @@
 ./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/ucd_compat.h
 ./snmpset.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h
@@ -629,7 +638,7 @@
 ./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
-./snmpstatus.lo: ../include/net-snmp/net-snmp-config.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
 ./snmpstatus.lo: ../include/net-snmp/library/types.h
@@ -655,6 +664,7 @@
 ./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/ucd_compat.h
 ./snmpstatus.lo: ../include/net-snmp/library/mib.h
@@ -664,7 +674,7 @@
 ./snmpstatus.lo: ../include/net-snmp/net-snmp-features.h
 ./snmpstatus.lo: ../include/net-snmp/library/snmp_impl.h
 ./snmpstatus.lo: ../include/net-snmp/library/snmp.h
-./snmpstatus.lo: ../include/net-snmp/library/snmp-tc.h 
+./snmpstatus.lo: ../include/net-snmp/library/snmp-tc.h
 ./snmpstatus.lo: ../include/net-snmp/library/system.h
 ./snmpstatus.lo: ../include/net-snmp/library/tools.h
 ./snmpstatus.lo: ../include/net-snmp/library/int64.h
@@ -698,10 +708,10 @@
 ./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
-./snmptable.lo: ../include/net-snmp/net-snmp-config.h 
-./snmptable.lo: ../include/net-snmp/net-snmp-includes.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
-./snmptable.lo:  ../include/net-snmp/library/oid.h
+./snmptable.lo: ../include/net-snmp/library/oid.h
 ./snmptable.lo: ../include/net-snmp/library/types.h
 ./snmptable.lo: ../include/net-snmp/library/snmp_api.h
 ./snmptable.lo: ../include/net-snmp/varbind_api.h
@@ -724,6 +734,7 @@
 ./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/ucd_compat.h
 ./snmptable.lo: ../include/net-snmp/library/mib.h
@@ -767,10 +778,10 @@
 ./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
-./snmptest.lo: ../include/net-snmp/net-snmp-config.h 
-./snmptest.lo:  ../include/net-snmp/net-snmp-includes.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
-./snmptest.lo:  ../include/net-snmp/library/oid.h
+./snmptest.lo: ../include/net-snmp/library/oid.h
 ./snmptest.lo: ../include/net-snmp/library/types.h
 ./snmptest.lo: ../include/net-snmp/library/snmp_api.h
 ./snmptest.lo: ../include/net-snmp/varbind_api.h
@@ -793,6 +804,7 @@
 ./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/ucd_compat.h
 ./snmptest.lo: ../include/net-snmp/library/mib.h
@@ -837,9 +849,9 @@
 ./snmptest.lo: ../include/net-snmp/library/snmpusm.h
 ./snmptls.lo: ../include/net-snmp/net-snmp-config.h
 ./snmptls.lo: ../include/net-snmp/net-snmp-features.h
-./snmptls.lo: ../include/net-snmp/net-snmp-includes.h 
-./snmptls.lo:  ../include/net-snmp/definitions.h
-./snmptls.lo: ../include/net-snmp/types.h 
+./snmptls.lo: ../include/net-snmp/net-snmp-includes.h
+./snmptls.lo: ../include/net-snmp/definitions.h
+./snmptls.lo: ../include/net-snmp/types.h
 ./snmptls.lo: ../include/net-snmp/library/oid.h
 ./snmptls.lo: ../include/net-snmp/library/types.h
 ./snmptls.lo: ../include/net-snmp/library/snmp_api.h
@@ -863,6 +875,7 @@
 ./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/ucd_compat.h
 ./snmptls.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h
@@ -947,7 +960,7 @@
 ./snmptls.lo: ../agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.h
 ./snmptranslate.lo: ../include/net-snmp/net-snmp-config.h
 ./snmptranslate.lo: ../include/net-snmp/utilities.h
-./snmptranslate.lo: ../include/net-snmp/types.h 
+./snmptranslate.lo: ../include/net-snmp/types.h
 ./snmptranslate.lo: ../include/net-snmp/library/oid.h
 ./snmptranslate.lo: ../include/net-snmp/library/types.h
 ./snmptranslate.lo: ../include/net-snmp/definitions.h
@@ -972,6 +985,7 @@
 ./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/ucd_compat.h
 ./snmptranslate.lo: ../include/net-snmp/library/mib.h
@@ -1003,10 +1017,10 @@
 ./snmptranslate.lo: ../include/net-snmp/library/snmp_parse_args.h
 ./snmptranslate.lo: ../include/net-snmp/library/snmp_enum.h
 ./snmptranslate.lo: ../include/net-snmp/library/vacm.h
-./snmptrap.lo: ../include/net-snmp/net-snmp-config.h 
-./snmptrap.lo: ../include/net-snmp/net-snmp-includes.h 
-./snmptrap.lo:  ../include/net-snmp/definitions.h
-./snmptrap.lo: ../include/net-snmp/types.h 
+./snmptrap.lo: ../include/net-snmp/net-snmp-config.h
+./snmptrap.lo: ../include/net-snmp/net-snmp-includes.h
+./snmptrap.lo: ../include/net-snmp/definitions.h
+./snmptrap.lo: ../include/net-snmp/types.h
 ./snmptrap.lo: ../include/net-snmp/library/oid.h
 ./snmptrap.lo: ../include/net-snmp/library/types.h
 ./snmptrap.lo: ../include/net-snmp/library/snmp_api.h
@@ -1030,6 +1044,7 @@
 ./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/ucd_compat.h
 ./snmptrap.lo: ../include/net-snmp/library/mib.h
@@ -1075,7 +1090,7 @@
 ./snmptrapd_auth.lo: ../include/net-snmp/net-snmp-config.h
 ./snmptrapd_auth.lo: ../include/net-snmp/net-snmp-includes.h
 ./snmptrapd_auth.lo: ../include/net-snmp/definitions.h
-./snmptrapd_auth.lo: ../include/net-snmp/types.h 
+./snmptrapd_auth.lo: ../include/net-snmp/types.h
 ./snmptrapd_auth.lo: ../include/net-snmp/library/oid.h
 ./snmptrapd_auth.lo: ../include/net-snmp/library/types.h
 ./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_api.h
@@ -1099,6 +1114,7 @@
 ./snmptrapd_auth.lo: ../include/net-snmp/library/snmpTCPDomain.h
 ./snmptrapd_auth.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./snmptrapd_auth.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h
+./snmptrapd_auth.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./snmptrapd_auth.lo: ../include/net-snmp/library/snmpIPXDomain.h
 ./snmptrapd_auth.lo: ../include/net-snmp/library/ucd_compat.h
 ./snmptrapd_auth.lo: ../include/net-snmp/library/mib.h
@@ -1147,10 +1163,10 @@
 ./snmptrapd_auth.lo: ../include/net-snmp/agent/mib_module_config.h
 ./snmptrapd_auth.lo: ../agent/mibgroup/mibII/vacm_conf.h
 ./snmptrapd_auth.lo: ../include/net-snmp/agent/agent_trap.h
-./snmptrapd.lo: ../include/net-snmp/net-snmp-config.h 
-./snmptrapd.lo: ../include/net-snmp/net-snmp-includes.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
-./snmptrapd.lo:  ../include/net-snmp/library/oid.h
+./snmptrapd.lo: ../include/net-snmp/library/oid.h
 ./snmptrapd.lo: ../include/net-snmp/library/types.h
 ./snmptrapd.lo: ../include/net-snmp/library/snmp_api.h
 ./snmptrapd.lo: ../include/net-snmp/varbind_api.h
@@ -1173,6 +1189,7 @@
 ./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/ucd_compat.h
 ./snmptrapd.lo: ../include/net-snmp/library/mib.h
@@ -1261,7 +1278,7 @@
 ./snmptrapd_handlers.lo: ../include/net-snmp/net-snmp-config.h
 ./snmptrapd_handlers.lo: ../include/net-snmp/net-snmp-features.h
 ./snmptrapd_handlers.lo: ../include/net-snmp/config_api.h
-./snmptrapd_handlers.lo: ../include/net-snmp/types.h 
+./snmptrapd_handlers.lo: ../include/net-snmp/types.h
 ./snmptrapd_handlers.lo: ../include/net-snmp/library/oid.h
 ./snmptrapd_handlers.lo: ../include/net-snmp/library/types.h
 ./snmptrapd_handlers.lo: ../include/net-snmp/definitions.h
@@ -1286,6 +1303,7 @@
 ./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/ucd_compat.h
 ./snmptrapd_handlers.lo: ../include/net-snmp/library/mib.h
@@ -1371,8 +1389,8 @@
 ./snmptrapd_handlers.lo: ../agent/mibgroup/notification-log-mib/notification_log.h
 ./snmptrapd_log.lo: ../include/net-snmp/net-snmp-config.h
 ./snmptrapd_log.lo: ../include/net-snmp/net-snmp-includes.h
-./snmptrapd_log.lo:  ../include/net-snmp/definitions.h
-./snmptrapd_log.lo: ../include/net-snmp/types.h 
+./snmptrapd_log.lo: ../include/net-snmp/definitions.h
+./snmptrapd_log.lo: ../include/net-snmp/types.h
 ./snmptrapd_log.lo: ../include/net-snmp/library/oid.h
 ./snmptrapd_log.lo: ../include/net-snmp/library/types.h
 ./snmptrapd_log.lo: ../include/net-snmp/library/snmp_api.h
@@ -1396,6 +1414,7 @@
 ./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/ucd_compat.h
 ./snmptrapd_log.lo: ../include/net-snmp/library/mib.h
@@ -1442,10 +1461,10 @@
 ./snmptrapd_log.lo: snmptrapd_ds.h
 ./snmptrapd_sql.lo: ../include/net-snmp/net-snmp-config.h
 ./snmptrapd_sql.lo: ../include/net-snmp/net-snmp-features.h
-./snmpusm.lo: ../include/net-snmp/net-snmp-config.h 
-./snmpusm.lo:  ../include/net-snmp/net-snmp-includes.h
+./snmpusm.lo: ../include/net-snmp/net-snmp-config.h
+./snmpusm.lo: ../include/net-snmp/net-snmp-includes.h
 ./snmpusm.lo: ../include/net-snmp/definitions.h ../include/net-snmp/types.h
-./snmpusm.lo:  ../include/net-snmp/library/oid.h
+./snmpusm.lo: ../include/net-snmp/library/oid.h
 ./snmpusm.lo: ../include/net-snmp/library/types.h
 ./snmpusm.lo: ../include/net-snmp/library/snmp_api.h
 ./snmpusm.lo: ../include/net-snmp/varbind_api.h
@@ -1468,6 +1487,7 @@
 ./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/ucd_compat.h
 ./snmpusm.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h
@@ -1509,10 +1529,10 @@
 ./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
-./snmpvacm.lo: ../include/net-snmp/net-snmp-config.h 
-./snmpvacm.lo:  ../include/net-snmp/net-snmp-includes.h
+./snmpvacm.lo: ../include/net-snmp/net-snmp-config.h
+./snmpvacm.lo: ../include/net-snmp/net-snmp-includes.h
 ./snmpvacm.lo: ../include/net-snmp/definitions.h ../include/net-snmp/types.h
-./snmpvacm.lo:  ../include/net-snmp/library/oid.h
+./snmpvacm.lo: ../include/net-snmp/library/oid.h
 ./snmpvacm.lo: ../include/net-snmp/library/types.h
 ./snmpvacm.lo: ../include/net-snmp/library/snmp_api.h
 ./snmpvacm.lo: ../include/net-snmp/varbind_api.h
@@ -1535,6 +1555,7 @@
 ./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/ucd_compat.h
 ./snmpvacm.lo: ../include/net-snmp/library/mib.h
@@ -1577,10 +1598,10 @@
 ./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
-./snmpwalk.lo: ../include/net-snmp/net-snmp-config.h 
-./snmpwalk.lo: ../include/net-snmp/net-snmp-includes.h 
-./snmpwalk.lo:  ../include/net-snmp/definitions.h
-./snmpwalk.lo: ../include/net-snmp/types.h 
+./snmpwalk.lo: ../include/net-snmp/net-snmp-config.h
+./snmpwalk.lo: ../include/net-snmp/net-snmp-includes.h
+./snmpwalk.lo: ../include/net-snmp/definitions.h
+./snmpwalk.lo: ../include/net-snmp/types.h
 ./snmpwalk.lo: ../include/net-snmp/library/oid.h
 ./snmpwalk.lo: ../include/net-snmp/library/types.h
 ./snmpwalk.lo: ../include/net-snmp/library/snmp_api.h
@@ -1604,6 +1625,7 @@
 ./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/ucd_compat.h
 ./snmpwalk.lo: ../include/net-snmp/library/mib.h
@@ -1650,7 +1672,7 @@
 ./snmpnetstat/if.lo: ../include/net-snmp/net-snmp-config.h
 ./snmpnetstat/if.lo: ../include/net-snmp/net-snmp-includes.h
 ./snmpnetstat/if.lo: ../include/net-snmp/definitions.h
-./snmpnetstat/if.lo: ../include/net-snmp/types.h 
+./snmpnetstat/if.lo: ../include/net-snmp/types.h
 ./snmpnetstat/if.lo: ../include/net-snmp/library/oid.h
 ./snmpnetstat/if.lo: ../include/net-snmp/library/types.h
 ./snmpnetstat/if.lo: ../include/net-snmp/library/snmp_api.h
@@ -1674,6 +1696,7 @@
 ./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/ucd_compat.h
 ./snmpnetstat/if.lo: ../include/net-snmp/library/mib.h
@@ -1717,12 +1740,12 @@
 ./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:  ./snmpnetstat/main.h
+./snmpnetstat/if.lo: ./snmpnetstat/main.h
 ./snmpnetstat/if.lo: ./snmpnetstat/netstat.h
 ./snmpnetstat/inet6.lo: ../include/net-snmp/net-snmp-config.h
 ./snmpnetstat/inet6.lo: ../include/net-snmp/net-snmp-includes.h
 ./snmpnetstat/inet6.lo: ../include/net-snmp/definitions.h
-./snmpnetstat/inet6.lo: ../include/net-snmp/types.h 
+./snmpnetstat/inet6.lo: ../include/net-snmp/types.h
 ./snmpnetstat/inet6.lo: ../include/net-snmp/library/oid.h
 ./snmpnetstat/inet6.lo: ../include/net-snmp/library/types.h
 ./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_api.h
@@ -1746,6 +1769,7 @@
 ./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpTCPDomain.h
 ./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h
+./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpIPXDomain.h
 ./snmpnetstat/inet6.lo: ../include/net-snmp/library/ucd_compat.h
 ./snmpnetstat/inet6.lo: ../include/net-snmp/library/mib.h
@@ -1793,7 +1817,7 @@
 ./snmpnetstat/inet.lo: ../include/net-snmp/net-snmp-config.h
 ./snmpnetstat/inet.lo: ../include/net-snmp/net-snmp-includes.h
 ./snmpnetstat/inet.lo: ../include/net-snmp/definitions.h
-./snmpnetstat/inet.lo: ../include/net-snmp/types.h 
+./snmpnetstat/inet.lo: ../include/net-snmp/types.h
 ./snmpnetstat/inet.lo: ../include/net-snmp/library/oid.h
 ./snmpnetstat/inet.lo: ../include/net-snmp/library/types.h
 ./snmpnetstat/inet.lo: ../include/net-snmp/library/snmp_api.h
@@ -1817,6 +1841,7 @@
 ./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/ucd_compat.h
 ./snmpnetstat/inet.lo: ../include/net-snmp/library/mib.h
@@ -1861,10 +1886,82 @@
 ./snmpnetstat/inet.lo: ../include/net-snmp/library/snmptsm.h
 ./snmpnetstat/inet.lo: ../include/net-snmp/library/snmpusm.h
 ./snmpnetstat/inet.lo: ./snmpnetstat/main.h ./snmpnetstat/netstat.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/net-snmp-config.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/net-snmp-includes.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/definitions.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/types.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/oid.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/types.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmp_api.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/varbind_api.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmp_client.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/pdu_api.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/asn1.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/output_api.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmp_debug.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmp_logging.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/session_api.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/callback.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmp_transport.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmp_service.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmpCallbackDomain.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmpUnixDomain.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmpUDPDomain.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h
+./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/ucd_compat.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/mib.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/mib_api.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/parse.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/oid_stash.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/net-snmp-features.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmp_impl.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmp.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmp-tc.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/getopt.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/utilities.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/system.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/tools.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/int64.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/mt_support.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmp_alarm.h
+./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
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/container.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmp_assert.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/version.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/config_api.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/read_config.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/default_store.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmp_parse_args.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmp_enum.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/vacm.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/snmpv3_api.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmpv3.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/transform_oids.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/keytools.h
+./snmpnetstat/inetx.lo: ../include/net-snmp/library/scapi.h
+./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: ./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
 ./snmpnetstat/main.lo: ../include/net-snmp/definitions.h
-./snmpnetstat/main.lo: ../include/net-snmp/types.h 
+./snmpnetstat/main.lo: ../include/net-snmp/types.h
 ./snmpnetstat/main.lo: ../include/net-snmp/library/oid.h
 ./snmpnetstat/main.lo: ../include/net-snmp/library/types.h
 ./snmpnetstat/main.lo: ../include/net-snmp/library/snmp_api.h
@@ -1888,6 +1985,7 @@
 ./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/ucd_compat.h
 ./snmpnetstat/main.lo: ../include/net-snmp/library/mib.h
@@ -1935,7 +2033,7 @@
 ./snmpnetstat/route.lo: ../include/net-snmp/net-snmp-config.h
 ./snmpnetstat/route.lo: ../include/net-snmp/net-snmp-includes.h
 ./snmpnetstat/route.lo: ../include/net-snmp/definitions.h
-./snmpnetstat/route.lo: ../include/net-snmp/types.h 
+./snmpnetstat/route.lo: ../include/net-snmp/types.h
 ./snmpnetstat/route.lo: ../include/net-snmp/library/oid.h
 ./snmpnetstat/route.lo: ../include/net-snmp/library/types.h
 ./snmpnetstat/route.lo: ../include/net-snmp/library/snmp_api.h
@@ -1959,6 +2057,7 @@
 ./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/ucd_compat.h
 ./snmpnetstat/route.lo: ../include/net-snmp/library/mib.h
@@ -2003,10 +2102,82 @@
 ./snmpnetstat/route.lo: ../include/net-snmp/library/snmptsm.h
 ./snmpnetstat/route.lo: ../include/net-snmp/library/snmpusm.h
 ./snmpnetstat/route.lo: ./snmpnetstat/main.h ./snmpnetstat/netstat.h
+./snmpnetstat/routex.lo: ../include/net-snmp/net-snmp-config.h
+./snmpnetstat/routex.lo: ../include/net-snmp/net-snmp-includes.h
+./snmpnetstat/routex.lo: ../include/net-snmp/definitions.h
+./snmpnetstat/routex.lo: ../include/net-snmp/types.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/oid.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/types.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/snmp_api.h
+./snmpnetstat/routex.lo: ../include/net-snmp/varbind_api.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/snmp_client.h
+./snmpnetstat/routex.lo: ../include/net-snmp/pdu_api.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/asn1.h
+./snmpnetstat/routex.lo: ../include/net-snmp/output_api.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/snmp_debug.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/snmp_logging.h
+./snmpnetstat/routex.lo: ../include/net-snmp/session_api.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/callback.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/snmp_transport.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/snmp_service.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/snmpCallbackDomain.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/snmpUnixDomain.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/snmpUDPDomain.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h
+./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/ucd_compat.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/mib.h
+./snmpnetstat/routex.lo: ../include/net-snmp/mib_api.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/parse.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/oid_stash.h
+./snmpnetstat/routex.lo: ../include/net-snmp/net-snmp-features.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/snmp_impl.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/snmp.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/snmp-tc.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/getopt.h
+./snmpnetstat/routex.lo: ../include/net-snmp/utilities.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/system.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/tools.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/int64.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/mt_support.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/snmp_alarm.h
+./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
+./snmpnetstat/routex.lo: ../include/net-snmp/library/container.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/snmp_assert.h
+./snmpnetstat/routex.lo: ../include/net-snmp/version.h
+./snmpnetstat/routex.lo: ../include/net-snmp/config_api.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/read_config.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/default_store.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/snmp_parse_args.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/snmp_enum.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/vacm.h
+./snmpnetstat/routex.lo: ../include/net-snmp/snmpv3_api.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/snmpv3.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/transform_oids.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/keytools.h
+./snmpnetstat/routex.lo: ../include/net-snmp/library/scapi.h
+./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: ./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
 ./snmpnetstat/winstub.lo: ../include/net-snmp/definitions.h
-./snmpnetstat/winstub.lo: ../include/net-snmp/types.h 
+./snmpnetstat/winstub.lo: ../include/net-snmp/types.h
 ./snmpnetstat/winstub.lo: ../include/net-snmp/library/oid.h
 ./snmpnetstat/winstub.lo: ../include/net-snmp/library/types.h
 ./snmpnetstat/winstub.lo: ../include/net-snmp/library/snmp_api.h
@@ -2030,6 +2201,7 @@
 ./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/ucd_compat.h
 ./snmpnetstat/winstub.lo: ../include/net-snmp/library/mib.h
diff --git a/apps/agentxtrap.c b/apps/agentxtrap.c
index f366f61..4df423c 100644
--- a/apps/agentxtrap.c
+++ b/apps/agentxtrap.c
@@ -45,9 +45,9 @@ usage(const char* progname)
     fprintf(stderr,
             "  -h\t\t\tdisplay this help message\n"
             "  -V\t\t\tdisplay package version number\n"
-            "  -m MIB[:...]\t\tload given list of MIBs (ALL loads "
+            "  -m MIB[" ENV_SEPARATOR "...]\t\tload given list of MIBs (ALL loads "
             "everything)\n"
-            "  -M DIR[:...]\t\tlook in given list of directories for MIBs\n"
+            "  -M DIR[" ENV_SEPARATOR "...]\t\tlook in given list of directories for MIBs\n"
             "  -D[TOKEN[,...]]\tturn on debugging output for the specified "
             "TOKENs\n"
             "\t\t\t   (ALL gives extremely verbose debugging output)\n"
@@ -232,12 +232,12 @@ ConnectingEntry(UNUSED tState self)
     if(!(t = netsnmp_transport_open_client(
              "agentx", netsnmp_ds_get_string(
                  NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_X_SOCKET)))) {
-        snmp_perror("Failed to connect to AgentX server");
+        snmp_log(LOG_ERR, "Failed to connect to AgentX server\n");
         change_state(&Exit);
     } else if(!(sess = snmp_sess_add_ex(
                     &init, t, NULL, agentx_parse, NULL, NULL,
                     agentx_realloc_build, agentx_check_packet, NULL))) {
-        snmp_perror("Failed to create session");
+      snmp_log(LOG_ERR, "Failed to create session\n");
         change_state(&Exit);
     } else {
         sessp = sess;
@@ -294,7 +294,7 @@ OpeningRes(UNUSED tState self, netsnmp_pdu *act)
         session = act->sessid;
         change_state(&Notifying);
     } else {
-        snmp_perror("Failed to open session");
+        snmp_log(LOG_ERR, "Failed to open session");
         change_state(&Exit);
     }
 }
@@ -329,7 +329,7 @@ NotifyingRes(UNUSED tState self, netsnmp_pdu *act)
     if(act->errstat == AGENTX_ERR_NOERROR)
         result = 0;
     else
-        snmp_perror("Failed to send notification");
+        snmp_log(LOG_ERR, "Failed to send notification");
     /** \todo: Retry handling --- ClosingReconnect??? */
     change_state(&Closing);
 }
@@ -440,6 +440,11 @@ main(int argc, char *argv[])
 
     putenv(strdup("POSIXLY_CORRECT=1"));
 
+    netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
+			   NETSNMP_DS_LIB_DISABLE_PERSISTENT_LOAD, 1);
+    netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
+			   NETSNMP_DS_LIB_DISABLE_PERSISTENT_SAVE, 1);
+
     while ((arg = getopt(argc, argv, ":Vhm:M:D:dP:L:U:c:x:")) != -1) {
         switch (arg) {
         case 'h':
diff --git a/apps/snmpdf.c b/apps/snmpdf.c
index 6a5ef19..144a505 100644
--- a/apps/snmpdf.c
+++ b/apps/snmpdf.c
@@ -87,9 +87,14 @@ usage(void)
             "\t-Cu\tUse UCD-SNMP dskTable to do the calculations.\n");
     fprintf(stderr,
             "\t\t[Normally the HOST-RESOURCES-MIB is consulted first.]\n");
+    fprintf(stderr,
+            "\t-Ch\tPrint using human readable format (MiB, GiB, TiB)\n");
+    fprintf(stderr,
+            "\t-CH\tPrint using human readable SI format (MB, GB, TB)\n");
 }
 
 int             ucd_mib = 0;
+int             human_units = 0;
 
 static void
 optProc(int argc, char *const *argv, int opt)
@@ -101,6 +106,12 @@ optProc(int argc, char *const *argv, int opt)
             case 'u':
                 ucd_mib = 1;
                 break;
+            case 'h':
+                human_units = 1024;
+                break;
+            case 'H':
+                human_units = 1000;
+                break;
             default:
                 fprintf(stderr,
                         "Unknown flag passed to -C: %c\n", optarg[-1]);
@@ -166,15 +177,18 @@ collect(netsnmp_session * ss, netsnmp_pdu *pdu,
             exit(1);
         }
         if (response->errstat != SNMP_ERR_NOERROR) {
-	    fprintf(stderr, "snmpdf: Error in packet: %s\n",
+            fprintf(stderr, "snmpdf: Error in packet: %s\n",
                     snmp_errstring(response->errstat));
             exit(1);
         }
-        if (response && snmp_oid_compare(response->variables->name,
-                                         SNMP_MIN(base_length,
-                                                  response->variables->
-                                                  name_length), base,
-                                         base_length) != 0)
+        if (snmp_oid_compare(response->variables->name,
+                             SNMP_MIN(base_length,
+                                      response->variables->name_length),
+                             base, base_length) != 0)
+            running = 0;
+        else if (response->variables->type == SNMP_NOSUCHINSTANCE ||
+                 response->variables->type == SNMP_NOSUCHOBJECT ||
+                 response->variables->type == SNMP_ENDOFMIBVIEW)
             running = 0;
         else {
             /*
@@ -200,6 +214,27 @@ collect(netsnmp_session * ss, netsnmp_pdu *pdu,
     return saved;
 }
 
+
+
+char *format_human(char *buf, size_t len, unsigned long mem, unsigned long scale)
+{
+    if (mem >= scale*scale*scale*scale)
+        snprintf(buf, len, "%4.2fP%sB", (float)mem/(scale*scale*scale*scale),
+		scale == 1024 ? "i" : "");
+    else if (mem >= scale*scale*scale)
+        snprintf(buf, len, "%4.2fT%sB", (float)mem/(scale*scale*scale),
+		scale == 1024 ? "i" : "");
+    else if (mem >= scale*scale)
+        snprintf(buf, len, "%4.2fG%sB", (float)mem/(scale*scale),
+		scale == 1024 ? "i" : "");
+    else if (mem >= scale)
+        snprintf(buf, len, "%4.2fM%sB", (float)mem/scale,
+		scale == 1024 ? "i" : "");
+    else
+        snprintf(buf, len, "%4.2fkB", (float)mem);
+    return buf;
+}
+
 /* Computes value*units/divisor in an overflow-proof way.
  */
 unsigned long
@@ -257,8 +292,14 @@ main(int argc, char *argv[])
         exit(1);
     }
 
-    printf("%-18s %15s %15s %15s %5s\n", "Description", "size (kB)",
+    if (human_units) {
+        printf("%-18s %10s %10s %10s %5s\n", "Description", "Size",
            "Used", "Available", "Used%");
+    }
+    else {
+        printf("%-18s %15s %15s %15s %5s\n", "Description", "Size (kB)",
+           "Used", "Available", "Used%");
+    }
     if (ucd_mib == 0) {
         /*
          * * Begin by finding all the storage pieces that are of
@@ -275,7 +316,7 @@ main(int argc, char *argv[])
             size_t          units;
             unsigned long   hssize, hsused;
             char            descr[SPRINT_MAX_LEN];
-	    int             len;
+            int             len;
 
             pdu = snmp_pdu_create(SNMP_MSG_GET);
 
@@ -295,27 +336,46 @@ main(int argc, char *argv[])
             }
 
             vlp2 = response->variables;
-	    len = vlp2->val_len;
-	    if (len >= SPRINT_MAX_LEN) len = SPRINT_MAX_LEN-1;
+            if (vlp2->type == SNMP_NOSUCHINSTANCE) goto next;
+            len = vlp2->val_len;
+            if (len >= SPRINT_MAX_LEN) len = SPRINT_MAX_LEN-1;
             memcpy(descr, vlp2->val.string, len);
             descr[len] = '\0';
 
             vlp2 = vlp2->next_variable;
+            if (vlp2->type == SNMP_NOSUCHINSTANCE) goto next;
             units = vlp2->val.integer ? *(vlp2->val.integer) : 0;
 
             vlp2 = vlp2->next_variable;
+            if (vlp2->type == SNMP_NOSUCHINSTANCE) goto next;
             hssize = vlp2->val.integer ? *(vlp2->val.integer) : 0;
 
             vlp2 = vlp2->next_variable;
+            if (vlp2->type == SNMP_NOSUCHINSTANCE) goto next;
             hsused = vlp2->val.integer ? *(vlp2->val.integer) : 0;
 
-            printf("%-18s %15lu %15lu %15lu %4lu%%\n", descr,
-                   units ? convert_units(hssize, units, 1024) : hssize,
-                   units ? convert_units(hsused, units, 1024) : hsused,
-                   units ? convert_units(hssize-hsused, units, 1024) : hssize -
-                   hsused, hssize ? convert_units(hsused, 100, hssize) :
-                   hsused);
+            if (human_units) {
+                char size[10], used[10], avail[10];
+                printf("%-18s %10s %10s %10s %4lu%%\n", descr,
+                    format_human(size, sizeof size,
+                        units ? convert_units(hssize, units, 1024) : hssize, human_units),
+                    format_human(used, sizeof used,
+                        units ? convert_units(hsused, units, 1024) : hsused, human_units),
+                    format_human(avail, sizeof avail,
+                        units ? convert_units(hssize-hsused, units, 1024) : hssize -
+                    hsused, human_units),
+                    hssize ? convert_units(hsused, 100, hssize) : hsused);
+            }
+            else {
+                printf("%-18s %15lu %15lu %15lu %4lu%%\n", descr,
+                    units ? convert_units(hssize, units, 1024) : hssize,
+                    units ? convert_units(hsused, units, 1024) : hsused,
+                    units ? convert_units(hssize-hsused, units, 1024) : hssize -
+                    hsused,
+                    hssize ? convert_units(hsused, 100, hssize) : hsused);
+            }
 
+        next:
             vlp = vlp->next_variable;
             snmp_free_pdu(response);
             count++;
@@ -323,7 +383,6 @@ main(int argc, char *argv[])
     }
 
     if (count == 0) {
-        size_t          units = 0;
         /*
          * the host resources mib must not be supported.  Lets try the
          * UCD-SNMP-MIB and its dskTable 
@@ -338,6 +397,7 @@ main(int argc, char *argv[])
         while (vlp) {
             unsigned long   hssize, hsused;
             char            descr[SPRINT_MAX_LEN];
+            int             len;
 
             pdu = snmp_pdu_create(SNMP_MSG_GET);
 
@@ -355,22 +415,35 @@ main(int argc, char *argv[])
             }
 
             vlp2 = response->variables;
-            memcpy(descr, vlp2->val.string, vlp2->val_len);
-            descr[vlp2->val_len] = '\0';
+            if (vlp2->type == SNMP_NOSUCHINSTANCE) goto next2;
+            len = vlp2->val_len;
+            if (len >= SPRINT_MAX_LEN) len = SPRINT_MAX_LEN-1;
+            memcpy(descr, vlp2->val.string, len);
+            descr[len] = '\0';
 
             vlp2 = vlp2->next_variable;
+            if (vlp2->type == SNMP_NOSUCHINSTANCE) goto next2;
             hssize = *(vlp2->val.integer);
 
             vlp2 = vlp2->next_variable;
+            if (vlp2->type == SNMP_NOSUCHINSTANCE) goto next2;
             hsused = *(vlp2->val.integer);
 
-            printf("%-18s %15lu %15lu %15lu %4lu%%\n", descr,
-                   units ? convert_units(hssize, units, 1024) : hssize,
-                   units ? convert_units(hsused, units, 1024) : hsused,
-                   units ? convert_units(hssize-hsused, units, 1024) : hssize -
-                   hsused, hssize ? convert_units(hsused, 100, hssize) :
-                   hsused);
+            if (human_units) {
+                char size[10], used[10], avail[10];
+                printf("%-18s %10s %10s %10s %4lu%%\n", descr,
+                    format_human(size, sizeof size, hssize, human_units),
+                    format_human(used, sizeof used, hsused, human_units),
+                    format_human(avail, sizeof avail, hssize - hsused, human_units),
+                    hssize ? convert_units(hsused, 100, hssize) : hsused);
+            }
+            else {
+                printf("%-18s %15lu %15lu %15lu %4lu%%\n", descr,
+                     hssize, hsused, hssize - hsused,
+                     hssize ? convert_units(hsused, 100, hssize) : hsused);
+            }
 
+        next2:
             vlp = vlp->next_variable;
             snmp_free_pdu(response);
             count++;
diff --git a/apps/snmpnetstat/Makefile.depend b/apps/snmpnetstat/Makefile.depend
index 3848e49..c4728a0 100644
--- a/apps/snmpnetstat/Makefile.depend
+++ b/apps/snmpnetstat/Makefile.depend
@@ -4,9 +4,9 @@
 ./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/net-snmp-includes.h 
+./if.lo: ../../include/net-snmp/net-snmp-includes.h
 ./if.lo: ../../include/net-snmp/definitions.h ../../include/net-snmp/types.h
-./if.lo:  ../../include/net-snmp/library/oid.h
+./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
 ./if.lo: ../../include/net-snmp/varbind_api.h
@@ -15,20 +15,21 @@
 ./if.lo: ../../include/net-snmp/library/asn1.h
 ./if.lo: ../../include/net-snmp/output_api.h
 ./if.lo: ../../include/net-snmp/library/snmp_debug.h
-./if.lo: ../../include/net-snmp/library/snmp_logging.h 
+./if.lo: ../../include/net-snmp/library/snmp_logging.h
 ./if.lo: ../../include/net-snmp/session_api.h
 ./if.lo: ../../include/net-snmp/library/callback.h
 ./if.lo: ../../include/net-snmp/library/snmp_transport.h
 ./if.lo: ../../include/net-snmp/library/snmp_service.h
 ./if.lo: ../../include/net-snmp/library/snmpCallbackDomain.h
 ./if.lo: ../../include/net-snmp/library/snmpUnixDomain.h
-./if.lo:  ../../include/net-snmp/library/snmpUDPDomain.h
+./if.lo: ../../include/net-snmp/library/snmpUDPDomain.h
 ./if.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h
 ./if.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h
 ./if.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h
 ./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/ucd_compat.h
 ./if.lo: ../../include/net-snmp/library/mib.h
@@ -71,13 +72,13 @@
 ./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
+./if.lo: ../../include/net-snmp/library/snmpusm.h
+./if.lo: main.h
 ./if.lo: netstat.h
 ./inet6.lo: ../../include/net-snmp/net-snmp-config.h
-./inet6.lo: ../../include/net-snmp/net-snmp-includes.h 
-./inet6.lo:  ../../include/net-snmp/definitions.h
-./inet6.lo: ../../include/net-snmp/types.h 
+./inet6.lo: ../../include/net-snmp/net-snmp-includes.h
+./inet6.lo: ../../include/net-snmp/definitions.h
+./inet6.lo: ../../include/net-snmp/types.h
 ./inet6.lo: ../../include/net-snmp/library/oid.h
 ./inet6.lo: ../../include/net-snmp/library/types.h
 ./inet6.lo: ../../include/net-snmp/library/snmp_api.h
@@ -101,6 +102,7 @@
 ./inet6.lo: ../../include/net-snmp/library/snmpTCPDomain.h
 ./inet6.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./inet6.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h
+./inet6.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./inet6.lo: ../../include/net-snmp/library/snmpIPXDomain.h
 ./inet6.lo: ../../include/net-snmp/library/ucd_compat.h
 ./inet6.lo: ../../include/net-snmp/library/mib.h
@@ -145,9 +147,9 @@
 ./inet6.lo: ../../include/net-snmp/library/snmptsm.h
 ./inet6.lo: ../../include/net-snmp/library/snmpusm.h main.h netstat.h
 ./inet.lo: ../../include/net-snmp/net-snmp-config.h
-./inet.lo: ../../include/net-snmp/net-snmp-includes.h 
+./inet.lo: ../../include/net-snmp/net-snmp-includes.h
 ./inet.lo: ../../include/net-snmp/definitions.h
-./inet.lo: ../../include/net-snmp/types.h 
+./inet.lo: ../../include/net-snmp/types.h
 ./inet.lo: ../../include/net-snmp/library/oid.h
 ./inet.lo: ../../include/net-snmp/library/types.h
 ./inet.lo: ../../include/net-snmp/library/snmp_api.h
@@ -171,6 +173,7 @@
 ./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/ucd_compat.h
 ./inet.lo: ../../include/net-snmp/library/mib.h
@@ -214,10 +217,81 @@
 ./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
+./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
+./inetx.lo: ../../include/net-snmp/types.h
+./inetx.lo: ../../include/net-snmp/library/oid.h
+./inetx.lo: ../../include/net-snmp/library/types.h
+./inetx.lo: ../../include/net-snmp/library/snmp_api.h
+./inetx.lo: ../../include/net-snmp/varbind_api.h
+./inetx.lo: ../../include/net-snmp/library/snmp_client.h
+./inetx.lo: ../../include/net-snmp/pdu_api.h
+./inetx.lo: ../../include/net-snmp/library/asn1.h
+./inetx.lo: ../../include/net-snmp/output_api.h
+./inetx.lo: ../../include/net-snmp/library/snmp_debug.h
+./inetx.lo: ../../include/net-snmp/library/snmp_logging.h
+./inetx.lo: ../../include/net-snmp/session_api.h
+./inetx.lo: ../../include/net-snmp/library/callback.h
+./inetx.lo: ../../include/net-snmp/library/snmp_transport.h
+./inetx.lo: ../../include/net-snmp/library/snmp_service.h
+./inetx.lo: ../../include/net-snmp/library/snmpCallbackDomain.h
+./inetx.lo: ../../include/net-snmp/library/snmpUnixDomain.h
+./inetx.lo: ../../include/net-snmp/library/snmpUDPDomain.h
+./inetx.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h
+./inetx.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h
+./inetx.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h
+./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/ucd_compat.h
+./inetx.lo: ../../include/net-snmp/library/mib.h
+./inetx.lo: ../../include/net-snmp/mib_api.h
+./inetx.lo: ../../include/net-snmp/library/parse.h
+./inetx.lo: ../../include/net-snmp/library/oid_stash.h
+./inetx.lo: ../../include/net-snmp/net-snmp-features.h
+./inetx.lo: ../../include/net-snmp/library/snmp_impl.h
+./inetx.lo: ../../include/net-snmp/library/snmp.h
+./inetx.lo: ../../include/net-snmp/library/snmp-tc.h
+./inetx.lo: ../../include/net-snmp/library/getopt.h
+./inetx.lo: ../../include/net-snmp/utilities.h
+./inetx.lo: ../../include/net-snmp/library/system.h
+./inetx.lo: ../../include/net-snmp/library/tools.h
+./inetx.lo: ../../include/net-snmp/library/int64.h
+./inetx.lo: ../../include/net-snmp/library/mt_support.h
+./inetx.lo: ../../include/net-snmp/library/snmp_alarm.h
+./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
+./inetx.lo: ../../include/net-snmp/library/container.h
+./inetx.lo: ../../include/net-snmp/library/snmp_assert.h
+./inetx.lo: ../../include/net-snmp/version.h
+./inetx.lo: ../../include/net-snmp/config_api.h
+./inetx.lo: ../../include/net-snmp/library/read_config.h
+./inetx.lo: ../../include/net-snmp/library/default_store.h
+./inetx.lo: ../../include/net-snmp/library/snmp_parse_args.h
+./inetx.lo: ../../include/net-snmp/library/snmp_enum.h
+./inetx.lo: ../../include/net-snmp/library/vacm.h
+./inetx.lo: ../../include/net-snmp/snmpv3_api.h
+./inetx.lo: ../../include/net-snmp/library/snmpv3.h
+./inetx.lo: ../../include/net-snmp/library/transform_oids.h
+./inetx.lo: ../../include/net-snmp/library/keytools.h
+./inetx.lo: ../../include/net-snmp/library/scapi.h
+./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
 ./main.lo: ../../include/net-snmp/net-snmp-config.h
-./main.lo: ../../include/net-snmp/net-snmp-includes.h 
+./main.lo: ../../include/net-snmp/net-snmp-includes.h
 ./main.lo: ../../include/net-snmp/definitions.h
-./main.lo: ../../include/net-snmp/types.h 
+./main.lo: ../../include/net-snmp/types.h
 ./main.lo: ../../include/net-snmp/library/oid.h
 ./main.lo: ../../include/net-snmp/library/types.h
 ./main.lo: ../../include/net-snmp/library/snmp_api.h
@@ -241,6 +315,7 @@
 ./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/ucd_compat.h
 ./main.lo: ../../include/net-snmp/library/mib.h
@@ -285,9 +360,9 @@
 ./main.lo: ../../include/net-snmp/library/snmptsm.h
 ./main.lo: ../../include/net-snmp/library/snmpusm.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
-./route.lo: ../../include/net-snmp/types.h 
+./route.lo: ../../include/net-snmp/net-snmp-includes.h
+./route.lo: ../../include/net-snmp/definitions.h
+./route.lo: ../../include/net-snmp/types.h
 ./route.lo: ../../include/net-snmp/library/oid.h
 ./route.lo: ../../include/net-snmp/library/types.h
 ./route.lo: ../../include/net-snmp/library/snmp_api.h
@@ -311,6 +386,7 @@
 ./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/ucd_compat.h
 ./route.lo: ../../include/net-snmp/library/mib.h
@@ -354,10 +430,81 @@
 ./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
+./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
+./routex.lo: ../../include/net-snmp/types.h
+./routex.lo: ../../include/net-snmp/library/oid.h
+./routex.lo: ../../include/net-snmp/library/types.h
+./routex.lo: ../../include/net-snmp/library/snmp_api.h
+./routex.lo: ../../include/net-snmp/varbind_api.h
+./routex.lo: ../../include/net-snmp/library/snmp_client.h
+./routex.lo: ../../include/net-snmp/pdu_api.h
+./routex.lo: ../../include/net-snmp/library/asn1.h
+./routex.lo: ../../include/net-snmp/output_api.h
+./routex.lo: ../../include/net-snmp/library/snmp_debug.h
+./routex.lo: ../../include/net-snmp/library/snmp_logging.h
+./routex.lo: ../../include/net-snmp/session_api.h
+./routex.lo: ../../include/net-snmp/library/callback.h
+./routex.lo: ../../include/net-snmp/library/snmp_transport.h
+./routex.lo: ../../include/net-snmp/library/snmp_service.h
+./routex.lo: ../../include/net-snmp/library/snmpCallbackDomain.h
+./routex.lo: ../../include/net-snmp/library/snmpUnixDomain.h
+./routex.lo: ../../include/net-snmp/library/snmpUDPDomain.h
+./routex.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h
+./routex.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h
+./routex.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h
+./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/ucd_compat.h
+./routex.lo: ../../include/net-snmp/library/mib.h
+./routex.lo: ../../include/net-snmp/mib_api.h
+./routex.lo: ../../include/net-snmp/library/parse.h
+./routex.lo: ../../include/net-snmp/library/oid_stash.h
+./routex.lo: ../../include/net-snmp/net-snmp-features.h
+./routex.lo: ../../include/net-snmp/library/snmp_impl.h
+./routex.lo: ../../include/net-snmp/library/snmp.h
+./routex.lo: ../../include/net-snmp/library/snmp-tc.h
+./routex.lo: ../../include/net-snmp/library/getopt.h
+./routex.lo: ../../include/net-snmp/utilities.h
+./routex.lo: ../../include/net-snmp/library/system.h
+./routex.lo: ../../include/net-snmp/library/tools.h
+./routex.lo: ../../include/net-snmp/library/int64.h
+./routex.lo: ../../include/net-snmp/library/mt_support.h
+./routex.lo: ../../include/net-snmp/library/snmp_alarm.h
+./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
+./routex.lo: ../../include/net-snmp/library/container.h
+./routex.lo: ../../include/net-snmp/library/snmp_assert.h
+./routex.lo: ../../include/net-snmp/version.h
+./routex.lo: ../../include/net-snmp/config_api.h
+./routex.lo: ../../include/net-snmp/library/read_config.h
+./routex.lo: ../../include/net-snmp/library/default_store.h
+./routex.lo: ../../include/net-snmp/library/snmp_parse_args.h
+./routex.lo: ../../include/net-snmp/library/snmp_enum.h
+./routex.lo: ../../include/net-snmp/library/vacm.h
+./routex.lo: ../../include/net-snmp/snmpv3_api.h
+./routex.lo: ../../include/net-snmp/library/snmpv3.h
+./routex.lo: ../../include/net-snmp/library/transform_oids.h
+./routex.lo: ../../include/net-snmp/library/keytools.h
+./routex.lo: ../../include/net-snmp/library/scapi.h
+./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
 ./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
-./winstub.lo: ../../include/net-snmp/types.h 
+./winstub.lo: ../../include/net-snmp/net-snmp-includes.h
+./winstub.lo: ../../include/net-snmp/definitions.h
+./winstub.lo: ../../include/net-snmp/types.h
 ./winstub.lo: ../../include/net-snmp/library/oid.h
 ./winstub.lo: ../../include/net-snmp/library/types.h
 ./winstub.lo: ../../include/net-snmp/library/snmp_api.h
@@ -381,6 +528,7 @@
 ./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/ucd_compat.h
 ./winstub.lo: ../../include/net-snmp/library/mib.h
diff --git a/apps/snmpnetstat/Makefile.in b/apps/snmpnetstat/Makefile.in
index ac6e775..04aeb40 100644
--- a/apps/snmpnetstat/Makefile.in
+++ b/apps/snmpnetstat/Makefile.in
@@ -18,10 +18,10 @@ INSTALLBINPROGS=snmpnetstat$(EXEEXT)
 #
 # build info
 #
-SRCS=	inet.c inet6.c if.c main.c route.c winstub.c ffs.c
-OBJS=	inet.o inet6.o if.o main.o route.o winstub.o ffs.o
-LOBJS=	inet.lo inet6.lo if.lo main.lo route.lo winstub.lo ffs.lo
-FTOBJS=	inet.ft inet6.ft if.ft main.ft route.ft winstub.ft ffs.ft
+SRCS=	inet.c inet6.c inetx.c if.c main.c route.c routex.c winstub.c ffs.c
+OBJS=	inet.o inet6.o inetx.o if.o main.o route.o routex.o winstub.o ffs.o
+LOBJS=	inet.lo inet6.lo inetx.lo if.lo main.lo route.lo routex.lo winstub.lo ffs.lo
+FTOBJS=	inet.ft inet6.ft inetx.ft if.ft main.ft route.ft routex.ft winstub.ft ffs.ft
 TARG= snmpnetstat$(EXEEXT)
 
 FEATUREFILE=../../include/net-snmp/features-snmpnetstat.h
diff --git a/apps/snmpnetstat/if.c b/apps/snmpnetstat/if.c
index f7e7554..125e6a3 100644
--- a/apps/snmpnetstat/if.c
+++ b/apps/snmpnetstat/if.c
@@ -69,6 +69,7 @@ static void timerPause(void);
 
     struct _if_info {
         char            name[128];
+        char            descr[128];
         char            ip[128], route[128];
         int             mtu;
         int             drops;
@@ -150,16 +151,16 @@ _set_address( struct _if_info *cur_if )
          *   displaying the local network information
          */
         cp = tmpAddr.data;
-        cp[0] = vp2->name[ 10 ] & 0xff;
-        cp[1] = vp2->name[ 11 ] & 0xff;
-        cp[2] = vp2->name[ 12 ] & 0xff;
-        cp[3] = vp2->name[ 13 ] & 0xff;
+        cp[0] = (uint8_t) vp2->name[10];
+        cp[1] = (uint8_t) vp2->name[11];
+        cp[2] = (uint8_t) vp2->name[12];
+        cp[3] = (uint8_t) vp2->name[13];
         ifAddr = tmpAddr.addr;
         cp = tmpAddr.data;
-        cp[0] = vp2->val.string[ 0 ] & 0xff;
-        cp[1] = vp2->val.string[ 1 ] & 0xff;
-        cp[2] = vp2->val.string[ 2 ] & 0xff;
-        cp[3] = vp2->val.string[ 3 ] & 0xff;
+        cp[0] = (uint8_t) vp2->val.string[0];
+        cp[1] = (uint8_t) vp2->val.string[1];
+        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));
     }
@@ -174,6 +175,8 @@ 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 );
 
     struct _if_info *if_head, *if_tail, *cur_if;
     netsnmp_variable_list *var, *vp;
@@ -254,6 +257,10 @@ intpr(int interval)
         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 */
+#undef ADD_IFXVAR
 
         /*
 	 * Now walk the ifTable, creating a list of interfaces
@@ -261,15 +268,21 @@ intpr(int interval)
     while ( 1 ) {
         if (netsnmp_query_getnext( var, ss ) != SNMP_ERR_NOERROR)
             break;
+        if ((var->type & 0xF0) == 0x80)     /* Exception */
+            break;
         ifcol_oid[ ifcol_len-1 ] = 2;	/* ifDescr */
         if ( snmp_oid_compare( ifcol_oid, ifcol_len,
                                var->name, ifcol_len) != 0 )
             break;    /* End of Table */
+        if ((var->type & 0xF0) == 0x80)     /* Exception */
+            return;
         cur_if = SNMP_MALLOC_TYPEDEF( struct _if_info );
         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 */
+                continue;
             if ( ! vp->val.integer )
                 continue;
             if ( var->name[ var->name_length-1 ] != cur_if->ifindex ) {
@@ -286,8 +299,8 @@ intpr(int interval)
                     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;
+                memmove( cur_if->descr, vp->val.string, vp->val_len );
+                cur_if->descr[vp->val_len] = 0;
                 break;
             case 4:     /* ifMtu   */
                 cur_if->mtu = *vp->val.integer;
@@ -357,6 +370,14 @@ intpr(int interval)
                 if (i > max_outq)
                     max_outq = i;
                 break;
+            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 );
+                cur_if->name[vp->val_len] = 0;
+                if ((i = strlen(cur_if->name) + 1) > max_name)
+                    max_name = i;
+                break;
             }
         }
 
@@ -372,7 +393,7 @@ intpr(int interval)
          *   the varbind list).  But performing this test here
          *   means we can recognise ifXTable names as well)
          */
-        if ( intrface && strcmp( cur_if->name, intrface ) != 0) {
+        if ( intrface && strcmp( cur_if->name, intrface) != 0 && strcmp( cur_if->descr, intrface) != 0) {
             SNMP_FREE( cur_if );
         }
 
@@ -381,6 +402,8 @@ intpr(int interval)
          *   add the new _if_stat structure to the list.
          */
         if ( cur_if ) {
+            if ((i = strlen(cur_if->name) + 1) > max_name)
+                max_name = i;
             _set_address( cur_if );
             i = strlen(cur_if->ip);
             if (i > max_ip)
@@ -539,6 +562,36 @@ sidewaysintpr(unsigned int interval)
          * 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 );
+            var = NULL;
+            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 &&
+                    i == vp->val_len)
+                    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 );
+            var = NULL;
+            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 &&
+                    i == vp->val_len)
+                    break;  /* found requested interface */
+            }
+        }
+        if (!vp) {
             fprintf(stderr, "%s: unknown interface\n", intrface );
             exit(1);
         }
@@ -613,6 +666,8 @@ loop:
         cur_if->ift_dr = 0;
         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 )
                 continue;
             switch (vp->name[ifcol_len-2]) {
@@ -705,11 +760,15 @@ loop:
         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 */
+                    continue;
                 if ( ! vp->val.integer )
                     continue;
                 switch ( vp->name[ ifcol_len-2 ] ) {
diff --git a/apps/snmpnetstat/inet.c b/apps/snmpnetstat/inet.c
index 0ae810d..0537340 100644
--- a/apps/snmpnetstat/inet.c
+++ b/apps/snmpnetstat/inet.c
@@ -126,7 +126,7 @@ tcpprotoprint_line(const char *name, netsnmp_variable_list *vp, int *first)
 		if (aflag)
 			printf(" (including servers)");
 		putchar('\n');
-		width = Aflag ? 18 : 22;
+		width = 27;
 		printf("%-5.5s %*.*s %*.*s %s\n",
 			   "Proto", -width, width, "Local Address",
 						-width, width, "Remote Address", "(state)");
@@ -135,27 +135,27 @@ tcpprotoprint_line(const char *name, netsnmp_variable_list *vp, int *first)
 	
 	/* Extract the local/remote information from the index values */
 	cp = tmpAddr.data;
-	cp[0] = vp->name[ 10 ] & 0xff;
-	cp[1] = vp->name[ 11 ] & 0xff;
-	cp[2] = vp->name[ 12 ] & 0xff;
-	cp[3] = vp->name[ 13 ] & 0xff;
+	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        = ntohs(vp->name[ 14 ]);
+	localPort        = vp->name[ 14 ];
 	cp = tmpAddr.data;
-	cp[0] = vp->name[ 15 ] & 0xff;
-	cp[1] = vp->name[ 16 ] & 0xff;
-	cp[2] = vp->name[ 17 ] & 0xff;
-	cp[3] = vp->name[ 18 ] & 0xff;
+	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        = ntohs(vp->name[ 19 ]);
+	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 );
+		printf(" %d\n", state );
 	} else {
-		printf("%s\n", tcpstates[state]);
+		printf(" %s\n", tcpstates[state]);
 	}
 }
 
@@ -176,6 +176,8 @@ tcpprotopr_get(const char *name, oid *root, size_t root_len)
         return;
     if (netsnmp_query_walk( var, ss ) != SNMP_ERR_NOERROR)
         return;
+    if ((var->type & 0xF0) == 0x80)	/* Exception */
+	return;
 
     for (vp = var; vp ; vp=vp->next_variable) {
         tcpprotoprint_line(name, vp, &first);
@@ -212,9 +214,11 @@ udpprotopr(const char *name)
         return;
     if (netsnmp_query_walk( var, ss ) != SNMP_ERR_NOERROR)
         return;
+    if ((var->type & 0xF0) == 0x80)	/* Exception */
+	return;
 
     printf("Active Internet (%s) Connections\n", name);
-    printf("%-5.5s %-28.28s\n", "Proto", "Local Address");
+    printf("%-5.5s %-27.27s\n", "Proto", "Local Address");
     for (vp = var; vp ; vp=vp->next_variable) {
         printf("%-5.5s", name);
         /*
@@ -223,12 +227,12 @@ udpprotopr(const char *name)
          *   we walked udpLocalAddress rather than udpLocalPort)
          */
         cp = tmpAddr.data;
-        cp[0] = vp->name[ 10 ] & 0xff;
-        cp[1] = vp->name[ 11 ] & 0xff;
-        cp[2] = vp->name[ 12 ] & 0xff;
-        cp[3] = vp->name[ 13 ] & 0xff;
+        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        = ntohs( (u_short)(vp->name[ 14 ]));
+        localPort        = vp->name[ 14 ];
         inetprint(&localAddr, localPort, name, 1);
         putchar('\n');
     }
@@ -281,11 +285,12 @@ tcpprotopr_bulkget(const char *name, oid *root, size_t root_len)
                         continue;
                     }
 
-					tcpprotoprint_line(name, vp, &first);
-
                     if ((vp->type != SNMP_ENDOFMIBVIEW) &&
                         (vp->type != SNMP_NOSUCHOBJECT) &&
                         (vp->type != SNMP_NOSUCHINSTANCE)) {
+
+			tcpprotoprint_line(name, vp, &first);
+
                         /*
                          * Check if last variable, and if so, save for next request.
                          */
@@ -324,19 +329,19 @@ 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;
+    int    use_getbulk = 1;
 
 #ifndef NETSNMP_DISABLE_SNMPV1
     if (ss->version == SNMP_VERSION_1) {
         use_getbulk = 0;
-	}
+    }
 #endif
 
-	if (use_getbulk) {
-		tcpprotopr_bulkget(name, tcpConnState_oid, tcpConnState_len);
-	} else {
-		tcpprotopr_get(name, tcpConnState_oid, tcpConnState_len);
-	}
+    if (use_getbulk) {
+	    tcpprotopr_bulkget(name, tcpConnState_oid, tcpConnState_len);
+    } else {
+	    tcpprotopr_get(name, tcpConnState_oid, tcpConnState_len);
+    }
 }
 
 
@@ -391,7 +396,6 @@ _dump_stats( const char *name, oid *oid_buf, size_t buf_len,
          *   then only display non-zero stats.
          */
         if ( *vp->val.integer > 0 || sflag == 1 ) {
-            putchar('\t');
             printf(sp->description, *vp->val.integer,
                              plural(*vp->val.integer));
             putchar('\n');
@@ -410,24 +414,24 @@ 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 );
     struct stat_table ipstats_tbl[] = {
-        {3, "%d total datagram%s received"},
-        {4, "%d datagram%s with header errors"},
-        {5, "%d datagram%s with an invalid destination address"},
-        {6, "%d datagram%s forwarded"},
-        {7, "%d datagram%s with unknown protocol"},
-        {8, "%d datagram%s discarded"},
-        {9, "%d datagram%s delivered"},
-        {10, "%d output datagram request%s"},
-        {11, "%d output datagram%s discarded"},
-        {12, "%d datagram%s with no route"},
-        {14, "%d fragment%s received"},
-        {15, "%d datagram%s reassembled"},
-        {16, "%d reassembly failure%s"},
-        {17, "%d datagram%s fragmented"},
-        {18, "%d fragmentation failure%s"},
-        {19, "%d fragment%s created"},
-        {23, "%d route%s discarded"},
-        {0, ""}
+        { 3, "%14d total datagram%s received"},
+        { 4, "%14d datagram%s with header errors"},
+        { 5, "%14d datagram%s with an invalid destination address"},
+        { 6, "%14d datagram%s forwarded"},
+        { 7, "%14d datagram%s with unknown protocol"},
+        { 8, "%14d datagram%s discarded"},
+        { 9, "%14d datagram%s delivered"},
+        {10, "%14d output datagram request%s"},
+        {11, "%14d output datagram%s discarded"},
+        {12, "%14d datagram%s with no route"},
+        {14, "%14d fragment%s received"},
+        {15, "%14d datagram%s reassembled"},
+        {16, "%14d reassembly failure%s"},
+        {17, "%14d datagram%s fragmented"},
+        {18, "%14d fragmentation failure%s"},
+        {19, "%14d fragment%s created"},
+        {23, "%14d route%s discarded"},
+        { 0, ""}
     };
 
     _dump_stats( name, ipstats_oid, ipstats_len, ipstats_tbl );
@@ -443,38 +447,38 @@ 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 );
     struct stat_table icmpstats_tbl[] = {
-        {1, "%d total message%s received"},
-        {2, "%d message%s dropped due to errors"},
-        {14, "%d ouput message request%s"},
-        {15, "%d output message%s discarded"},
-        {0, ""}
+        { 1, "%14d total message%s received"},
+        { 2, "%14d message%s dropped due to errors"},
+        {14, "%14d ouput message request%s"},
+        {15, "%14d output message%s discarded"},
+        { 0, ""}
     };
     struct stat_table icmp_inhistogram[] = {
-        {3, "Destination unreachable: %d"},
-        {4, "Time Exceeded: %d"},
-        {5, "Parameter Problem: %d"},
-        {6, "Source Quench: %d"},
-        {7, "Redirect: %d"},
-        {8, "Echo Request: %d"},
-        {9, "Echo Reply: %d"},
-        {10, "Timestamp Request: %d"},
-        {11, "Timestamp Reply: %d"},
-        {12, "Address Mask Request: %d"},
-        {13, "Address Mask Reply: %d"},
-        {0, ""}
+        { 3, "        Destination unreachable: %d"},
+        { 4, "        Time Exceeded: %d"},
+        { 5, "        Parameter Problem: %d"},
+        { 6, "        Source Quench: %d"},
+        { 7, "        Redirect: %d"},
+        { 8, "        Echo Request: %d"},
+        { 9, "        Echo Reply: %d"},
+        {10, "        Timestamp Request: %d"},
+        {11, "        Timestamp Reply: %d"},
+        {12, "        Address Mask Request: %d"},
+        {13, "        Address Mask Reply: %d"},
+        { 0, ""}
     };
     struct stat_table icmp_outhistogram[] = {
-        {16, "Destination unreachable: %d"},
-        {17, "Time Exceeded: %d"},
-        {18, "Parameter Problem: %d"},
-        {19, "Source Quench: %d"},
-        {20, "Redirect: %d"},
-        {21, "Echo Request: %d"},
-        {22, "Echo Reply: %d"},
-        {23, "Timestamp Request: %d"},
-        {24, "Timestamp Reply: %d"},
-        {25, "Address Mask Request: %d"},
-        {26, "Address Mask Reply: %d"},
+        {16, "        Destination unreachable: %d"},
+        {17, "        Time Exceeded: %d"},
+        {18, "        Parameter Problem: %d"},
+        {19, "        Source Quench: %d"},
+        {20, "        Redirect: %d"},
+        {21, "        Echo Request: %d"},
+        {22, "        Echo Reply: %d"},
+        {23, "        Timestamp Request: %d"},
+        {24, "        Timestamp Reply: %d"},
+        {25, "        Address Mask Request: %d"},
+        {26, "        Address Mask Reply: %d"},
         {0, ""}
     };
 
@@ -495,19 +499,19 @@ 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 );
     struct stat_table tcpstats_tbl[] = {
-        {5, "%d active open%s"},
-        {6, "%d passive open%s"},
-        {7, "%d failed attempt%s"},
-        {8, "%d reset%s of established connections"},
-        {9, "%d current established connection%s"},
-        {10, "%d segment%s received"},
-        {11, "%d segment%s sent"},
-        {12, "%d segment%s retransmitted"},
-        {14, "%d invalid segment%s received"},
-        {15, "%d reset%s sent"},
-        {0, ""}
+        { 5, "%14d active open%s"},
+        { 6, "%14d passive open%s"},
+        { 7, "%14d failed attempt%s"},
+        { 8, "%14d reset%s of established connections"},
+        { 9, "%14d currently established connection%s"},
+        {10, "%14d segment%s received"},
+        {11, "%14d segment%s sent"},
+        {12, "%14d segment%s retransmitted"},
+        {14, "%14d invalid segment%s received"},
+        {15, "%14d reset%s sent"},
+        { 0, ""}
     };
-    _dump_stats( name, tcpstats_oid, tcpstats_len, tcpstats_tbl );
+    _dump_stats( "tcp", tcpstats_oid, tcpstats_len, tcpstats_tbl );
 }
 
 
@@ -520,13 +524,13 @@ 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 );
     struct stat_table udpstats_tbl[] = {
-        {1, "%d total datagram%s received"},
-        {2, "%d datagram%s to invalid port"},
-        {3, "%d datagram%s dropped due to errors"},
-        {4, "%d output datagram request%s"},
+        {1, "%14d total datagram%s received"},
+        {2, "%14d datagram%s to invalid port"},
+        {3, "%14d datagram%s dropped due to errors"},
+        {4, "%14d output datagram request%s"},
         {0, ""}
     };
-    _dump_stats( name, udpstats_oid, udpstats_len, udpstats_tbl );
+    _dump_stats( "udp", udpstats_oid, udpstats_len, udpstats_tbl );
 }
 
 
@@ -560,22 +564,25 @@ inetprint(struct in_addr *in, int port, const char *proto, int local)
 {
 	struct servent *sp = NULL;
 	char line[80], *cp;
-	int width;
+	int width = 27;
 
-	snprintf(line, sizeof line, "%.*s.", (Aflag && !nflag) ? 12 : 16,
-	    inetname(in));
+	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((int)port, proto);
+		sp = getservbyport(htons((uint16_t) port), proto);
 	if (sp || port == 0)
-		snprintf(cp, line + sizeof line - cp, "%.8s",
+		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", ntohs(port));
-	width = Aflag ? 18 : 22;
+		snprintf(cp, line + sizeof line - cp, "%d", port);
+	if (vflag && width < strlen(line))
+	    width = strlen(line);
 	printf(" %-*.*s", width, width, line);
 }
 
@@ -598,9 +605,10 @@ inetname(struct in_addr *inp)
 #endif
 
 	if (first && !nflag) {
+		char tmp[MAXHOSTNAMELEN];
 		first = 0;
-		if (gethostname(domain, sizeof(domain)) == 0 &&
-		    (cp = strchr(domain, '.')))
+		if (gethostname(tmp, sizeof(tmp)) == 0 &&
+		    (cp = strchr(tmp, '.')))
 			(void) strlcpy(domain, cp + 1, sizeof domain);
 		else
 			domain[0] = '\0';
diff --git a/apps/snmpnetstat/inet6.c b/apps/snmpnetstat/inet6.c
index d4ad391..7109b87 100644
--- a/apps/snmpnetstat/inet6.c
+++ b/apps/snmpnetstat/inet6.c
@@ -124,7 +124,7 @@ tcp6protopr(const char *name)
                                      ASN_NULL, NULL,  0);
     if (netsnmp_query_walk( var, ss ) != SNMP_ERR_NOERROR)
         return;
-    if (var->type == ASN_NULL)    /* No entries */
+    if ((var->type & 0xF0) == 0x80)		/* exception */
         return;
 
     for (vp = var; vp ; vp=vp->next_variable) {
@@ -137,7 +137,7 @@ tcp6protopr(const char *name)
             if (aflag)
                 printf(" (including servers)");
             putchar('\n');
-            printf("%-5.5s %-28.28s %-28.28s %4s %s\n",
+            printf("%-5.5s %-27.27s %-27.27s %4s %s\n",
                    "Proto", "Local Address", "Remote Address", "I/F", "(state)");
             first = 0;
         }
@@ -184,11 +184,11 @@ udp6protopr(const char *name)
                                      ASN_NULL, NULL,  0);
     if (netsnmp_query_walk( var, ss ) != SNMP_ERR_NOERROR)
         return;
-    if (var->type == ASN_NULL)    /* No entries */
+    if ((var->type & 0xF0) == 0x80)		/* exception */
         return;
 
     printf("Active Internet Connections\n");
-    printf("%-5.5s %-28.28s %4s\n", "Proto", "Local Address", "I/F");
+    printf("%-5.5s %-27.27s %4s\n", "Proto", "Local Address", "I/F");
     for (vp = var; vp ; vp=vp->next_variable) {
         printf("%-5.5s", name);
         /*
@@ -245,6 +245,8 @@ _dump_v6stats( const char *name, oid *oid_buf, size_t buf_len,
     while (1) {
         if (netsnmp_query_getnext( var, ss ) != SNMP_ERR_NOERROR)
             break;
+        if ((var->type & 0xF0) == 0x80)		/* exception */
+            break;
         if ( snmp_oid_compare( oid_buf,   buf_len,
                                var->name, buf_len) != 0 )
             break;    /* End of Table */
@@ -271,7 +273,6 @@ _dump_v6stats( const char *name, oid *oid_buf, size_t buf_len,
          *   then only display non-zero stats.
          */
         if ( stats[sp->entry] > 0 || sflag == 1 ) {
-            putchar('\t');
             printf(sp->description, stats[sp->entry],
                              plural(stats[sp->entry]));
             putchar('\n');
@@ -291,27 +292,27 @@ 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 );
     struct stat_table ip6stats_tbl[] = {
-        {1, "%d total datagram%s received"},
-        {2, "%d datagram%s with header errors"},
-        {3, "%d oversized datagram%s"},
-        {4, "%d datagram%s with no route"},
-        {5, "%d datagram%s with an invalid destination address"},
-        {6, "%d datagram%s with unknown protocol"},
-        {7, "%d short datagram%s discarded"},
-        {8, "%d datagram%s discarded"},
-        {9, "%d datagram%s delivered"},
-        {10, "%d datagram%s forwarded"},
-        {11, "%d output datagram request%s"},
-        {12, "%d output datagram%s discarded"},
-        {13, "%d datagram%s fragmented"},
-        {14, "%d fragmentation failure%s"},
-        {15, "%d fragment%s created"},
-        {16, "%d fragment%s received"},
-        {17, "%d datagram%s reassembled"},
-        {18, "%d reassembly failure%s"},
-        {19, "%d multicast datagram%s received"},
-        {20, "%d multicast datagram%s transmitted"},
-        {0, ""}
+        { 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"},
+        {13, "%14d datagram%s fragmented"},
+        {14, "%14d fragmentation failure%s"},
+        {15, "%14d fragment%s created"},
+        {16, "%14d fragment%s received"},
+        {17, "%14d datagram%s reassembled"},
+        {18, "%14d reassembly failure%s"},
+        {19, "%14d multicast datagram%s received"},
+        {20, "%14d multicast datagram%s transmitted"},
+        { 0, ""}
     };
 
     _dump_v6stats( name, ip6stats_oid, ip6stats_len, ip6stats_tbl );
@@ -331,46 +332,46 @@ 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 );
     struct stat_table icmp6stats_tbl[] = {
-        {1, "%d total message%s received"},
-        {2, "%d message%s dropped due to errors"},
-        {18, "%d ouput message request%s"},
-        {19, "%d output message%s discarded"},
-        {0, ""}
+        { 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, ""}
     };
     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"},
-        {10, "Router Solicit: %d"},
-        {11, "Router Advert: %d"},
-        {12, "Neighbor Solicit: %d"},
-        {13, "Neighbor Advert: %d"},
-        {14, "Redirect: %d"},
-        {15, "Group Member Request: %d"},
-        {16, "Group Member Reply:%d"},
-        {17, "Group Member Reduce:%d"},
-        {0, ""}
+        { 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"},
+        {13, "        Neighbor Advert: %d"},
+        {14, "        Redirect: %d"},
+        {15, "        Group Member Request: %d"},
+        {16, "        Group Member Reply: %d"},
+        {17, "        Group Member Reduce: %d"},
+        { 0, ""}
     };
     struct stat_table icmp6_outhistogram[] = {
-        {20, "Destination unreachable: %d"},
-        {21, "Admin Prohibit: %d"},
-        {22, "Time Exceeded: %d"},
-        {23, "Parameter Problem: %d"},
-        {24, "Too Big: %d"},
-        {25, "Echo Request: %d"},
-        {26, "Echo Reply: %d"},
-        {27, "Router Solicit: %d"},
-        {28, "Router Advert: %d"},
-        {29, "Neighbor Solicit: %d"},
-        {30, "Neighbor Advert: %d"},
-        {31, "Redirect: %d"},
-        {32, "Group Member Request: %d"},
-        {33, "Group Member Reply:%d"},
-        {34, "Group Member Reduce:%d"},
+        {20, "        Destination unreachable: %d"},
+        {21, "        Admin Prohibit: %d"},
+        {22, "        Time Exceeded: %d"},
+        {23, "        Parameter Problem: %d"},
+        {24, "        Too Big: %d"},
+        {25, "        Echo Request: %d"},
+        {26, "        Echo Reply: %d"},
+        {27, "        Router Solicit: %d"},
+        {28, "        Router Advert: %d"},
+        {29, "        Neighbor Solicit: %d"},
+        {30, "        Neighbor Advert: %d"},
+        {31, "        Redirect: %d"},
+        {32, "        Group Member Request: %d"},
+        {33, "        Group Member Reply: %d"},
+        {34, "        Group Member Reduce: %d"},
         {0, ""}
     };
 
@@ -414,10 +415,9 @@ inet6print(unsigned char *in6, int port, const char *proto, int local)
 
 	struct servent *sp = NULL;
 	char line[80], *cp;
-	unsigned width;
+	int width = 27-9;
 	int len = sizeof line;
 
-	width = Aflag ? 12 : 16;
 	if (vflag && width < strlen(inet6name(in6)))
 		width = strlen(inet6name(in6));
 	snprintf(line, len, "%.*s.", width, inet6name(in6));
@@ -427,12 +427,12 @@ inet6print(unsigned char *in6, int port, const char *proto, int local)
 
 	cp = strchr(line, '\0');
 	if (!nflag && port && local)
-		GETSERVBYPORT6(port, proto, sp);
+		GETSERVBYPORT6(htons(port), proto, sp);
 	if (sp || port == 0)
-		snprintf(cp, len, "%.8s", sp ? sp->s_name : "*");
+		snprintf(cp, len, vflag ? "%s" : "%.8s", sp ? sp->s_name : "*");
 	else
-		snprintf(cp, len, "%d", ntohs((u_short)port));
-	width = Aflag ? 18 : 22;
+		snprintf(cp, len, "%d", port);
+	width = 27;
 	if (vflag && width < strlen(line))
 		width = strlen(line);
 bail:
@@ -462,8 +462,8 @@ inet6name(const unsigned char *in6)
 
 	if (first && !nflag) {
 		first = 0;
-		if (gethostname(domain, sizeof(domain)) == 0 &&
-		    (cp = strchr(domain, '.')))
+		if (gethostname(line, sizeof(line)) == 0 &&
+		    (cp = strchr(line, '.')))
 			(void) strlcpy(domain, cp + 1, sizeof domain);
 		else
 			domain[0] = '\0';
diff --git a/apps/snmpnetstat/inetx.c b/apps/snmpnetstat/inetx.c
new file mode 100644
index 0000000..365ebee
--- /dev/null
+++ b/apps/snmpnetstat/inetx.c
@@ -0,0 +1,584 @@
+/*	$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.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
+ */
+
+#ifdef  INHERITED_CODE
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)inet.c	8.4 (Berkeley) 4/20/94";
+#else
+/*__RCSID("$OpenBSD: inet6.c,v 1.31 2004/11/17 01:47:20 itojun Exp $");*/
+/*__RCSID("KAME Id: inet6.c,v 1.10 2000/02/09 10:49:31 itojun Exp");*/
+#endif
+#endif /* not lint */
+#endif
+
+#include <net-snmp/net-snmp-config.h>
+
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_WINSOCK_H
+#include "winstub.h"
+#endif
+#if HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#if HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#if HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+
+#include <net-snmp/net-snmp-includes.h>
+
+#include "main.h"
+#include "netstat.h"
+
+struct stat_table {
+    unsigned int entry;      /* entry number in table */
+    /*
+     * 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);
+
+/*
+ * Print a summary of TCP connections
+ * Listening processes are suppressed unless the
+ *   -a (all) flag is specified.
+ */
+const char     *tcpxstates[] = {
+    "",
+    "CLOSED",
+    "LISTEN",
+    "SYNSENT",
+    "SYNRECEIVED",
+    "ESTABLISHED",
+    "FINWAIT1",
+    "FINWAIT2",
+    "CLOSEWAIT",
+    "LASTACK",
+    "CLOSING",
+    "TIMEWAIT"
+};
+#define TCP_NSTATES 11
+
+typedef struct {
+    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 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;
+} 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 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 }
+};
+
+
+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;
+    struct sockaddr_in6 localAddr, remoteAddr;
+    int    localPort,     remotePort,  pid = 0;
+    int    localType,    remoteType, inx;
+    int    first = 1;
+    static int done = 0;
+
+    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)
+        return;
+    if ((var->type & 0xF0) == 0x80)	/* Exception */
+        return;
+
+    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;
+
+        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");
+            first = 0;
+        }
+
+	strcpy(lname, "tcp");
+	if (localType == 2) lname[3] = '6';
+	else lname[3] = '4';
+	lname[4] = 0;
+        printf("%-5.5s", lname);
+        inetxprint(localType, localAddr,  localPort, "tcp", 1);
+        inetxprint(remoteType, remoteAddr, remotePort, "tcp", 0);
+        if ( state < 1 || state > TCP_NSTATES )
+            printf(" %11d %5d\n", state, pid);
+        else
+            printf(" %11s %5d\n", tcpxstates[ state ], pid);
+    }
+    snmp_free_varbind( var );
+
+    if (aflag)
+	listenxprotopr(name);
+}
+
+/*
+ * Print a summary of listening "connections"
+ */
+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 );
+    struct sockaddr_in6 localAddr;
+    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)
+        return;
+    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;
+        /*
+         * 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;
+        printf("%-5.5s", lname);
+        inetxprint(localType, localAddr, localPort, "tcp", 1);
+        printf(" %5d\n", pid);
+    }
+    snmp_free_varbind( var );
+}
+
+/*
+ * Print a summary of UDPv6 "connections"
+ *    XXX - what about "listening" services ??
+ */
+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 );
+    struct sockaddr_in6 localAddr, remoteAddr;
+    int    localType, remoteType, localPort, remotePort, pid;
+    int    i, inx;
+    static int done = 0;
+
+    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)
+        return;
+    if ((var->type & 0xF0) == 0x80)	/* Exception */
+        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;
+        /*
+         * 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;
+        printf("%-5.5s", lname);
+        inetxprint(localType, localAddr, localPort, "udp", 1);
+        inetxprint(remoteType, remoteAddr, remotePort, "udp", 1);
+        printf(" %5d\n", pid);
+    }
+    snmp_free_varbind( var );
+}
+
+static void
+statsprint(const char *name, const systemstats_t *st, int proto,
+	const oid *tbl, size_t tbllen)
+{
+    oid var[32];
+    size_t len;
+    netsnmp_variable_list *vb;
+
+    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++;
+    }
+}
+
+static void
+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;
+    }
+    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);
+	    }
+	}
+    }
+    snmp_free_varbind(vb);
+}
+
+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;
+
+    if (!first) return;
+    first = 0;
+
+    if (!name || strcmp(name, "ip") == 0)
+	statsprint("ip", systemstats, 1, ipsysstat_oid, ipsysstat_len);
+    if (!name || strcmp(name, "ip6") == 0)
+	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;
+
+    if (!first)
+	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);
+    }
+    if (!name || strcmp(name, "icmp6") == 0) {
+	statsprint("icmp6", icmpstats, 2, icmpstat_oid, icmpstat_len);
+	prhisto("icmp6", icmpmsg_oid, icmpmsg_len, 2, icmp6codes);
+    }
+}
+
+
+static void
+unknownprint(void)
+{
+    char line[80], *cp;
+    int width = 27;
+
+    if (vflag)
+	snprintf(line, sizeof line, "%s.", "*");
+    else
+	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);
+    printf(" %-*.*s", width, width, line);
+}
+
+/*
+ * Pretty print an Internet address (net address + port).
+ * If the nflag was specified, use numbers instead of names.
+ */
+
+void
+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();
+}
diff --git a/apps/snmpnetstat/main.c b/apps/snmpnetstat/main.c
index 2e09d5e..0e977ad 100644
--- a/apps/snmpnetstat/main.c
+++ b/apps/snmpnetstat/main.c
@@ -61,13 +61,13 @@ static char *rcsid = "$OpenBSD: main.c,v 1.52 2005/02/10 14:25:08 itojun Exp $";
 #include "winstub.h"
 #endif
 
-int	Aflag;		/* show addresses of protocol control block */
 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 */
@@ -86,7 +86,7 @@ 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
      */
@@ -99,7 +99,9 @@ struct protox {
 	stringfun	*pr_cblocks;	/* control blocks printing routine */
 	stringfun	*pr_stats;	/* statistics printing routine */
 	const char	*pr_name;	/* well-known name */
-} protox[] = {
+};
+
+struct protox protox[] = {
 	{ 1,	tcpprotopr,	tcp_stats,	"tcp" },	
 	{ 1,	udpprotopr,	udp_stats,	"udp" },	
 
@@ -119,6 +121,16 @@ struct protox ip6protox[] = {
 	{ 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 */
 
 struct protox *protoprotox[] = {
@@ -140,11 +152,6 @@ optProc( int argc, char *const *argv, int opt )
     case 'C':
         while (*optarg) {
             switch (*optarg++) {
-	    /*	case 'A':		*BSD:  display PCB addresses
-					Linux: protocol family
-			Aflag = 1;
-			break;
-	     */
 		case 'a':
 			aflag = 1;
 			break;
@@ -194,6 +201,9 @@ optProc( int argc, char *const *argv, int opt )
 		case 'i':
 			iflag = 1;
 			break;
+		case 'L':
+			Lflag = 1;
+			break;
 	    /*  case 'L':		FreeBSD: Display listen queue lengths
 					NetBSD:  Suppress link-level routes */
 	    /*	case 'l':		OpenBSD: Wider IPv6 display
@@ -230,6 +240,7 @@ optProc( int argc, char *const *argv, int opt )
 				exit(1);
 			}
 			pflag = 1;
+			pname = tp->pr_name;
 			return;
 	    /*	case 'q':		NetBSD:  IRQ information
 					OpenBSD: Suppress inactive I/Fs
@@ -358,6 +369,7 @@ main(int argc, char *argv[])
 	 *     Kernel namelis handling
 	 */
 
+#if 0
 	if (mflag) {
             /*
 		mbpr(nl[N_MBSTAT].n_value, nl[N_MBPOOL].n_value,
@@ -369,6 +381,7 @@ main(int argc, char *argv[])
 		printproto(tp, tp->pr_name);
 		exit(0);
 	}
+#endif
 	/*
 	 * Keep file descriptors open to avoid overhead
 	 * of open/close on each call to get* routines.
@@ -385,7 +398,10 @@ main(int argc, char *argv[])
 			rt_stats();
 		else
               */
-			routepr();
+		if (Lflag || routexpr(af) == 0) {
+		    if (route4pr(af) == 0 && af == AF_INET) routepr();
+		    route6pr(af);
+		}
 		exit(0);
 	}
      /*
@@ -416,23 +432,33 @@ main(int argc, char *argv[])
 		exit(0);
 	}
      */
-	if (af == AF_INET || af == AF_UNSPEC) {
+	setservent(1);
+        if (Lflag) {
+            switch (af) {
+            case AF_UNSPEC:
 		setprotoent(1);
-		setservent(1);
 		/* ugh, this is O(MN) ... why do we do this? */
 		while ((p = getprotoent())) {
 			for (tp = protox; tp->pr_name; tp++)
 				if (strcmp(tp->pr_name, p->p_name) == 0)
-					break;
-			if (tp->pr_name == NULL || tp->pr_wanted == 0)
-				continue;
-			printproto(tp, p->p_name);
+					if (tp->pr_name && tp->pr_wanted)
+					    printproto(tp, p->p_name);
 		}
 		endprotoent();
+                break;
+            case AF_INET:
+                    for (tp = protox; tp->pr_name; tp++)
+                            printproto(tp, tp->pr_name);
+            case AF_INET6:
+                    for (tp = ip6protox; tp->pr_name; tp++)
+                            printproto(tp, tp->pr_name);
+            }
+	}
+        else {
+	    for (tp = ipxprotox; tp->pr_name; tp++)
+		if (!pname || strcmp(pname,tp->pr_name) == 0)
+		    printproto(tp, pname);
 	}
-	if (af == AF_INET6 || af == AF_UNSPEC)
-		for (tp = ip6protox; tp->pr_name; tp++)
-			printproto(tp, tp->pr_name);
     /*
 	if (af == AF_IPX || af == AF_UNSPEC)
 		for (tp = ipxprotox; tp->pr_name; tp++)
@@ -526,14 +552,12 @@ static void
 usage(void)
 {
 	(void)fprintf(stderr,
-"usage: %s [snmp_opts] [-Can] [-Cf address_family]\n", progname);
-	(void)fprintf(stderr,
-"       %s [snmp_opts] [-CbdgimnrSs] [-Cf address_family]\n", progname);
+"usage: %s [snmp_opts] [-Canv] [-Cf address_family]\n", progname);
 	(void)fprintf(stderr,
-"       %s [snmp_opts] [-Cbdn] [-CI interface] [-Cw wait]\n", progname);
+"       %s [snmp_opts] [-Cibodnv] [-CI interface] [-Cw wait]\n", progname);
 	(void)fprintf(stderr,
-"       %s [snmp_opts] [-Cs] [-Cp protocol]\n", progname);
+"       %s [snmp_opts] [-Cs[s]] [-Cp protocol]\n", progname);
 	(void)fprintf(stderr,
-"       %s [snmp_opts] [-Ca] [-Cf address_family] [-Ci | -CI interface]\n", progname);
+"       %s [snmp_opts] [-Crnv] [-Cf address_family]\n", progname);
 	exit(1);
 }
diff --git a/apps/snmpnetstat/netstat.h b/apps/snmpnetstat/netstat.h
index 2841bf2..ba61eb3 100644
--- a/apps/snmpnetstat/netstat.h
+++ b/apps/snmpnetstat/netstat.h
@@ -39,13 +39,13 @@
 /* What is the max length of a pointer printed with %p (including 0x)? */
 #define PLEN	(LONG_BIT / 4 + 2)
 
-extern int	Aflag;		/* show addresses of protocol control block */
 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 */
@@ -80,15 +80,26 @@ 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	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	intpr(int);
-
+void	inetprint(struct in_addr *, int, const char *, int);
+void	inet6print(unsigned char *, int, const char *, int);
diff --git a/apps/snmpnetstat/route.c b/apps/snmpnetstat/route.c
index e5526dc..1dba74d 100644
--- a/apps/snmpnetstat/route.c
+++ b/apps/snmpnetstat/route.c
@@ -80,13 +80,13 @@ static char *rcsid = "$OpenBSD: route.c,v 1.66 2004/11/17 01:47:20 itojun Exp $"
 #define SET_ALL  0x1f
 
 struct route_entry {
-    oid             instance[4];
     in_addr_t       destination;
     in_addr_t       mask;
     in_addr_t       gateway;
     int             ifNumber;
     int             type;
     int             proto;
+    int             af;
     int             set_bits;
     char            ifname[64];
 };
@@ -110,7 +110,7 @@ routepr(void)
     netsnmp_variable_list *var=NULL, *vp;
     char  *cp;
     
-    printf("Routing tables\n");
+    printf("Routing tables (ipRouteTable)\n");
     pr_rthdr(AF_INET);
 
 #define ADD_RTVAR( x ) rtcol_oid[ rtcol_len-1 ] = x; \
@@ -132,6 +132,10 @@ routepr(void)
         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;
@@ -174,6 +178,104 @@ 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 );
+    netsnmp_variable_list *var = NULL, *vp;
+    union {
+        in_addr_t addr;
+        unsigned char data[4];
+    } tmpAddr;
+    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   */
+#undef ADD_RTVAR
+
+    /*
+     * Now walk the ipCidrRouteTable, reporting the various route entries
+     */
+    while ( 1 ) {
+        oid *op;
+        unsigned char *cp;
+
+        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 */
+        if (var->type == SNMP_NOSUCHOBJECT ||
+                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;
+        cp = tmpAddr.data;
+        cp[0] = *op++ & 0xff;
+        cp[1] = *op++ & 0xff;
+        cp[2] = *op++ & 0xff;
+        cp[3] = *op++ & 0xff;
+        rp->destination = tmpAddr.addr;
+        cp = tmpAddr.data;
+        cp[0] = *op++ & 0xff;
+        cp[1] = *op++ & 0xff;
+        cp[2] = *op++ & 0xff;
+        cp[3] = *op++ & 0xff;
+        rp->mask = tmpAddr.addr;
+	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;
+
+        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;
+                rp->set_bits |= SET_TYPE;
+                break;
+            case 7:     /* ipCidrRouteProto   */
+                rp->proto     = *vp->val.integer;
+                rp->set_bits |= SET_PRTO;
+                break;
+            }
+        }
+        if (rp->set_bits != SET_ALL) {
+            continue;   /* Incomplete query */
+        }
+
+        if (hdr_af != rp->af) {
+            if (hdr_af != AF_UNSPEC)
+                printf("\n");
+            hdr_af = rp->af;
+	    printf("Routing tables (ipCidrRouteTable)\n");
+            pr_rthdr(hdr_af);
+        }
+        p_rtnode( rp );
+        printed++;
+    }
+    return printed;
+}
+
 
 struct iflist {
     int             index;
@@ -186,6 +288,8 @@ 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 );
     netsnmp_variable_list *var = NULL;
     struct iflist         *ip;
 
@@ -204,6 +308,18 @@ 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) {
+        if (var->val_len >= sizeof(ip->name))
+            var->val_len  = sizeof(ip->name) - 1;
+        memmove(ip->name, var->val.string, var->val_len);
+        ip->name[var->val_len] = '\0';
+	strcpy(name, ip->name);
+	return;
+    }
+
     ifdescr_oid[ ifdescr_len-1 ] = ifIndex;
     snmp_varlist_add_variable( &var, ifdescr_oid, ifdescr_len,
                                ASN_NULL, NULL,  0);
@@ -279,8 +395,8 @@ routename(in_addr_t in)
 
 	if (first) {
 		first = 0;
-		if (gethostname(domain, sizeof domain) == 0 &&
-		    (cp = strchr(domain, '.')))
+		if (gethostname(line, sizeof line) == 0 &&
+		    (cp = strchr(line, '.')))
 			(void) strlcpy(domain, cp + 1, sizeof domain);
 		else
 			domain[0] = '\0';
@@ -455,7 +571,6 @@ s_rtflags( struct route_entry *rp )
     static char flag_buf[10];
     char  *cp = flag_buf;
 
-    memset( flag_buf, 0, sizeof(flag_buf));
     *cp++ = '<';
     *cp++ = 'U';   /* route is in use */
     if (rp->mask  == 0xffffffff)
@@ -465,6 +580,7 @@ s_rtflags( struct route_entry *rp )
     if (rp->type  == 4)
         *cp++ = 'G';   /* remote destination/net */
     *cp++ = '>';
+    *cp = 0;
     return flag_buf;
 }
 
diff --git a/apps/snmpnetstat/routex.c b/apps/snmpnetstat/routex.c
new file mode 100644
index 0000000..be06d25
--- /dev/null
+++ b/apps/snmpnetstat/routex.c
@@ -0,0 +1,558 @@
+/*        $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.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
+ */
+
+#ifdef  INHERITED_CODE
+#ifndef lint
+#if 0
+static char sccsid[] = "from: @(#)route.c        8.3 (Berkeley) 3/9/94";
+#else
+static char *rcsid = "$OpenBSD: route.c,v 1.66 2004/11/17 01:47:20 itojun Exp $";
+#endif
+#endif /* not lint */
+#endif
+
+#include <net-snmp/net-snmp-config.h>
+
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#if HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+
+#include <net-snmp/net-snmp-includes.h>
+
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_NETDB_H
+#include <netdb.h>
+#endif
+
+#ifndef INET
+#define INET
+#endif
+
+#include "main.h"
+#include "netstat.h"
+#if HAVE_WINSOCK_H
+#include "winstub.h"
+#endif
+
+/* inetCidrRouteTable */
+#define SET_IFNO 0x01
+#define SET_TYPE 0x02
+#define SET_PRTO 0x04
+#define SET_AGE  0x08
+#define SET_AS   0x10
+#define SET_MET1 0x20
+#define SET_ALL  0x3f
+
+/* ip6RouteTable */
+#define SET_HOP     0x40
+#define SET_INVALID 0x80
+#define SET_ALL6    0x67
+/* not invalid, and only the columns that we fetch */
+
+struct route_entry {
+    int             af;
+    struct sockaddr_storage dst;
+    struct sockaddr_storage hop;
+    int             mask;
+    int             ifNumber;
+    int             type;
+    int             proto;
+    int             age;
+    int             as;
+    int             metric1;
+    int             set_bits;
+    char            ifname[64];
+};
+
+
+static void pr_rtxhdr(int af, const char *table);
+static void p_rtnodex( struct route_entry *rp );
+
+/*
+ * Print routing tables.
+ */
+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 );
+    netsnmp_variable_list *var = NULL, *vp;
+    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   */
+#undef ADD_RTVAR
+
+    /*
+     * Now walk the inetCidrRouteTable, reporting the various route entries
+     */
+    while ( 1 ) {
+        oid *op;
+        unsigned char *cp;
+        int i;
+
+        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 */
+        if (var->type == SNMP_NOSUCHOBJECT ||
+                var->type == SNMP_NOSUCHINSTANCE ||
+                var->type == SNMP_ENDOFMIBVIEW)
+            break;
+        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;
+                route.af = AF_INET;
+                sin->sin_family = AF_INET;
+                op = var->name+rtcol_len+1;
+                len = *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;
+                sin->sin_family = AF_INET;
+                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;
+                route.af = AF_INET6;
+                sin6->sin6_family = AF_INET6;
+                op = var->name+rtcol_len+1;
+                len = *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;
+                sin6->sin6_family = AF_INET6;
+                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]);
+            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;
+                rp->set_bits |= SET_IFNO;
+                break;
+            case 8:     /* inetCidrRouteType    */
+                rp->type      = *vp->val.integer;
+                rp->set_bits |= SET_TYPE;
+                break;
+            case 9:     /* inetCidrRouteProto   */
+                rp->proto     = *vp->val.integer;
+                rp->set_bits |= SET_PRTO;
+                break;
+            case 10:     /* inetCidrRouteAge   */
+                rp->age     = *vp->val.integer;
+                rp->set_bits |= SET_AGE;
+                break;
+            case 11:     /* inetCidrRouteNextHopAS   */
+                rp->as     = *vp->val.integer;
+                rp->set_bits |= SET_AS;
+                break;
+            case 12:     /* inetCidrRouteMetric1   */
+                rp->metric1     = *vp->val.integer;
+                rp->set_bits |= SET_MET1;
+                break;
+            }
+        }
+        if (rp->set_bits != SET_ALL) {
+            continue;   /* Incomplete query */
+        }
+    
+        if (af != AF_UNSPEC && rp->af != af)
+            continue;
+
+        if (hdr_af != rp->af) {
+            if (hdr_af != AF_UNSPEC)
+                printf("\n");
+            hdr_af = rp->af;
+            pr_rtxhdr(hdr_af, "inetCidrRouteTable");
+        }
+        p_rtnodex( rp );
+        printed++;
+    }
+    return printed;
+}
+
+/*
+ * Backwards-compatibility for the IPV6-MIB
+ */
+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 );
+    netsnmp_variable_list *var = NULL, *vp;
+    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   */
+#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;
+
+        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 */
+        if (var->type == SNMP_NOSUCHOBJECT ||
+                var->type == SNMP_NOSUCHINSTANCE ||
+                var->type == SNMP_ENDOFMIBVIEW)
+            break;
+        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++;
+        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;
+                /*
+                 * This is, technically, an Ipv6IfIndex, which
+                 * could maybe be different than the IfIndex
+                 * for the same interface.  We ignore this
+                 * possibility for now, in the hopes that
+                 * nobody actually allocates these numbers
+                 * differently.
+                 */
+                rp->set_bits |= SET_IFNO;
+                break;
+            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++;
+                rp->set_bits |= SET_HOP;
+            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. */
+                rp->set_bits |= SET_PRTO;
+                break;
+            case 11:    /* ipv6RouteMetric   */
+                rp->metric1   = *vp->val.integer;
+                rp->set_bits |= SET_MET1;
+                break;
+            case 14:    /* ipv6RouteValid    */
+                if (*vp->val.integer == 2)
+                    rp->set_bits |= SET_INVALID;
+                break;
+            }
+        }
+        if (rp->set_bits != SET_ALL6) {
+            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 );
+        printed++;
+    }
+    return printed;
+}
+
+
+/* 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 */
+#else
+/* width of destination/gateway column */
+/* strlen("fe80::aaaa:bbbb:cccc:dddd at 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 */
+
+/*
+ * Print header for routing table columns.
+ */
+static void
+pr_rtxhdr(int af, const char *table)
+{
+    switch (af) {
+    case AF_INET:
+	printf("IPv4 Routing tables (inetCidrRouteTable)\n");
+	break;
+    case AF_INET6:
+	printf("IPv6 Routing tables (%s)\n", table);
+	break;
+    }
+    printf("%-*.*s ",
+	WID_DST(af), WID_DST(af), "Destination");
+    printf("%-*.*s %-6.6s  %s\n",
+	WID_GW(af), WID_GW(af), "Gateway",
+	"Flags", "Interface");
+}
+
+#ifndef HAVE_INET_NTOP
+/* 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;
+
+    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;
+    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;
+    }
+    return NULL;
+}
+#endif
+
+/*
+ * 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 *
+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;
+
+    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);
+        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);
+        break;
+    }
+    return line;
+}
+
+static char *
+routexname(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;
+
+    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) {
+        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);
+}
+
+
+static char *
+s_rtflagsx( struct route_entry *rp )
+{
+    static char flag_buf[10];
+    char  *cp = flag_buf;
+
+    *cp++ = '<';
+    *cp++ = 'U';   /* route is in use */
+    if ((rp->af == AF_INET && rp->mask == 32) ||
+            (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++ = '>';
+    *cp = 0;
+    return flag_buf;
+}
+
+static void
+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;
+        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) {
+        struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&rp->dst;
+        struct in6_addr 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)));
+    }
+    printf("%-*s %-6.6s  %s",
+        WID_GW(rp->af),
+        1 ? routexname(&rp->hop) : "*",
+        s_rtflagsx(rp), rp->ifname);
+    if ((rp->set_bits & SET_AS) && rp->as != 0)
+        printf(" (AS %d)", rp->as);
+    printf("\n");
+}
diff --git a/apps/snmpstatus.c b/apps/snmpstatus.c
index 166ff3d..0443c4d 100644
--- a/apps/snmpstatus.c
+++ b/apps/snmpstatus.c
@@ -301,6 +301,10 @@ main(int argc, char *argv[])
                 pdu = snmp_pdu_create(SNMP_MSG_GETNEXT);
                 for (vars = response->variables; vars;
                      vars = vars->next_variable) {
+                    if ((vars->type & 0xF0) == 0x80) {
+			print_variable(vars->name, vars->name_length, vars);
+                        continue;
+                    }
                     if (vars->name_length >= length_ifOperStatus
                         && !memcmp(objid_ifOperStatus, vars->name,
                                    sizeof(objid_ifOperStatus))) {
diff --git a/apps/snmptls.c b/apps/snmptls.c
index 93b648b..84c5fbe 100644
--- a/apps/snmptls.c
+++ b/apps/snmptls.c
@@ -432,7 +432,7 @@ main(int argc, char **argv)
 {
     netsnmp_session        session, *ss;
     netsnmp_variable_list *var_list = NULL;
-    int                    arg, rs_idx;
+    int                    arg, rs_idx = 0;
     u_int                  hash_type;
     char                  *fingerprint, *tmp;
 
@@ -468,7 +468,7 @@ main(int argc, char **argv)
 
         oid           map_type[MAX_OID_LEN];
         u_int         pri;
-        size_t        map_type_len;
+        size_t        map_type_len = 0;
 
         if (strcmp(argv[++arg], "add") != 0) {
             fprintf(stderr, "only add is supported at this time\n");
diff --git a/apps/snmptranslate.c b/apps/snmptranslate.c
index c3d47ae..2b19777 100644
--- a/apps/snmptranslate.c
+++ b/apps/snmptranslate.c
@@ -70,9 +70,9 @@ usage(void)
     fprintf(stderr, "  -h\t\t\tdisplay this help message\n");
     fprintf(stderr, "  -V\t\t\tdisplay package version number\n");
     fprintf(stderr,
-            "  -m MIB[:...]\t\tload given list of MIBs (ALL loads everything)\n");
+            "  -m MIB[" ENV_SEPARATOR "...]\t\tload given list of MIBs (ALL loads everything)\n");
     fprintf(stderr,
-            "  -M DIR[:...]\t\tlook in given list of directories for MIBs\n");
+            "  -M DIR[" ENV_SEPARATOR "...]\t\tlook in given list of directories for MIBs\n");
     fprintf(stderr,
             "  -D[TOKEN[,...]]\tturn on debugging output for the specified TOKENs\n\t\t\t   (ALL gives extremely verbose debugging output)\n");
     fprintf(stderr, "  -w WIDTH\t\tset width of tree and detail output\n");
diff --git a/apps/snmptrapd.c b/apps/snmptrapd.c
index 1a52080..bce0d47 100644
--- a/apps/snmptrapd.c
+++ b/apps/snmptrapd.c
@@ -289,6 +289,7 @@ usage(void)
     fprintf(stderr, "  -v, --version\t\tdisplay version information\n");
 #if defined(USING_AGENTX_SUBAGENT_MODULE) && !defined(NETSNMP_SNMPTRAPD_DISABLE_AGENTX)
     fprintf(stderr, "  -x ADDRESS\t\tuse ADDRESS as AgentX address\n");
+    fprintf(stderr, "  -X\t\t\tdon't become a subagent\n");
 #endif
     fprintf(stderr,
             "  -O <OUTOPTS>\t\ttoggle options controlling output display\n");
@@ -443,6 +444,7 @@ free_trapd_address(void)
 {
     if (default_port != ddefault_port) {
         free(default_port);
+        default_port = ddefault_port;
     }
 }
 
@@ -645,7 +647,7 @@ SnmpTrapdMain(int argc, TCHAR * argv[])
 main(int argc, char *argv[])
 #endif
 {
-    char            options[128] = "aAc:CdD::efF:g:hHI:L:m:M:no:O:PqsS:tu:vx:-:";
+    char            options[128] = "aAc:CdD::efF:g:hHI:L:m:M:no:O:Ptu:vx:X-:";
     netsnmp_session *sess_list = NULL, *ss = NULL;
     netsnmp_transport *transport = NULL;
     int             arg, i = 0;
@@ -958,6 +960,7 @@ main(int argc, char *argv[])
             exit(0);
             break;
 
+#if defined(USING_AGENTX_SUBAGENT_MODULE) && !defined(NETSNMP_SNMPTRAPD_DISABLE_AGENTX)
         case 'x':
             if (optarg != NULL) {
                 netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID,
@@ -968,6 +971,11 @@ main(int argc, char *argv[])
             }
             break;
 
+         case 'X':
+            agentx_subagent = 0;
+            break;
+#endif
+
         default:
             fprintf(stderr, "invalid option: -%c\n", arg);
             usage();
@@ -1193,7 +1201,6 @@ main(int argc, char *argv[])
                  * successfully so what could have gone wrong?  
                  */
                 snmptrapd_close_sessions(sess_list);
-                netsnmp_transport_free(transport);
                 snmp_log(LOG_ERR, "couldn't open snmp - %s", strerror(errno));
                 SOCK_CLEANUP;
                 exit(1);
diff --git a/apps/snmptrapd_sql.c b/apps/snmptrapd_sql.c
index ccba258..671e542 100644
--- a/apps/snmptrapd_sql.c
+++ b/apps/snmptrapd_sql.c
@@ -50,10 +50,10 @@
 #undef PACKAGE_STRING
 #undef PACKAGE_TARNAME
 #undef PACKAGE_VERSION
-#include <mysql/my_global.h>
-#include <mysql/my_sys.h>
-#include <mysql/mysql.h>
-#include <mysql/errmsg.h>
+#include <my_global.h>
+#include <my_sys.h>
+#include <mysql.h>
+#include <errmsg.h>
 
 netsnmp_feature_require(container_fifo)
 
@@ -458,6 +458,8 @@ netsnmp_mysql_init(void)
             _sql.port_num = atoi(&not_argv[i][7]);
         else if (strncmp(not_argv[i],"--socket=",9) == 0)
             _sql.socket_name = &not_argv[i][9];
+        else if (strncmp(not_argv[i],"--database=",11) == 0)
+            _sql.db_name = &not_argv[i][11];
         else
             snmp_log(LOG_WARNING, "unknown argument[%d] %s\n", i, not_argv[i]);
     }
@@ -730,7 +732,7 @@ _sql_save_trap_info(sql_buf *sqlb, netsnmp_pdu  *pdu,
 
     /** host name */
     buf_host_len_t = 0;
-    tmp_size = sizeof(sqlb->host);
+    tmp_size = 0;
     realloc_format_trap((u_char**)&sqlb->host, &tmp_size,
                         &buf_host_len_t, 1, "%B", pdu, transport);
     sqlb->host_len = buf_host_len_t;
@@ -880,7 +882,7 @@ _sql_save_varbind_info(sql_buf *sqlb, netsnmp_pdu  *pdu)
                                &buf_val_len_t, 1, var, 0, 0, 0);
         sqlvb->val_len = buf_val_len_t;
 #else
-        memdup(&sqlvb->val, var->val.string, var->val_len);
+        sqlvb->val = netsnmp_memdup(var->val.string, var->val_len);
         sqlvb->val_len = var->val_len;
 #endif
 
diff --git a/configure b/configure
index eb6f294..433ba5b 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
 #! /bin/sh
 # From configure.ac Revision.
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for Net-SNMP 5.7.2.1.
+# Generated by GNU Autoconf 2.68 for Net-SNMP 5.7.3.
 #
 # Report bugs to <net-snmp-coders at lists.sourceforge.net>.
 #
@@ -571,8 +571,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='Net-SNMP'
 PACKAGE_TARNAME='net-snmp'
-PACKAGE_VERSION='5.7.2.1'
-PACKAGE_STRING='Net-SNMP 5.7.2.1'
+PACKAGE_VERSION='5.7.3'
+PACKAGE_STRING='Net-SNMP 5.7.3'
 PACKAGE_BUGREPORT='net-snmp-coders at lists.sourceforge.net'
 PACKAGE_URL=''
 
@@ -699,6 +699,7 @@ target_cpu
 target
 NON_GNU_VPATH
 GNU_vpath
+EXTERNAL_MIBGROUP_INCLUDES
 MIBGROUP_INCLUDES
 HELPER_INCLUDES
 AGENT_INCLUDES
@@ -1590,7 +1591,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures Net-SNMP 5.7.2.1 to adapt to many kinds of systems.
+\`configure' configures Net-SNMP 5.7.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1656,7 +1657,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of Net-SNMP 5.7.2.1:";;
+     short | recursive ) echo "Configuration of Net-SNMP 5.7.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1771,7 +1772,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.7.2.1).
+                          was release "version" (default is 5.7.3).
 
 Miscellaneous:
   --with-defaults         Use defaults for prompted values.
@@ -2072,7 +2073,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-Net-SNMP configure 5.7.2.1
+Net-SNMP configure 5.7.3
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2438,6 +2439,63 @@ $as_echo "$ac_res" >&6; }
 
 } # ac_fn_c_check_func
 
+# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
+# ----------------------------------------------------
+# Tries to find if the field MEMBER exists in type AGGR, after including
+# INCLUDES, setting cache variable VAR accordingly.
+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
+/* end confdefs.h.  */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (ac_aggr.$3)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$4=yes"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (sizeof ac_aggr.$3)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$4=yes"
+else
+  eval "$4=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$4
+	       { $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_member
+
 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
 # --------------------------------------------
 # Tries to find the compile-time value of EXPR in a program that includes
@@ -2797,63 +2855,6 @@ $as_echo "$ac_res" >&6; }
 
 } # ac_fn_c_find_uintX_t
 
-# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
-# ----------------------------------------------------
-# Tries to find if the field MEMBER exists in type AGGR, after including
-# INCLUDES, setting cache variable VAR accordingly.
-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
-/* end confdefs.h.  */
-$5
-int
-main ()
-{
-static $2 ac_aggr;
-if (ac_aggr.$3)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$4=yes"
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$5
-int
-main ()
-{
-static $2 ac_aggr;
-if (sizeof ac_aggr.$3)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$4=yes"
-else
-  eval "$4=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$4
-	       { $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_member
-
 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
 # ---------------------------------------------
 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
@@ -2903,7 +2904,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by Net-SNMP $as_me 5.7.2.1, which was
+It was created by Net-SNMP $as_me 5.7.3, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -6500,14 +6501,14 @@ have_gnu_make=$?
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Perl function system() invokes a POSIX shell" >&5
 $as_echo_n "checking whether the Perl function system() invokes a POSIX shell... " >&6; }
-if test "x$PERLPROG" != 'x' && test -x "$PERLPROG" && test "x`$PERLPROG -e 'system('"'"'echo $OSTYPE'"'"');'`" != 'x$OSTYPE'; then
+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; }
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
 
 ##
@@ -15287,6 +15288,7 @@ fi
 
 
 
+
 ##
 #   System-related compilation checks:
 ##
@@ -15656,13 +15658,13 @@ $as_echo "none" >&6; }
 	fi
 	;;
 
-    darwin8*|darwin9*|darwin10*)
+    darwin8*|darwin9*|darwin10*|darwin11*|darwin12*|darwin13*)
         #   Flat Namespace linking                      (Mac OS/X)
         #
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether darwin ld might need -flat_namespace" >&5
 $as_echo_n "checking whether darwin ld might need -flat_namespace... " >&6; }
 	if test -z "$MACOSX_DEPLOYMENT_TARGET"; then
-		LDFLAGS="-flat_namespace $LDFLAGS"
+		LDFLAGS="-flat_namespace -framework CoreFoundation -framework CoreServices -framework DiskArbitration -framework IOKit $LDFLAGS"
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 	else
@@ -16239,7 +16241,7 @@ done
 
 
 #  Agent:
-for ac_header in dlfcn.h    err.h      fcntl.h    fstab.h                                   grp.h      io.h                                      ioctls.h   kstat.h    kvm.h      limits.h                                  mntent.h   mtab.h                                               pkglocs.h             pwd.h                                     utmpx.h    utsname.h
+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"
@@ -16830,18 +16832,21 @@ ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
 #if HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
-#if HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#if HAVE_NETINET_IP6_H
-#include <netinet/ip6.h>
-#endif
 #if HAVE_NET_IF_H
 #include <net/if.h>
 #endif
+#if HAVE_NET_IF_VAR_H
+#include <net/if_var.h>
+#endif
 #if HAVE_NET_ROUTE_H
 #include <net/route.h>
 #endif
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#if HAVE_NETINET_IP6_H
+#include <netinet/ip6.h>
+#endif
 
 "
 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
@@ -17026,32 +17031,22 @@ fi
 done
 
 
-case $target_os in
-    aix*)
-        #       for CPU/memory statistics               (AIX)
-        #  Agent:
-        #
-        for ac_header in libperfstat.h
+for ac_header in pkg.h
 do :
-  ac_fn_c_check_header_compile "$LINENO" "libperfstat.h" "ac_cv_header_libperfstat_h" "
-#if HAVE_SYS_PROTOSW_H
-#include <sys/protosw.h>
-#endif
-
-"
-if test "x$ac_cv_header_libperfstat_h" = xyes; then :
+  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_LIBPERFSTAT_H 1
+#define HAVE_PKG_H 1
 _ACEOF
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing perfstat_cpu_total" >&5
-$as_echo_n "checking for library containing perfstat_cpu_total... " >&6; }
-if ${netsnmp_cv_func_perfstat_cpu_total_LMIBLIBS+:} false; then :
+ { $as_echo "$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="$LMIBLIBS"
-          netsnmp_temp_LIBS="${netsnmp_target_val}  ${LIBS}"
+     netsnmp_target_val="$LIBS"
+          netsnmp_temp_LIBS=" ${LIBS}"
      netsnmp_result=no
      LIBS="${netsnmp_temp_LIBS}"
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -17063,11 +17058,11 @@ else
 #ifdef __cplusplus
 extern "C"
 #endif
-char perfstat_cpu_total ();
+char pkg_init ();
 int
 main ()
 {
-return perfstat_cpu_total ();
+return pkg_init ();
   ;
   return 0;
 }
@@ -17075,7 +17070,7 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
   netsnmp_result="none required"
 else
-  for netsnmp_cur_lib in perfstat ; do
+  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.  */
@@ -17086,11 +17081,11 @@ else
 #ifdef __cplusplus
 extern "C"
 #endif
-char perfstat_cpu_total ();
+char pkg_init ();
 int
 main ()
 {
-return perfstat_cpu_total ();
+return pkg_init ();
   ;
   return 0;
 }
@@ -17106,42 +17101,48 @@ 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}"
+     netsnmp_cv_func_pkg_init_LIBS="${netsnmp_result}"
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_perfstat_cpu_total_LMIBLIBS" >&5
-$as_echo "$netsnmp_cv_func_perfstat_cpu_total_LMIBLIBS" >&6; }
- if test "${netsnmp_cv_func_perfstat_cpu_total_LMIBLIBS}" != "no" ; then
-    if test "${netsnmp_cv_func_perfstat_cpu_total_LMIBLIBS}" != "none required" ; then
-       LMIBLIBS="${netsnmp_result} ${netsnmp_target_val}"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_pkg_init_LIBS" >&5
+$as_echo "$netsnmp_cv_func_pkg_init_LIBS" >&6; }
+ if test "${netsnmp_cv_func_pkg_init_LIBS}" != "no" ; then
+    if test "${netsnmp_cv_func_pkg_init_LIBS}" != "none required" ; then
+       LIBS="${netsnmp_result} ${netsnmp_target_val}"
     fi
 
-$as_echo "#define HAVE_PERFSTAT 1" >>confdefs.h
+$as_echo "#define HAVE_LIBPKG 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!)
-        #
 
- { $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 :
+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
+
+ { $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="$LMIBLIBS"
-          netsnmp_temp_LIBS="${netsnmp_target_val}  ${LIBS}"
+     netsnmp_target_val="$LIBS"
+          netsnmp_temp_LIBS=" ${LIBS}"
      netsnmp_result=no
      LIBS="${netsnmp_temp_LIBS}"
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -17153,11 +17154,11 @@ else
 #ifdef __cplusplus
 extern "C"
 #endif
-char open_mib ();
+char pkg_init ();
 int
 main ()
 {
-return open_mib ();
+return pkg_init ();
   ;
   return 0;
 }
@@ -17165,7 +17166,7 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
   netsnmp_result="none required"
 else
-  for netsnmp_cur_lib in nm ; do
+  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.  */
@@ -17176,11 +17177,11 @@ else
 #ifdef __cplusplus
 extern "C"
 #endif
-char open_mib ();
+char pkg_init ();
 int
 main ()
 {
-return open_mib ();
+return pkg_init ();
   ;
   return 0;
 }
@@ -17196,81 +17197,480 @@ 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}"
+     netsnmp_cv_func_pkg_init_LIBS="${netsnmp_result}"
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_open_mib_LMIBLIBS" >&5
-$as_echo "$netsnmp_cv_func_open_mib_LMIBLIBS" >&6; }
- if test "${netsnmp_cv_func_open_mib_LMIBLIBS}" != "no" ; then
-    if test "${netsnmp_cv_func_open_mib_LMIBLIBS}" != "none required" ; then
-       LMIBLIBS="${netsnmp_result} ${netsnmp_target_val}"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_pkg_init_LIBS" >&5
+$as_echo "$netsnmp_cv_func_pkg_init_LIBS" >&6; }
+ if test "${netsnmp_cv_func_pkg_init_LIBS}" != "no" ; then
+    if test "${netsnmp_cv_func_pkg_init_LIBS}" != "none required" ; then
+       LIBS="${netsnmp_result} ${netsnmp_target_val}"
     fi
 
-$as_echo "#define HAVE_LIBNM 1" >>confdefs.h
+$as_echo "#define HAVE_LIBPKG 1" >>confdefs.h
 
 
  fi
 
-        ;;
-    *)
-        ;;
-esac
-
-#       for MIB-2 info                                  (Cygwin and MinGW)
-#  Core:
-#
-for ac_header in windows.h iphlpapi.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
-#ifdef HAVE_WINDOWS_H
-#include <windows.h>
-#endif
-
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
 fi
 
 done
 
+    if test $ac_cv_header_pkg_h = no
+    then
+        CPPFLAGS="$netsnmp_save_CPPFLAGS"
+        LDFLAGS="$netsnmp_save_LDFLAGS"
+    fi
+fi
 
-#       for MIB-2 info                                  (MinGW)
-#  Core:
-#
-if test x$with_socklib = xwinsock2; then
-  for ac_header in winsock.h winsock2.h ws2tcpip.h
+case $target_os in
+    aix*)
+        #       for CPU/memory statistics               (AIX)
+        #  Agent:
+        #
+        for ac_header in libperfstat.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 :
+  ac_fn_c_check_header_compile "$LINENO" "libperfstat.h" "ac_cv_header_libperfstat_h" "
+#if HAVE_SYS_PROTOSW_H
+#include <sys/protosw.h>
+#endif
+
+"
+if test "x$ac_cv_header_libperfstat_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_LIBPERFSTAT_H 1
+_ACEOF
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing perfstat_cpu_total" >&5
+$as_echo_n "checking for library containing perfstat_cpu_total... " >&6; }
+if ${netsnmp_cv_func_perfstat_cpu_total_LMIBLIBS+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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 "${netsnmp_cv_func_perfstat_cpu_total_LMIBLIBS}" != "no" ; then
+    if test "${netsnmp_cv_func_perfstat_cpu_total_LMIBLIBS}" != "none required" ; then
+       LMIBLIBS="${netsnmp_result} ${netsnmp_target_val}"
+    fi
+
+$as_echo "#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!)
+        #
+
+ { $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.  */
+
+/* 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 "${netsnmp_cv_func_open_mib_LMIBLIBS}" != "no" ; then
+    if test "${netsnmp_cv_func_open_mib_LMIBLIBS}" != "none 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:
+#
+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 <windows.h>
+#endif
+
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+#       for MIB-2 info                                  (MinGW)
+#  Core:
+#
+if test x$with_socklib = xwinsock2; then
+  for ac_header in winsock.h winsock2.h ws2tcpip.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+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
+
+
+##  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 <sys/param.h>
+#endif
+#include <sys/types.h>
+#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 <sys/socket.h>
+#undef KERNEL
+#undef _KERNEL
+#endif
+#ifdef HAVE_NET_ROUTE_H
+#include <net/route.h>
+#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
+
+
+fi
+ac_fn_c_check_member "$LINENO" "struct rtentry" "rt_hash" "ac_cv_member_struct_rtentry_rt_hash" "
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#include <sys/types.h>
+#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 <sys/socket.h>
+#undef KERNEL
+#undef _KERNEL
+#endif
+#ifdef HAVE_NET_ROUTE_H
+#include <net/route.h>
+#endif
+
+"
+if test "x$ac_cv_member_struct_rtentry_rt_hash" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_RTENTRY_RT_HASH 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_member "$LINENO" "struct rtentry" "rt_next" "ac_cv_member_struct_rtentry_rt_next" "
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#include <sys/types.h>
+#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 <sys/socket.h>
+#undef KERNEL
+#undef _KERNEL
+#endif
+#ifdef HAVE_NET_ROUTE_H
+#include <net/route.h>
+#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
 
-fi
-
-done
 
 fi
+ac_fn_c_check_member "$LINENO" "struct rtentry" "rt_refcnt" "ac_cv_member_struct_rtentry_rt_refcnt" "
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#include <sys/types.h>
+#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 <sys/socket.h>
+#undef KERNEL
+#undef _KERNEL
+#endif
+#ifdef HAVE_NET_ROUTE_H
+#include <net/route.h>
+#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
+
+
+fi
+ac_fn_c_check_member "$LINENO" "struct rtentry" "rt_unit" "ac_cv_member_struct_rtentry_rt_unit" "
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#include <sys/types.h>
+#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 <sys/socket.h>
+#undef KERNEL
+#undef _KERNEL
+#endif
+#ifdef HAVE_NET_ROUTE_H
+#include <net/route.h>
+#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
+
+
+fi
+ac_fn_c_check_member "$LINENO" "struct rtentry" "rt_use" "ac_cv_member_struct_rtentry_rt_use" "
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#include <sys/types.h>
+#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 <sys/socket.h>
+#undef KERNEL
+#undef _KERNEL
+#endif
+#ifdef HAVE_NET_ROUTE_H
+#include <net/route.h>
+#endif
 
-#
-# 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
+"
+if test "x$ac_cv_member_struct_rtentry_rt_use" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_RTENTRY_RT_USE 1
 _ACEOF
 
-fi
 
-done
+fi
 
 
 fi # NETSNMP_QUICK_CHECK
@@ -18547,16 +18947,18 @@ EOF
 # Handle the special case of KSM to see which crypto API we support
 #
 
-ac_cv_NETSNMP_USE_KERBEROS_MIT=no
 rebuilt_new_with_security=
 already_checked_krb5=no
 
 for sec in $new_with_security
 do
-  if test "x$sec" = "xksm" -a "xyes" = "x$already_checked_krb5"; then
-    continue
+  if test "x$sec" = "xksm"; then
+    if test "xyes" = "x$already_checked_krb5"; then
+      continue
+    else
+      already_checked_krb5=yes
+    fi
   fi
-  already_checked_krb5=yes
 
   if test x$sec != xksm; then
     rebuilt_new_with_security="$rebuilt_new_with_security $sec"
@@ -18742,9 +19144,6 @@ $as_echo "#define NETSNMP_USE_KERBEROS_HEIMDAL 1" >>confdefs.h
 
     { $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; }
-    ac_fn_c_check_func "$LINENO" "krb5_c_encrypt" "ac_cv_func_krb5_c_encrypt"
-if test "x$ac_cv_func_krb5_c_encrypt" = xyes; then :
-
     if ${ac_cv_NETSNMP_USE_KERBEROS_MIT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
@@ -18787,7 +19186,7 @@ $as_echo "$ac_cv_lib_k5crypto_krb5_init_context" >&6; }
 if test "x$ac_cv_lib_k5crypto_krb5_init_context" = xyes; then :
   ac_cv_NETSNMP_USE_KERBEROS_MIT=yes
 else
-  ac_cv_MIT_NEW_CRYPTo=no
+  ac_cv_NETSNMP_USE_KERBEROS_MIT=no
 
 fi
 
@@ -18807,9 +19206,18 @@ $as_echo "#define NETSNMP_USE_KERBEROS_MIT 1" >>confdefs.h
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: old MIT crypto API" >&5
 $as_echo "old MIT crypto API" >&6; }
+    fi
+    for ac_func in krb5_auth_con_getsendsubkey
+do :
+  ac_fn_c_check_func "$LINENO" "krb5_auth_con_getsendsubkey" "ac_cv_func_krb5_auth_con_getsendsubkey"
+if test "x$ac_cv_func_krb5_auth_con_getsendsubkey" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_KRB5_AUTH_CON_GETSENDSUBKEY 1
+_ACEOF
+
 fi
+done
 
-    fi
   fi
 done
 
@@ -20028,7 +20436,7 @@ done
 $as_echo_n "checking for and configuring mib modules to use... " >&6; }
 
 # set up the CPP command
-MODULECPP="$CPP $PARTIALTARGETFLAGS -DNETSNMP_FEATURE_CHECKING -I${srcdir}/include -I${srcdir}/agent/mibgroup"
+MODULECPP="$CPP $PARTIALTARGETFLAGS $CPPFLAGS -DNETSNMP_FEATURE_CHECKING -I${srcdir}/include -I${srcdir}/agent/mibgroup"
 if test "x$enable_mfd_rewrites" = "xyes"; then
   MODULECPP="$MODULECPP -DNETSNMP_ENABLE_MFD_REWRITES"
 fi
@@ -20087,6 +20495,8 @@ EOF
   fi
 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; }
 
@@ -20940,8 +21350,10 @@ $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$PARTIALTARGETOS" = "xmingw32" -o "x$PARTIALTARGETOS" = "xmingw32msvc" -o "x$PARTIALTARGETOS" = "xcygwin"; then
-  # mingw32 and cygwin use ';' as the environment variable separator char
+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'`
@@ -20949,6 +21361,16 @@ 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
@@ -22254,6 +22676,97 @@ fi
 if test "x$with_nl" != "xno"; then
     case $target_os in
     linux*) # Check for libnl (linux)
+        netsnmp_save_CPPFLAGS="$CPPFLAGS"
+        CPPFLAGS="-I/usr/include/libnl3 $CPPFLAGS"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nl_connect" >&5
+$as_echo_n "checking for library containing nl_connect... " >&6; }
+if ${netsnmp_cv_func_nl_connect_LIBS+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char nl_connect ();
+int
+main ()
+{
+return nl_connect ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  netsnmp_result="none required"
+else
+  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.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char nl_connect ();
+int
+main ()
+{
+return nl_connect ();
+  ;
+  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_nl_connect_LIBS="${netsnmp_result}"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_nl_connect_LIBS" >&5
+$as_echo "$netsnmp_cv_func_nl_connect_LIBS" >&6; }
+ if test "${netsnmp_cv_func_nl_connect_LIBS}" != "no" ; then
+    if test "${netsnmp_cv_func_nl_connect_LIBS}" != "none required" ; then
+       LIBS="${netsnmp_result} ${netsnmp_target_val}"
+    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
+
+done
+
+            EXTERNAL_MIBGROUP_INCLUDES="$EXTERNAL_MIBGROUP_INCLUDES -I/usr/include/libnl3"
+ else
+    CPPFLAGS="$netsnmp_save_CPPFLAGS"
+ fi
+
+        if test "x$ac_cv_header_netlink_netlink_h" != xyes; then
 
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nl_connect" >&5
 $as_echo_n "checking for library containing nl_connect... " >&6; }
@@ -22325,7 +22838,8 @@ $as_echo "$netsnmp_cv_func_nl_connect_LMIBLIBS" >&6; }
     if test "${netsnmp_cv_func_nl_connect_LMIBLIBS}" != "none required" ; then
        LMIBLIBS="${netsnmp_result} ${netsnmp_target_val}"
     fi
-    for ac_header in netlink/netlink.h
+
+                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 :
@@ -22340,6 +22854,22 @@ done
 
  fi
 
+        fi
+        if test "x$ac_cv_header_netlink_netlink_h" = xyes; then
+            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <netlink/socket.h>
+
+_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
+
+fi
+rm -f conftest*
+
+        fi
     ;;
     esac
 fi
@@ -22857,21 +23387,21 @@ if test "x$TLSPROG" = "xyes"; then
    ac_fn_c_check_decl "$LINENO" "EVP_sha224" "ac_cv_have_decl_EVP_sha224" "#include <openssl/evp.h>
 "
 if test "x$ac_cv_have_decl_EVP_sha224" = xyes; then :
-  :
-else
 
 $as_echo "#define HAVE_EVP_SHA224 /**/" >>confdefs.h
 
+else
+  :
 fi
 
    ac_fn_c_check_decl "$LINENO" "EVP_sha384" "ac_cv_have_decl_EVP_sha384" "#include <openssl/evp.h>
 "
 if test "x$ac_cv_have_decl_EVP_sha384" = xyes; then :
-  :
-else
 
 $as_echo "#define HAVE_EVP_SHA384 /**/" >>confdefs.h
 
+else
+  :
 fi
 
 fi
@@ -23140,41 +23670,29 @@ fi
   test -n "$MYSQLCONFIG" && break
 done
 
-  for ac_header in mysql/mysql.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "mysql/mysql.h" "ac_cv_header_mysql_mysql_h" "$ac_includes_default"
-if test "x$ac_cv_header_mysql_mysql_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_MYSQL_MYSQL_H 1
-_ACEOF
-
-fi
-
-done
+  test -x "$MYSQLCONFIG" \
+	|| as_fn_error $? "Could not find mysql_config and was specifically asked to use MySQL support" "$LINENO" 5
+  MYSQL_LIBS=`$MYSQLCONFIG --libs`
+  MYSQL_INCLUDES=`$MYSQLCONFIG --include`
+  _libs="${LIBS}"
+  _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_mongrel "$LINENO" "mysql/mysql.h" "ac_cv_header_mysql_mysql_h" "$ac_includes_default"
-if test "x$ac_cv_header_mysql_mysql_h" = xyes; then :
-  mysql_h=yes
 else
-  mysql_h=no
+  as_fn_error $? "Could not find mysql.h and was specifically asked to use MySQL support" "$LINENO" 5
 fi
 
 
-  if test "x$MYSQLCONFIG" = "x" -o "x$mysql_h" = "xno"; then
-     as_fn_error $? "Could not find mysql_config or mysql.h and was specifically asked to use MySQL support" "$LINENO" 5
-  fi
-  MYSQL_LIBS=`$MYSQLCONFIG --libs`
-  MYSQL_INCLUDES=`$MYSQLCONFIG --cflags`
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether MY_INIT() works" >&5
 $as_echo_n "checking whether MY_INIT() works... " >&6; }
-  _libs="${LIBS}"
-  _cppflags="${CPPFLAGS}"
-  LIBS="${LIBS} ${MYSQL_LIBS}"
-  CPPFLAGS="${CPPFLAGS} ${MYSQL_INCLUDES}"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <mysql/my_global.h>
-               #include <mysql/my_sys.h>
+
+    #include <my_global.h>
+        #include <my_sys.h>
 int
 main ()
 {
@@ -26093,6 +26611,30 @@ _ACEOF
 
 fi
 
+#       struct ip6stat
+#   Agent:
+#
+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
+#include <netinet/in.h>
+#endif
+#if HAVE_NETINET6_IP6_VAR_H
+#include <netinet6/ip6_var.h>
+#endif
+
+"
+if test "x$ac_cv_member_struct_ip6stat_ip6s_exthdrtoolong_" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_IP6STAT_IP6S_EXTHDRTOOLONG_ 1
+_ACEOF
+
+
+fi
+
+
 #
 #   Not-Used:
 ac_fn_c_check_member "$LINENO" "struct ipstat" "ips_cantforward" "ac_cv_member_struct_ipstat_ips_cantforward" "
@@ -26197,6 +26739,24 @@ _ACEOF
 fi
 
 
+#	struct uvmexp
+#
+ac_fn_c_check_member "$LINENO" "struct uvmexp" "pgswapin" "ac_cv_member_struct_uvmexp_pgswapin" "
+    $ac_includes_default
+
+#include <uvm/uvm_extern.h>
+
+"
+if test "x$ac_cv_member_struct_uvmexp_pgswapin" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_UVMEXP_PGSWAPIN 1
+_ACEOF
+
+
+fi
+
+
 #       struct nlist
 #
 ac_fn_c_check_member "$LINENO" "struct nlist" "n_value" "ac_cv_member_struct_nlist_n_value" "
@@ -26314,66 +26874,9 @@ ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_memb
 #ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#elif defined(HAVE_WINSOCK2_H)
-#include <winsock2.h>
-#endif
-#ifdef HAVE_WS2TCPIP_H
-#include <ws2tcpip.h>
-#endif
-
-"
-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
-
-
-fi
-ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "
-    $ac_includes_default
-
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#elif defined(HAVE_WINSOCK2_H)
-#include <winsock2.h>
-#endif
-#ifdef HAVE_WS2TCPIP_H
-#include <ws2tcpip.h>
-#endif
-
-"
-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
-
-
-fi
-
-
-#       struct sockaddr_in6     (see RFC 2553)
-#   Library:
-#
-ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_scope_id" "ac_cv_member_struct_sockaddr_in6_sin6_scope_id" "
-    $ac_includes_default
-
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_WINSOCK2_H
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#elif defined(HAVE_WINSOCK2_H)
 #include <winsock2.h>
 #endif
 #ifdef HAVE_WS2TCPIP_H
@@ -26381,20 +26884,15 @@ 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_storage_ss_family" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1
+#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
 _ACEOF
 
 
 fi
-
-
-#       struct msghdr
-#   Library:
-#
-ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "
+ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "
     $ac_includes_default
 
 #ifdef HAVE_SYS_PARAM_H
@@ -26402,11 +26900,7 @@ ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struc
 #endif
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_WINSOCK2_H
+#elif defined(HAVE_WINSOCK2_H)
 #include <winsock2.h>
 #endif
 #ifdef HAVE_WS2TCPIP_H
@@ -26414,15 +26908,20 @@ ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struc
 #endif
 
 "
-if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then :
+if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
+#define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
 _ACEOF
 
 
 fi
-ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_flags" "ac_cv_member_struct_msghdr_msg_flags" "
+
+
+#       struct sockaddr_in6     (see RFC 2553)
+#   Library:
+#
+ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_scope_id" "ac_cv_member_struct_sockaddr_in6_sin6_scope_id" "
     $ac_includes_default
 
 #ifdef HAVE_SYS_PARAM_H
@@ -26442,10 +26941,10 @@ ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_flags" "ac_cv_member_struct_
 #endif
 
 "
-if test "x$ac_cv_member_struct_msghdr_msg_flags" = xyes; then :
+if test "x$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_MSGHDR_MSG_FLAGS 1
+#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1
 _ACEOF
 
 
@@ -26952,6 +27451,31 @@ _ACEOF
 
 
 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
+#include <netinet/in.h>
+#endif
+#if HAVE_NETINET_IP_VAR_H
+#include <netinet/ip_var.h>
+#endif
+#if HAVE_NETINET_UDP_H
+#include <netinet/udp.h>
+#endif
+#if HAVE_NETINET_UDP_VAR_H
+#include <netinet/udp_var.h>
+#endif
+
+"
+if test "x$ac_cv_member_struct_udpstat_udps_ipackets" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_UDPSTAT_UDPS_IPACKETS 1
+_ACEOF
+
+
+fi
 ac_fn_c_check_member "$LINENO" "struct udpstat" "udps_opackets" "ac_cv_member_struct_udpstat_udps_opackets" "
     $ac_includes_default
 
@@ -27123,216 +27647,32 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 int
 main ()
 {
-struct ifnet test; test.if_mtu = 0;
-  ;
-  return 0;
-}
-_ACEOF
-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
-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; }
-
-if test "x$ac_cv_IFNET_NEEDS_KERNEL_STRUCTURES" = "xyes"; then
-
-$as_echo "#define NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES 1" >>confdefs.h
-
-fi
-
-
-#       struct ifaddr
-#   Not-Used:
-#
-ac_fn_c_check_member "$LINENO" "struct ifaddr" "ifa_next" "ac_cv_member_struct_ifaddr_ifa_next" "
-
-#ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES
-#define _KERNEL_STRUCTURES 1
-#endif
-#ifdef NETSNMP_IFNET_NEEDS_KERNEL
-#define KERNEL
-#if !defined(__DragonFly__)
-#define _KERNEL 1
-#endif
-#endif
-
-    $ac_includes_default
-
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_NET_IF_H
-#include <net/if.h>
-#endif
-#ifdef HAVE_NET_IF_VAR_H
-#include <net/if_var.h>
-#endif
-
-"
-if test "x$ac_cv_member_struct_ifaddr_ifa_next" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_IFADDR_IFA_NEXT 1
-_ACEOF
-
-
-fi
-
-
-#       struct ifnet
-#         (Broken on FreeBSD - #define'd in <net/if.h>)
-#   Agent:   (?or Not-Used?)
-#
-ac_fn_c_check_member "$LINENO" "struct ifnet" "if_addrlist" "ac_cv_member_struct_ifnet_if_addrlist" "
-#ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES
-#define _KERNEL_STRUCTURES 1
-#endif
-#ifdef NETSNMP_IFNET_NEEDS_KERNEL
-#define KERNEL
-#if !defined(__DragonFly__)
-#define _KERNEL 1
-#endif
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_NET_IF_H
-#include <net/if.h>
-#endif
-#ifdef HAVE_NET_IF_VAR_H
-#include <net/if_var.h>
-#endif
-#ifdef HAVE_SYS_QUEUE_H
-#include <sys/queue.h>
-#endif
-#ifdef linux
-struct ifnet {
-	char	*if_name;		/* name, e.g. \"en\" or \"lo\" */
-	short	if_unit;		/* sub-unit for lower level driver */
-	short	if_mtu;			/* maximum transmission unit */
-	short	if_flags;		/* up/down, broadcast, etc. */
-	int	if_metric;		/* routing metric (external only) */
-	char    if_hwaddr [6];		/* ethernet address */
-	int	if_type;		/* interface type: 1=generic,
-					   28=slip, ether=6, loopback=24 */
-	int	if_speed;		/* interface speed: in bits/sec */
-
-	struct sockaddr if_addr;	/* interface's address */
-	struct sockaddr ifu_broadaddr;	/* broadcast address */
-	struct sockaddr ia_subnetmask; 	/* interface's mask */
-
-	struct	ifqueue {
-		int	ifq_len;
-		int	ifq_drops;
-	} if_snd;			/* output queue */
-	int	if_ibytes;		/* octets received on interface */
-	int	if_ipackets;		/* packets received on interface */
-	int	if_ierrors;		/* input errors on interface */
-        int     if_iqdrops;             /* input queue overruns */
-	int	if_obytes;		/* octets sent on interface */
-	int	if_opackets;		/* packets sent on interface */
-	int	if_oerrors;		/* output errors on interface */
-	int	if_collisions;		/* collisions on csma interfaces */
-/* end statistics */
-	struct	ifnet *if_next;
-};
-#endif
-
-"
-if test "x$ac_cv_member_struct_ifnet_if_addrlist" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_IFNET_IF_ADDRLIST 1
-_ACEOF
-
-
-fi
-ac_fn_c_check_member "$LINENO" "struct ifnet" "if_addrhead.tqh_first" "ac_cv_member_struct_ifnet_if_addrhead_tqh_first" "
-#ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES
-#define _KERNEL_STRUCTURES 1
-#endif
-#ifdef NETSNMP_IFNET_NEEDS_KERNEL
-#define KERNEL
-#if !defined(__DragonFly__)
-#define _KERNEL 1
-#endif
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_NET_IF_H
-#include <net/if.h>
-#endif
-#ifdef HAVE_NET_IF_VAR_H
-#include <net/if_var.h>
-#endif
-#ifdef HAVE_SYS_QUEUE_H
-#include <sys/queue.h>
-#endif
-#ifdef linux
-struct ifnet {
-	char	*if_name;		/* name, e.g. \"en\" or \"lo\" */
-	short	if_unit;		/* sub-unit for lower level driver */
-	short	if_mtu;			/* maximum transmission unit */
-	short	if_flags;		/* up/down, broadcast, etc. */
-	int	if_metric;		/* routing metric (external only) */
-	char    if_hwaddr [6];		/* ethernet address */
-	int	if_type;		/* interface type: 1=generic,
-					   28=slip, ether=6, loopback=24 */
-	int	if_speed;		/* interface speed: in bits/sec */
-
-	struct sockaddr if_addr;	/* interface's address */
-	struct sockaddr ifu_broadaddr;	/* broadcast address */
-	struct sockaddr ia_subnetmask; 	/* interface's mask */
-
-	struct	ifqueue {
-		int	ifq_len;
-		int	ifq_drops;
-	} if_snd;			/* output queue */
-	int	if_ibytes;		/* octets received on interface */
-	int	if_ipackets;		/* packets received on interface */
-	int	if_ierrors;		/* input errors on interface */
-        int     if_iqdrops;             /* input queue overruns */
-	int	if_obytes;		/* octets sent on interface */
-	int	if_opackets;		/* packets sent on interface */
-	int	if_oerrors;		/* output errors on interface */
-	int	if_collisions;		/* collisions on csma interfaces */
-/* end statistics */
-	struct	ifnet *if_next;
-};
-#endif
-
-"
-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
+struct ifnet test; test.if_mtu = 0;
+  ;
+  return 0;
+}
 _ACEOF
+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
+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; }
 
+if test "x$ac_cv_IFNET_NEEDS_KERNEL_STRUCTURES" = "xyes"; then
+
+$as_echo "#define NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES 1" >>confdefs.h
 
 fi
-ac_fn_c_check_member "$LINENO" "struct ifnet" "if_baudrate" "ac_cv_member_struct_ifnet_if_baudrate" "
+
+
+#       struct ifaddr
+#   Not-Used:
+#
+ac_fn_c_check_member "$LINENO" "struct ifaddr" "ifa_next" "ac_cv_member_struct_ifaddr_ifa_next" "
+
 #ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES
 #define _KERNEL_STRUCTURES 1
 #endif
@@ -27342,8 +27682,11 @@ ac_fn_c_check_member "$LINENO" "struct ifnet" "if_baudrate" "ac_cv_member_struct
 #define _KERNEL 1
 #endif
 #endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
+
+    $ac_includes_default
+
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
 #endif
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
@@ -27357,52 +27700,23 @@ ac_fn_c_check_member "$LINENO" "struct ifnet" "if_baudrate" "ac_cv_member_struct
 #ifdef HAVE_NET_IF_VAR_H
 #include <net/if_var.h>
 #endif
-#ifdef HAVE_SYS_QUEUE_H
-#include <sys/queue.h>
-#endif
-#ifdef linux
-struct ifnet {
-	char	*if_name;		/* name, e.g. \"en\" or \"lo\" */
-	short	if_unit;		/* sub-unit for lower level driver */
-	short	if_mtu;			/* maximum transmission unit */
-	short	if_flags;		/* up/down, broadcast, etc. */
-	int	if_metric;		/* routing metric (external only) */
-	char    if_hwaddr [6];		/* ethernet address */
-	int	if_type;		/* interface type: 1=generic,
-					   28=slip, ether=6, loopback=24 */
-	int	if_speed;		/* interface speed: in bits/sec */
-
-	struct sockaddr if_addr;	/* interface's address */
-	struct sockaddr ifu_broadaddr;	/* broadcast address */
-	struct sockaddr ia_subnetmask; 	/* interface's mask */
-
-	struct	ifqueue {
-		int	ifq_len;
-		int	ifq_drops;
-	} if_snd;			/* output queue */
-	int	if_ibytes;		/* octets received on interface */
-	int	if_ipackets;		/* packets received on interface */
-	int	if_ierrors;		/* input errors on interface */
-        int     if_iqdrops;             /* input queue overruns */
-	int	if_obytes;		/* octets sent on interface */
-	int	if_opackets;		/* packets sent on interface */
-	int	if_oerrors;		/* output errors on interface */
-	int	if_collisions;		/* collisions on csma interfaces */
-/* end statistics */
-	struct	ifnet *if_next;
-};
-#endif
 
 "
-if test "x$ac_cv_member_struct_ifnet_if_baudrate" = xyes; then :
+if test "x$ac_cv_member_struct_ifaddr_ifa_next" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_IFNET_IF_BAUDRATE 1
+#define HAVE_STRUCT_IFADDR_IFA_NEXT 1
 _ACEOF
 
 
 fi
-ac_fn_c_check_member "$LINENO" "struct ifnet" "if_baudrate.ifs_value" "ac_cv_member_struct_ifnet_if_baudrate_ifs_value" "
+
+
+#       struct ifnet
+#         (Broken on FreeBSD - #define'd in <net/if.h>)
+#   Agent:   (?or Not-Used?)
+#
+ac_fn_c_check_member "$LINENO" "struct ifnet" "if_addrlist" "ac_cv_member_struct_ifnet_if_addrlist" "
 #ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES
 #define _KERNEL_STRUCTURES 1
 #endif
@@ -27464,15 +27778,15 @@ 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_addrlist" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_IFNET_IF_BAUDRATE_IFS_VALUE 1
+#define HAVE_STRUCT_IFNET_IF_ADDRLIST 1
 _ACEOF
 
 
 fi
-ac_fn_c_check_member "$LINENO" "struct ifnet" "if_ibytes" "ac_cv_member_struct_ifnet_if_ibytes" "
+ac_fn_c_check_member "$LINENO" "struct ifnet" "if_addrhead.tqh_first" "ac_cv_member_struct_ifnet_if_addrhead_tqh_first" "
 #ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES
 #define _KERNEL_STRUCTURES 1
 #endif
@@ -27534,15 +27848,15 @@ struct ifnet {
 #endif
 
 "
-if test "x$ac_cv_member_struct_ifnet_if_ibytes" = 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_IBYTES 1
+#define HAVE_STRUCT_IFNET_IF_ADDRHEAD_TQH_FIRST 1
 _ACEOF
 
 
 fi
-ac_fn_c_check_member "$LINENO" "struct ifnet" "if_imcasts" "ac_cv_member_struct_ifnet_if_imcasts" "
+ac_fn_c_check_member "$LINENO" "struct ifnet" "if_baudrate" "ac_cv_member_struct_ifnet_if_baudrate" "
 #ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES
 #define _KERNEL_STRUCTURES 1
 #endif
@@ -27604,15 +27918,15 @@ struct ifnet {
 #endif
 
 "
-if test "x$ac_cv_member_struct_ifnet_if_imcasts" = xyes; then :
+if test "x$ac_cv_member_struct_ifnet_if_baudrate" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_IFNET_IF_IMCASTS 1
+#define HAVE_STRUCT_IFNET_IF_BAUDRATE 1
 _ACEOF
 
 
 fi
-ac_fn_c_check_member "$LINENO" "struct ifnet" "if_iqdrops" "ac_cv_member_struct_ifnet_if_iqdrops" "
+ac_fn_c_check_member "$LINENO" "struct ifnet" "if_baudrate.ifs_value" "ac_cv_member_struct_ifnet_if_baudrate_ifs_value" "
 #ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES
 #define _KERNEL_STRUCTURES 1
 #endif
@@ -27674,15 +27988,15 @@ struct ifnet {
 #endif
 
 "
-if test "x$ac_cv_member_struct_ifnet_if_iqdrops" = 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_IQDROPS 1
+#define HAVE_STRUCT_IFNET_IF_BAUDRATE_IFS_VALUE 1
 _ACEOF
 
 
 fi
-ac_fn_c_check_member "$LINENO" "struct ifnet" "if_lastchange.tv_sec" "ac_cv_member_struct_ifnet_if_lastchange_tv_sec" "
+ac_fn_c_check_member "$LINENO" "struct ifnet" "if_ibytes" "ac_cv_member_struct_ifnet_if_ibytes" "
 #ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES
 #define _KERNEL_STRUCTURES 1
 #endif
@@ -27744,15 +28058,15 @@ 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_ibytes" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_SEC 1
+#define HAVE_STRUCT_IFNET_IF_IBYTES 1
 _ACEOF
 
 
 fi
-ac_fn_c_check_member "$LINENO" "struct ifnet" "if_lastchange.tv_nsec" "ac_cv_member_struct_ifnet_if_lastchange_tv_nsec" "
+ac_fn_c_check_member "$LINENO" "struct ifnet" "if_imcasts" "ac_cv_member_struct_ifnet_if_imcasts" "
 #ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES
 #define _KERNEL_STRUCTURES 1
 #endif
@@ -27814,15 +28128,15 @@ 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_imcasts" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_NSEC 1
+#define HAVE_STRUCT_IFNET_IF_IMCASTS 1
 _ACEOF
 
 
 fi
-ac_fn_c_check_member "$LINENO" "struct ifnet" "if_mtu" "ac_cv_member_struct_ifnet_if_mtu" "
+ac_fn_c_check_member "$LINENO" "struct ifnet" "if_iqdrops" "ac_cv_member_struct_ifnet_if_iqdrops" "
 #ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES
 #define _KERNEL_STRUCTURES 1
 #endif
@@ -27884,15 +28198,15 @@ struct ifnet {
 #endif
 
 "
-if test "x$ac_cv_member_struct_ifnet_if_mtu" = xyes; then :
+if test "x$ac_cv_member_struct_ifnet_if_iqdrops" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_IFNET_IF_MTU 1
+#define HAVE_STRUCT_IFNET_IF_IQDROPS 1
 _ACEOF
 
 
 fi
-ac_fn_c_check_member "$LINENO" "struct ifnet" "if_noproto" "ac_cv_member_struct_ifnet_if_noproto" "
+ac_fn_c_check_member "$LINENO" "struct ifnet" "if_lastchange.tv_sec" "ac_cv_member_struct_ifnet_if_lastchange_tv_sec" "
 #ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES
 #define _KERNEL_STRUCTURES 1
 #endif
@@ -27954,15 +28268,15 @@ struct ifnet {
 #endif
 
 "
-if test "x$ac_cv_member_struct_ifnet_if_noproto" = 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_NOPROTO 1
+#define HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_SEC 1
 _ACEOF
 
 
 fi
-ac_fn_c_check_member "$LINENO" "struct ifnet" "if_obytes" "ac_cv_member_struct_ifnet_if_obytes" "
+ac_fn_c_check_member "$LINENO" "struct ifnet" "if_lastchange.tv_nsec" "ac_cv_member_struct_ifnet_if_lastchange_tv_nsec" "
 #ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES
 #define _KERNEL_STRUCTURES 1
 #endif
@@ -28024,15 +28338,15 @@ struct ifnet {
 #endif
 
 "
-if test "x$ac_cv_member_struct_ifnet_if_obytes" = 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_OBYTES 1
+#define HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_NSEC 1
 _ACEOF
 
 
 fi
-ac_fn_c_check_member "$LINENO" "struct ifnet" "if_omcasts" "ac_cv_member_struct_ifnet_if_omcasts" "
+ac_fn_c_check_member "$LINENO" "struct ifnet" "if_mtu" "ac_cv_member_struct_ifnet_if_mtu" "
 #ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES
 #define _KERNEL_STRUCTURES 1
 #endif
@@ -28094,15 +28408,15 @@ struct ifnet {
 #endif
 
 "
-if test "x$ac_cv_member_struct_ifnet_if_omcasts" = xyes; then :
+if test "x$ac_cv_member_struct_ifnet_if_mtu" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_IFNET_IF_OMCASTS 1
+#define HAVE_STRUCT_IFNET_IF_MTU 1
 _ACEOF
 
 
 fi
-ac_fn_c_check_member "$LINENO" "struct ifnet" "if_speed" "ac_cv_member_struct_ifnet_if_speed" "
+ac_fn_c_check_member "$LINENO" "struct ifnet" "if_noproto" "ac_cv_member_struct_ifnet_if_noproto" "
 #ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES
 #define _KERNEL_STRUCTURES 1
 #endif
@@ -28164,15 +28478,15 @@ struct ifnet {
 #endif
 
 "
-if test "x$ac_cv_member_struct_ifnet_if_speed" = xyes; then :
+if test "x$ac_cv_member_struct_ifnet_if_noproto" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_IFNET_IF_SPEED 1
+#define HAVE_STRUCT_IFNET_IF_NOPROTO 1
 _ACEOF
 
 
 fi
-ac_fn_c_check_member "$LINENO" "struct ifnet" "if_type" "ac_cv_member_struct_ifnet_if_type" "
+ac_fn_c_check_member "$LINENO" "struct ifnet" "if_obytes" "ac_cv_member_struct_ifnet_if_obytes" "
 #ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES
 #define _KERNEL_STRUCTURES 1
 #endif
@@ -28234,15 +28548,15 @@ struct ifnet {
 #endif
 
 "
-if test "x$ac_cv_member_struct_ifnet_if_type" = xyes; then :
+if test "x$ac_cv_member_struct_ifnet_if_obytes" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_IFNET_IF_TYPE 1
+#define HAVE_STRUCT_IFNET_IF_OBYTES 1
 _ACEOF
 
 
 fi
-ac_fn_c_check_member "$LINENO" "struct ifnet" "if_xname" "ac_cv_member_struct_ifnet_if_xname" "
+ac_fn_c_check_member "$LINENO" "struct ifnet" "if_omcasts" "ac_cv_member_struct_ifnet_if_omcasts" "
 #ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES
 #define _KERNEL_STRUCTURES 1
 #endif
@@ -28304,212 +28618,220 @@ struct ifnet {
 #endif
 
 "
-if test "x$ac_cv_member_struct_ifnet_if_xname" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_IFNET_IF_XNAME 1
-_ACEOF
-
-
-fi
-
-
-
-##
-#   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 <sys/param.h>
-#endif
-#include <sys/types.h>
-#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 <sys/socket.h>
-#undef KERNEL
-#undef _KERNEL
-#endif
-#ifdef HAVE_NET_ROUTE_H
-#include <net/route.h>
-#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
-
-
-fi
-ac_fn_c_check_member "$LINENO" "struct rtentry" "rt_hash" "ac_cv_member_struct_rtentry_rt_hash" "
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#include <sys/types.h>
-#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 <sys/socket.h>
-#undef KERNEL
-#undef _KERNEL
-#endif
-#ifdef HAVE_NET_ROUTE_H
-#include <net/route.h>
-#endif
-
-"
-if test "x$ac_cv_member_struct_rtentry_rt_hash" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_RTENTRY_RT_HASH 1
-_ACEOF
-
-
-fi
-ac_fn_c_check_member "$LINENO" "struct rtentry" "rt_next" "ac_cv_member_struct_rtentry_rt_next" "
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#include <sys/types.h>
-#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 <sys/socket.h>
-#undef KERNEL
-#undef _KERNEL
-#endif
-#ifdef HAVE_NET_ROUTE_H
-#include <net/route.h>
-#endif
-
-"
-if test "x$ac_cv_member_struct_rtentry_rt_next" = xyes; then :
+if test "x$ac_cv_member_struct_ifnet_if_omcasts" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_RTENTRY_RT_NEXT 1
+#define HAVE_STRUCT_IFNET_IF_OMCASTS 1
 _ACEOF
 
 
 fi
-ac_fn_c_check_member "$LINENO" "struct rtentry" "rt_refcnt" "ac_cv_member_struct_rtentry_rt_refcnt" "
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#include <sys/types.h>
+ac_fn_c_check_member "$LINENO" "struct ifnet" "if_speed" "ac_cv_member_struct_ifnet_if_speed" "
 #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
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
-#undef KERNEL
-#undef _KERNEL
 #endif
-#ifdef HAVE_NET_ROUTE_H
-#include <net/route.h>
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_NET_IF_H
+#include <net/if.h>
+#endif
+#ifdef HAVE_NET_IF_VAR_H
+#include <net/if_var.h>
+#endif
+#ifdef HAVE_SYS_QUEUE_H
+#include <sys/queue.h>
+#endif
+#ifdef linux
+struct ifnet {
+	char	*if_name;		/* name, e.g. \"en\" or \"lo\" */
+	short	if_unit;		/* sub-unit for lower level driver */
+	short	if_mtu;			/* maximum transmission unit */
+	short	if_flags;		/* up/down, broadcast, etc. */
+	int	if_metric;		/* routing metric (external only) */
+	char    if_hwaddr [6];		/* ethernet address */
+	int	if_type;		/* interface type: 1=generic,
+					   28=slip, ether=6, loopback=24 */
+	int	if_speed;		/* interface speed: in bits/sec */
+
+	struct sockaddr if_addr;	/* interface's address */
+	struct sockaddr ifu_broadaddr;	/* broadcast address */
+	struct sockaddr ia_subnetmask; 	/* interface's mask */
+
+	struct	ifqueue {
+		int	ifq_len;
+		int	ifq_drops;
+	} if_snd;			/* output queue */
+	int	if_ibytes;		/* octets received on interface */
+	int	if_ipackets;		/* packets received on interface */
+	int	if_ierrors;		/* input errors on interface */
+        int     if_iqdrops;             /* input queue overruns */
+	int	if_obytes;		/* octets sent on interface */
+	int	if_opackets;		/* packets sent on interface */
+	int	if_oerrors;		/* output errors on interface */
+	int	if_collisions;		/* collisions on csma interfaces */
+/* end statistics */
+	struct	ifnet *if_next;
+};
 #endif
 
 "
-if test "x$ac_cv_member_struct_rtentry_rt_refcnt" = xyes; then :
+if test "x$ac_cv_member_struct_ifnet_if_speed" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_RTENTRY_RT_REFCNT 1
+#define HAVE_STRUCT_IFNET_IF_SPEED 1
 _ACEOF
 
 
 fi
-ac_fn_c_check_member "$LINENO" "struct rtentry" "rt_unit" "ac_cv_member_struct_rtentry_rt_unit" "
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#include <sys/types.h>
+ac_fn_c_check_member "$LINENO" "struct ifnet" "if_type" "ac_cv_member_struct_ifnet_if_type" "
 #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
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
-#undef KERNEL
-#undef _KERNEL
 #endif
-#ifdef HAVE_NET_ROUTE_H
-#include <net/route.h>
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_NET_IF_H
+#include <net/if.h>
+#endif
+#ifdef HAVE_NET_IF_VAR_H
+#include <net/if_var.h>
+#endif
+#ifdef HAVE_SYS_QUEUE_H
+#include <sys/queue.h>
+#endif
+#ifdef linux
+struct ifnet {
+	char	*if_name;		/* name, e.g. \"en\" or \"lo\" */
+	short	if_unit;		/* sub-unit for lower level driver */
+	short	if_mtu;			/* maximum transmission unit */
+	short	if_flags;		/* up/down, broadcast, etc. */
+	int	if_metric;		/* routing metric (external only) */
+	char    if_hwaddr [6];		/* ethernet address */
+	int	if_type;		/* interface type: 1=generic,
+					   28=slip, ether=6, loopback=24 */
+	int	if_speed;		/* interface speed: in bits/sec */
+
+	struct sockaddr if_addr;	/* interface's address */
+	struct sockaddr ifu_broadaddr;	/* broadcast address */
+	struct sockaddr ia_subnetmask; 	/* interface's mask */
+
+	struct	ifqueue {
+		int	ifq_len;
+		int	ifq_drops;
+	} if_snd;			/* output queue */
+	int	if_ibytes;		/* octets received on interface */
+	int	if_ipackets;		/* packets received on interface */
+	int	if_ierrors;		/* input errors on interface */
+        int     if_iqdrops;             /* input queue overruns */
+	int	if_obytes;		/* octets sent on interface */
+	int	if_opackets;		/* packets sent on interface */
+	int	if_oerrors;		/* output errors on interface */
+	int	if_collisions;		/* collisions on csma interfaces */
+/* end statistics */
+	struct	ifnet *if_next;
+};
 #endif
 
 "
-if test "x$ac_cv_member_struct_rtentry_rt_unit" = xyes; then :
+if test "x$ac_cv_member_struct_ifnet_if_type" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_RTENTRY_RT_UNIT 1
+#define HAVE_STRUCT_IFNET_IF_TYPE 1
 _ACEOF
 
 
 fi
-ac_fn_c_check_member "$LINENO" "struct rtentry" "rt_use" "ac_cv_member_struct_rtentry_rt_use" "
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#include <sys/types.h>
+ac_fn_c_check_member "$LINENO" "struct ifnet" "if_xname" "ac_cv_member_struct_ifnet_if_xname" "
 #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
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
-#undef KERNEL
-#undef _KERNEL
 #endif
-#ifdef HAVE_NET_ROUTE_H
-#include <net/route.h>
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_NET_IF_H
+#include <net/if.h>
+#endif
+#ifdef HAVE_NET_IF_VAR_H
+#include <net/if_var.h>
+#endif
+#ifdef HAVE_SYS_QUEUE_H
+#include <sys/queue.h>
+#endif
+#ifdef linux
+struct ifnet {
+	char	*if_name;		/* name, e.g. \"en\" or \"lo\" */
+	short	if_unit;		/* sub-unit for lower level driver */
+	short	if_mtu;			/* maximum transmission unit */
+	short	if_flags;		/* up/down, broadcast, etc. */
+	int	if_metric;		/* routing metric (external only) */
+	char    if_hwaddr [6];		/* ethernet address */
+	int	if_type;		/* interface type: 1=generic,
+					   28=slip, ether=6, loopback=24 */
+	int	if_speed;		/* interface speed: in bits/sec */
+
+	struct sockaddr if_addr;	/* interface's address */
+	struct sockaddr ifu_broadaddr;	/* broadcast address */
+	struct sockaddr ia_subnetmask; 	/* interface's mask */
+
+	struct	ifqueue {
+		int	ifq_len;
+		int	ifq_drops;
+	} if_snd;			/* output queue */
+	int	if_ibytes;		/* octets received on interface */
+	int	if_ipackets;		/* packets received on interface */
+	int	if_ierrors;		/* input errors on interface */
+        int     if_iqdrops;             /* input queue overruns */
+	int	if_obytes;		/* octets sent on interface */
+	int	if_opackets;		/* packets sent on interface */
+	int	if_oerrors;		/* output errors on interface */
+	int	if_collisions;		/* collisions on csma interfaces */
+/* end statistics */
+	struct	ifnet *if_next;
+};
 #endif
 
 "
-if test "x$ac_cv_member_struct_rtentry_rt_use" = xyes; then :
+if test "x$ac_cv_member_struct_ifnet_if_xname" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_RTENTRY_RT_USE 1
+#define HAVE_STRUCT_IFNET_IF_XNAME 1
 _ACEOF
 
 
@@ -29213,6 +29535,149 @@ And this can be very slow." >&2;}
     ;;
 esac
 
+#   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
+/* end confdefs.h.  */
+
+#include <stdio.h>  /* printf() */
+#include <stdlib.h> /* malloc() */
+#include <string.h> /* memset() */
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+
+int
+main ()
+{
+
+    void *buf;
+    int len;
+    void *from;
+    socklen_t *fromlen;
+
+    struct iovec iov;
+    char *cmsg = malloc(CMSG_SPACE(sizeof(struct in_pktinfo)));
+    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);
+
+    for (cm = CMSG_FIRSTHDR(&msg); cm; cm = CMSG_NXTHDR(&msg, cm)) {
+        if (cm->cmsg_level == SOL_IP && cm->cmsg_type == IP_PKTINFO) {
+            struct in_pktinfo* src = (struct in_pktinfo *)CMSG_DATA(cm);
+            printf("Address: %s; index: %d\n", inet_ntoa(src->ipi_addr),
+	           src->ipi_ifindex);
+        }
+    }
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_have_ip_pktinfo=yes
+else
+  ac_cv_have_ip_pktinfo=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ip_pktinfo" >&5
+$as_echo "$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
+
+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
+/* end confdefs.h.  */
+
+#include <stdio.h>  /* printf() */
+#include <stdlib.h> /* malloc() */
+#include <string.h> /* memset() */
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+
+int
+main ()
+{
+
+    void *buf;
+    int len;
+    void *from;
+    socklen_t *fromlen;
+
+    struct iovec iov;
+    char *cmsg = malloc(CMSG_SPACE(sizeof(struct in_addr)));
+    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);
+
+    for (cm = CMSG_FIRSTHDR(&msg); cm; cm = CMSG_NXTHDR(&msg, cm)) {
+        if (cm->cmsg_level == IPPROTO_IP && cm->cmsg_type == IP_RECVDSTADDR) {
+            struct in_addr* src = (struct in_addr *)CMSG_DATA(cm);
+            printf("Address: %s\n", inet_ntoa(src));
+        }
+    }
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_have_ip_recvdstaddr=yes
+else
+  ac_cv_have_ip_recvdstaddr=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ip_recvdstaddr" >&5
+$as_echo "$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
+
+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
@@ -29341,6 +29806,8 @@ ac_config_files="$ac_config_files net-snmp-create-v3-user:net-snmp-create-v3-use
 
 ac_config_files="$ac_config_files dist/generation-scripts/gen-variables:dist/generation-scripts/gen-variables.in"
 
+ac_config_files="$ac_config_files local/snmpconf"
+
 
 ac_config_commands="$ac_config_commands default"
 
@@ -29873,7 +30340,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by Net-SNMP $as_me 5.7.2.1, which was
+This file was extended by Net-SNMP $as_me 5.7.3, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -29939,7 +30406,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-Net-SNMP config.status 5.7.2.1
+Net-SNMP config.status 5.7.3
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
@@ -30361,6 +30828,7 @@ do
     "net-snmp-config") CONFIG_FILES="$CONFIG_FILES net-snmp-config:net-snmp-config.in" ;;
     "net-snmp-create-v3-user") CONFIG_FILES="$CONFIG_FILES net-snmp-create-v3-user:net-snmp-create-v3-user.in" ;;
     "dist/generation-scripts/gen-variables") CONFIG_FILES="$CONFIG_FILES dist/generation-scripts/gen-variables:dist/generation-scripts/gen-variables.in" ;;
+    "local/snmpconf") CONFIG_FILES="$CONFIG_FILES local/snmpconf" ;;
     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
diff --git a/configure.ac b/configure.ac
index 81f3e64..ecf761f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,7 +10,7 @@
 #
 # Process this file with autoconf to produce a configure script.
 #
-AC_INIT([Net-SNMP], [5.7.2.1], [net-snmp-coders at lists.sourceforge.net])
+AC_INIT([Net-SNMP], [5.7.3], [net-snmp-coders at lists.sourceforge.net])
 AC_PREREQ([2.63])
 AC_CONFIG_SRCDIR([agent/snmpd.c])
 AC_REVISION([$Revision$])
@@ -95,6 +95,7 @@ AC_CONFIG_FILES([net-snmp-config:net-snmp-config.in],
 AC_CONFIG_FILES([net-snmp-create-v3-user:net-snmp-create-v3-user.in],
 		[chmod +x net-snmp-create-v3-user])
 AC_CONFIG_FILES([dist/generation-scripts/gen-variables:dist/generation-scripts/gen-variables.in])
+AC_CONFIG_FILES([local/snmpconf])
 
 AC_CONFIG_COMMANDS([default], echo timestamp > stamp-h)
 
diff --git a/configure.d/config_modules_agent b/configure.d/config_modules_agent
index 3272679..c18ac33 100644
--- a/configure.d/config_modules_agent
+++ b/configure.d/config_modules_agent
@@ -28,7 +28,7 @@ done
 AC_MSG_CHECKING([for and configuring mib modules to use])
 
 # set up the CPP command
-MODULECPP="$CPP $PARTIALTARGETFLAGS -DNETSNMP_FEATURE_CHECKING -I${srcdir}/include -I${srcdir}/agent/mibgroup"
+MODULECPP="$CPP $PARTIALTARGETFLAGS $CPPFLAGS -DNETSNMP_FEATURE_CHECKING -I${srcdir}/include -I${srcdir}/agent/mibgroup"
 if test "x$enable_mfd_rewrites" = "xyes"; then
   MODULECPP="$MODULECPP -DNETSNMP_ENABLE_MFD_REWRITES"
 fi
@@ -77,6 +77,8 @@ for i in $test_modules
   fi
 done
 
+new_module_list=`(echo $new_module_list | tr ' ' '\n' | sort | tr '\n' ' '; echo '') | $SED 's/ $//'`
+
 AC_MSG_RESULT([$new_module_list.])
 
 #---------------------
@@ -783,8 +785,10 @@ AC_MSG_CHECKING([default mib files to read])
 if test "x$NETSNMP_DEFAULT_MIBS" = "x"; then
   NETSNMP_DEFAULT_MIBS="$default_mibs"
 fi
-if test "x$PARTIALTARGETOS" = "xmingw32" -o "x$PARTIALTARGETOS" = "xmingw32msvc" -o "x$PARTIALTARGETOS" = "xcygwin"; then
-  # mingw32 and cygwin use ';' as the environment variable separator char
+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'`
@@ -792,6 +796,10 @@ else
   ENV_SEPARATOR=":"
 fi
 AC_SUBST(ENV_SEPARATOR)
+AC_DEFINE_UNQUOTED([ENV_SEPARATOR], ["$ENV_SEPARATOR"],
+         [Environment separator character surrounded by double quotes.])
+AC_DEFINE_UNQUOTED([ENV_SEPARATOR_CHAR], ['$ENV_SEPARATOR'],
+          [Environment separator character surrounded by single quotes.])
 AC_DEFINE_UNQUOTED(NETSNMP_DEFAULT_MIBS,"$NETSNMP_DEFAULT_MIBS")
 AC_SUBST(NETSNMP_DEFAULT_MIBS)
 AC_MSG_RESULT($NETSNMP_DEFAULT_MIBS)
diff --git a/configure.d/config_modules_lib b/configure.d/config_modules_lib
index b6609c1..362ba0a 100644
--- a/configure.d/config_modules_lib
+++ b/configure.d/config_modules_lib
@@ -131,16 +131,18 @@ AC_MSG_CACHE_ADD(SNMPv3 Security Modules:    $new_with_security)
 # Handle the special case of KSM to see which crypto API we support
 #
 
-ac_cv_NETSNMP_USE_KERBEROS_MIT=no
 rebuilt_new_with_security=
 already_checked_krb5=no
 
 for sec in $new_with_security
 do
-  if test "x$sec" = "xksm" -a "xyes" = "x$already_checked_krb5"; then
-    continue
+  if test "x$sec" = "xksm"; then
+    if test "xyes" = "x$already_checked_krb5"; then
+      continue
+    else
+      already_checked_krb5=yes
+    fi
   fi
-  already_checked_krb5=yes
 
   if test x$sec != xksm; then
     rebuilt_new_with_security="$rebuilt_new_with_security $sec"
@@ -199,10 +201,9 @@ do
     fi
 
     AC_MSG_CHECKING([to see which crypto API we need to use])
-    AC_CHECK_FUNC(krb5_c_encrypt,[
     AC_CACHE_VAL(ac_cv_NETSNMP_USE_KERBEROS_MIT,
       AC_CHECK_LIB(k5crypto, krb5_init_context,
-	ac_cv_NETSNMP_USE_KERBEROS_MIT=yes, ac_cv_MIT_NEW_CRYPTo=no
+	ac_cv_NETSNMP_USE_KERBEROS_MIT=yes, ac_cv_NETSNMP_USE_KERBEROS_MIT=no
       )
     )
 
@@ -214,8 +215,9 @@ do
 	LIBS="$LIBS -lk5crypto"
       fi
     else
-      AC_MSG_RESULT(old MIT crypto API)])
+      AC_MSG_RESULT(old MIT crypto API)
     fi
+    AC_CHECK_FUNCS([krb5_auth_con_getsendsubkey])
   fi
 done
 
diff --git a/configure.d/config_os_headers b/configure.d/config_os_headers
index d903f58..708aa09 100644
--- a/configure.d/config_os_headers
+++ b/configure.d/config_os_headers
@@ -55,6 +55,7 @@ AC_CHECK_HEADERS([dlfcn.h    err.h      fcntl.h    fstab.h      ] dnl
                  [ioctls.h   kstat.h    kvm.h      limits.h     ] dnl
                  [           mntent.h   mtab.h                  ] dnl
                  [           pkglocs.h             pwd.h        ] dnl
+                 [           com_err.h             et/com_err.h ] dnl
                  [           utmpx.h    utsname.h               ])
 
 AC_CHECK_HEADERS([sys/diskio.h  sys/dkio.h                                 ] dnl
@@ -390,18 +391,21 @@ AC_CHECK_HEADERS([netinet/ip6.h                               ] dnl
 #if HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
-#if HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#if HAVE_NETINET_IP6_H
-#include <netinet/ip6.h>
-#endif
 #if HAVE_NET_IF_H
 #include <net/if.h>
 #endif
+#if HAVE_NET_IF_VAR_H
+#include <net/if_var.h>
+#endif
 #if HAVE_NET_ROUTE_H
 #include <net/route.h>
 #endif
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#if HAVE_NETINET_IP6_H
+#include <netinet/ip6.h>
+#endif
     ]])
 
 #       requiring <netinet/in.h>                        (OpenBSD 2.6)
@@ -469,6 +473,27 @@ AC_CHECK_HEADERS(pkginfo.h,
     NETSNMP_SEARCH_LIBS(pkginfo, adm,
         AC_DEFINE(HAVE_PKGINFO, 1, [define if you have pkginfo]),,,LMIBLIBS))
 
+AC_CHECK_HEADERS(pkg.h,
+    NETSNMP_SEARCH_LIBS(pkg_init, pkg,
+        AC_DEFINE(HAVE_LIBPKG, 1, [define if you have BSD pkg-ng])))
+
+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"
+    AC_CHECK_HEADERS(pkg.h,
+        NETSNMP_SEARCH_LIBS(pkg_init, pkg,
+	    AC_DEFINE(HAVE_LIBPKG, 1, [define if you have BSD pkg-ng])))
+    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)
@@ -520,4 +545,44 @@ fi
 #
 AC_CHECK_HEADERS([sensors/sensors.h picl.h])
 
+##  This is here to avoid loads of redefinition warnings during
+##  module configuration
+
+##
+#   rtentry structure checks:
+##
+
+# Check struct rtentry for common fields
+#   Agent:
+#
+AC_CHECK_MEMBERS([struct rtentry.rt_dst,
+                  struct rtentry.rt_hash,
+                  struct rtentry.rt_next,
+                  struct rtentry.rt_refcnt,
+                  struct rtentry.rt_unit,
+                  struct rtentry.rt_use],,,
+    [
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#include <sys/types.h>
+#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 <sys/socket.h>
+#undef KERNEL
+#undef _KERNEL
+#endif
+#ifdef HAVE_NET_ROUTE_H
+#include <net/route.h>
+#endif
+    ])
+
 fi # NETSNMP_QUICK_CHECK
diff --git a/configure.d/config_os_libs2 b/configure.d/config_os_libs2
index 677f3e6..47491e2 100644
--- a/configure.d/config_os_libs2
+++ b/configure.d/config_os_libs2
@@ -225,9 +225,22 @@ fi
 if test "x$with_nl" != "xno"; then
     case $target_os in
     linux*) # Check for libnl (linux)
-	NETSNMP_SEARCH_LIBS(
-	    nl_connect, nl,
-	    [AC_CHECK_HEADERS(netlink/netlink.h)],,, LMIBLIBS)
+        netsnmp_save_CPPFLAGS="$CPPFLAGS"
+        CPPFLAGS="-I/usr/include/libnl3 $CPPFLAGS"
+        NETSNMP_SEARCH_LIBS(nl_connect, nl-3,
+            [AC_CHECK_HEADERS(netlink/netlink.h)
+            EXTERNAL_MIBGROUP_INCLUDES="$EXTERNAL_MIBGROUP_INCLUDES -I/usr/include/libnl3"],
+            [CPPFLAGS="$netsnmp_save_CPPFLAGS"], [], [], [LMIBLIBS])
+        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 <netlink/netlink.h> provides the
+                            libnl3 API])])
+        fi
     ;;
     esac
 fi
@@ -317,12 +330,12 @@ elif test "x$askedpkcs" = "xyes"; then
 fi
 if test "x$TLSPROG" = "xyes"; then
    AC_CHECK_DECL([EVP_sha224],
-    : ,
     AC_DEFINE([HAVE_EVP_SHA224], [], [Define if you have EVP_sha224/256 in openssl]),
+    : ,
     [[#include <openssl/evp.h>]])
    AC_CHECK_DECL([EVP_sha384],
-    : ,
     AC_DEFINE([HAVE_EVP_SHA384], [], [Define if you have EVP_sha384/256 in openssl]),
+    : ,
     [[#include <openssl/evp.h>]])
 fi
 
@@ -452,22 +465,26 @@ fi
 ##
 if test "x$with_mysql" = "xyes" ; then
   AC_PATH_PROGS(MYSQLCONFIG,mysql_config)
-  AC_CHECK_HEADERS(mysql/mysql.h)
-  AC_CHECK_HEADER(mysql/mysql.h,mysql_h=yes,mysql_h=no)
-  if test "x$MYSQLCONFIG" = "x" -o "x$mysql_h" = "xno"; then
-     AC_MSG_ERROR([Could not find mysql_config or mysql.h and was specifically asked to use MySQL support])
-  fi
+  test -x "$MYSQLCONFIG" \
+	|| AC_MSG_ERROR([Could not find mysql_config and was specifically asked to use MySQL support])
   MYSQL_LIBS=`$MYSQLCONFIG --libs`
-  MYSQL_INCLUDES=`$MYSQLCONFIG --cflags`
-  AC_MSG_CHECKING([whether MY_INIT() works])
+  MYSQL_INCLUDES=`$MYSQLCONFIG --include`
   _libs="${LIBS}"
   _cppflags="${CPPFLAGS}"
   LIBS="${LIBS} ${MYSQL_LIBS}"
   CPPFLAGS="${CPPFLAGS} ${MYSQL_INCLUDES}"
-  AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <mysql/my_global.h>
-               #include <mysql/my_sys.h>]], [[MY_INIT("my_init_test")]])],[AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
-               AC_DEFINE([HAVE_BROKEN_LIBMYSQLCLIENT], 1,
-	                 [Define if using MY_INIT() causes a linker error])])
+  AC_CHECK_HEADER(mysql.h,,
+     [AC_MSG_ERROR([Could not find mysql.h and was specifically asked to use MySQL support])])
+  AC_MSG_CHECKING([whether MY_INIT() works])
+  AC_LINK_IFELSE([
+    AC_LANG_PROGRAM(
+      [[#include <my_global.h>
+        #include <my_sys.h>]],
+      [[MY_INIT("my_init_test")]])],
+      [AC_MSG_RESULT(yes)],
+      [AC_MSG_RESULT(no)
+       AC_DEFINE([HAVE_BROKEN_LIBMYSQLCLIENT], 1,
+                 [Define if using MY_INIT() causes a linker error])])
   CPPFLAGS="${_cppflags}"
   LIBS="${_libs}"
   AC_MSG_CACHE_ADD(MYSQL Trap Logging:         enabled)
diff --git a/configure.d/config_os_misc4 b/configure.d/config_os_misc4
index b6cb040..cc8bad2 100644
--- a/configure.d/config_os_misc4
+++ b/configure.d/config_os_misc4
@@ -317,3 +317,100 @@ And this can be very slow.])
     fi         # "test $ac_inet_ip_h = yes"
     ;;
 esac
+
+#   Check whether IP_PKTINFO is usable.
+#
+
+AC_CACHE_CHECK([for IP_PKTINFO ],
+                [ac_cv_have_ip_pktinfo],
+[AC_LINK_IFELSE([AC_LANG_PROGRAM([
+#include <stdio.h>  /* printf() */
+#include <stdlib.h> /* malloc() */
+#include <string.h> /* memset() */
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+], [
+    void *buf;
+    int len;
+    void *from;
+    socklen_t *fromlen;
+
+    struct iovec iov;
+    char *cmsg = malloc(CMSG_SPACE(sizeof(struct in_pktinfo)));
+    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);
+
+    for (cm = CMSG_FIRSTHDR(&msg); cm; cm = CMSG_NXTHDR(&msg, cm)) {
+        if (cm->cmsg_level == SOL_IP && cm->cmsg_type == IP_PKTINFO) {
+            struct in_pktinfo* src = (struct in_pktinfo *)CMSG_DATA(cm);
+            printf("Address: %s; index: %d\n", inet_ntoa(src->ipi_addr),
+	           src->ipi_ifindex);
+        }
+    }
+])],
+[ac_cv_have_ip_pktinfo=yes],
+[ac_cv_have_ip_pktinfo=no]
+)])
+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 IP_RECVDSTADDR is usable.
+#
+
+AC_CACHE_CHECK([for IP_RECVDSTADDR ],
+                [ac_cv_have_ip_recvdstaddr],
+[AC_LINK_IFELSE([AC_LANG_PROGRAM([
+#include <stdio.h>  /* printf() */
+#include <stdlib.h> /* malloc() */
+#include <string.h> /* memset() */
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+], [
+    void *buf;
+    int len;
+    void *from;
+    socklen_t *fromlen;
+
+    struct iovec iov;
+    char *cmsg = malloc(CMSG_SPACE(sizeof(struct in_addr)));
+    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);
+
+    for (cm = CMSG_FIRSTHDR(&msg); cm; cm = CMSG_NXTHDR(&msg, cm)) {
+        if (cm->cmsg_level == IPPROTO_IP && cm->cmsg_type == IP_RECVDSTADDR) {
+            struct in_addr* src = (struct in_addr *)CMSG_DATA(cm);
+            printf("Address: %s\n", inet_ntoa(src));
+        }
+    }
+])],
+[ac_cv_have_ip_recvdstaddr=yes],
+[ac_cv_have_ip_recvdstaddr=no]
+)])
+if test x$ac_cv_have_ip_recvdstaddr = xyes; then
+    AC_DEFINE(HAVE_IP_RECVDSTADDR, 1, [Set if IP_RECVDSTADDR is usable])
+fi
diff --git a/configure.d/config_os_progs b/configure.d/config_os_progs
index 6ab38f4..160134c 100644
--- a/configure.d/config_os_progs
+++ b/configure.d/config_os_progs
@@ -85,13 +85,13 @@ have_gnu_make=$?
 ##
 
 AC_MSG_CHECKING([whether the Perl function system() invokes a POSIX shell])
-if test "x$PERLPROG" != 'x' && test -x "$PERLPROG" && test "x`$PERLPROG -e 'system('"'"'echo $OSTYPE'"'"');'`" != 'x$OSTYPE'; then
+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
+AC_MSG_RESULT([$PERL_SYSTEM_INVOKES_POSIX_SHELL])
 AC_SUBST([PERL_SYSTEM_INVOKES_POSIX_SHELL])
-AC_MSG_RESULT([yes])
 
 
 ##
@@ -171,6 +171,7 @@ AC_SUBST(SNMPLIB_INCLUDES)
 AC_SUBST(AGENT_INCLUDES)
 AC_SUBST(HELPER_INCLUDES)
 AC_SUBST(MIBGROUP_INCLUDES)
+AC_SUBST(EXTERNAL_MIBGROUP_INCLUDES)
 AC_SUBST(GNU_vpath)
 AC_SUBST(NON_GNU_VPATH)
 
@@ -400,12 +401,12 @@ case $target_os in
 	fi
 	;;
 
-    darwin8*|darwin9*|darwin10*)
+    darwin8*|darwin9*|darwin10*|darwin11*|darwin12*|darwin13*)
         #   Flat Namespace linking                      (Mac OS/X)
         #
         AC_MSG_CHECKING([whether darwin ld might need -flat_namespace])
 	if test -z "$MACOSX_DEPLOYMENT_TARGET"; then
-		LDFLAGS="-flat_namespace $LDFLAGS"
+		LDFLAGS="-flat_namespace -framework CoreFoundation -framework CoreServices -framework DiskArbitration -framework IOKit $LDFLAGS"
 		AC_MSG_RESULT([yes])
 	else
 		AC_MSG_RESULT([no])
diff --git a/configure.d/config_os_struct_members b/configure.d/config_os_struct_members
index b26cf77..7f6b2c0 100644
--- a/configure.d/config_os_struct_members
+++ b/configure.d/config_os_struct_members
@@ -91,6 +91,20 @@ AC_CHECK_MEMBERS([struct ipstat.ips_cantfrag,
 #include <netinet/ip_var.h>
 #endif
     ]])
+#       struct ip6stat
+#   Agent:
+#
+AC_CHECK_MEMBERS([struct ip6stat.ip6s_exthdrtoolong ],,,[
+    AC_INCLUDES_DEFAULT()
+    [
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#if HAVE_NETINET6_IP6_VAR_H
+#include <netinet6/ip6_var.h>
+#endif
+    ]])
+
 #
 #   Not-Used:
 AC_CHECK_MEMBERS([struct ipstat.ips_cantforward,
@@ -121,6 +135,14 @@ AC_CHECK_MEMBERS([struct mbstat.m_clusters,
 #endif
     ]])
 
+#	struct uvmexp
+#
+AC_CHECK_MEMBERS([struct uvmexp.pgswapin],,,[
+    AC_INCLUDES_DEFAULT()
+    [
+#include <uvm/uvm_extern.h>
+    ]])
+
 #       struct nlist
 #
 AC_CHECK_MEMBERS([struct nlist.n_value,
@@ -191,30 +213,6 @@ AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id],,,[
 #endif
     ]])
 
-#       struct msghdr
-#   Library:
-#
-AC_CHECK_MEMBERS([struct msghdr.msg_control,
-                  struct msghdr.msg_flags],,,[
-    AC_INCLUDES_DEFAULT()
-    [
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#endif
-#ifdef HAVE_WS2TCPIP_H
-#include <ws2tcpip.h>
-#endif
-    ]])
-
 #       struct sockaddr_un
 #   Library:
 #
@@ -372,6 +370,7 @@ AC_CHECK_MEMBERS([struct udpstat.udps_discard,
                   struct udpstat.udps_fullsock,
                   struct udpstat.udps_noport,
                   struct udpstat.udps_noportbcast,
+                  struct udpstat.udps_ipackets,
                   struct udpstat.udps_opackets],,,[
     AC_INCLUDES_DEFAULT()
     [
@@ -608,44 +607,6 @@ struct ifnet {
     ]])
 
 
-##
-#   rtentry structure checks:
-##
-
-# Check struct rtentry for common fields
-#   Agent:
-#
-AC_CHECK_MEMBERS([struct rtentry.rt_dst,
-                  struct rtentry.rt_hash,
-                  struct rtentry.rt_next,
-                  struct rtentry.rt_refcnt,
-                  struct rtentry.rt_unit,
-                  struct rtentry.rt_use],,,
-    [
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#include <sys/types.h>
-#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 <sys/socket.h>
-#undef KERNEL
-#undef _KERNEL
-#endif
-#ifdef HAVE_NET_ROUTE_H
-#include <net/route.h>
-#endif
-    ])
-
-
 # Check for BSD 4.3 vs 4.4 struct rtentry
 #
 AC_CACHE_CHECK([type of rtentry structure],
diff --git a/dist/Makefile b/dist/Makefile
index 57eb2af..59ad8d5 100644
--- a/dist/Makefile
+++ b/dist/Makefile
@@ -19,7 +19,7 @@ SHELL = /bin/sh
 NAME = net-snmp
 
 # Define the default RPM release number. Set by Version-Munge.pl
-VERSION = 5.7.2.1
+VERSION = 5.7.3
 
 VERSION_TAG=`echo Ext-$(VERSION) | sed 's/\./-/g;'`
 
diff --git a/dist/generation-scripts/gen-variables b/dist/generation-scripts/gen-variables
deleted file mode 100644
index d2e8677..0000000
--- a/dist/generation-scripts/gen-variables
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# common variables used by configure scripts
-#
-SED="/usr/bin/sed"
-CPP="gcc -E"
-GREP="/usr/bin/grep"
-PARTIALTARGETFLAGS="-Ulinux -Dlinux=linux"
-NETSNMP_SYSTEM_INCLUDE_FILE="net-snmp/system/linux.h"
-
-srcdir=.
diff --git a/dist/makerelease.xml b/dist/makerelease.xml
index 7371256..021a2b7 100644
--- a/dist/makerelease.xml
+++ b/dist/makerelease.xml
@@ -115,6 +115,13 @@
             Git Branch Name:         {BRANCHPATH}
 	  </text>
 	</step>
+	<step type="system" stepname="update" title="update">
+	  <text>We need to make sure your code is up to date and
+	  matches the latest sources in this branch.</text>
+	  <commands>
+	    <command>git pull</command>
+	  </commands>
+	</step>
 	<step type="system" stepname="update" title="Check for changes">
 	  <text>This steps looks for outstanding files that have been
 	  modified.  There should be no outstanding modifications!  If
@@ -265,6 +272,48 @@
 	    </step>
 	  </steps>
 	</step>
+        <step type="section" title="Handle dist/release">
+          <steps>
+	    <step type="system" skipunless="'{RELEASETYPE}' eq 'rc'">
+	      <text>Note in 'dist/release' that this branch is in release candidate mode
+	      </text>
+	      <commands>
+	        <command>git checkout V5-4-patches</command>
+	        <command>echo {BRANCHPATH} rc >> dist/release </command>
+	        <command ignoreerror="1">git commit -m "Release Candidate for {BRANCHPATH}" dist/release</command>
+	        <command>git checkout {BRANCHPATH} </command>
+	        <command>git merge V5-4-patches    </command>
+	        <command>git commit                </command>
+	      </commands>
+	    </step>
+	    <step type="system" skipif="'{RELEASETYPE}' eq 'rc'">
+	      <text>Ensure that 'dist/release' doesn't reference this branch
+	      </text>
+	      <commands>
+	        <command>git checkout V5-4-patches</command>
+	        <command>grep -v {BRANCHPATH} dist/release > dist/release.new </command>
+	        <command>mv dist/release.new dist/release </command>
+	        <command ignoreerror="1">git commit -m "{BRANCHPATH} out of Release Candidate" dist/release</command>
+	        <command>git checkout {BRANCHPATH} </command>
+	        <command>git merge V5-4-patches    </command>
+	        <command>git commit                </command>
+	      </commands>
+	    </step>
+          </steps>
+        </step>
+	<step type="system" stepname="docs:make" title="docs:make">
+	  <text>This step will create manual pages from doxygen
+	  instrumented code files.</text>
+	  <commands>
+	    <command>
+	       if [ -f Makefile ]
+	       then
+	         make docs
+	         make mancp
+	       fi
+	    </command>
+	  </commands>
+	</step>
 	<step type="system" stepname="docs:update" title="docs:update">
 	  <text>This will run git status to figure out what files have
 	  changed since the previous man page generation steps were
@@ -434,6 +483,7 @@
 	  <text>One more git pull and status to make sure nothing
 	  odd exists in your source tree.  Please check the results!</text>
 	  <commands>
+	    <command>git pull</command>
 	    <command>git status --porcelain</command>
 	  </commands>
 	</step>
@@ -452,10 +502,10 @@
 	    This will actually svn copy the current checked out branch
 	    to the new tag name.  Specifically:
 
-               git tag -u A77C5329 -s {VERSIONTAGNAME} -m "Tagging of version {VERSION} as {VERSIONTAGNAME}"
+               git tag -u E0F81533 -s {VERSIONTAGNAME} -m "Tagging of version {VERSION} as {VERSIONTAGNAME}"
 	  </text>
 	  <commands>
-	    <command>git tag -u A77C5329 -s {VERSIONTAGNAME} -m "Tagging of version {VERSION} as {VERSIONTAGNAME}"</command>
+	    <command>git tag -u E0F81533 -s {VERSIONTAGNAME} -m "Tagging of version {VERSION} as {VERSIONTAGNAME}"</command>
 	  </commands>
 	</step>
 	<step prompt="true" type="system" stepname="release:makedist" title="release:makedist">
@@ -490,12 +540,33 @@
 	</step>
 	<step type="system" stepname="release:gpg" title="release:gpg">
 	  <commands>
-	    <command>gpg -u A77C5329 -a --detach-sign net-snmp-{VERSION}.tar.gz</command>
+	    <command>gpg --use-agent -u E0F81533 -a --detach-sign net-snmp-{VERSION}.tar.gz</command>
 	  </commands>
 	</step>
 	<step type="system" stepname="release:gpg" title="release:gpg">
 	  <commands>
-	    <command>gpg -u A77C5329 -a --detach-sign net-snmp-{VERSION}.zip</command>
+	    <command>gpg --use-agent -u E0F81533 -a --detach-sign net-snmp-{VERSION}.zip</command>
+	  </commands>
+	</step>
+	<step type="command" name="release:nextbranch" title="Don't propagate code modifications"
+	      pause="0" mandatory="0">
+	  <text>
+	    Mark these code modifications as specific to this particular branch
+	  </text>
+	  <commands>
+	    <command>git checkout {NEXTBRANCH}</command>
+	    <command>git merge -s ours -m "Release {VERSION} specific changes" {BRANCHPATH}</command>
+	    <command>git checkout {BRANCHPATH}</command>
+	  </commands>
+	</step>
+	<step type="command" name="release:push" title="Push the code modifications"
+	      pause="0" mandatory="0">
+	  <text>
+	    Push the code modifications to the upstream branch
+	  </text>
+	  <commands>
+	    <command>git push</command>
+	    <command>git push --tags origin {VERSIONTAGNAME}</command>
 	  </commands>
 	</step>
 
@@ -533,5 +604,123 @@
 	</step>
       </steps>
     </step>
+    <step type="section" title="Release the results">
+      <text>Now we'll publish the results to the SF server</text>
+      <steps>
+	<step pause="true" type="system" skipif="'{RELEASETYPE}' eq 'full'"
+	      stepname="publish:rsync" title="rsync the new files">
+	  <text>This will copy the results to the SF uploads directory
+	    in your account on frs.sourceforge.net.  The following command
+	    is just as an example - this script does *not* upload the
+	    files automatically.  You must do something like:</text>
+	  <commands>
+	    <command>echo rsync -v net-snmp-{VERSION}.tar.gz net-snmp-{VERSION}.tar.gz.asc net-snmp-{VERSION}.zip net-snmp-{VERSION}.zip.asc hardaker,net-snmp at frs.sourceforge.net:/home/frs/project/n/ne/net-snmp/net-snmp/{VERSIONTARGET}-pre-releases/</command>
+	  </commands>
+	</step>
+	<step pause="true" type="system" skipunless="'{RELEASETYPE}' eq 'full'"
+	      stepname="publish:rsync" title="rsync the new files">
+	  <text>This will copy the results to the SF uploads directory
+	    in your account on frs.sourceforge.net.  The following command
+	    is just as an example - this script does *not* upload the
+	    files automatically.  You must do something like:</text>
+	  <commands>
+	    <command>echo rsync -v net-snmp-{VERSION}.tar.gz net-snmp-{VERSION}.tar.gz.asc net-snmp-{VERSION}.zip net-snmp-{VERSION}.zip.asc hardaker,net-snmp at frs.sourceforge.net:/home/frs/project/n/ne/net-snmp/net-snmp/{VERSIONTARGET}/</command>
+	  </commands>
+	</step>
+	<step type="informational" stepname="publish:editrelease"
+	title="Update the SF release web page">
+	  <text>
+	    Update the project download web page (http://www.net-snmp.org/download.html) to mention this new release
+	  </text>
+<!-- Doesn't work
+	  <commands>
+	    <command>firefox 'http://sourceforge.net/project/admin/editpackages.php?group_id=12694'</command>
+	  </commands>
+ -->
+	</step>
+	<step type="system" stepname="publish:editpatches"
+	      skipunless="'{RELEASETYPE}' eq 'full'"
+	      title="Update the SF Official Patch tracker">
+	  <text>
+	    If this the final version of this release, then:
+	    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.
+	  </text>
+	  <commands>
+	    <command>firefox 'http://www.net-snmp.org/official_patches/'</command>
+	  </commands>
+	</step>
+      </steps>
+    </step>
+    <step type="informational">
+      <text>
+	Binaries: build rpms, .tar.gzs, etc.
+      </text>
+    </step>
+    <step type="Informational" name="cleanup:nsrollup" title="Run nsrollup"
+	  pause="1" mandatory="1">
+      <text>
+	You need to run nsrollup now to sync all the changes we've
+	made into any upstream branches.  This will likely cause merge
+	conflicts because of the version number clashes and will need
+	to be resolved.
+
+	Run (in bash):
+
+ 	  . local/gittools/shell-functions
+	  nsrollup
+	  nssync
+
+	XXX: For conflicts, we can probably pick -s ours but needs to
+     	     be checked and documented.
+      </text>
+    </step>
+    <step type="section" title="Advertise it!">
+      <steps>
+	<step type="system" pause="1" title="Add note to the news system">
+	  <text>Add a note to the source forge news system:
+
+	    http://sourceforge.net/news/submit.php?group_id=12694
+	  </text>
+	  <commands>
+	    <command>echo firefox 'http://sourceforge.net/news/submit.php?group_id=12694'</command>
+	  </commands>
+	</step>
+	<step type="informational" pause="1">
+	  <text>Send an announcement message to one of the following
+	  mailing lists based on its type:
+
+          pre:    net-snmp-coders at lists.sourceforge.net
+
+          rc:     net-snmp-users at lists.sourceforge.net
+
+          final:  net-snmp-announce at lists.sourceforge.net
+                       (one week after the source tarball is made available)
+	  </text>
+	</step>
+	<step type="informational" skipunless="'{RELEASETYPE}' eq 'full'" pause="1">
+	  <text>Update the topic on the #Net-SNMP channel if this is a
+	    trunk based release.
+	  </text>
+	</step>
+	<step type="system" skipunless="'{RELEASETYPE}' eq 'full'" pause="1">
+	  <text>Update the freshmeat listing (Wes needs to do this):
+
+	    http://freshmeat.net/projects/net-snmp/
+	  </text>
+	  <commands>
+	    <command>echo firefox http://freshmeat.net/projects/net-snmp/</command>
+	  </commands>
+	</step>
+      </steps>
+    </step>
+    <step type="informational" skipunless="'{RELEASETYPE}' eq 'full'" pause="1">
+      <text>
+	Advertise: NEWS upload to sf, publish on -announce, freshmeat,
+	and the GNU FSF directory
+	(http://directory.fsf.org/project/net-snmp/)...
+        (send mail to bug-directory at gnu.org)
+      </text>
+    </step>
   </steps>
 </makerelease>
diff --git a/dist/net-snmp.spec b/dist/net-snmp.spec
index bc36a6e..893adbe 100644
--- a/dist/net-snmp.spec
+++ b/dist/net-snmp.spec
@@ -24,11 +24,11 @@
 #
 # Check for -without embedded_perl
 #
-%{?_without_embedded_perl:%define netsnmp_embedded_perl 0}
+%{?_without_embedded_perl:%undefine netsnmp_embedded_perl}
 #
 # check for -without perl_modules
 #
-%{?_without_perl_modules:%define netsnmp_perl_modules 0}
+%{?_without_perl_modules:%undefine netsnmp_perl_modules}
 #
 # if embedded_perl or perl_modules specified, include some Perl stuff
 #
@@ -37,7 +37,7 @@
 %endif
 Summary: Tools and servers for the SNMP protocol
 Name: net-snmp
-Version: 5.7.2.1
+Version: 5.7.3
 # update release for vendor release. (eg 1.fc6, 1.rh72, 1.ydl3, 1.ydl23)
 Release: 1
 URL: http://www.net-snmp.org/
@@ -51,7 +51,7 @@ BuildRoot: /tmp/%{name}-root
 Packager: The Net-SNMP Coders <http://sourceforge.net/projects/net-snmp/>
 Requires: openssl, popt, rpm, zlib, bzip2-libs, elfutils-libelf, glibc
 BuildRequires: perl, elfutils-libelf-devel, openssl-devel, bzip2-devel, rpm-devel
-%if %{netsnmp_embedded_perl}
+%if 0%{?netsnmp_embedded_perl}
 BuildRequires: perl(ExtUtils::Embed)
 Requires: perl
 %endif
@@ -81,7 +81,7 @@ generate and handle SNMP traps, etc.  Using SNMP you can check the
 status of a network of computers, routers, switches, servers, ... to
 evaluate the state of your network.
 
-%if %{netsnmp_embedded_perl}
+%if 0%{?netsnmp_embedded_perl}
 This package includes embedded Perl support within the agent.
 %endif
 
@@ -96,7 +96,7 @@ Obsoletes: cmu-snmp-devel ucd-snmp-devel
 The net-snmp-devel package contains headers and libraries which are
 useful for building SNMP applications, agents, and sub-agents.
 
-%if %{netsnmp_include_perl}
+%if 0%{?netsnmp_include_perl}
 %package perlmods
 Group: System Environment/Libraries
 Summary: The Perl modules provided with Net-SNMP
@@ -120,7 +120,7 @@ protocol.  Both client and agent support modules are provided.
 %endif
 
 %prep
-%if %{netsnmp_embedded_perl} == 1 && %{netsnmp_perl_modules} == 0
+%if 0%{?netsnmp_embedded_perl} != 0 && 0%{?netsnmp_perl_modules} == 0
 echo "'-with embedded_perl' requires '-with perl_modules'"
 exit 1
 %endif
@@ -155,7 +155,7 @@ mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
 perl -i -p -e 's@/usr/local/share/snmp/@/etc/snmp/@g;s at usr/local@%{_prefix}@g' dist/snmpd-init.d
 install -m 755 dist/snmpd-init.d $RPM_BUILD_ROOT/etc/rc.d/init.d/snmpd
 
-%if %{netsnmp_include_perl}
+%if 0%{?netsnmp_include_perl}
 # unneeded Perl stuff
 find $RPM_BUILD_ROOT/%{_libdir}/perl5/ -name Bundle -type d | xargs rm -rf
 find $RPM_BUILD_ROOT/%{_libdir}/perl5/ -name perllocal.pod | xargs rm -f
@@ -226,7 +226,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/*.a
 %{_libdir}/*.la
 
-%if %{netsnmp_include_perl}
+%if 0%{?netsnmp_include_perl}
 %files -f net-snmp-perl-files perlmods
 %defattr(-,root,root)
 %{_mandir}/man3/*::*
@@ -237,6 +237,9 @@ rm -rf $RPM_BUILD_ROOT
 echo "No additional verification is done for net-snmp"
 
 %changelog
+* Sat Dec 15 2012 Magnus Fromreide <magfr at lysator.liu.se>
+- Make he -without options to rpmbuild work
+
 * Thu Jul 26 2012 Dave Shield <D.T.Shield at liverpool.ac.uk>
 - Additional "Provides:" to complete the list of perl modules
   Triggered by Bug ID #3540621
diff --git a/dist/release b/dist/release
index 6da7b93..8a8314c 100644
--- a/dist/release
+++ b/dist/release
@@ -3,6 +3,3 @@
 # applying patches to a given branch.  Right now, the file should contain
 # a branch name followed by 'rc' when the branch is in rc phase of a release.
 #
-V5-7-patches rc
-V5-7-patches rc
-V5-7-patches rc
diff --git a/dist/run-autoconf b/dist/run-autoconf
index 2969a59..c0f1eec 100755
--- a/dist/run-autoconf
+++ b/dist/run-autoconf
@@ -29,4 +29,4 @@ if [ "$version" != "$toolversion" ] ; then
 fi
 
 echo "Running $prog"
-autoconf "$@"
+$prog "$@"
diff --git a/include/net-snmp/agent/agent_registry.h b/include/net-snmp/agent/agent_registry.h
index 6a907bf..2949c9d 100644
--- a/include/net-snmp/agent/agent_registry.h
+++ b/include/net-snmp/agent/agent_registry.h
@@ -89,25 +89,30 @@ int netsnmp_get_lookup_cache_size(void);
 #define MIB_UNREGISTRATION_FAILED	-2
 #define DEFAULT_MIB_PRIORITY		127
 
-int             register_mib		   (const char *, struct variable *,
+int             register_mib		   (const char *,
+                                            const struct variable *,
 					    size_t, size_t, const oid *,
 					    size_t);
 
-int             register_mib_priority	   (const char *, struct variable *,
+int             register_mib_priority	   (const char *,
+                                            const struct variable *,
 					    size_t, size_t, const oid *, size_t,
 					    int);
 
-int             register_mib_range	   (const char *, struct variable *,
+int             register_mib_range	   (const char *,
+                                            const struct variable *,
 					    size_t, size_t, const oid *,
 					    size_t, int, int, oid,
 					    netsnmp_session *);
 
-int		register_mib_context	   (const char *, struct variable *,
+int		register_mib_context	   (const char *,
+                                            const struct variable *,
 					    size_t, size_t, const oid *, size_t,
 					    int, int, oid, netsnmp_session *,
 					    const char *, int, int);
 
-int	netsnmp_register_mib_table_row	   (const char *, struct variable *,
+int	netsnmp_register_mib_table_row	   (const char *,
+                                            const struct variable *,
 					    size_t, size_t, oid *,
 					    size_t, int, int, netsnmp_session *,
 					    const char *, int, int);
@@ -144,10 +149,12 @@ void            register_mib_detach	   (void);
  *          (sizeof(theoid) *must* return the number of elements!) 
  */
 
-#define REGISTER_MIB(descr, var, vartype, theoid)                      \
-  if (register_mib(descr, (struct variable *) var, sizeof(struct vartype), \
-               sizeof(var)/sizeof(struct vartype),                     \
-               theoid, sizeof(theoid)/sizeof(oid)) != MIB_REGISTERED_OK ) \
+#define REGISTER_MIB(descr, var, vartype, theoid)                       \
+    if (register_mib(descr, (const struct variable *) var,              \
+                     sizeof(struct vartype),                            \
+                     sizeof(var)/sizeof(struct vartype),                \
+                     theoid, sizeof(theoid)/sizeof(oid)) !=             \
+        MIB_REGISTERED_OK)                                              \
 	DEBUGMSGTL(("register_mib", "%s registration failed\n", descr));
 
 
diff --git a/include/net-snmp/agent/old_api.h b/include/net-snmp/agent/old_api.h
index 1ae171c..2bd3cd1 100644
--- a/include/net-snmp/agent/old_api.h
+++ b/include/net-snmp/agent/old_api.h
@@ -25,7 +25,7 @@ typedef struct old_opi_cache_s {
 } netsnmp_old_api_cache;
 
 int             netsnmp_register_old_api(const char *moduleName,
-                                         struct variable *var,
+                                         const struct variable *var,
                                          size_t varsize,
                                          size_t numvars,
                                          const oid * mibloc,
diff --git a/include/net-snmp/agent/snmp_vars.h b/include/net-snmp/agent/snmp_vars.h
index 5ca2ffc..77dbd70 100644
--- a/include/net-snmp/agent/snmp_vars.h
+++ b/include/net-snmp/agent/snmp_vars.h
@@ -60,7 +60,7 @@ PERFORMANCE OF THIS SOFTWARE.
      * @see struct variable8
      * @see struct variable13
      */
-    struct variable *netsnmp_duplicate_variable(struct variable *var);
+    struct variable *netsnmp_duplicate_variable(const struct variable *var);
 
     /*
      * Function pointer called by the master agent for writes. 
diff --git a/include/net-snmp/data_access/ip_scalars.h b/include/net-snmp/data_access/ip_scalars.h
index f7b2e31..03601a0 100644
--- a/include/net-snmp/data_access/ip_scalars.h
+++ b/include/net-snmp/data_access/ip_scalars.h
@@ -8,9 +8,14 @@ extern          "C" {
 int netsnmp_arch_ip_scalars_ipForwarding_get(u_long *value);
 int netsnmp_arch_ip_scalars_ipForwarding_set(u_long value);
 
+int netsnmp_arch_ip_scalars_ipDefaultTTL_get(u_long *value);
+int netsnmp_arch_ip_scalars_ipDefaultTTL_set(u_long value);
+
 int netsnmp_arch_ip_scalars_ipv6IpForwarding_get(u_long *value);
 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);
 
 #ifdef __cplusplus
 }
diff --git a/include/net-snmp/data_access/ipaddress.h b/include/net-snmp/data_access/ipaddress.h
index 75056f2..0bff108 100644
--- a/include/net-snmp/data_access/ipaddress.h
+++ b/include/net-snmp/data_access/ipaddress.h
@@ -144,6 +144,8 @@ int netsnmp_ipaddress_prefix_copy(u_char *dst, u_char *src,
                                   int addr_len, int pfx_len);
 
 int netsnmp_ipaddress_ipv4_prefix_len(in_addr_t mask);
+in_addr_t netsnmp_ipaddress_ipv4_mask(int len);
+int netsnmp_ipaddress_ipv6_prefix_len(struct in6_addr mask);
 
 int netsnmp_ipaddress_flags_copy(u_long *ipAddressPrefixAdvPreferredLifetime,
                                  u_long *ipAddressPrefixAdvValidLifetime,
diff --git a/include/net-snmp/library/large_fd_set.h b/include/net-snmp/library/large_fd_set.h
index 9b547cd..af3fa02 100644
--- a/include/net-snmp/library/large_fd_set.h
+++ b/include/net-snmp/library/large_fd_set.h
@@ -55,8 +55,9 @@ extern "C" {
  * Number of bytes needed to store a number of file descriptors as a
  * struct fd_set.
  */
-#define NETSNMP_FD_SET_BYTES(setsize)                           \
-    (sizeof(fd_set) + ((setsize) - FD_SETSIZE) * sizeof(SOCKET))
+#define NETSNMP_FD_SET_BYTES(setsize)                                   \
+    (sizeof(fd_set) + ((setsize) > FD_SETSIZE ?                         \
+                       ((setsize) - FD_SETSIZE) * sizeof(SOCKET) : 0))
 
 /** Remove all sockets from the set *fdset. */
 #define NETSNMP_LARGE_FD_ZERO(fdset) \
@@ -91,9 +92,10 @@ int    netsnmp_large_fd_is_set(SOCKET fd, netsnmp_large_fd_set *fdset);
  * Number of bytes needed to store a number of file descriptors as a
  * struct fd_set.
  */
-#define NETSNMP_FD_SET_BYTES(setsize)                                   \
-    (sizeof(fd_set) + NETSNMP_FD_SET_ELEM_COUNT((setsize) - FD_SETSIZE) \
-     * NETSNMP_FD_MASK_SIZE)
+#define NETSNMP_FD_SET_BYTES(setsize)                                    \
+    (sizeof(fd_set) + ((setsize) > FD_SETSIZE ?                          \
+                       NETSNMP_FD_SET_ELEM_COUNT((setsize) - FD_SETSIZE) \
+                       * NETSNMP_FD_MASK_SIZE : 0))
 
 /** Remove all file descriptors from the set *fdset. */
 #define NETSNMP_LARGE_FD_ZERO(fdset)                            \
diff --git a/include/net-snmp/library/read_config.h b/include/net-snmp/library/read_config.h
index 5b1f7d0..08eca9b 100644
--- a/include/net-snmp/library/read_config.h
+++ b/include/net-snmp/library/read_config.h
@@ -66,9 +66,11 @@ extern          "C" {
 
     NETSNMP_IMPORT
     char           *skip_white(char *);
+    NETSNMP_IMPORT
     const char     *skip_white_const(const char *);
     NETSNMP_IMPORT
     char           *skip_not_white(char *);
+    NETSNMP_IMPORT
     const char     *skip_not_white_const(const char *);
     NETSNMP_IMPORT
     char           *skip_token(char *);
@@ -84,12 +86,13 @@ extern          "C" {
     int             read_config_with_type(const char *, const char *);
     NETSNMP_IMPORT
     char           *read_config_save_octet_string(char *saveto,
-                                                  u_char * str,
+                                                  const u_char * str,
                                                   size_t len);
     NETSNMP_IMPORT
     char           *read_config_read_octet_string(const char *readfrom,
                                                   u_char ** str,
                                                   size_t * len);
+    NETSNMP_IMPORT
     const char     *read_config_read_octet_string_const(const char *readfrom,
                                                         u_char ** str,
                                                         size_t * len);
diff --git a/include/net-snmp/library/snmpUDPBaseDomain.h b/include/net-snmp/library/snmpUDPBaseDomain.h
index 3ce7320..b9d2c34 100644
--- a/include/net-snmp/library/snmpUDPBaseDomain.h
+++ b/include/net-snmp/library/snmpUDPBaseDomain.h
@@ -10,19 +10,10 @@ extern          "C" {
 #endif
 
 /*
- * Definitions
+ * "Constructor" for transport domain object.  
  */
-#ifdef  MSG_DONTWAIT
-#define NETSNMP_DONTWAIT MSG_DONTWAIT
-#else
-#define NETSNMP_DONTWAIT 0
-#endif
 
-#ifdef  MSG_NOSIGNAL
-#define NETSNMP_NOSIGNAL MSG_NOSIGNAL
-#else
-#define NETSNMP_NOSIGNAL 0
-#endif
+    void netsnmp_udp_base_ctor(void);
 
 /*
  * Prototypes
@@ -33,8 +24,7 @@ extern          "C" {
     int netsnmp_udpbase_send(netsnmp_transport *t, void *buf, int size,
                              void **opaque, int *olength);
 
-#if defined(linux) && defined(IP_PKTINFO) \
-    || defined(IP_RECVDSTADDR) && !defined(_MSC_VER)
+#if defined(HAVE_IP_PKTINFO) || defined(HAVE_IP_RECVDSTADDR)
     int netsnmp_udpbase_recvfrom(int s, void *buf, int len,
                                  struct sockaddr *from, socklen_t *fromlen,
                                  struct sockaddr *dstip, socklen_t *dstlen,
diff --git a/include/net-snmp/library/snmpUDPDomain.h b/include/net-snmp/library/snmpUDPDomain.h
index f030360..3a09dfd 100644
--- a/include/net-snmp/library/snmpUDPDomain.h
+++ b/include/net-snmp/library/snmpUDPDomain.h
@@ -48,8 +48,7 @@ void            netsnmp_udp_ctor(void);
  * protected-ish functions used by other core-code
  */
 char *netsnmp_udp_fmtaddr(netsnmp_transport *t, void *data, int len);
-#if defined(linux) && defined(IP_PKTINFO) || \
-    defined(IP_RECVDSTADDR) && !defined(_MSC_VER)
+#if defined(HAVE_IP_PKTINFO) || defined(HAVE_IP_RECVDSTADDR)
 int netsnmp_udp_recvfrom(int s, void *buf, int len, struct sockaddr *from,
                          socklen_t *fromlen, struct sockaddr *dstip,
                          socklen_t *dstlen, int *if_index);
diff --git a/include/net-snmp/library/snmpUDPIPv4BaseDomain.h b/include/net-snmp/library/snmpUDPIPv4BaseDomain.h
index 54f8a49..6f7f2c2 100644
--- a/include/net-snmp/library/snmpUDPIPv4BaseDomain.h
+++ b/include/net-snmp/library/snmpUDPIPv4BaseDomain.h
@@ -27,8 +27,7 @@ extern          "C" {
     netsnmp_transport *netsnmp_udpipv4base_transport(struct sockaddr_in *addr,
                                                      int local);
 
-#if defined(linux) && defined(IP_PKTINFO) \
-    || defined(IP_RECVDSTADDR) && !defined(_MSC_VER)
+#if defined(HAVE_IP_PKTINFO) || defined(HAVE_IP_RECVDSTADDR)
     int netsnmp_udpipv4_recvfrom(int s, void *buf, int len,
                                  struct sockaddr *from, socklen_t *fromlen,
                                  struct sockaddr *dstip, socklen_t *dstlen,
diff --git a/include/net-snmp/library/system.h b/include/net-snmp/library/system.h
index 5c58e4a..ac5052e 100644
--- a/include/net-snmp/library/system.h
+++ b/include/net-snmp/library/system.h
@@ -196,8 +196,7 @@ SOFTWARE.
 #endif
 #ifndef HAVE_STRLCAT
     NETSNMP_IMPORT
-    size_t            strlcat(char * __restrict, const char * __restrict,
-                              size_t);
+    size_t            strlcat(char *, const char *, size_t);
 #endif
 
     int             netsnmp_os_prematch(const char *ospmname,
diff --git a/include/net-snmp/library/tools.h b/include/net-snmp/library/tools.h
index b420c0f..2634b34 100644
--- a/include/net-snmp/library/tools.h
+++ b/include/net-snmp/library/tools.h
@@ -142,25 +142,6 @@ extern          "C" {
 		goto l ;		\
 	}
 
-    /*
-     * DIFFTIMEVAL
-     *      Set <diff> to the difference between <now> (current) and <then> (past).
-     *
-     * ASSUMES that all inputs are (struct timeval)'s.
-     * Cf. system.c:calculate_time_diff().
-     */
-#define DIFFTIMEVAL(now, then, diff) 			\
-{							\
-	now.tv_sec--;					\
-	now.tv_usec += 1000000L;			\
-	diff.tv_sec  = now.tv_sec  - then.tv_sec;	\
-	diff.tv_usec = now.tv_usec - then.tv_usec;	\
-	if (diff.tv_usec > 1000000L){			\
-		diff.tv_usec -= 1000000L;		\
-		diff.tv_sec++;				\
-	}						\
-}
-
 /**
  * Compute res = a + b.
  *
@@ -226,7 +207,7 @@ extern          "C" {
     u_char         *malloc_random(size_t * size);
     u_char         *malloc_zero(size_t size);
     NETSNMP_IMPORT
-    int             memdup(u_char ** to, const void * from, size_t size);
+    void           *netsnmp_memdup(const void * from, size_t size);
 
     void            netsnmp_check_definedness(const void *packet,
                                               size_t length);
diff --git a/include/net-snmp/net-snmp-config.h.in b/include/net-snmp/net-snmp-config.h.in
index ff30b46..1db0237 100644
--- a/include/net-snmp/net-snmp-config.h.in
+++ b/include/net-snmp/net-snmp-config.h.in
@@ -28,15 +28,6 @@
  */
 #ifndef NETSNMP_NO_AUTOCONF_DEFINITIONS
 
-
-#if defined (WIN32) || defined (mingw32) || defined (cygwin)
-#define ENV_SEPARATOR ";"
-#define ENV_SEPARATOR_CHAR ';'
-#else
-#define ENV_SEPARATOR ":"
-#define ENV_SEPARATOR_CHAR ':'
-#endif
-
 /* definitions added by configure on-the-fly */
 
 #define config_belongs_in(x)
@@ -74,6 +65,12 @@
 /* Define if you want local DNSSEC validation support */
 #undef DNSSEC_LOCAL_VALIDATION
 
+/* Environment separator character surrounded by double quotes. */
+#undef ENV_SEPARATOR
+
+/* Environment separator character surrounded by single quotes. */
+#undef ENV_SEPARATOR_CHAR
+
 /* location of mount table list */
 #undef ETC_MNTTAB
 
@@ -111,6 +108,9 @@
 /* Define to 1 if you have the `closedir' function. */
 #undef HAVE_CLOSEDIR
 
+/* Define to 1 if you have the <com_err.h> header file. */
+#undef HAVE_COM_ERR_H
+
 /* Define to 1 if the system has the type `Counter64'. */
 #undef HAVE_COUNTER64
 
@@ -143,6 +143,9 @@
 /* Define to 1 if you have the <err.h> header file. */
 #undef HAVE_ERR_H
 
+/* Define to 1 if you have the <et/com_err.h> header file. */
+#undef HAVE_ET_COM_ERR_H
+
 /* Define to 1 if you have the `eval_pv' function. */
 #undef HAVE_EVAL_PV
 
@@ -296,6 +299,12 @@
 /* Define to 1 if you have the <iphlpapi.h> header file. */
 #undef HAVE_IPHLPAPI_H
 
+/* 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. */
 #undef HAVE_KINFO_GET_CPUS
 
@@ -305,6 +314,9 @@
 /* Define to 1 if you have the `knlist' function. */
 #undef HAVE_KNLIST
 
+/* Define to 1 if you have the `krb5_auth_con_getsendsubkey' function. */
+#undef HAVE_KRB5_AUTH_CON_GETSENDSUBKEY
+
 /* Define to 1 if you have the <kstat.h> header file. */
 #undef HAVE_KSTAT_H
 
@@ -335,6 +347,9 @@
 /* Define to 1 if you have the `mld' library (-lmld). */
 #undef HAVE_LIBMLD
 
+/* Define to 1 if <netlink/netlink.h> provides the libnl3 API */
+#undef HAVE_LIBNL3
+
 /* define if you have libnm */
 #undef HAVE_LIBNM
 
@@ -347,6 +362,9 @@
 /* Define to 1 if you have the `pkcs11' library (-lpkcs11). */
 #undef HAVE_LIBPKCS11
 
+/* define if you have BSD pkg-ng */
+#undef HAVE_LIBPKG
+
 /* Define to 1 if you have the `pthread' library (-lpthread). */
 #undef HAVE_LIBPTHREAD
 
@@ -437,9 +455,6 @@
 /* Define to 1 if you have the <mtab.h> header file. */
 #undef HAVE_MTAB_H
 
-/* Define to 1 if you have the <mysql/mysql.h> header file. */
-#undef HAVE_MYSQL_MYSQL_H
-
 /* Define to 1 if you have the <nbutil.h> header file. */
 #undef HAVE_NBUTIL_H
 
@@ -617,6 +632,9 @@
 /* Define to 1 if you have the <pkglocs.h> header file. */
 #undef HAVE_PKGLOCS_H
 
+/* Define to 1 if you have the <pkg.h> header file. */
+#undef HAVE_PKG_H
+
 /* Define to 1 if you have the `poll' function. */
 #undef HAVE_POLL
 
@@ -851,6 +869,9 @@
 /* Define to 1 if `if_xname' is a member of `struct ifnet'. */
 #undef HAVE_STRUCT_IFNET_IF_XNAME
 
+/* Define to 1 if `ip6s_exthdrtoolong ' is a member of `struct ip6stat'. */
+#undef HAVE_STRUCT_IP6STAT_IP6S_EXTHDRTOOLONG_
+
 /* Define to 1 if `ips_cantforward' is a member of `struct ipstat'. */
 #undef HAVE_STRUCT_IPSTAT_IPS_CANTFORWARD
 
@@ -896,12 +917,6 @@
 /* Define to 1 if `m_mbufs' is a member of `struct mbstat'. */
 #undef HAVE_STRUCT_MBSTAT_M_MBUFS
 
-/* Define to 1 if `msg_control' is a member of `struct msghdr'. */
-#undef HAVE_STRUCT_MSGHDR_MSG_CONTROL
-
-/* Define to 1 if `msg_flags' is a member of `struct msghdr'. */
-#undef HAVE_STRUCT_MSGHDR_MSG_FLAGS
-
 /* Define to 1 if `n_value' is a member of `struct nlist64'. */
 #undef HAVE_STRUCT_NLIST64_N_VALUE
 
@@ -987,6 +1002,9 @@
 /* Define to 1 if `udps_fullsock' is a member of `struct udpstat'. */
 #undef HAVE_STRUCT_UDPSTAT_UDPS_FULLSOCK
 
+/* Define to 1 if `udps_ipackets' is a member of `struct udpstat'. */
+#undef HAVE_STRUCT_UDPSTAT_UDPS_IPACKETS
+
 /* Define to 1 if `udps_noport' is a member of `struct udpstat'. */
 #undef HAVE_STRUCT_UDPSTAT_UDPS_NOPORT
 
@@ -996,6 +1014,9 @@
 /* Define to 1 if `udps_opackets' is a member of `struct udpstat'. */
 #undef HAVE_STRUCT_UDPSTAT_UDPS_OPACKETS
 
+/* Define to 1 if `pgswapin' is a member of `struct uvmexp'. */
+#undef HAVE_STRUCT_UVMEXP_PGSWAPIN
+
 /* Define to 1 if you have the `sysconf' function. */
 #undef HAVE_SYSCONF
 
diff --git a/include/net-snmp/system/darwin10.h b/include/net-snmp/system/darwin10.h
index 8ed82d0..3037324 100644
--- a/include/net-snmp/system/darwin10.h
+++ b/include/net-snmp/system/darwin10.h
@@ -65,6 +65,7 @@
 /*
  * use new host resources files as well
  */
+#define NETSNMP_INCLUDE_HOST_RESOURCES
 #define NETSNMP_INCLUDE_HRSWINST_REWRITES
 #define NETSNMP_INCLUDE_HRSWRUN_REWRITES
 #undef NETSNMP_INCLUDE_HRSWRUN_WRITE_SUPPORT
@@ -92,17 +93,6 @@
 #endif
 
 /*
- * Darwin's tools are capable of building multiple architectures in one pass.
- * As a result, platform definitions should be deferred until compile time.
- */
-#ifdef BYTE_ORDER
-# undef WORDS_BIGENDIAN
-# if BYTE_ORDER == BIG_ENDIAN
-#  define WORDS_BIGENDIAN 1
-# endif
-#endif
-
-/*
  * Although Darwin does have an fstab.h file, getfsfile etc. always return null.
  * At least, as of 5.3.
  */
diff --git a/include/net-snmp/system/darwin11.h b/include/net-snmp/system/darwin11.h
index 24fed93..9d6f03d 100644
--- a/include/net-snmp/system/darwin11.h
+++ b/include/net-snmp/system/darwin11.h
@@ -65,6 +65,7 @@
 /*
  * use new host resources files as well
  */
+#define NETSNMP_INCLUDE_HOST_RESOURCES
 #define NETSNMP_INCLUDE_HRSWINST_REWRITES
 #define NETSNMP_INCLUDE_HRSWRUN_REWRITES
 #undef NETSNMP_INCLUDE_HRSWRUN_WRITE_SUPPORT
@@ -92,25 +93,6 @@
 #endif
 
 /*
- * Darwin's tools are capable of building multiple architectures in one pass.
- * As a result, platform definitions should be deferred until compile time.
- */
-#ifdef BYTE_ORDER
-# undef WORDS_BIGENDIAN
-# if BYTE_ORDER == BIG_ENDIAN
-#  define WORDS_BIGENDIAN 1
-# endif
-#endif
-
-/*
- * Although Darwin does have a kvm.h file, kvm_openfiles etc. always
- * return null because /dev/kmem was removed completely in OS X 10.5.
- */
-#undef HAVE_KVM_H
-#undef HAVE_KVM_GETPROCS
-#undef HAVE_KVM_OPENFILES
-
-/*
  * Although Darwin does have an fstab.h file, getfsfile etc. always return null.
  * At least, as of 5.3.
  */
diff --git a/include/net-snmp/system/darwin12.h b/include/net-snmp/system/darwin12.h
index fd66147..3031d04 100644
--- a/include/net-snmp/system/darwin12.h
+++ b/include/net-snmp/system/darwin12.h
@@ -65,6 +65,7 @@
 /*
  * use new host resources files as well
  */
+#define NETSNMP_INCLUDE_HOST_RESOURCES
 #define NETSNMP_INCLUDE_HRSWINST_REWRITES
 #define NETSNMP_INCLUDE_HRSWRUN_REWRITES
 #undef NETSNMP_INCLUDE_HRSWRUN_WRITE_SUPPORT
@@ -92,25 +93,6 @@
 #endif
 
 /*
- * Darwin's tools are capable of building multiple architectures in one pass.
- * As a result, platform definitions should be deferred until compile time.
- */
-#ifdef BYTE_ORDER
-# undef WORDS_BIGENDIAN
-# if BYTE_ORDER == BIG_ENDIAN
-#  define WORDS_BIGENDIAN 1
-# endif
-#endif
-
-/*
- * Although Darwin does have a kvm.h file, kvm_openfiles etc. always
- * return null because /dev/kmem was removed completely in OS X 10.5.
- */
-#undef HAVE_KVM_H
-#undef HAVE_KVM_GETPROCS
-#undef HAVE_KVM_OPENFILES
-
-/*
  * Although Darwin does have an fstab.h file, getfsfile etc. always return null.
  * At least, as of 5.3.
  */
diff --git a/include/net-snmp/system/darwin10.h b/include/net-snmp/system/darwin13.h
similarity index 91%
copy from include/net-snmp/system/darwin10.h
copy to include/net-snmp/system/darwin13.h
index 8ed82d0..cb1870b 100644
--- a/include/net-snmp/system/darwin10.h
+++ b/include/net-snmp/system/darwin13.h
@@ -44,9 +44,9 @@
 /*
  * This section defines Mac OS X 10.5 (and later) specific additions.
  */
-#define darwin 10
-#ifndef darwin10
-#   define darwin10 darwin
+#define darwin 13
+#ifndef darwin13
+#   define darwin13 darwin
 #endif
 
 /*
@@ -65,6 +65,7 @@
 /*
  * use new host resources files as well
  */
+#define NETSNMP_INCLUDE_HOST_RESOURCES
 #define NETSNMP_INCLUDE_HRSWINST_REWRITES
 #define NETSNMP_INCLUDE_HRSWRUN_REWRITES
 #undef NETSNMP_INCLUDE_HRSWRUN_WRITE_SUPPORT
@@ -92,17 +93,6 @@
 #endif
 
 /*
- * Darwin's tools are capable of building multiple architectures in one pass.
- * As a result, platform definitions should be deferred until compile time.
- */
-#ifdef BYTE_ORDER
-# undef WORDS_BIGENDIAN
-# if BYTE_ORDER == BIG_ENDIAN
-#  define WORDS_BIGENDIAN 1
-# endif
-#endif
-
-/*
  * Although Darwin does have an fstab.h file, getfsfile etc. always return null.
  * At least, as of 5.3.
  */
@@ -146,3 +136,8 @@
 #define UDP_ADDRESSES_IN_HOST_ORDER 1
 #endif
 
+/*
+ * as of 7/2010, openssl on darwin does not have sha256
+ */
+#define OPENSSL_NO_SHA256 1
+#define OPENSSL_NO_SHA512 1
diff --git a/include/net-snmp/system/darwin9.h b/include/net-snmp/system/darwin9.h
index cf4e1d5..bf3d2dc 100644
--- a/include/net-snmp/system/darwin9.h
+++ b/include/net-snmp/system/darwin9.h
@@ -92,17 +92,6 @@
 #endif
 
 /*
- * Darwin's tools are capable of building multiple architectures in one pass.
- * As a result, platform definitions should be deferred until compile time.
- */
-#ifdef BYTE_ORDER
-# undef WORDS_BIGENDIAN
-# if BYTE_ORDER == BIG_ENDIAN
-#  define WORDS_BIGENDIAN 1
-# endif
-#endif
-
-/*
  * Although Darwin does have an fstab.h file, getfsfile etc. always return null.
  * At least, as of 5.3.
  */
diff --git a/include/net-snmp/system/freebsd10.h b/include/net-snmp/system/freebsd10.h
index 871b9df..a7334b9 100644
--- a/include/net-snmp/system/freebsd10.h
+++ b/include/net-snmp/system/freebsd10.h
@@ -1,3 +1,3 @@
-/* freebsd9 is a superset of freebsd10 */
+/* freebsd10 is a superset of freebsd9 */
 #include "freebsd9.h"
-#define freebsd10 freebsd10
+#define freebsd9 freebsd9
diff --git a/include/net-snmp/system/freebsd11.h b/include/net-snmp/system/freebsd11.h
new file mode 100644
index 0000000..e81b4cf
--- /dev/null
+++ b/include/net-snmp/system/freebsd11.h
@@ -0,0 +1,3 @@
+/* freebsd11 is a superset of freebsd10 */
+#include "freebsd10.h"
+#define freebsd10 freebsd10
diff --git a/include/net-snmp/system/freebsd12.h b/include/net-snmp/system/freebsd12.h
new file mode 100644
index 0000000..301432b
--- /dev/null
+++ b/include/net-snmp/system/freebsd12.h
@@ -0,0 +1,3 @@
+/* freebsd12 is a superset of freebsd11 */
+#include "freebsd11.h"
+#define freebsd11 freebsd11
diff --git a/include/net-snmp/system/freebsd9.h b/include/net-snmp/system/freebsd9.h
index 1bd4750..ce23322 100644
--- a/include/net-snmp/system/freebsd9.h
+++ b/include/net-snmp/system/freebsd9.h
@@ -1,3 +1,3 @@
 /* freebsd9 is a superset of freebsd8 */
 #include "freebsd8.h"
-#define freebsd9 freebsd9
+#define freebsd8 freebsd8
diff --git a/include/net-snmp/types.h b/include/net-snmp/types.h
index 95d2576..5e80a45 100644
--- a/include/net-snmp/types.h
+++ b/include/net-snmp/types.h
@@ -35,8 +35,8 @@
  * file has already been included, do this now.
  */
 # if defined(HAVE_WINSOCK2_H) && defined(HAVE_WS2TCPIP_H)
-#  if !defined(HAVE_WIN32_PLATFORM_SDK) && _MSC_VER -0 <= 1200 \
-    && _WIN32_WINNT -0 >= 0x0400
+#  if !defined(__MINGW32__) && !defined(HAVE_WIN32_PLATFORM_SDK) && \
+    _MSC_VER -0 <= 1200 && _WIN32_WINNT -0 >= 0x0400
     /*
      * When using the MSVC 6 header files, including <winsock2.h> when
      * _WIN32_WINNT >= 0x0400 results in a compilation error. Hence include
diff --git a/local/Makefile.in b/local/Makefile.in
index df81db0..cb84afc 100644
--- a/local/Makefile.in
+++ b/local/Makefile.in
@@ -130,9 +130,9 @@ fixproc.made: $(srcdir)/fixproc
 	  touch fixproc.made; \
         fi
 
-snmpconf.made: $(srcdir)/snmpconf
+snmpconf.made: snmpconf
 	if test "x$(PERL)" != "x" ; then \
-	  $(PERL) -p -e 's%^#!.*/perl.*%#!$(PERL)%; s#/usr/local/share#$(datadir)#g; s#/usr/local/etc/snmp#$(SNMPCONFPATH)#g; s#/var/net-snmp#$(PERSISTENT_DIRECTORY)#g' ${srcdir}/snmpconf > snmpconf.made; \
+	  $(PERL) -p -e 's%^#!.*/perl.*%#!$(PERL)%; s#/usr/local/share#$(datadir)#g; s#/usr/local/etc/snmp#$(SNMPCONFPATH)#g; s#/var/net-snmp#$(PERSISTENT_DIRECTORY)#g' snmpconf > snmpconf.made; \
 	else \
 	  touch snmpconf.made; \
         fi
diff --git a/local/gittools/shell-functions b/local/gittools/shell-functions
index 45e6507..aef3a98 100644
--- a/local/gittools/shell-functions
+++ b/local/gittools/shell-functions
@@ -64,6 +64,9 @@ nsmake () {
 	shift
         _ns_setbuilddir "$1"
 	shift
+    elif [ "$1" != "" ]; then
+    	echo "Unknown argument: $1"
+	exit 1
     else
         _ns_setbuilddir
     fi
@@ -94,6 +97,9 @@ nsconfigure () {
 	shift
         _ns_setbuilddir "$1"
 	shift
+    elif [ "$1" != "" ]; then
+    	echo "Unknown argument: $1"
+	exit 1
     else
         _ns_setbuilddir
     fi
@@ -267,6 +273,9 @@ nsrollup() {
 	mergeop="merge"
     elif [ "$1" = "--rebase" ] ; then
 	mergeop="rebase"
+    elif [ "$1" != "" ]; then
+    	echo "Unknown argument: $1"
+	exit 1
     else
 	mergeop="merge"
     fi
@@ -379,6 +388,9 @@ nspull() {
 	mergeop="merge"
     elif [ "$1" = "--rebase" ] ; then
 	mergeop="rebase"
+    elif [ "$1" != "" ]; then
+    	echo "Unknown argument: $1"
+	exit 1
     else
 	mergeop="merge"
     fi
diff --git a/local/mib2c.iterate_access.conf b/local/mib2c.iterate_access.conf
index c211fd3..a38ac20 100644
--- a/local/mib2c.iterate_access.conf
+++ b/local/mib2c.iterate_access.conf
@@ -292,8 +292,7 @@ ${i}_handler(
                                 if (retval) {
                                     ui = SNMP_MALLOC_STRUCT(undoInfo);
                                     ui->len = retval_len;
-                                    memdup((u_char **) &ui->ptr,
-                                           retval, ui->len);
+                                    ui->ptr = netsnmp_memdup(retval, ui->len);
                                 }
 
                     /** check the new value, possibly against the
diff --git a/local/snmpconf b/local/snmpconf.in
similarity index 99%
rename from local/snmpconf
rename to local/snmpconf.in
index 37a5136..bff8025 100755
--- a/local/snmpconf
+++ b/local/snmpconf.in
@@ -92,13 +92,9 @@ if ($opts{'G'}) {
 }
 
 #
-# Expand the search path in case it contains multiple directories
-# separated by : (Unix) or ; (Win32)
+# Expand the search path in case it contains multiple directories.
 #
-my $ENV_SEPARATOR = ':';
-if ($^O eq 'MSWin32') {
-  $ENV_SEPARATOR = ';';
-}
+my $ENV_SEPARATOR = '@ENV_SEPARATOR@';
 my @searchpath = split(/$ENV_SEPARATOR/, $confpath);
 push @searchpath, "/usr/local/etc/snmp";
 push @searchpath, ".";
diff --git a/m4/ac_add_search_path.m4 b/m4/ac_add_search_path.m4
index b1ffc5d..8e0a819 100644
--- a/m4/ac_add_search_path.m4
+++ b/m4/ac_add_search_path.m4
@@ -1,5 +1,5 @@
 dnl
-dnl Add a search path to the LIBS and CFLAGS variables
+dnl Add a search path to the LIBS and CPPFLAGS variables
 dnl
 AC_DEFUN([AC_ADD_SEARCH_PATH],[
   if test "x$1" != x -a -d $1; then
diff --git a/man/Makefile.in b/man/Makefile.in
index 5627cc0..01fe852 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -54,11 +54,13 @@ CONFIG_ALIASES  = config_perror.3 config_pwarn.3			    \
 ALARM_ALIASES   = snmp_alarm_register.3 snmp_alarm_register_hr.3 snmp_alarm_unregister.3
 SESSION_ALIASES = snmp_api_errstring.3 snmp_close.3 snmp_error.3    \
 	snmp_open.3 snmp_perror.3 snmp_read.3 snmp_select_info.3    \
-	snmp_send.3 snmp_sess_perror.3 snmp_timeout.3
+	snmp_send.3 snmp_sess_perror.3 snmp_timeout.3               \
+	snmp_async_send.3 snmp_synch_response.3
 SSESS_ALIASES   = snmp_sess_async_send.3 snmp_sess_close.3 snmp_sess_error.3 \
 	snmp_sess_init.3 snmp_sess_open.3 snmp_sess_read.3		     \
 	snmp_sess_select_info.3 snmp_sess_send.3			     \
-	snmp_sess_session.3 snmp_sess_timeout.3
+	snmp_sess_session.3 snmp_sess_timeout.3                              \
+	snmp_sess_synch_response.3
 TRAP_ALIASES    = send_easy_trap.3 send_trap_vars.3 send_v2trap.3 
 VARBIND_ALIASES = fprint_value.3 fprint_variable.3	\
 	print_value.3 print_variable.3			\
@@ -81,14 +83,26 @@ OTHERCLEANTARGETS=$(TARGETS) default_store.3.h $(MANALIASES) manaliases
 
 all: $(TARGETS) standardall manaliases
 
-manaliases: Makefile
+manaliases: Makefile $(MAN3_API)
 	touch manaliases
-	@for i in $(MAN3_API) ; do				  \
-            for j in `sed -n '/^.SH NAME/,/^.SH SYNOPSIS/p' $$i  | sed -e 's/.- .*//' | sed 's/,.*//'  | @EGREP@ -v '^.SH ' `; do \
+	@result=0 ; \
+        for i in $(MAN3_API) ; do				  \
+            for j in `$(SED) -n '/^.SH NAME/,/^.SH SYNOPSIS/p' $$i  | $(SED) -e 's/.- .*//' | $(SED) 's/,.*//'  | $(EGREP) -v '^.SH ' `; do \
 		echo "making man page alias $$j -> $$i APIs" ;    \
 		echo ".so man3/$$i" > $$j.3 ; 		  \
+		if expr "$(MANALIASES)" : ".*$$j\\.3" > /dev/null ; \
+		then \
+		  : ; \
+		else \
+		    var=`echo $$i | $(SED) -e 's/^netsnmp_//' -e 's/_api.3//' | tr '[a-z]' '[A-Z]'` ; \
+		    echo "You must add $$j.3 to the $${var}_ALIASES variable in the Makefile.in" ; \
+		    result=1 ; \
+	        fi; \
 	    done                                                  \
-	done
+	done ; \
+	exit $$result
+
+$(MANALIASES): manaliases
 
 agentxtrap.1: $(srcdir)/agentxtrap.1.def ../sedscript
 	$(SED) -f ../sedscript < $(srcdir)/agentxtrap.1.def > agentxtrap.1
@@ -239,8 +253,8 @@ mib2c.conf.5: $(top_srcdir)/local/mib2c mib2c.conf.5.in $(srcdir)/mib2c.extract.
 	  touch mib2c.conf.5 ; \
 	fi
 
-maninstall:  maninstalldirs $(MAN1) $(MAN1G) $(MAN3) $(MAN5G) $(MAN8) $(MANALIASES)
-	@for i in $(MAN1) ; do $(INSTALL_DATA) $(srcdir)/$$i $(INSTALL_PREFIX)$(man1dir) ; echo "install:  installed $$i in $(INSTALL_PREFIX)$(man1dir)" ; done
+maninstall:  maninstalldirs $(MAN1) $(MAN1G) $(MAN3) $(MAN3_API) $(MAN3G) $(MAN5G) $(MAN8G) $(MANALIASES)
+	@for i in $(MAN1) ; do $(INSTALL_DATA) $(srcdir)/`basename $$i` $(INSTALL_PREFIX)$(man1dir) ; echo "install:  installed $$i in $(INSTALL_PREFIX)$(man1dir)" ; done
 	@$(INSTALL_DATA) $(MAN1G) $(INSTALL_PREFIX)$(man1dir)
 	@for i in $(MAN1G) ; do echo "install:  installed $$i in $(INSTALL_PREFIX)$(man1dir)" ; done
 	#EMPTY LIST#@for i in $(MAN3) ; do $(INSTALL_DATA) $(srcdir)/$$i $(INSTALL_PREFIX)$(man3dir) ; echo "install:  installed $$i in $(INSTALL_PREFIX)$(man3dir)" ; done
diff --git a/man/netsnmp_config_api.3.def b/man/netsnmp_config_api.3.def
index 68049df..d009fc5 100644
--- a/man/netsnmp_config_api.3.def
+++ b/man/netsnmp_config_api.3.def
@@ -367,7 +367,7 @@ A colon separated list of directories to search for configuration
 files in.
 Default: SYSCONFDIR/snmp:DATADIR/snmp:LIBDIR/snmp:$HOME/.snmp
 .SH "SEE ALSO"
-.BR mib_api "(3), " snmp_api (3)
+netsnmp_mib_api(3), snmp_api(3)
 .\" Local Variables:
 .\"  mode: nroff
 .\" End:
diff --git a/man/netsnmp_mib_api.3.def b/man/netsnmp_mib_api.3.def
index c253047..2e1da8f 100644
--- a/man/netsnmp_mib_api.3.def
+++ b/man/netsnmp_mib_api.3.def
@@ -306,5 +306,4 @@ Used by
 .B init_mib
 only.
 .SH "SEE ALSO"
-.BR snmp_api "(3),"
-.BR output_api "(3)"
+netsnmp_session_api(3), netsnmp_pdu_api(3), netsnmp_varbind_api(3)
diff --git a/man/netsnmp_pdu_api.3.def b/man/netsnmp_pdu_api.3.def
index 0b94e9e..a0f1aa1 100644
--- a/man/netsnmp_pdu_api.3.def
+++ b/man/netsnmp_pdu_api.3.def
@@ -26,5 +26,4 @@ These functions deal with SNMP request structures.
 .PP
 .B snmp_free_pdu
 .SH "SEE ALSO"
-.BR varbind_api "(3)"
-.BR session_api "(3)"
+netsnmp_varbind_api(3), netsnmp_session_api(3)
diff --git a/man/netsnmp_sess_api.3.def b/man/netsnmp_sess_api.3.def
index 36b4159..890353d 100644
--- a/man/netsnmp_sess_api.3.def
+++ b/man/netsnmp_sess_api.3.def
@@ -232,4 +232,5 @@ The specified session was not open.
 .RE
 .PP
 .SH "SEE ALSO"
-.BR select "(2), " snmp_api "(3), " snmp_api.h
+select(2), netsnmp_session_api(3), netsnmp_pdu_api(3),
+netsnmp_varbind_api(3), netsnmp_mib_api(3), snmp_api.h
diff --git a/man/netsnmp_session_api.3.def b/man/netsnmp_session_api.3.def
index 7164d36..c8891a1 100644
--- a/man/netsnmp_session_api.3.def
+++ b/man/netsnmp_session_api.3.def
@@ -278,4 +278,5 @@ that functions like the
 .I perror
 standard routine.
 .SH "SEE ALSO"
-select(2), snmp_api.h
+select(2), netsnmp_sess_api(3), netsnmp_mib_api(3), netsnmp_pdu_api(3),
+netsnmp_varbind_api(3), snmp_api.h
diff --git a/man/netsnmp_varbind_api.3.def b/man/netsnmp_varbind_api.3.def
index d950adb..3941f9f 100644
--- a/man/netsnmp_varbind_api.3.def
+++ b/man/netsnmp_varbind_api.3.def
@@ -202,7 +202,7 @@ do the same as the equivalent
 routines, but only displaying the value of the variable, without the
 corresponding object identifier.
 .PP
-For displaying the OID of a varbind, see \fBmin_api\fP(3).
+For displaying the OID of a varbind, see \fBnetsnmp_mib_api\fP(3).
 .br
 .SS Deletion
 .B snmp_free_var
@@ -212,5 +212,5 @@ releases all memory used by the given varbind structure.
 releases all memory used by each varbind structure in the varbind list provided.
 .br
 .SH "SEE ALSO"
-.BR pdu_api "(3)"
-.BR mib_api "(3)"
+.BR netsnmp_pdu_api "(3)"
+.BR netsnmp_mib_api "(3)"
diff --git a/man/snmp_async_send.3 b/man/snmp_async_send.3
deleted file mode 100644
index 2cc05ec..0000000
--- a/man/snmp_async_send.3
+++ /dev/null
@@ -1 +0,0 @@
-.so man3/netsnmp_session_api.3
diff --git a/man/snmp_config.5.def b/man/snmp_config.5.def
index 413a334..fd30873 100644
--- a/man/snmp_config.5.def
+++ b/man/snmp_config.5.def
@@ -11,9 +11,10 @@ found and read from.  By default, the applications look for
 configuration files in the following 4 directories, in order:
 SYSCONFDIR/snmp,
 DATADIR/snmp, LIBDIR/snmp, and $HOME/.snmp.  In each of these
-directories, it looks for files with the extension of both
-.IR conf " and " local.conf
-(reading the second ones last).  In this manner, there are
+directories, it looks for files snmp.conf, snmpd.conf and/or
+snmptrapd.conf, as well as snmp.local.conf, snmpd.local.conf
+and/or snmptrapd.local.conf. *.local.conf are always
+read last. In this manner, there are
 8 default places a configuration file can exist for any given
 configuration file type.
 .PP
@@ -178,14 +179,28 @@ during normal configuration file processing.:
 .RS
 .nf
 # include site specific config
-include site.conf
+includeFile site.conf
 .RE
 .PP
-This will search every directory in the configuration path for files
-named site.conf, and will process those files before returning to the
-processing of the original file. Note that if '.conf' is omitted,
-it will be appended. That is, all configuration files must end
-in '.conf'.
+This will load the specified configuration file. The
+path to file must be either absolute, starting with '/',
+or relative. The relative path is then relative to the directory
+where the parent file with 'includeFile' directive resides.
+.PP
+The included file name does not need to have '.conf' suffix.
+.PP
+.RS
+.nf
+# include a all *.conf files in a directory
+includeDir /etc/snmp/config.d
+.RE
+.PP
+This will search specified directory for all files with '.conf'
+suffix and process them as if they were included using includeFile
+directive. The configuration files are not processed in any particular
+order.
+.PP
+The specified directory must be absolute directory path.
 .SH "API INTERFACE"
 .PP
 Information about writing C code that makes use of this system in
diff --git a/man/snmp_sess_synch_response.3 b/man/snmp_sess_synch_response.3
deleted file mode 100644
index 5ead05d..0000000
--- a/man/snmp_sess_synch_response.3
+++ /dev/null
@@ -1 +0,0 @@
-.so man3/netsnmp_sess_api.3
diff --git a/man/snmp_synch_response.3 b/man/snmp_synch_response.3
deleted file mode 100644
index 2cc05ec..0000000
--- a/man/snmp_synch_response.3
+++ /dev/null
@@ -1 +0,0 @@
-.so man3/netsnmp_session_api.3
diff --git a/man/snmpcmd.1.def b/man/snmpcmd.1.def
index bb4ed96..e4df8b2 100644
--- a/man/snmpcmd.1.def
+++ b/man/snmpcmd.1.def
@@ -60,7 +60,7 @@ single-dash arguments aren't working because you have settings in the
 the longer-form double-dash arguments to successfully trump the
 \fIsnmp.conf\fR file settings.
 .SH Generic Options
-Thes options control how the Net-SNMP commands behave regardless of
+These options control how the Net-SNMP commands behave regardless of
 what version of SNMP you are using.  See further below for options
 that control specific versions or sub-modules of the SNMP protocol. 
 .TP
diff --git a/man/snmpd.conf.5.def b/man/snmpd.conf.5.def
index 5f85f72..2a8a3d3 100644
--- a/man/snmpd.conf.5.def
+++ b/man/snmpd.conf.5.def
@@ -73,7 +73,7 @@ specifying "\-U" on the command line.
 .IP "maxGetbulkRepeats NUM"
 Sets the maximum number of responses allowed for a single variable in
 a getbulk request.  Set to 0 to enable the default and set it to \-1 to
-enable unlimited.  Because memory is allocated ahead of time, sitting
+enable unlimited.  Because memory is allocated ahead of time, setting
 this to unlimited is not considered safe if your user population can
 not be trusted.  A repeat number greater than this will be truncated
 to this value.
@@ -83,7 +83,7 @@ This is set by default to -1.
 Sets the maximum number of responses allowed for a getbulk request.
 This is set by default to 100.  Set to 0 to enable the default and set
 it to \-1 to enable unlimited.  Because memory is allocated ahead of
-time, sitting this to unlimited is not considered safe if your user
+time, setting this to unlimited is not considered safe if your user
 population can not be trusted.
 .IP
 In general, the total number of responses will not be allowed to
@@ -181,7 +181,7 @@ HIGH:!AES128\-SHA
 .RE
 .IP
 The default value is whatever openssl itself was configured with.
-.IP "[snmp] x059CRLFile"
+.IP "[snmp] x509CRLFile"
 If you are using a Certificate Authority (CA) that publishes a
 Certificate Revocation List (CRL) then this token can be used to
 specify the location in the filesystem of a copy of the CRL file.
diff --git a/man/snmpd.examples.5.def b/man/snmpd.examples.5.def
index b4125d6..3602869 100644
--- a/man/snmpd.examples.5.def
+++ b/man/snmpd.examples.5.def
@@ -567,7 +567,7 @@ Note that the administrative settings for the proxied request
 are specified explicitly, and are independent of the settings
 from the incoming request.
 .PP
-An alternative use for the \fiproxy\fR directive is to pass
+An alternative use for the \fIproxy\fR directive is to pass
 part of the OID tree to another agent (either on a remote host
 or listening on a different port on the same system),
 while handling the rest internally:
diff --git a/man/snmpdelta.1.def b/man/snmpdelta.1.def
index fe80b57..e95a69b 100644
--- a/man/snmpdelta.1.def
+++ b/man/snmpdelta.1.def
@@ -108,7 +108,7 @@ Specifies the maximum number of oids allowed to be packaged
 in a single PDU. Multiple PDUs can be created in a single
 request. The default value of variables per packet is 60.
 This option is useful if a request response results in an
-error becaues the packet is too big.
+error because the packet is too big.
 .PP
 Note that
 .B snmpdelta
diff --git a/man/snmpdf.1.def b/man/snmpdf.1.def
index 75ebaf8..406845a 100644
--- a/man/snmpdf.1.def
+++ b/man/snmpdf.1.def
@@ -7,12 +7,12 @@
 .\" Use is subject to license terms specified in the COPYING file
 .\" distributed with the Net-SNMP package.
 .\" ******************************************************************/
-.TH SNMPDF 1 "25 Jul 2003" VVERSIONINFO "Net-SNMP"
+.TH SNMPDF 1 "28 Jan 2013" VVERSIONINFO "Net-SNMP"
 .SH NAME
 snmpdf - display disk space usage on a network entity via SNMP
 .SH SYNOPSIS
 .B snmpdf
-[COMMON OPTIONS] [\-Cu] AGENT
+[COMMON OPTIONS] [\-Cu] [\-Ch] AGENT
 .SH DESCRIPTION
 .B snmpdf
 is simply a networked version of the typical df command.  It
@@ -23,7 +23,7 @@ more information.  However, the \-Cu argument can be passed to snmpdf
 to force the usage of the dskTable.
 .PP
 AGENT identifies a target SNMP agent, which is instrumented
-to monitor the gievn objects.  At its simplest, the AGENT
+to monitor the given objects.  At its simplest, the AGENT
 specification will consist of a hostname or an IPv4
 address.  In this situation, the command will attempt
 communication with the agent, using UDP/IPv4 to port 161
@@ -51,6 +51,12 @@ the storage information. Generally, the default
 use of hrStorageTable in mib HOST\-RESOURCES\-MIB
 is preferred because it typically contains
 more information.
+.TP
+.B \-Ch
+Print sizes in human readable format (i.e. MiB, GiB, TiB)
+.TP
+.B \-CH
+Print sizes in human readable SI format (i.e. MB, GB, TB)
 .SH "EXAMPLES"
 .PP
 % snmpdf \-v 2c \-c public localhost
diff --git a/man/snmpgetnext.1.def b/man/snmpgetnext.1.def
index 5e99a18..e6c6e60 100644
--- a/man/snmpgetnext.1.def
+++ b/man/snmpgetnext.1.def
@@ -30,7 +30,7 @@ snmpgetnext - communicates with a network entity using SNMP GETNEXT requests
 .B snmpgetnext
 [COMMON OPTIONS] [\-Cf] AGENT OID [OID]...
 .SH DESCRIPTION
-.B snmpget
+.B snmpgetnext
 is an SNMP application that uses the SNMP GETNEXT request to query for
 information on a network entity.  One or more object identifiers
 (OIDs) may be given as arguments on the command line.  Each variable
diff --git a/man/snmpnetstat.1.def b/man/snmpnetstat.1.def
index e3aa634..450ab7f 100644
--- a/man/snmpnetstat.1.def
+++ b/man/snmpnetstat.1.def
@@ -12,7 +12,7 @@
 .\" both that copyright notice and this permission notice appear in 
 .\" supporting documentation, and that the name of CMU not be
 .\" used in advertising or publicity pertaining to distribution of the
-.\" software without specific, written prior permission.  
+.\" software without specific, written prior permission.
 .\" 
 .\" CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
 .\" ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -58,21 +58,21 @@
 .\" Use is subject to license terms specified in the COPYING file
 .\" distributed with the Net-SNMP package.
 .\" ******************************************************************/
-.TH SNMPNETSTAT 1 "20 Jan 2010" VVERSIONINFO "Net-SNMP"
+.TH SNMPNETSTAT 1 "04 Nov 2013" VVERSIONINFO "Net-SNMP"
 .SH NAME
 snmpnetstat \- display networking status and configuration information from a network entity via SNMP
 .SH SYNOPSIS
 .B snmpnetstat
-[COMMON OPTIONS] [\-Ca] [\-Cn] AGENT
+[COMMON OPTIONS] [\-Ca] [\-Cn] [\-Cv] [\-Cf address_family] AGENT
 .br
 .B snmpnetstat
-[COMMON OPTIONS] [\-Ci] [\-Co] [\-Cr] [\-Cn] [\-Cs] AGENT
+[COMMON OPTIONS] [\-Cr] [\-Cn] [\-Cv] [\-Cf address_family] AGENT
 .br
 .B snmpnetstat
-[COMMON OPTIONS] [\-Ci] [\-Cn] [\-CI interface] AGENT [interval]
+[COMMON OPTIONS] [\-Ci] [\-C o | b | d] [\-Cn] [\-Cv] [\-CI interface] [\-Cw interval] AGENT
 .br
 .B snmpnetstat
-[COMMON OPTIONS] [\-Ca] [\-Cn] [\-Cs] [\-Cp protocol] AGENT
+[COMMON OPTIONS] [\-Cs[s]] [\-Cp protocol] AGENT
 .SH DESCRIPTION
 The
 .B snmpnetstat 
@@ -115,18 +115,32 @@ The options have the following meaning:
 for a list of possible values for common options
 as well as their descriptions.
 .PP
+.B \-CL
+use the legacy SNMP MIB elements, not the modern IP version agnostic
+tables. \fIsnmpnetstat\fR  will automatically fall back to the legacy
+tables if the modern ones are not available.
+.PP
 .B \-Ca
 With the default display,
 show the state of all sockets; normally sockets used by
 server processes are not shown.
 .PP
+.BI \-Cf " address_family"
+Only show entries for the selected address family (inet, inet6)
+.PP
 .B \-Ci
 Show the state of all of the network interfaces.
-The  interface  display  provides  a  table  of cumulative
+The interface display provides a table of cumulative
 statistics regarding packets transferred, errors, and collisions.
-The  network addresses of the interface and the maximum transmission 
+The network addresses of the interface and the maximum transmission 
 unit (``mtu'') are also displayed.
 .PP
+.B \-Cd
+Add dropped packets to the interface display.
+.PP
+.B \-Cb
+Show an extended interface status, giving octets in addition to packets.
+.PP
 .B \-Co
 Show an abbreviated interface status, giving octets in place of packets.
 This is useful when enquiring virtual interfaces (such as Frame-Relay circuits)
@@ -145,6 +159,10 @@ interprets addresses and attempts to display them
 symbolically).
 This option may be used with any of the display formats.
 .PP
+.B \-Cv
+Allow long host or service names to break the columnar output.
+This option may be used with any of the display formats.
+.PP
 .BI \-Cp " protocol"
 Show statistics about 
 .IR protocol,
@@ -158,24 +176,20 @@ The program will complain if
 is unknown or if there is no statistics routine for it.
 .PP
 .B \-Cs
-Show per-protocol statistics.  When used with the
-.B \-Cr
-option, show routing statistics instead.
+Show per-protocol statistics.
+If this is duplicated (-Css) statistics entries which are zero will
+be suppressed.
 .PP
 .B \-Cr
 Show the routing tables.
-When
-.B \-Cs
-is also present, show per-protocol routing statistics instead of 
-the routing tables.
 .PP
 .BI \-CR " repeaters"
 For GETBULK requests,
 .I repeaters
 specifies the max-repeaters value to use.
 .PP
-When  snmpnetstat is invoked with an interval argument, it
-displays a running count of statistics related to  network
+When snmpnetstat is invoked with an interval argument, it
+displays a running count of statistics related to network
 interfaces.
 .I interval
 is the number of seconds between
@@ -184,43 +198,43 @@ reporting of statistics.
 .I The Active Sockets Display (default)
 .PP
 The default display, for active sockets, shows the local
-and remote addresses, protocol, and the internal state  of
-the   protocol.    Address   formats   are   of  the  form
-``host.port'' or ``network.port'' if  a  socket's  address
-specifies  a  network  but no specific host address.  When
+and remote addresses, protocol, and the internal state of
+the protocol.  Address formats are of the form
+``host.port'' or ``network.port'' if a socket's address
+specifies a network but no specific host address.  When
 known, the host and network addresses are displayed symbolically
-according   to  the  data  bases 
-.I /etc/hosts  and
+according to the databases 
+.I /etc/hosts and
 .IR /etc/networks,
-respectively.  If a symbolic  name  for  an
-address  is unknown, or if the
+respectively.  If a symbolic name for an
+address is unknown, or if the
 .B \-Cn
 option is specified, the
-address is printed numerically, according to  the  address
+address is printed numerically, according to the address
 family.  For more information regarding the Internet ``dot
-format,'' refer  to
+format,'' refer to
 .IR inet(3N).
-Unspecified,  or  ``wildcard'', addresses and ports appear as ``*''.
+Unspecified, or ``wildcard'', addresses and ports appear as ``*''.
 .PP
 .I The Interface Display
 .PP
-The  interface  display  provides  a  table  of cumulative
+The interface display provides a table of cumulative
 statistics regarding packets transferred, errors, and col-
-lisions.   The  network addresses of the interface and the
+lisions.  The network addresses of the interface and the
 maximum transmission unit (``mtu'') are also displayed.
 .PP
 .I The Routing Table Display
 .PP
-The routing table display indicates the  available  routes
-and  their  status.   Each route consists of a destination
-host or network and a gateway to use in  forwarding  pack-
-ets.   The flags field shows the state of the route (``U''
-if ``up''), whether the route is  to  a  gateway  (``G''),
-whether  the  route  was created dynamically by a redirect
-(``D''), and whether the route  has  been  modified  by  a
-redirect  (``M'').   Direct  routes  are  created for each
-interface attached to the local host;  the  gateway  field
-for  such entries shows the address of the outgoing inter-
+The routing table display indicates the available routes
+and their status.  Each route consists of a destination
+host or network and a gateway to use in forwarding pack-
+ets.  The flags field shows the state of the route (``U''
+if ``up''), whether the route is to a gateway (``G''),
+whether the route was created dynamically by a redirect
+(``D''), and whether the route has been modified by a
+redirect (``M'').  Direct routes are created for each
+interface attached to the local host; the gateway field
+for such entries shows the address of the outgoing inter-
 face.  The interface entry indicates the network interface
 utilized for the route.
 .PP
@@ -231,10 +245,10 @@ When
 is invoked with an
 .I interval
 argument, it
-displays a running count of statistics related to  network
-interfaces.   This  display  consists  of a column for the
+displays a running count of statistics related to network
+interfaces.  This display consists of a column for the
 primary interface and a column summarizing information for
-all  interfaces.   The  primary  interface may be replaced
+all interfaces.  The primary interface may be replaced
 with another interface with the
 .B \-CI
 option.  The first line
diff --git a/man/snmpstatus.1.def b/man/snmpstatus.1.def
index df7824f..1126146 100644
--- a/man/snmpstatus.1.def
+++ b/man/snmpstatus.1.def
@@ -41,7 +41,7 @@ from a network entity.
 AGENT identifies a target SNMP agent, which is instrumented
 to monitor the given objects.  At its simplest, the AGENT
 specification will consist of a hostname or an IPv4 address.
-n this situation, the command will attempt communication with
+In this situation, the command will attempt communication with
 the agent, using UDP/IPv4 to port 161 of the given target host.
 .PP
 See the 
diff --git a/man/snmptable.1.def b/man/snmptable.1.def
index 743da1b..4e65cb4 100644
--- a/man/snmptable.1.def
+++ b/man/snmptable.1.def
@@ -31,17 +31,10 @@ AGENT TABLE\-OID
 .B snmptable
 is an SNMP application that repeatedly uses the SNMP GETNEXT or
 GETBULK requests to query for information on a network entity.  The
-parameter
-.I TABLE\-OID
-must specify an SNMP table.
-.PP
-snmptable is an SNMP application that repeatedly uses the
-SNMP GETNEXT or GETBULK requests to query for  information
-on a network entity.  The parameter TABLE\-OID must specify
-an SNMP table.
+parameter TABLE\-OID must specify an SNMP table.
 
 AGENT identifies a target SNMP agent, which is instrumented
-to monitor the gievn objects.  At its simplest, the AGENT
+to monitor the given objects.  At its simplest, the AGENT
 specification will consist of a hostname or an IPv4
 address.  In this situation, the command will attempt
 communication with the agent, using UDP/IPv4 to port 161
diff --git a/man/snmptest.1.def b/man/snmptest.1.def
index 7874196..dfdaed8 100644
--- a/man/snmptest.1.def
+++ b/man/snmptest.1.def
@@ -114,7 +114,7 @@ the GET request.
 .PP
 GETNEXT Request:
 .PP
-The "GETNEXT request" mode ($N) is simlar to the "Get request"
+The "GETNEXT request" mode ($N) is similar to the "Get request"
 mode, described above.
 .PP
 SET Request:
diff --git a/man/snmptranslate.1.def b/man/snmptranslate.1.def
index 288218b..721af99 100644
--- a/man/snmptranslate.1.def
+++ b/man/snmptranslate.1.def
@@ -27,7 +27,7 @@
 .\" Use is subject to license terms specified in the COPYING file
 .\" distributed with the Net-SNMP package.
 .\" ******************************************************************/
-.TH SNMPTRANSLATE 1 "20 Jul 2010" VVERSIONINFO "Net-SNMP"
+.TH SNMPTRANSLATE 1 "13 Nov 2013" VVERSIONINFO "Net-SNMP"
 .SH NAME
 snmptranslate - translate MIB OID names between numeric and textual forms
 .SH SYNOPSIS
@@ -73,6 +73,9 @@ following
 are available:
 .RS
 .TP 6
+.B \-TB
+Print all matching objects for a regex search.
+.TP
 .B \-Td
 Print full details of the specified OID.
 .TP
diff --git a/man/snmptrapd.8.def b/man/snmptrapd.8.def
index 12421a8..45bd034 100644
--- a/man/snmptrapd.8.def
+++ b/man/snmptrapd.8.def
@@ -23,7 +23,7 @@
 .\" ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
 .\" SOFTWARE.
 .\" ******************************************************************/
-.TH SNMPTRAPD 8 "30 Mar 2011" VVERSIONINFO "Net-SNMP"
+.TH SNMPTRAPD 8 "27 Apr 2014" VVERSIONINFO "Net-SNMP"
 .SH NAME
 snmptrapd - Receive and log SNMP trap messages.
 .SH SYNOPSIS
@@ -142,6 +142,9 @@ Connect to the AgentX master agent on the specified address,
 rather than the default AGENTX_SOCKET.
 See \fIsnmpd(8)\fR for details of the format of such addresses.
 .TP
+.B \-X
+Do not connect to a AgentX master agent
+.TP
 .BI \-\- "name"="value"
 Allows one to specify any token ("name") supported in the
 .I snmptrapd.conf
@@ -170,13 +173,18 @@ the PDU, if available, otherwise the contents of the agent\-addr field
 of the PDU (v1 TRAPs only).
 .TP
 .B %b
-PDU source address (Note: this is not necessarily an IPv4
-address)
+PDU transport address (Note: this is not necessarily an IPv4
+address).
+.br
+Something like "[UDP: [172.16.10.12]:23456->[10.150.0.8]]"
 .TP
 .B %B
 PDU source hostname if available, otherwise PDU source address (see
 note above) 
 .TP
+.B %E
+SNMPv3 context engine id
+.TP
 .B %h
 current hour on the local system
 .TP
@@ -210,13 +218,19 @@ the numeric month field from the \fCsysUpTime.0\fR varbind
 .B %N
 enterprise string
 .TP
-.B %q
-trap sub-type (numeric, in decimal)
-.TP
 .B %P
 security information from the PDU (community name for v1/v2c,
 user and context for v3)
 .TP
+.B %q
+trap sub-type (numeric, in decimal)
+.TP
+.B %s
+SNMP version number (0: v1, 1: v2c, 2: v3)
+.TP
+.B %S
+SNMPv3 security model version number
+.TP
 .B %t
 decimal number of seconds since the operating system epoch (as
 returned by
@@ -225,6 +239,9 @@ returned by
 .B %T
 the value of the \fCsysUpTime.0\fR varbind in seconds
 .TP
+.B %u
+SNMPv3 security name, or v1/v2c community name
+.TP
 .B %v
 list of variable-bindings from the notification payload.
 These will be separated by a tab, 
@@ -317,4 +334,4 @@ See the
 .I snmptrapd.conf(5)
 manual page.
 .SH "SEE ALSO"
-snmpcmd(1), snmpd(8), printf(3), snmptrapd.conf(5), syslog(8), variables(5)
+snmpcmd(1), snmpd(8), printf(3), snmptrapd.conf(5), syslog(8), traptoemail(1), variables(5)
diff --git a/man/snmptrapd.conf.5.def b/man/snmptrapd.conf.5.def
index 9242b28..1bbbfbb 100644
--- a/man/snmptrapd.conf.5.def
+++ b/man/snmptrapd.conf.5.def
@@ -1,4 +1,4 @@
-.TH SNMPTRAPD.CONF 5 "19 Feb 2009" VVERSIONINFO "Net-SNMP"
+.TH SNMPTRAPD.CONF 5 "13 Mar 2014" VVERSIONINFO "Net-SNMP"
 .SH NAME
 snmptrapd.conf - configuration file for the Net-SNMP notification receiver
 .SH DESCRIPTION
@@ -7,7 +7,7 @@ configuration files to control its operation and how incoming traps
 (and INFORM requests) should be processed.
 This file (\fBsnmptrapd.conf\fR) can be located in
 one of several locations, as described in the
-.I snmp_config(5)
+.IR snmp_config (5)
 manual page.
 .SH IMPORTANT
 Previously,
@@ -32,7 +32,7 @@ incoming SNMP notifications.
 See the section 
 .B LISTENING ADDRESSES
 in the
-.I snmpd(8)
+.IR snmpd (8)
 manual page for more information about the format of listening
 addresses.
 .IP
@@ -46,7 +46,7 @@ the \fCnlmLogTable\fR and \fCnlmLogvariableTable\fR tables.
 This directive can be used to suppress this behaviour.
 .IP
 See the 
-.I snmptrapd(8) 
+.IR snmptrapd (8) 
 manual page and the NOTIFICATION\-LOG\-MIB for details.
 .IP "doNotLogTraps yes"
 disables the logging of notifications altogether.
@@ -87,7 +87,9 @@ community to trigger the types of processing listed.
 By default, this will allow any notification using this community
 to be processed.  The SOURCE field can be used to specify that the
 configuration should only apply to notifications received from
-particular sources - see \fIsnmpd.conf(5)\fR for more details.
+particular sources - see
+.IR snmpd.conf (5)
+for more details.
 .IP "authUser   TYPES [\-s MODEL] USER  [LEVEL [OID | \-v VIEW ]]"
 authorises SNMPv3 notifications with the specified
 user to trigger the types of processing listed.
@@ -112,10 +114,12 @@ held within that notification.
 authorise notifications in the specified GROUP
 (configured using the \fIgroup\fR directive)
 to trigger the types of processing listed.
-See \fIsnmpd.conf(5)\fR for more details.
+See
+.IR snmpd.conf (5)
+for more details.
 .IP "createUser [-e  ENGINEID] username (MD5|SHA) authpassphrase [DES|AES]"
 See the 
-.I snmpd.conf(5)
+.IR snmpd.conf (5)
 manual page for a description of how to create SNMPv3 users.  This
 is roughly the same, but the file name changes to snmptrapd.conf from
 snmpd.conf.
@@ -131,9 +135,38 @@ previous behaviour of accepting all incoming notifications.
 specify the format used to display SNMPv1 TRAPs and SNMPv2
 notifications respectively.  Note that SNMPv2c and SNMPv3
 both use the same SNMPv2 PDU format.
+.IP "format DESTINATION FORMAT"
+specify the format used for different destinations.
+DESTINATION is one of:
+.IR print ", " print1 ", " print2 ", " 
+.IR syslog ", " syslog1 ", " syslog2 ", " 
+.IR execute ", " execute1 ", " execute2 .
+.I print1
+is used for printing SNMPv1 traps,
+.I print2
+is for SNMPv2.
+.I print
+is used for both versions.
+.I syslog
+is similarly used when sending traps to syslog, and
+.I execute
+used when sending traps to a program such as
+.IR traptoemail (1).
+.IP
+The default formats are
+.br
+.I format print1 %.4y-%.2m-%.2l %.2h:%.2j:%.2k %B [%b] (via %A [%a]): %N\en\et%W Trap (%q) Uptime: %#T\en%v\en
+.br
+.I format print2 %.4y-%.2m-%.2l %.2h:%.2j:%.2k %B [%b]:\en%v\en
+.br
+.I format syslog1 %a: %W Trap (%q) Uptime: %#T%#v\en
+.br
+.I format syslog2 %B [%b]: Trap %#v\en
+.br
+.I format execute %B\en%b\en%V\en%v\en
 .IP
 See
-.IR snmptrapd(8)
+.IR snmptrapd (8)
 for the layout characters available.
 .IP "ignoreAuthFailure yes"
 instructs the receiver to ignore \fIauthenticationFailure\fR traps.
@@ -149,12 +182,14 @@ to change in future versions.
 specifies where notifications should be logged - to standard
 output, standard error, a specified file or via \fIsyslog\fR.
 See the section LOGGING OPTIONS in the
-\fIsnmpcmd(1)\fR manual page for details.
+.IR snmpcmd (1)
+manual page for details.
 .IP "outputOption string"
 specifies various characteristics of how OIDs and other values
 should be displayed.
 See the section OUTPUT OPTIONS in the
-\fIsnmpcmd(1)\fR manual page for details.
+.IR snmpcmd (1)
+manual page for details.
 .SH MySQL Logging
 There are two configuration variables that work together to control
 when queued traps are logged to the MySQL database. A non-zero
@@ -201,14 +236,17 @@ Details of the notification are fed to the program via its standard input.
 Note that this will always use the SNMPv2-style notification format, with
 SNMPv1 traps being converted as per RFC 2576, before being passed to the
 program.
-The input format is as follows, one entry per line:
+The input format is, if you use the default set by
+the "format execute %B\en%b\en%V\en%v\en", one entry per line:
 .RS
 .IP HOSTNAME
 The name of the host that sent the notification, as determined by
-.IR gethostbyaddr(3) .
+.IR gethostbyaddr (3).
+.br
+.IP ADDRESS
+The transport address, like
 .br
-.IP IPADDRESS
-The IP address of the host that sent the notification.
+"[UDP: [172.16.10.12]:23456->[10.150.0.8]]"
 .\"
 .\" XXX - What about non-IPv4 transports?
 .\"
@@ -242,7 +280,7 @@ as for the \fItraphandle\fR directive).
 See the section 
 .B LISTENING ADDRESSES
 in the
-.I snmpd(8)
+.IR snmpd (8)
 manual page for more information about the format of listening
 addresses.
 .RE
@@ -262,5 +300,5 @@ directives are typically only used to enable the appropriate behaviour.
 .SH FILES
 SYSCONFDIR/snmp/snmptrapd.conf
 .SH "SEE ALSO"
-snmp_config(5), snmptrapd(8), syslog(8), variables(5), snmpd.conf(5), netsnmp_config_api(3).
+snmp_config(5), snmptrapd(8), syslog(8), traptoemail(1), variables(5), netsnmp_config_api(3).
 
diff --git a/man/snmpwalk.1.def b/man/snmpwalk.1.def
index ef78660..d9f3d5c 100644
--- a/man/snmpwalk.1.def
+++ b/man/snmpwalk.1.def
@@ -108,7 +108,7 @@ manual page.
 .SH EXAMPLES
 .br
 Note that
-.B snmpbulkget
+.B snmpwalk
 REQUIRES  an argument specifying the agent to query
 and at most one OID argument, as described there.
 The command:
diff --git a/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt b/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
new file mode 100644
index 0000000..7995fc4
--- /dev/null
+++ b/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
@@ -0,0 +1,166 @@
+  IANA-ADDRESS-FAMILY-NUMBERS-MIB DEFINITIONS ::= BEGIN
+
+  IMPORTS
+      MODULE-IDENTITY,
+      mib-2                               FROM SNMPv2-SMI
+      TEXTUAL-CONVENTION                  FROM SNMPv2-TC;
+
+  ianaAddressFamilyNumbers MODULE-IDENTITY
+      LAST-UPDATED "201309250000Z"  -- September 25, 2013
+      ORGANIZATION "IANA"
+      CONTACT-INFO
+          "Postal:    Internet Assigned Numbers Authority
+                      Internet Corporation for Assigned Names
+		      and Numbers
+                      12025 Waterfront Drive, Suite 300
+                      Los Angeles, CA 90094-2536
+                      USA
+
+          Tel:    +1  310-301-5800
+          E-Mail: iana&iana.org"
+      DESCRIPTION
+          "The MIB module defines the AddressFamilyNumbers
+          textual convention."
+
+      -- revision history
+
+      REVISION     "201309250000Z"  -- September 25, 2013
+      DESCRIPTION  "Fixed labels for 16389-16390."
+
+      REVISION     "201307160000Z"  -- July 16, 2013
+      DESCRIPTION  "Fixed labels for 16389-16390."
+
+      REVISION     "201306260000Z"  -- June 26, 2013
+      DESCRIPTION  "Added assignments 26-28."
+
+      REVISION     "201306180000Z"  -- June 18, 2013
+      DESCRIPTION  "Added assignments 16384-16390. Assignment 
+                    25 added in 2007 revision."
+
+      REVISION     "200203140000Z"  -- March 14, 2002
+      DESCRIPTION  "AddressFamilyNumbers assignment 22 to 
+                   fibreChannelWWPN. AddressFamilyNumbers 
+                   assignment 23 to fibreChannelWWNN.
+                   AddressFamilyNumers assignment 24 to gwid."
+
+      REVISION     "200009080000Z"  -- September 8, 2000
+      DESCRIPTION  "AddressFamilyNumbers assignment 19 to xtpOverIpv4.  
+                   AddressFamilyNumbers assignment 20 to xtpOverIpv6.  
+                   AddressFamilyNumbers assignment 21 to xtpNativeModeXTP."
+
+      REVISION     "200003010000Z"  -- March 1, 2000
+      DESCRIPTION  "AddressFamilyNumbers assignment 17 to distinguishedName. 
+                   AddressFamilyNumbers assignment 18 to asNumber."
+
+      REVISION     "200002040000Z"  -- February 4, 2000
+      DESCRIPTION  "AddressFamilyNumbers assignment 16 to dns."
+
+      REVISION     "9908260000Z"  -- August 26, 1999
+      DESCRIPTION  "Initial version, published as RFC 2677."
+      ::= { mib-2 72 }
+
+  AddressFamilyNumbers ::= TEXTUAL-CONVENTION
+      STATUS       current
+      DESCRIPTION
+          "The definition of this textual convention with the
+          addition of newly assigned values is published
+          periodically by the IANA, in either the Assigned
+          Numbers RFC, or some derivative of it specific to
+          Internet Network Management number assignments.
+          (The latest arrangements can be obtained by
+          contacting the IANA.)
+
+          The enumerations are described as:
+
+          other(0),    -- none of the following
+          ipV4(1),     -- IP Version 4
+          ipV6(2),     -- IP Version 6
+          nsap(3),     -- NSAP
+          hdlc(4),     -- (8-bit multidrop)
+          bbn1822(5),
+          all802(6),   -- (includes all 802 media
+                       --   plus Ethernet 'canonical format')
+          e163(7),
+          e164(8),     -- (SMDS, Frame Relay, ATM)
+          f69(9),      -- (Telex)
+          x121(10),    -- (X.25, Frame Relay)
+          ipx(11),     -- IPX (Internet Protocol Exchange)
+          appleTalk(12),  -- Apple Talk
+          decnetIV(13),   -- DEC Net Phase IV
+          banyanVines(14),  -- Banyan Vines
+          e164withNsap(15),
+                       -- (E.164 with NSAP format subaddress)
+          dns(16),     -- (Domain Name System)
+          distinguishedName(17), -- (Distinguished Name, per X.500)
+          asNumber(18), -- (16-bit quantity, per the AS number space)
+          xtpOverIpv4(19),  -- XTP over IP version 4
+          xtpOverIpv6(20),  -- XTP over IP version 6
+          xtpNativeModeXTP(21),  -- XTP native mode XTP
+          fibreChannelWWPN(22),  -- Fibre Channel World-Wide Port Name 
+          fibreChannelWWNN(23),  -- Fibre Channel World-Wide Node Name
+          gwid(24),    -- Gateway Identifier 
+          afi(25),  -- AFI for L2VPN information
+          mplsTpSectionEndpointIdentifier(26),  -- MPLS-TP Section Endpoint Identifier
+          mplsTpLspEndpointIdentifier(27),  -- MPLS-TP LSP Endpoint Identifier
+          mplsTpPseudowireEndpointIdentifier(28),  -- MPLS-TP Pseudowire Endpoint Identifier
+          eigrpCommonServiceFamily(16384),  -- EIGRP Common Service Family
+          eigrpIpv4ServiceFamily(16385),  -- EIGRP IPv4 Service Family
+          eigrpIpv6ServiceFamily(16386),  -- EIGRP IPv6 Service Family
+          lispCanonicalAddressFormat(16387),  -- LISP Canonical Address Format (LCAF)
+          bgpLs(16388),  -- BGP-LS
+          fortyeightBitMacBitMac(16389),  -- 48-bit MAC
+          sixtyfourBitMac(16390),  -- 64-bit MAC
+          oui(16391),  -- OUI
+          mac24(16392),  -- MAC/24
+          mac40(16393),  -- MAC/40
+          ipv664(16394),  -- IPv6/64
+          rBridgePortID(16395),  -- RBridge Port ID
+          reserved(65535)
+
+          Requests for new values should be made to IANA via
+          email (iana&iana.org)."
+      SYNTAX  INTEGER {
+                  other(0),
+                  ipV4(1),
+                  ipV6(2),
+                  nsap(3),
+                  hdlc(4),
+                  bbn1822(5),
+                  all802(6),
+                  e163(7),
+                  e164(8),
+                  f69(9),
+                  x121(10),
+                  ipx(11),
+                  appleTalk(12),
+                  decnetIV(13),
+                  banyanVines(14),
+                  e164withNsap(15),
+                  dns(16),
+                  distinguishedName(17), -- (Distinguished Name, per X.500)
+                  asNumber(18), -- (16-bit quantity, per the AS number space)
+                  xtpOverIpv4(19),
+                  xtpOverIpv6(20),
+                  xtpNativeModeXTP(21),
+                  fibreChannelWWPN(22),
+                  fibreChannelWWNN(23),
+                  gwid(24),
+                  afi(25),
+                  mplsTpSectionEndpointIdentifier(26),
+                  mplsTpLspEndpointIdentifier(27),
+                  mplsTpPseudowireEndpointIdentifier(28),
+                  eigrpCommonServiceFamily(16384),
+                  eigrpIpv4ServiceFamily(16385),
+                  eigrpIpv6ServiceFamily(16386),
+                  lispCanonicalAddressFormat(16387),
+                  bgpLs(16388),
+                  fortyeightBitMac(16389),
+                  sixtyfourBitMac(16390),
+                  oui(16391),
+                  mac24(16392),
+                  mac40(16393),
+                  ipv664(16394),
+                  rBridgePortID(16395),
+                  reserved(65535)
+              }
+      END
diff --git a/mibs/IANA-LANGUAGE-MIB.txt b/mibs/IANA-LANGUAGE-MIB.txt
new file mode 100644
index 0000000..4b97bdd
--- /dev/null
+++ b/mibs/IANA-LANGUAGE-MIB.txt
@@ -0,0 +1,126 @@
+IANA-LANGUAGE-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+    MODULE-IDENTITY, OBJECT-IDENTITY, mib-2
+        FROM SNMPv2-SMI;
+
+ianaLanguages MODULE-IDENTITY
+    LAST-UPDATED "201405220000Z" -- May 22, 2014
+    ORGANIZATION "IANA"
+    CONTACT-INFO
+        "Internet Assigned Numbers Authority (IANA)
+
+         Postal: ICANN
+                 12025 Waterfront Drive, Suite 300
+                 Los Angeles, CA 90094-2536
+
+         Tel:    +1 310-301-5800
+         E-Mail: iana&iana.org"
+    DESCRIPTION
+        "The MIB module registers object identifier values for
+         well-known programming and scripting languages. Every
+         language registration MUST describe the format used
+         when transferring scripts written in this language.
+
+         Any additions or changes to the contents of this MIB
+         module require Designated Expert Review as defined in
+         the Guidelines for Writing IANA Considerations Section
+         document. The Designated Expert will be selected by
+         the IESG Area Director of the OPS Area.
+
+         Note, this module does not have to register all possible
+         languages since languages are identified by object
+         identifier values. It is therefore possible to registered 
+         languages in private OID trees. The references given below are not
+         normative with regard to the language version. Other
+         references might be better suited to describe some newer 
+         versions of this language. The references are only
+         provided as `a pointer into the right direction'."
+
+ -- Revision log, in reverse chronological order
+
+    REVISION    "201405220000Z" -- May 22, 2014
+    DESCRIPTION "Updated contact info."
+
+    REVISION    "200005100000Z" -- May 10, 2000
+    DESCRIPTION "Import mib-2 instead of experimental, so that
+                 this module compiles"
+
+    REVISION    "199909090900Z" -- September 9, 1999
+    DESCRIPTION "Initial version as published at time of
+                 publication of RFC 2591."
+    ::= { mib-2 73 }
+
+ianaLangJavaByteCode OBJECT-IDENTITY
+    STATUS  current
+    DESCRIPTION
+        "Java byte code to be processed by a Java virtual machine.
+         A script written in Java byte code is transferred by using
+         the Java archive file format (JAR)."
+    REFERENCE
+        "The Java Virtual Machine Specification.
+         ISBN 0-201-63452-X"
+    ::= { ianaLanguages 1 }
+
+ianaLangTcl OBJECT-IDENTITY
+    STATUS  current
+    DESCRIPTION
+        "The Tool Command Language (Tcl). A script written in the
+         Tcl language is transferred in Tcl source code format."
+    REFERENCE
+        "Tcl and the Tk Toolkit.
+         ISBN 0-201-63337-X"
+    ::= { ianaLanguages 2 }
+
+ianaLangPerl OBJECT-IDENTITY
+    STATUS  current
+    DESCRIPTION
+        "The Perl language. A script written in the Perl language
+         is transferred in Perl source code format."
+    REFERENCE
+        "Programming Perl.
+         ISBN 1-56592-149-6"
+    ::= { ianaLanguages 3 }
+
+ianaLangScheme OBJECT-IDENTITY
+    STATUS  current
+    DESCRIPTION
+        "The Scheme language. A script written in the Scheme
+         language is transferred in Scheme source code format."
+    REFERENCE
+        "The Revised^4 Report on the Algorithmic Language Scheme.
+         MIT Press"
+    ::= { ianaLanguages 4 }
+
+ianaLangSRSL OBJECT-IDENTITY
+    STATUS  current
+    DESCRIPTION
+        "The SNMP Script Language defined by SNMP Research. A
+         script written in the SNMP Script Language is transferred
+         in the SNMP Script Language source code format."
+    ::= { ianaLanguages 5 }
+
+ianaLangPSL OBJECT-IDENTITY
+    STATUS  current
+    DESCRIPTION
+        "The Patrol Script Language defined by BMC Software. A script
+         written in the Patrol Script Language is transferred in the
+         Patrol Script Language source code format."
+    REFERENCE
+        "PATROL Script Language Reference Manual, Version 3.0,
+         November 30, 1995. BMC Software, Inc. 2101 City West Blvd.,
+         Houston, Texas 77042."
+    ::= { ianaLanguages 6 }
+
+ianaLangSMSL OBJECT-IDENTITY
+    STATUS  current
+    DESCRIPTION
+        "The Systems Management Scripting Language. A script written
+         in the SMSL language is transferred in the SMSL source code
+         format."
+    REFERENCE
+        "ISO/ITU Command Sequencer.
+         ISO 10164-21 or ITU X.753"
+    ::= { ianaLanguages 7 }
+
+END
diff --git a/mibs/IANA-RTPROTO-MIB.txt b/mibs/IANA-RTPROTO-MIB.txt
new file mode 100644
index 0000000..f7bc1eb
--- /dev/null
+++ b/mibs/IANA-RTPROTO-MIB.txt
@@ -0,0 +1,95 @@
+IANA-RTPROTO-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+    MODULE-IDENTITY, mib-2           FROM SNMPv2-SMI
+    TEXTUAL-CONVENTION               FROM SNMPv2-TC;
+
+ianaRtProtoMIB  MODULE-IDENTITY
+    LAST-UPDATED "201208300000Z" -- August 30, 2012
+    ORGANIZATION "IANA"
+    CONTACT-INFO
+            " Internet Assigned Numbers Authority
+              Internet Corporation for Assigned Names and Numbers
+              12025 Waterfront Drive, Suite 300
+              Los Angeles, CA 90094-2536
+
+              Phone: +1 310 301 5800
+              EMail: iana&iana.org"
+    DESCRIPTION
+            "This MIB module defines the IANAipRouteProtocol and
+            IANAipMRouteProtocol textual conventions for use in MIBs
+            which need to identify unicast or multicast routing
+            mechanisms.
+
+            Any additions or changes to the contents of this MIB module
+            require either publication of an RFC, or Designated Expert
+            Review as defined in RFC 2434, Guidelines for Writing an
+            IANA Considerations Section in RFCs.  The Designated Expert 
+            will be selected by the IESG Area Director(s) of the Routing
+            Area."
+
+    REVISION     "201208300000Z"  -- August 30, 2012 
+    DESCRIPTION  "Added dhcp(19)."
+
+    REVISION     "201107220000Z"  -- July 22, 2011 
+    DESCRIPTION  "Added rpl(18) ."
+
+    REVISION     "200009260000Z"  -- September 26, 2000 
+    DESCRIPTION  "Original version, published in coordination
+                 with RFC 2932."
+    ::= { mib-2 84 }
+
+IANAipRouteProtocol ::= TEXTUAL-CONVENTION
+   STATUS      current
+   DESCRIPTION
+            "A mechanism for learning routes.  Inclusion of values for
+            routing protocols is not intended to imply that those
+            protocols need be supported."
+   SYNTAX      INTEGER {
+                other     (1),  -- not specified
+                local     (2),  -- local interface
+                netmgmt   (3),  -- static route
+                icmp      (4),  -- result of ICMP Redirect
+
+                        -- the following are all dynamic
+                        -- routing protocols
+
+                egp        (5),  -- Exterior Gateway Protocol
+                ggp        (6),  -- Gateway-Gateway Protocol
+                hello      (7),  -- FuzzBall HelloSpeak
+                rip        (8),  -- Berkeley RIP or RIP-II
+                isIs       (9),  -- Dual IS-IS
+                esIs       (10), -- ISO 9542
+                ciscoIgrp  (11), -- Cisco IGRP
+                bbnSpfIgp  (12), -- BBN SPF IGP
+                ospf       (13), -- Open Shortest Path First
+                bgp        (14), -- Border Gateway Protocol
+                idpr       (15), -- InterDomain Policy Routing
+                ciscoEigrp (16), -- Cisco EIGRP
+                dvmrp      (17), -- DVMRP
+                rpl        (18), -- RPL [RFC-ietf-roll-rpl-19]
+                dhcp       (19)  -- DHCP [RFC2132]
+               }
+
+IANAipMRouteProtocol ::= TEXTUAL-CONVENTION
+   STATUS      current
+   DESCRIPTION
+            "The multicast routing protocol.  Inclusion of values for
+            multicast routing protocols is not intended to imply that
+            those protocols need be supported."
+   SYNTAX      INTEGER {
+                   other(1),          -- none of the following
+                   local(2),          -- e.g., manually configured
+                   netmgmt(3),        -- set via net.mgmt protocol
+                   dvmrp(4),
+                   mospf(5),
+                   pimSparseDense(6), -- PIMv1, both DM and SM
+                   cbt(7),
+                   pimSparseMode(8),  -- PIM-SM
+                   pimDenseMode(9),   -- PIM-DM
+                   igmpOnly(10),
+                   bgmp(11),
+                   msdp(12)
+               }
+
+END
diff --git a/mibs/IANAifType-MIB.txt b/mibs/IANAifType-MIB.txt
new file mode 100644
index 0000000..027a153
--- /dev/null
+++ b/mibs/IANAifType-MIB.txt
@@ -0,0 +1,646 @@
+   IANAifType-MIB DEFINITIONS ::= BEGIN
+
+   IMPORTS
+       MODULE-IDENTITY, mib-2      FROM SNMPv2-SMI
+       TEXTUAL-CONVENTION          FROM SNMPv2-TC;
+
+   ianaifType MODULE-IDENTITY
+       LAST-UPDATED "201407030000Z" -- July 3, 2014
+       ORGANIZATION "IANA"
+       CONTACT-INFO "        Internet Assigned Numbers Authority
+
+                     Postal: ICANN
+                             12025 Waterfront Drive, Suite 300
+                             Los Angeles, CA 90094-2536
+
+                     Tel:    +1 310-301-5800
+                     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     "201407030000Z"  -- July 3, 2014
+	   DESCRIPTION  "Registration of new IANAifTypes 277-278."
+
+       REVISION     "201405220000Z" -- May 22, 2014
+       DESCRIPTION  "Updated contact info."
+
+       REVISION     "201205170000Z"  -- May 17, 2012
+       DESCRIPTION  "Registration of new IANAifType 272."
+
+       REVISION     "201201110000Z"  -- January 11, 2012
+       DESCRIPTION  "Registration of new IANAifTypes 266-271."
+
+       REVISION     "201112180000Z"  -- December 18, 2011
+       DESCRIPTION  "Registration of new IANAifTypes 263-265."
+
+       REVISION     "201110260000Z"  -- October 26, 2011
+       DESCRIPTION  "Registration of new IANAifType 262."
+
+       REVISION     "201109070000Z"  -- September 7, 2011
+       DESCRIPTION  "Registration of new IANAifTypes 260 and 261."
+
+       REVISION     "201107220000Z"  -- July 22, 2011
+       DESCRIPTION  "Registration of new IANAifType 259."
+
+       REVISION     "201106030000Z"  -- June 03, 2011
+       DESCRIPTION  "Registration of new IANAifType 258."
+
+       REVISION     "201009210000Z"  -- September 21, 2010
+       DESCRIPTION  "Registration of new IANAifTypes 256 and 257."
+
+       REVISION     "201007210000Z"  -- July 21, 2010
+       DESCRIPTION  "Registration of new IANAifType 255."
+
+       REVISION     "201002110000Z"  -- February 11, 2010
+       DESCRIPTION  "Registration of new IANAifType 254."
+
+       REVISION     "201002080000Z"  -- February 08, 2010
+       DESCRIPTION  "Registration of new IANAifTypes 252 and 253."
+
+       REVISION     "200905060000Z"  -- May 06, 2009
+       DESCRIPTION  "Registration of new IANAifType 251."
+
+       REVISION     "200902060000Z"  -- February 06, 2009
+       DESCRIPTION  "Registration of new IANAtunnelType 15."
+
+       REVISION     "200810090000Z"  -- October 09, 2008
+       DESCRIPTION  "Registration of new IANAifType 250."
+
+       REVISION     "200808120000Z"  -- August 12, 2008
+       DESCRIPTION  "Registration of new IANAifType 249."
+
+       REVISION     "200807220000Z"  -- July 22, 2008
+       DESCRIPTION  "Registration of new IANAifTypes 247 and 248."
+
+       REVISION     "200806240000Z"  -- June 24, 2008
+       DESCRIPTION  "Registration of new IANAifType 246."
+
+       REVISION     "200805290000Z"  -- May 29, 2008
+       DESCRIPTION  "Registration of new IANAifType 245."
+
+       REVISION     "200709130000Z"  -- September 13, 2007
+       DESCRIPTION  "Registration of new IANAifTypes 243 and 244."
+
+       REVISION     "200705290000Z"  -- May 29, 2007
+       DESCRIPTION  "Changed the description for IANAifType 228."
+
+       REVISION     "200703080000Z"  -- March 08, 2007
+       DESCRIPTION  "Registration of new IANAifType 242."
+
+       REVISION     "200701230000Z"  -- January 23, 2007
+       DESCRIPTION  "Registration of new IANAifTypes 239, 240, and 241." 
+
+       REVISION     "200610170000Z"  -- October 17, 2006
+       DESCRIPTION  "Deprecated/Obsoleted IANAifType 230.  Registration of 
+                     IANAifType 238." 
+
+       REVISION     "200609250000Z"  -- September 25, 2006
+       DESCRIPTION  "Changed the description for IANA ifType 
+                     184 and added new IANA ifType 237."  
+
+       REVISION     "200608170000Z"  -- August 17, 2006
+       DESCRIPTION  "Changed the descriptions for IANAifTypes
+                     20 and 21."   
+
+       REVISION     "200608110000Z"  -- August 11, 2006
+       DESCRIPTION  "Changed the descriptions for IANAifTypes
+                     7, 11, 62, 69, and 117."   
+
+       REVISION     "200607250000Z"  -- July 25, 2006
+       DESCRIPTION  "Registration of new IANA ifType 236."
+
+       REVISION     "200606140000Z"  -- June 14, 2006
+       DESCRIPTION  "Registration of new IANA ifType 235."
+
+       REVISION     "200603310000Z"  -- March 31, 2006
+       DESCRIPTION  "Registration of new IANA ifType 234."
+
+       REVISION     "200603300000Z"  -- March 30, 2006
+       DESCRIPTION  "Registration of new IANA ifType 233."
+
+       REVISION     "200512220000Z"  -- December 22, 2005
+       DESCRIPTION  "Registration of new IANA ifTypes 231 and 232."
+
+       REVISION     "200510100000Z"  -- October 10, 2005
+       DESCRIPTION  "Registration of new IANA ifType 230."
+
+       REVISION     "200509090000Z"  -- September 09, 2005
+       DESCRIPTION  "Registration of new IANA ifType 229."
+
+       REVISION     "200505270000Z"  -- May 27, 2005
+       DESCRIPTION  "Registration of new IANA ifType 228."
+
+       REVISION     "200503030000Z"  -- March 3, 2005
+       DESCRIPTION  "Added the IANAtunnelType TC and deprecated
+	                 IANAifType sixToFour (215) per RFC4087."
+
+       REVISION     "200411220000Z"  -- November 22, 2004
+       DESCRIPTION  "Registration of new IANA ifType 227 per RFC4631."
+
+       REVISION     "200406170000Z"  -- June 17, 2004
+       DESCRIPTION  "Registration of new IANA ifType 226."
+
+       REVISION     "200405120000Z"  -- May 12, 2004
+       DESCRIPTION  "Added description for IANAifType 6, and 
+	                 changed the descriptions for IANAifTypes
+                     180, 181, and 182."
+
+       REVISION     "200405070000Z"  -- May 7, 2004
+       DESCRIPTION  "Registration of new IANAifType 225."
+
+       REVISION     "200308250000Z"  -- Aug 25, 2003
+       DESCRIPTION  "Deprecated IANAifTypes 7 and 11. Obsoleted
+                     IANAifTypes 62, 69, and 117.  ethernetCsmacd (6)
+                     should be used instead of these values"
+
+       REVISION     "200308180000Z"  -- Aug 18, 2003
+       DESCRIPTION  "Registration of new IANAifType
+                     224."
+
+       REVISION     "200308070000Z"  -- Aug 7, 2003
+       DESCRIPTION  "Registration of new IANAifTypes
+                     222 and 223."
+
+       REVISION     "200303180000Z"  -- Mar 18, 2003
+       DESCRIPTION  "Registration of new IANAifType
+                     221."
+
+       REVISION     "200301130000Z"  -- Jan 13, 2003
+       DESCRIPTION  "Registration of new IANAifType
+                     220."
+
+       REVISION     "200210170000Z"  -- Oct 17, 2002
+       DESCRIPTION  "Registration of new IANAifType
+                     219."
+
+       REVISION     "200207160000Z"  -- Jul 16, 2002
+       DESCRIPTION  "Registration of new IANAifTypes
+                     217 and 218."
+
+       REVISION     "200207100000Z"  -- Jul 10, 2002
+       DESCRIPTION  "Registration of new IANAifTypes
+                     215 and 216."
+
+       REVISION     "200206190000Z"  -- Jun 19, 2002
+       DESCRIPTION  "Registration of new IANAifType
+                     214."
+
+       REVISION     "200201040000Z"  -- Jan 4, 2002
+       DESCRIPTION  "Registration of new IANAifTypes
+                     211, 212 and 213."
+
+       REVISION     "200112200000Z"  -- Dec 20, 2001
+       DESCRIPTION  "Registration of new IANAifTypes
+                     209 and 210."
+
+       REVISION     "200111150000Z"  -- Nov 15, 2001
+       DESCRIPTION  "Registration of new IANAifTypes
+                     207 and 208."
+
+       REVISION     "200111060000Z"  -- Nov 6, 2001
+       DESCRIPTION  "Registration of new IANAifType
+                     206."
+
+       REVISION     "200111020000Z"  -- Nov 2, 2001
+       DESCRIPTION  "Registration of new IANAifType
+                     205."
+
+       REVISION     "200110160000Z"  -- Oct 16, 2001
+       DESCRIPTION  "Registration of new IANAifTypes
+                     199, 200, 201, 202, 203, and 204."
+
+       REVISION     "200109190000Z"  -- Sept 19, 2001
+       DESCRIPTION  "Registration of new IANAifType
+                     198."
+
+       REVISION     "200105110000Z"  -- May 11, 2001
+       DESCRIPTION  "Registration of new IANAifType
+                     197."
+
+       REVISION     "200101120000Z"  -- Jan 12, 2001
+       DESCRIPTION  "Registration of new IANAifTypes
+                     195 and 196."
+
+       REVISION     "200012190000Z"  -- Dec 19, 2000
+       DESCRIPTION  "Registration of new IANAifTypes
+                     193 and 194."
+
+       REVISION     "200012070000Z"  -- Dec 07, 2000
+       DESCRIPTION  "Registration of new IANAifTypes
+                     191 and 192."
+
+       REVISION     "200012040000Z"  -- Dec 04, 2000
+       DESCRIPTION  "Registration of new IANAifType
+                     190."
+
+       REVISION     "200010170000Z"  -- Oct 17, 2000
+       DESCRIPTION  "Registration of new IANAifTypes
+                     188 and 189."  
+
+       REVISION     "200010020000Z"  -- Oct 02, 2000
+       DESCRIPTION  "Registration of new IANAifType 187." 
+
+       REVISION     "200009010000Z"  -- Sept 01, 2000
+       DESCRIPTION  "Registration of new IANAifTypes
+                     184, 185, and 186."			
+
+       REVISION     "200008240000Z"  -- Aug 24, 2000
+       DESCRIPTION  "Registration of new IANAifType 183." 
+
+       REVISION     "200008230000Z"  -- Aug 23, 2000
+       DESCRIPTION  "Registration of new IANAifTypes
+                     174-182."
+
+       REVISION     "200008220000Z"  -- Aug 22, 2000
+       DESCRIPTION  "Registration of new IANAifTypes 170,
+                     171, 172 and 173."
+
+       REVISION     "200004250000Z"  -- Apr 25, 2000
+       DESCRIPTION  "Registration of new IANAifTypes 168 and 169."       
+
+       REVISION     "200003060000Z"  -- Mar 6, 2000
+       DESCRIPTION  "Fixed a missing semi-colon in the IMPORT.
+                     Also cleaned up the REVISION log a bit.
+                     It is not complete, but from now on it will
+                     be maintained and kept up to date with each
+                     change to this MIB module."
+
+       REVISION     "199910081430Z"  -- Oct 08, 1999
+       DESCRIPTION  "Include new name assignments up to cnr(85).
+                     This is the first version available via the WWW
+                     at: ftp://ftp.isi.edu/mib/ianaiftype.mib"
+
+       REVISION     "199401310000Z"  -- Jan 31, 1994
+       DESCRIPTION  "Initial version of this MIB as published in
+                     RFC 1573."
+       ::= { mib-2 30 }
+
+   IANAifType ::= TEXTUAL-CONVENTION
+       STATUS       current
+       DESCRIPTION
+               "This data type is used as the syntax of the ifType
+               object in the (updated) definition of MIB-II's
+               ifTable.
+
+               The definition of this textual convention with the
+               addition of newly assigned values is published
+               periodically by the IANA, in either the Assigned
+               Numbers RFC, or some derivative of it specific to
+               Internet Network Management number assignments.  (The
+               latest arrangements can be obtained by contacting the
+               IANA.)
+
+               Requests for new values should be made to IANA via
+               email (iana&iana.org).
+
+               The relationship between the assignment of ifType
+               values and of OIDs to particular media-specific MIBs
+               is solely the purview of IANA and is subject to change
+               without notice.  Quite often, a media-specific MIB's
+               OID-subtree assignment within MIB-II's 'transmission'
+               subtree will be the same as its ifType value.
+               However, in some circumstances this will not be the
+               case, and implementors must not pre-assume any
+               specific relationship between ifType values and
+               transmission subtree OIDs."
+       SYNTAX  INTEGER {
+                   other(1),          -- none of the following
+                   regular1822(2),
+                   hdh1822(3),
+                   ddnX25(4),
+                   rfc877x25(5),
+                   ethernetCsmacd(6), -- for all ethernet-like interfaces,
+                                      -- regardless of speed, as per RFC3635
+                   iso88023Csmacd(7), -- Deprecated via RFC3635
+                                      -- ethernetCsmacd (6) should be used instead
+                   iso88024TokenBus(8),
+                   iso88025TokenRing(9),
+                   iso88026Man(10),
+                   starLan(11), -- Deprecated via RFC3635
+                                -- ethernetCsmacd (6) should be used instead
+                   proteon10Mbit(12),
+                   proteon80Mbit(13),
+                   hyperchannel(14),
+                   fddi(15),
+                   lapb(16),
+                   sdlc(17),
+                   ds1(18),            -- DS1-MIB
+                   e1(19),             -- Obsolete see DS1-MIB
+                   basicISDN(20),              -- no longer used
+                                               -- see also RFC2127
+                   primaryISDN(21),            -- no longer used
+                                               -- see also RFC2127
+                   propPointToPointSerial(22), -- proprietary serial
+                   ppp(23),
+                   softwareLoopback(24),
+                   eon(25),            -- CLNP over IP 
+                   ethernet3Mbit(26),
+                   nsip(27),           -- XNS over IP
+                   slip(28),           -- generic SLIP
+                   ultra(29),          -- ULTRA technologies
+                   ds3(30),            -- DS3-MIB
+                   sip(31),            -- SMDS, coffee
+                   frameRelay(32),     -- DTE only. 
+                   rs232(33),
+                   para(34),           -- parallel-port
+                   arcnet(35),         -- arcnet
+                   arcnetPlus(36),     -- arcnet plus
+                   atm(37),            -- ATM cells
+                   miox25(38),
+                   sonet(39),          -- SONET or SDH 
+                   x25ple(40),
+                   iso88022llc(41),
+                   localTalk(42),
+                   smdsDxi(43),
+                   frameRelayService(44),  -- FRNETSERV-MIB
+                   v35(45),
+                   hssi(46),
+                   hippi(47),
+                   modem(48),          -- Generic modem
+                   aal5(49),           -- AAL5 over ATM
+                   sonetPath(50),
+                   sonetVT(51),
+                   smdsIcip(52),       -- SMDS InterCarrier Interface
+                   propVirtual(53),    -- proprietary virtual/internal
+                   propMultiplexor(54),-- proprietary multiplexing
+                   ieee80212(55),      -- 100BaseVG
+                   fibreChannel(56),   -- Fibre Channel
+                   hippiInterface(57), -- HIPPI interfaces     
+                   frameRelayInterconnect(58), -- Obsolete, use either
+                                       -- frameRelay(32) or 
+                                       -- frameRelayService(44).
+                   aflane8023(59),     -- ATM Emulated LAN for 802.3
+                   aflane8025(60),     -- ATM Emulated LAN for 802.5
+                   cctEmul(61),        -- ATM Emulated circuit          
+                   fastEther(62),      -- Obsoleted via RFC3635
+                                       -- ethernetCsmacd (6) should be used instead
+                   isdn(63),           -- ISDN and X.25           
+                   v11(64),            -- CCITT V.11/X.21             
+                   v36(65),            -- CCITT V.36                  
+                   g703at64k(66),      -- CCITT G703 at 64Kbps
+                   g703at2mb(67),      -- Obsolete see DS1-MIB
+                   qllc(68),           -- SNA QLLC                    
+                   fastEtherFX(69),    -- Obsoleted via RFC3635
+                                       -- ethernetCsmacd (6) should be used instead
+                   channel(70),        -- channel                     
+                   ieee80211(71),      -- radio spread spectrum       
+                   ibm370parChan(72),  -- IBM System 360/370 OEMI Channel
+                   escon(73),          -- IBM Enterprise Systems Connection
+                   dlsw(74),           -- Data Link Switching
+                   isdns(75),          -- ISDN S/T interface
+                   isdnu(76),          -- ISDN U interface
+                   lapd(77),           -- Link Access Protocol D
+                   ipSwitch(78),       -- IP Switching Objects
+                   rsrb(79),           -- Remote Source Route Bridging
+                   atmLogical(80),     -- ATM Logical Port
+                   ds0(81),            -- Digital Signal Level 0
+                   ds0Bundle(82),      -- group of ds0s on the same ds1
+                   bsc(83),            -- Bisynchronous Protocol
+                   async(84),          -- Asynchronous Protocol
+                   cnr(85),            -- Combat Net Radio
+                   iso88025Dtr(86),    -- ISO 802.5r DTR
+                   eplrs(87),          -- Ext Pos Loc Report Sys
+                   arap(88),           -- Appletalk Remote Access Protocol
+                   propCnls(89),       -- Proprietary Connectionless Protocol
+                   hostPad(90),        -- CCITT-ITU X.29 PAD Protocol
+                   termPad(91),        -- CCITT-ITU X.3 PAD Facility
+                   frameRelayMPI(92),  -- Multiproto Interconnect over FR
+                   x213(93),           -- CCITT-ITU X213
+                   adsl(94),           -- Asymmetric Digital Subscriber Loop
+                   radsl(95),          -- Rate-Adapt. Digital Subscriber Loop
+                   sdsl(96),           -- Symmetric Digital Subscriber Loop
+                   vdsl(97),           -- Very H-Speed Digital Subscrib. Loop
+                   iso88025CRFPInt(98), -- ISO 802.5 CRFP
+                   myrinet(99),        -- Myricom Myrinet
+                   voiceEM(100),       -- voice recEive and transMit
+                   voiceFXO(101),      -- voice Foreign Exchange Office
+                   voiceFXS(102),      -- voice Foreign Exchange Station
+                   voiceEncap(103),    -- voice encapsulation
+                   voiceOverIp(104),   -- voice over IP encapsulation
+                   atmDxi(105),        -- ATM DXI
+                   atmFuni(106),       -- ATM FUNI
+                   atmIma (107),       -- ATM IMA		   
+                   pppMultilinkBundle(108), -- PPP Multilink Bundle
+                   ipOverCdlc (109),   -- IBM ipOverCdlc
+                   ipOverClaw (110),   -- IBM Common Link Access to Workstn
+                   stackToStack (111), -- IBM stackToStack
+                   virtualIpAddress (112), -- IBM VIPA
+                   mpc (113),          -- IBM multi-protocol channel support
+                   ipOverAtm (114),    -- IBM ipOverAtm
+                   iso88025Fiber (115), -- ISO 802.5j Fiber Token Ring
+                   tdlc (116),	       -- IBM twinaxial data link control
+                   gigabitEthernet (117), -- Obsoleted via RFC3635
+                                          -- ethernetCsmacd (6) should be used instead
+                   hdlc (118),         -- HDLC
+                   lapf (119),	       -- LAP F
+                   v37 (120),	       -- V.37
+                   x25mlp (121),       -- Multi-Link Protocol
+                   x25huntGroup (122), -- X25 Hunt Group
+                   transpHdlc (123),   -- Transp HDLC
+                   interleave (124),   -- Interleave channel
+                   fast (125),         -- Fast channel
+                   ip (126),	       -- IP (for APPN HPR in IP networks)
+                   docsCableMaclayer (127),  -- CATV Mac Layer
+                   docsCableDownstream (128), -- CATV Downstream interface
+                   docsCableUpstream (129),  -- CATV Upstream interface
+                   a12MppSwitch (130), -- Avalon Parallel Processor
+                   tunnel (131),       -- Encapsulation interface
+                   coffee (132),       -- coffee pot
+                   ces (133),          -- Circuit Emulation Service
+                   atmSubInterface (134), -- ATM Sub Interface
+                   l2vlan (135),       -- Layer 2 Virtual LAN using 802.1Q
+                   l3ipvlan (136),     -- Layer 3 Virtual LAN using IP
+                   l3ipxvlan (137),    -- Layer 3 Virtual LAN using IPX
+                   digitalPowerline (138), -- IP over Power Lines	
+                   mediaMailOverIp (139), -- Multimedia Mail over IP
+                   dtm (140),        -- Dynamic syncronous Transfer Mode
+                   dcn (141),    -- Data Communications Network
+                   ipForward (142),    -- IP Forwarding Interface
+                   msdsl (143),       -- Multi-rate Symmetric DSL
+                   ieee1394 (144), -- IEEE1394 High Performance Serial Bus
+                   if-gsn (145),       --   HIPPI-6400 
+                   dvbRccMacLayer (146), -- DVB-RCC MAC Layer
+                   dvbRccDownstream (147),  -- DVB-RCC Downstream Channel
+                   dvbRccUpstream (148),  -- DVB-RCC Upstream Channel
+                   atmVirtual (149),   -- ATM Virtual Interface
+                   mplsTunnel (150),   -- MPLS Tunnel Virtual Interface
+                   srp (151),	-- Spatial Reuse Protocol	
+                   voiceOverAtm (152),  -- Voice Over ATM
+                   voiceOverFrameRelay (153),   -- Voice Over Frame Relay 
+                   idsl (154),		-- Digital Subscriber Loop over ISDN
+                   compositeLink (155),  -- Avici Composite Link Interface
+                   ss7SigLink (156),     -- SS7 Signaling Link 
+                   propWirelessP2P (157),  --  Prop. P2P wireless interface
+                   frForward (158),    -- Frame Forward Interface
+                   rfc1483 (159),	-- Multiprotocol over ATM AAL5
+                   usb (160),		-- USB Interface
+                   ieee8023adLag (161),  -- IEEE 802.3ad Link Aggregate
+                   bgppolicyaccounting (162), -- BGP Policy Accounting
+                   frf16MfrBundle (163), -- FRF .16 Multilink Frame Relay 
+                   h323Gatekeeper (164), -- H323 Gatekeeper
+                   h323Proxy (165), -- H323 Voice and Video Proxy
+                   mpls (166), -- MPLS                   
+                   mfSigLink (167), -- Multi-frequency signaling link
+                   hdsl2 (168), -- High Bit-Rate DSL - 2nd generation
+                   shdsl (169), -- Multirate HDSL2
+                   ds1FDL (170), -- Facility Data Link 4Kbps on a DS1
+                   pos (171), -- Packet over SONET/SDH Interface
+                   dvbAsiIn (172), -- DVB-ASI Input
+                   dvbAsiOut (173), -- DVB-ASI Output 
+                   plc (174), -- Power Line Communtications
+                   nfas (175), -- Non Facility Associated Signaling
+                   tr008 (176), -- TR008
+                   gr303RDT (177), -- Remote Digital Terminal
+                   gr303IDT (178), -- Integrated Digital Terminal
+                   isup (179), -- ISUP
+                   propDocsWirelessMaclayer (180), -- Cisco proprietary Maclayer
+                   propDocsWirelessDownstream (181), -- Cisco proprietary Downstream
+                   propDocsWirelessUpstream (182), -- Cisco proprietary Upstream
+                   hiperlan2 (183), -- HIPERLAN Type 2 Radio Interface
+                   propBWAp2Mp (184), -- PropBroadbandWirelessAccesspt2multipt
+                             -- use of this iftype for IEEE 802.16 WMAN
+                             -- interfaces as per IEEE Std 802.16f is
+                             -- deprecated and ifType 237 should be used instead.
+                   sonetOverheadChannel (185), -- SONET Overhead Channel
+                   digitalWrapperOverheadChannel (186), -- Digital Wrapper
+                   aal2 (187), -- ATM adaptation layer 2
+                   radioMAC (188), -- MAC layer over radio links
+                   atmRadio (189), -- ATM over radio links   
+                   imt (190), -- Inter Machine Trunks
+                   mvl (191), -- Multiple Virtual Lines DSL
+                   reachDSL (192), -- Long Reach DSL
+                   frDlciEndPt (193), -- Frame Relay DLCI End Point
+                   atmVciEndPt (194), -- ATM VCI End Point
+                   opticalChannel (195), -- Optical Channel
+                   opticalTransport (196), -- Optical Transport
+                   propAtm (197), --  Proprietary ATM       
+                   voiceOverCable (198), -- Voice Over Cable Interface
+                   infiniband (199), -- Infiniband
+                   teLink (200), -- TE Link
+                   q2931 (201), -- Q.2931
+                   virtualTg (202), -- Virtual Trunk Group
+                   sipTg (203), -- SIP Trunk Group
+                   sipSig (204), -- SIP Signaling   
+                   docsCableUpstreamChannel (205), -- CATV Upstream Channel
+                   econet (206), -- Acorn Econet
+                   pon155 (207), -- FSAN 155Mb Symetrical PON interface
+                   pon622 (208), -- FSAN622Mb Symetrical PON interface
+                   bridge (209), -- Transparent bridge interface
+                   linegroup (210), -- Interface common to multiple lines   
+                   voiceEMFGD (211), -- voice E&M Feature Group D
+                   voiceFGDEANA (212), -- voice FGD Exchange Access North American
+                   voiceDID (213), -- voice Direct Inward Dialing
+                   mpegTransport (214), -- MPEG transport interface
+                   sixToFour (215), -- 6to4 interface (DEPRECATED)
+                   gtp (216), -- GTP (GPRS Tunneling Protocol)
+                   pdnEtherLoop1 (217), -- Paradyne EtherLoop 1
+                   pdnEtherLoop2 (218), -- Paradyne EtherLoop 2
+                   opticalChannelGroup (219), -- Optical Channel Group
+                   homepna (220), -- HomePNA ITU-T G.989
+                   gfp (221), -- Generic Framing Procedure (GFP)
+                   ciscoISLvlan (222), -- Layer 2 Virtual LAN using Cisco ISL
+                   actelisMetaLOOP (223), -- Acteleis proprietary MetaLOOP High Speed Link 
+                   fcipLink (224), -- FCIP Link 
+                   rpr (225), -- Resilient Packet Ring Interface Type
+                   qam (226), -- RF Qam Interface
+                   lmp (227), -- Link Management Protocol
+                   cblVectaStar (228), -- Cambridge Broadband Networks Limited VectaStar
+                   docsCableMCmtsDownstream (229), -- CATV Modular CMTS Downstream Interface
+                   adsl2 (230), -- Asymmetric Digital Subscriber Loop Version 2 
+                                -- (DEPRECATED/OBSOLETED - please use adsl2plus 238 instead)
+                   macSecControlledIF (231), -- MACSecControlled 
+                   macSecUncontrolledIF (232), -- MACSecUncontrolled
+                   aviciOpticalEther (233), -- Avici Optical Ethernet Aggregate
+                   atmbond (234), -- atmbond
+                   voiceFGDOS (235), -- voice FGD Operator Services
+                   mocaVersion1 (236), -- MultiMedia over Coax Alliance (MoCA) Interface
+                             -- as documented in information provided privately to IANA
+                   ieee80216WMAN (237), -- IEEE 802.16 WMAN interface
+                   adsl2plus (238), -- Asymmetric Digital Subscriber Loop Version 2, 
+                                   -- Version 2 Plus and all variants
+                   dvbRcsMacLayer (239), -- DVB-RCS MAC Layer
+                   dvbTdm (240), -- DVB Satellite TDM
+                   dvbRcsTdma (241), -- DVB-RCS TDMA
+                   x86Laps (242), -- LAPS based on ITU-T X.86/Y.1323
+                   wwanPP (243), -- 3GPP WWAN
+                   wwanPP2 (244), -- 3GPP2 WWAN
+                   voiceEBS (245), -- voice P-phone EBS physical interface
+                   ifPwType (246), -- Pseudowire interface type
+                   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
+                   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
+                   capwapWtpVirtualRadio (254), -- WTP Virtual Radio Interface
+                   bits (255), -- bitsport
+                   docsCableUpstreamRfPort (256), -- DOCSIS CATV Upstream RF Port
+                   cableDownstreamRfPort (257), -- CATV downstream RF port
+                   vmwareVirtualNic (258), -- VMware Virtual Network Interface
+                   ieee802154 (259), -- IEEE 802.15.4 WPAN interface
+                   otnOdu (260), -- OTN Optical Data Unit
+                   otnOtu (261), -- OTN Optical channel Transport Unit
+                   ifVfiType (262), -- VPLS Forwarding Instance Interface Type
+                   g9981 (263), -- G.998.1 bonded interface
+                   g9982 (264), -- G.998.2 bonded interface
+                   g9983 (265), -- G.998.3 bonded interface
+                   aluEpon (266), -- Ethernet Passive Optical Networks (E-PON)
+                   aluEponOnu (267), -- EPON Optical Network Unit
+                   aluEponPhysicalUni (268), -- EPON physical User to Network interface
+                   aluEponLogicalLink (269), -- The emulation of a point-to-point link over the EPON layer
+                   aluGponOnu (270), -- GPON Optical Network Unit
+                   aluGponPhysicalUni (271), -- GPON physical User to Network interface
+                   vmwareNicTeam (272), -- VMware NIC Team
+                   docsOfdmDownstream (277), -- CATV Downstream OFDM interface
+                   docsOfdmaUpstream (278) -- CATV Upstream OFDMA interface
+                   }
+
+IANAtunnelType ::= TEXTUAL-CONVENTION
+    STATUS     current
+    DESCRIPTION
+            "The encapsulation method used by a tunnel. The value
+            direct indicates that a packet is encapsulated
+            directly within a normal IP header, with no
+            intermediate header, and unicast to the remote tunnel
+            endpoint (e.g., an RFC 2003 IP-in-IP tunnel, or an RFC
+            1933 IPv6-in-IPv4 tunnel). The value minimal indicates
+            that a Minimal Forwarding Header (RFC 2004) is
+            inserted between the outer header and the payload
+            packet. The value UDP indicates that the payload
+            packet is encapsulated within a normal UDP packet
+            (e.g., RFC 1234).
+
+            The values sixToFour, sixOverFour, and isatap
+            indicates that an IPv6 packet is encapsulated directly
+            within an IPv4 header, with no intermediate header,
+            and unicast to the destination determined by the 6to4,
+            6over4, or ISATAP protocol.
+
+            The remaining protocol-specific values indicate that a
+            header of the protocol of that name is inserted
+            between the outer header and the payload header.
+
+            The assignment policy for IANAtunnelType values is
+            identical to the policy for assigning IANAifType
+            values."
+    SYNTAX     INTEGER {
+                   other(1),        -- none of the following
+                   direct(2),       -- no intermediate header
+                   gre(3),          -- GRE encapsulation
+                   minimal(4),      -- Minimal encapsulation
+                   l2tp(5),         -- L2TP encapsulation
+                   pptp(6),         -- PPTP encapsulation
+                   l2f(7),          -- L2F encapsulation
+                   udp(8),          -- UDP encapsulation
+                   atmp(9),         -- ATMP encapsulation
+                   msdp(10),        -- MSDP encapsulation
+                   sixToFour(11),   -- 6to4 encapsulation
+                   sixOverFour(12), -- 6over4 encapsulation
+                   isatap(13),      -- ISATAP encapsulation
+                   teredo(14),      -- Teredo encapsulation
+                   ipHttps(15)      -- IPHTTPS
+               }
+
+   END
diff --git a/mibs/Makefile.in b/mibs/Makefile.in
index 0d8e71f..f185002 100644
--- a/mibs/Makefile.in
+++ b/mibs/Makefile.in
@@ -40,6 +40,7 @@ RFCMIBS	= IF-MIB.txt IF-INVERTED-STACK-MIB.txt \
 	DISMAN-EVENT-MIB.txt DISMAN-SCRIPT-MIB.txt DISMAN-SCHEDULE-MIB.txt \
 	NOTIFICATION-LOG-MIB.txt SNMP-USM-AES-MIB.txt \
 	SNMP-USM-DH-OBJECTS-MIB.txt \
+	SNMP-TLS-TM-MIB.txt SNMP-TSM-MIB.txt \
 	SCTP-MIB.txt BRIDGE-MIB.txt
 
 NETSNMPMIBS = NET-SNMP-TC.txt NET-SNMP-MIB.txt NET-SNMP-AGENT-MIB.txt \
diff --git a/mibs/RFC-1215.txt b/mibs/RFC-1215.txt
new file mode 100644
index 0000000..6432723
--- /dev/null
+++ b/mibs/RFC-1215.txt
@@ -0,0 +1,38 @@
+
+RFC-1215 DEFINITIONS ::= BEGIN
+
+-- This  module is a empty module.  It has been created solely for the 
+-- purpose of allowing other modules to correctly import the TRAP-TYPE 
+-- clause from RFC-1215 where it should be imported from.  It's a
+-- built in type in the UCD-SNMP code, and in fact RFC-1215 doesn't
+-- actually define a mib at all; it only defines macros.  However,
+-- importing the TRAP-TYPE is conventionally done from an import
+-- clause pointing to RFC-1215.
+--
+--   Wes 7/17/98
+
+TRAP-TYPE MACRO ::=
+BEGIN
+    TYPE NOTATION ::= "ENTERPRISE" value
+                      (enterprise OBJECT IDENTIFIER)
+                      VarPart
+                      DescrPart
+                      ReferPart
+    VALUE NOTATION ::= value (VALUE INTEGER)
+    VarPart ::=
+               "VARIABLES" "{" VarTypes "}"
+               | empty
+    VarTypes ::=
+               VarType | VarTypes "," VarType
+    VarType ::=
+               value (vartype ObjectName)
+    DescrPart ::=
+               "DESCRIPTION" value (description DisplayString)
+               | empty
+    ReferPart ::=
+               "REFERENCE" value (reference DisplayString)
+               | empty
+END
+ 
+
+END
diff --git a/mibs/UCD-SNMP-MIB.txt b/mibs/UCD-SNMP-MIB.txt
index 3bf4913..e8acc8c 100644
--- a/mibs/UCD-SNMP-MIB.txt
+++ b/mibs/UCD-SNMP-MIB.txt
@@ -37,7 +37,7 @@ IMPORTS
 	FROM SNMPv2-TC;
 
 ucdavis MODULE-IDENTITY
-    LAST-UPDATED "200901190000Z"
+    LAST-UPDATED "201407310000Z"
     ORGANIZATION "University of California, Davis"
     CONTACT-INFO    
 	"This mib is no longer being maintained by the University of
@@ -55,6 +55,9 @@ ucdavis MODULE-IDENTITY
     DESCRIPTION
 	"This file defines the private UCD SNMP MIB extensions."
 
+    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"
@@ -1488,6 +1491,23 @@ ssCpuRawGuestNice OBJECT-TYPE
          sum will typically be N*100 (for N processors)."
     ::= { systemStats 66 }
 
+ssCpuNumCpus OBJECT-TYPE
+    SYNTAX      Integer32
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+        "The number of processors, as counted by the agent.
+         This object's value may be useful in the management
+         of certain operating systems where notions such as
+         load average do not take into account the number of
+         processors in the system.
+
+         For other objects in the systemStats group whose
+         descriptions refer to 'N processors', this object's
+         value is N."
+    ::= { systemStats 67 }
+
+
 -- possibly used in the future:
 --
 -- ssErrorFlag OBJECT-TYPE
diff --git a/mibs/ianalist b/mibs/ianalist
index 0edb3a0..8b31ad6 100644
--- a/mibs/ianalist
+++ b/mibs/ianalist
@@ -1,15 +1,17 @@
-# updated 2010-04-21
+# updated 2014-08-14
 ianaaddressfamilynumbers-mib	IANA-ADDRESS-FAMILY-NUMBERS-MIB
+ianabfdtcstd-mib		IANA-BFD-TC-STD-MIB
 ianacharset-mib			IANA-CHARSET-MIB
+ianaentity-mib			IANA-ENTITY-MIB
 ianafinisher-mib		IANA-FINISHER-MIB
 ianagmplstc-mib			IANA-GMPLS-TC-MIB
 ianaiftype-mib			IANAifType-MIB
 ianaiprouteprotocol-mib		IANA-RTPROTO-MIB
-# ianaipfixselector-mib		IPFIX-SELECTOR-MIB
 ianaippmmetricsregistry-mib	IANA-IPPM-METRICS-REGISTRY-MIB
 ianaitualarmtc-mib		IANA-ITU-ALARM-TC-MIB
 ianalanguage-mib		IANA-LANGUAGE-MIB
 ianamalloc-mib			IANA-MALLOC-MIB
 ianamau-mib			IANA-MAU-MIB
+ianaolsrv2linkmetrictype-mib	IANA-OLSRv2-LINK-METRIC-TYPE-MIB
 ianaprinter-mib			IANA-PRINTER-MIB
 ianatn3270etc-mib		IANATn3270eTC-MIB
diff --git a/mibs/makehtml.pl b/mibs/makehtml.pl
index 5a34a35..e62a912 100644
--- a/mibs/makehtml.pl
+++ b/mibs/makehtml.pl
@@ -32,7 +32,7 @@ if (-f "rfclist") {
 if (-f "nodemap") {
     open(I,"nodemap");
     while (<I>) {
-	if (/^([-\w]+)\s+(\w+)\s*$/) {
+	if (/^([-\w]+)\s+(\S+)\s*$/) {
 	    $nodemap{$1} = $2;
 	}
     }
@@ -80,7 +80,9 @@ foreach my $mibf (@ARGV) {
 
     # get a different tree than the module identity though.
     if (exists($nodemap{$mib})) {
-	$node = $nodemap{$mib};
+	@nodelist = split(/,/,$nodemap{$mib});
+    } else {
+	@nodelist = $node;
     }
 
     # Change tabs to spaces
@@ -95,7 +97,18 @@ foreach my $mibf (@ARGV) {
     $desc =~ s/>/>/g;
 
     print "  <tr>\n";
-    print "    <td><a href=\"$node.html\">$mib</a><br />\n";
+    print "    <td>";
+    for (my $i = 0; $i <= $#nodelist; $i++) {
+	my $node = $nodelist[$i];
+	if ($i != 0) {
+	    print "        ";
+	}
+	print "<a href=\"$node.html\">$mib";
+	if ($#nodelist > 0) {
+	    print " ($node)";
+	}
+	print "</a><br />\n";
+    }
     print "        <a href=\"$mib.txt\">[mib file]</a></td>\n";
     print "        <br><a href=\"$mib-conf.html\">[conformance summary]</a></td>\n";
     print "    <td><a href=\"http://www.ietf.org/rfc/rfc$mibs{$mib}.txt\">rfc$mibs{$mib}</a></td>\n" if ($mibs{$mib});
@@ -103,8 +116,11 @@ foreach my $mibf (@ARGV) {
     print "    <td><pre>$desc</pre></td>\n";
     print "  </tr>\n";
 
-    system("MIBS=$mib mib2c -c mib2c.genhtml.conf $node");
-    system("mv $node.html $opts{D}");
+    for (my $i = 0; $i <= $#nodelist; $i++) {
+	my $node = $nodelist[$i];
+	system("MIBS=$mib mib2c -c mib2c.genhtml.conf $node");
+	system("mv $node.html $opts{D}");
+    }
 }
 
 print "</table>\n";
diff --git a/mibs/miblist.txt b/mibs/miblist.txt
new file mode 100644
index 0000000..6418835
--- /dev/null
+++ b/mibs/miblist.txt
@@ -0,0 +1,51 @@
+RFC1155-SMI.txt
+RFC1213-MIB.txt
+SMUX-MIB.txt
+IPV6-TCP-MIB.txt
+IPV6-UDP-MIB.txt
+IPV6-MIB.txt
+IPV6-TC.txt
+IPV6-ICMP-MIB.txt
+SNMP-COMMUNITY-MIB.txt
+SNMPv2-SMI.txt
+SNMPv2-TC.txt
+SNMPv2-CONF.txt
+AGENTX-MIB.txt
+SNMP-USM-DH-OBJECTS-MIB.txt
+NETWORK-SERVICES-MIB.txt
+MTA-MIB.txt
+HOST-RESOURCES-MIB.txt
+HOST-RESOURCES-TYPES.txt
+RMON-MIB.txt
+HCNUM-TC.txt
+IF-MIB.txt
+IF-INVERTED-STACK-MIB.txt
+DISMAN-EVENT-MIB.txt
+DISMAN-EXPRESSION-MIB.txt
+NOTIFICATION-LOG-MIB.txt
+DISMAN-SCRIPT-MIB.txt
+DISMAN-SCHEDULE-MIB.txt
+SNMP-FRAMEWORK-MIB.txt
+SNMP-MPD-MIB.txt
+SNMP-NOTIFICATION-MIB.txt
+SNMP-PROXY-MIB.txt
+SNMP-TARGET-MIB.txt
+SNMP-USER-BASED-SM-MIB.txt
+SNMP-VIEW-BASED-ACM-MIB.txt
+SNMPv2-TM.txt
+SNMPv2-MIB.txt
+TRANSPORT-ADDRESS-MIB.txt
+IPV6-FLOW-LABEL-MIB.txt
+EtherLike-MIB.txt
+SNMP-USM-AES-MIB.txt
+SCTP-MIB.txt
+INET-ADDRESS-MIB.txt
+TCP-MIB.txt
+TUNNEL-MIB.txt
+UDP-MIB.txt
+BRIDGE-MIB.txt
+IP-FORWARD-MIB.txt
+IP-MIB.txt
+DISMAN-NSLOOKUP-MIB.txt
+DISMAN-PING-MIB.txt
+DISMAN-TRACEROUTE-MIB.txt
diff --git a/mibs/nodemap b/mibs/nodemap
index bce284f..50f3475 100644
--- a/mibs/nodemap
+++ b/mibs/nodemap
@@ -1,6 +1,6 @@
 EtherLike-MIB		dot3
 HOST-RESOURCES-MIB	host
 IP-MIB			ip
-IF-MIB			interfaces
+IF-MIB			interfaces,ifMIBObjects
 UDP-MIB			udp
 TCP-MIB			tcp
diff --git a/mibs/rfclist b/mibs/rfclist
index df93d8d..e0d3eef 100644
--- a/mibs/rfclist
+++ b/mibs/rfclist
@@ -1,4 +1,4 @@
-# updated 2012-06-13
+# updated 2014-08-15
 1155	RFC1155-SMI
 1213	RFC1213-MIB
 1227	SMUX-MIB
@@ -77,7 +77,6 @@
 2613	SMON-MIB
 2662	ADSL-TC-MIB:ADSL-LINE-MIB
 2666	ETHER-CHIPSET-MIB
-2670	DOCS-IF-MIB
 2677	NHRP-MIB
 2707	Job-Monitoring-MIB
 2720	FLOW-METER-MIB
@@ -168,7 +167,6 @@
 4087	TUNNEL-MIB
 4113	UDP-MIB
 4131	DOCS-IETF-BPI2-MIB
-4133	ENTITY-MIB
 4149	SSPM-MIB
 4188	BRIDGE-MIB
 4220	TE-LINK-STD-MIB
@@ -191,8 +189,9 @@
 4455	SCSI-MIB
 4498	AGGREGATE-MIB:TIME-AGGREGATE-MIB
 4502	RMON2-MIB
-4544	ISCSI-MIB
 4545	IPS-AUTH-MIB
+4546	DOCS-IF-MIB
+4547	DOCS-IETF-CABLE-DEVICE-NOTIFICATION-MIB
 4560	DISMAN-PING-MIB:DISMAN-TRACEROUTE-MIB:DISMAN-NSLOOKUP-MIB
 4624	MSDP-MIB
 4625	T11-FC-ROUTE-MIB
@@ -250,7 +249,6 @@
 5676	SYSLOG-MSG-MIB
 5728	DVB-RCS-MIB
 5813	FORCES-MIB
-5815	IPFIX-MIB:IPFIX-SELECTOR-MIB
 5833	CAPWAP-BASE-MIB
 5834	CAPWAP-DOT11-MIB
 5907	NTPv4-MIB
@@ -263,3 +261,19 @@
 6475	PMIPV6-TC-MIB:PMIPV6-MIB
 6527	VRRPV3-MIB
 6615	IPFIX-MIB:IPFIX-SELECTOR-MIB
+6727	PSAMP-MIB
+6765	GBOND-MIB:IANA-GBOND-TC-MIB
+6766	G9983-MIB
+6767	G9982-MIB
+6768	G9981-MIB
+6779	NHDP-MIB
+6825	TED-MIB
+6850	RBRIDGE-MIB
+6933	ENTITY-MIB:UUID-TC-MIB
+6945	RPKI-ROUTER-MIB
+7052	LISP-MIB
+7147	ISCSI-MIB
+7184	OLSRv2-MIB
+7257	VPLS-GENERIC-MIB:VPLS-LDP-MIB:VPLS-BGP-MIB
+7330	BFD-TC-STD-MIB
+7331	BFD-STD-MIB
diff --git a/net-snmp-config.in b/net-snmp-config.in
index 2300fe1..d55872c 100644
--- a/net-snmp-config.in
+++ b/net-snmp-config.in
@@ -374,9 +374,9 @@ usage(const char *prog)
     snmp_log_options_usage("\t\t\t  ", stderr);
 #ifndef DISABLE_MIB_LOADING
     fprintf(stderr,
-            "  -m MIB[:...]\t\tload given list of MIBs (ALL loads "
+            "  -m MIB[" ENV_SEPARATOR "...]\t\tload given list of MIBs (ALL loads "
             "everything)\n"
-            "  -M DIR[:...]\t\tlook in given list of directories for MIBs\n");
+            "  -M DIR[" ENV_SEPARATOR "...]\t\tlook in given list of directories for MIBs\n");
 #endif /* DISABLE_MIB_LOADING */
 #ifndef DISABLE_MIB_LOADING
     fprintf(stderr,
diff --git a/perl/ASN/ASN.pm b/perl/ASN/ASN.pm
index 28768ab..008e97b 100644
--- a/perl/ASN/ASN.pm
+++ b/perl/ASN/ASN.pm
@@ -66,7 +66,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @EXPORT $VERSION $AUTOLOAD);
 	ASN_UNSIGNED
 	ASN_UNSIGNED64
 );
-$VERSION = '5.07021';
+$VERSION = '5.0703';
 
 sub AUTOLOAD {
     # This AUTOLOAD is used to 'autoload' constants from the constant()
diff --git a/perl/AnyData_SNMP/Storage.pm b/perl/AnyData_SNMP/Storage.pm
index 196946f..67c791f 100644
--- a/perl/AnyData_SNMP/Storage.pm
+++ b/perl/AnyData_SNMP/Storage.pm
@@ -6,7 +6,7 @@ package AnyData::Storage::SNMP;
 ##   scalar sets?
 ##   multi-hosts
 
-$AnyData::Storage::VERSION = '5.07021';
+$AnyData::Storage::VERSION = '5.0703';
 use strict;
 use warnings;
 
diff --git a/perl/OID/OID.pm b/perl/OID/OID.pm
index e3e942b..b75bf1d 100644
--- a/perl/OID/OID.pm
+++ b/perl/OID/OID.pm
@@ -92,7 +92,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @EXPORT $VERSION $AUTOLOAD);
 	snmp_oid_compare
         compare
 );
-$VERSION = '5.07021';
+$VERSION = '5.0703';
 
 sub new {
     my $type = shift;
diff --git a/perl/SNMP/SNMP.pm b/perl/SNMP/SNMP.pm
index 6c80468..a05cd38 100644
--- a/perl/SNMP/SNMP.pm
+++ b/perl/SNMP/SNMP.pm
@@ -7,7 +7,7 @@
 #     modify it under the same terms as Perl itself.
 
 package SNMP;
-$VERSION = '5.07021';   # current release version number
+$VERSION = '5.0703';   # current release version number
 
 use strict;
 use warnings;
@@ -1196,7 +1196,7 @@ sub trap {
        my $specific = $param{specific} || 0;
        @res = SNMP::_trapV1($this, $enterprise, $agent, $generic, $specific,
 			  $uptime, $varbind_list_ref);
-   } elsif  (($this->{Version} eq '2')|| ($this->{Version} eq '2c')) {
+   } elsif ($this->{Version} =~ '^[23]') {
        my $trap_oid = $param{oid} || $param{trapoid} || '.0.0';
        my $uptime = $param{uptime} || SNMP::_sys_uptime();
        @res = SNMP::_trapV2($this, $uptime, $trap_oid, $varbind_list_ref);
diff --git a/perl/SNMP/SNMP.xs b/perl/SNMP/SNMP.xs
index b4f35c8..2a734e8 100644
--- a/perl/SNMP/SNMP.xs
+++ b/perl/SNMP/SNMP.xs
@@ -242,6 +242,8 @@ __libraries_init(char *appname)
             return;
         have_inited = 1;
 
+        SOCK_STARTUP;
+
         netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, 
                                NETSNMP_DS_LIB_QUICK_PRINT, 1);
         init_snmp(appname);
@@ -250,8 +252,6 @@ __libraries_init(char *appname)
         netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_PRINT_SUFFIX_ONLY, 1);
 	netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT,
                                               NETSNMP_OID_OUTPUT_SUFFIX);
-        SOCK_STARTUP;
-    
     }
 
 static void
@@ -942,7 +942,7 @@ char * soid_str;
 
    if (!soid_str || !*soid_str) return SUCCESS;/* successfully added nothing */
    if (*soid_str == '.') soid_str++;
-   soid_buf = strdup(soid_str);
+   soid_buf = netsnmp_strdup(soid_str);
    if (!soid_buf)
        return FAILURE;
    cp = strtok_r(soid_buf,".",&st);
@@ -951,7 +951,7 @@ char * soid_str;
      /* doid_arr[(*doid_arr_len)++] =  atoi(cp); */
      cp = strtok_r(NULL,".",&st);
    }
-   free(soid_buf);
+   netsnmp_free(soid_buf);
    return(SUCCESS);
 }
 
@@ -1004,16 +1004,16 @@ __add_var_val_str(pdu, name, name_length, val, len, type)
       case TYPE_GAUGE:
       case TYPE_UNSIGNED32:
         vars->type = ASN_GAUGE;
-        goto UINT;
+        goto as_uint;
       case TYPE_COUNTER:
         vars->type = ASN_COUNTER;
-        goto UINT;
+        goto as_uint;
       case TYPE_TIMETICKS:
         vars->type = ASN_TIMETICKS;
-        goto UINT;
+        goto as_uint;
       case TYPE_UINTEGER:
         vars->type = ASN_UINTEGER;
-UINT:
+as_uint:
         vars->val.integer = netsnmp_malloc(sizeof(long));
         if (val)
             sscanf(val,"%lu",vars->val.integer);
@@ -1026,15 +1026,15 @@ UINT:
 
       case TYPE_OCTETSTR:
 	vars->type = ASN_OCTET_STR;
-	goto OCT;
+	goto as_oct;
 
       case TYPE_BITSTRING:
 	vars->type = ASN_OCTET_STR;
-	goto OCT;
+	goto as_oct;
 
       case TYPE_OPAQUE:
         vars->type = ASN_OCTET_STR;
-OCT:
+as_oct:
         vars->val.string = netsnmp_malloc(len);
         vars->val_len = len;
         if (val && len)
@@ -2689,9 +2689,9 @@ snmp_new_v3_session(version, peer, retries, timeout, sec_name, sec_level, sec_en
            }
            if (session.securityLevel >= SNMP_SEC_LEVEL_AUTHNOPRIV) {
                if (auth_localized_key_len) {
-                   memdup(&session.securityAuthLocalKey,
-                          (u_char*)auth_localized_key,
-                          auth_localized_key_len);
+                   session.securityAuthLocalKey =
+                       netsnmp_memdup(auth_localized_key,
+                                      auth_localized_key_len);
                    session.securityAuthLocalKeyLen = auth_localized_key_len;
                } else if (auth_master_key_len) {
                    session.securityAuthKeyLen =
@@ -2739,9 +2739,9 @@ snmp_new_v3_session(version, peer, retries, timeout, sec_name, sec_level, sec_en
            }
            if (session.securityLevel >= SNMP_SEC_LEVEL_AUTHPRIV) {
                if (priv_localized_key_len) {
-                   memdup(&session.securityPrivLocalKey,
-                          (u_char*)priv_localized_key,
-                          priv_localized_key_len);
+                   session.securityPrivLocalKey =
+                       netsnmp_memdup(priv_localized_key,
+                                      priv_localized_key_len);
                    session.securityPrivLocalKeyLen = priv_localized_key_len;
                } else if (priv_master_key_len) {
                    session.securityPrivKeyLen =
diff --git a/perl/SNMP/t/dump-session.t b/perl/SNMP/t/dump-session.t
new file mode 100755
index 0000000..e94c9f2
--- /dev/null
+++ b/perl/SNMP/t/dump-session.t
@@ -0,0 +1,29 @@
+#!./perl
+
+use strict;
+use Test;
+
+BEGIN {
+    unless(grep /blib/, @INC) {
+        chdir 't' if -d 't';
+        @INC = '../lib' if -d '../lib';
+    }
+    eval "use Cwd qw(abs_path)";
+    $ENV{'SNMPCONFPATH'} = 'nopath';
+    $ENV{'MIBDIRS'} = '+' . abs_path("../../mibs");
+    plan tests => 1;
+}
+
+use SNMP;
+use Data::Dumper;
+use vars qw($agent_port $comm $agent_host);
+require "t/startagent.pl";
+
+# See also https://sourceforge.net/p/net-snmp/bugs/2488/
+
+my $s = new SNMP::Session(DestHost=>$agent_host, Version=>1, Community=>$comm,
+                          RemotePort=>$agent_port);
+
+print Dumper($s->get('anything'));
+
+ok(1);
diff --git a/perl/SNMP/t/snmptest.cmd b/perl/SNMP/t/snmptest.cmd
deleted file mode 100644
index 7225b7d..0000000
--- a/perl/SNMP/t/snmptest.cmd
+++ /dev/null
@@ -1,3 +0,0 @@
-SNMPD => ../../agent/snmpd
-SNMPTRAPD => ../../apps/snmptrapd
-MIBDIR => ../../mibs
diff --git a/perl/TrapReceiver/TrapReceiver.pm b/perl/TrapReceiver/TrapReceiver.pm
index 474be48..85a041a 100644
--- a/perl/TrapReceiver/TrapReceiver.pm
+++ b/perl/TrapReceiver/TrapReceiver.pm
@@ -47,7 +47,7 @@ require NetSNMP::OID;
 	NETSNMPTRAPD_PRE_HANDLER
 );
 
-$VERSION = '5.07021';
+$VERSION = '5.0703';
 
 # sub new {
 #     my $type = shift;
diff --git a/perl/TrapReceiver/TrapReceiver.xs b/perl/TrapReceiver/TrapReceiver.xs
index 531bfa4..a4fc136 100644
--- a/perl/TrapReceiver/TrapReceiver.xs
+++ b/perl/TrapReceiver/TrapReceiver.xs
@@ -81,18 +81,18 @@ int   perl_trapd_handler( netsnmp_pdu           *pdu,
         STOREPDUi("securitymodel", pdu->securityModel);
         STOREPDUi("securitylevel", pdu->securityLevel);
         STOREPDU("contextName",
-                 newSVpv(pdu->contextName, pdu->contextNameLen));
+                 newSVpv(pdu->contextName ? pdu->contextName : "", pdu->contextNameLen));
         STOREPDU("contextEngineID",
-                 newSVpv((char *) pdu->contextEngineID,
+                 newSVpv(pdu->contextEngineID ? (char *) pdu->contextEngineID : "",
                                     pdu->contextEngineIDLen));
         STOREPDU("securityEngineID",
-                 newSVpv((char *) pdu->securityEngineID,
+                 newSVpv(pdu->securityEngineID ? (char *) pdu->securityEngineID : "",
                                     pdu->securityEngineIDLen));
         STOREPDU("securityName",
-                 newSVpv((char *) pdu->securityName, pdu->securityNameLen));
+                 newSVpv(pdu->securityName ? (char *) pdu->securityName : "", pdu->securityNameLen));
     } else {
         STOREPDU("community",
-                 newSVpv((char *) pdu->community, pdu->community_len));
+                 newSVpv(pdu->community ? (char *) pdu->community : "", pdu->community_len));
     }
 
     if (transport && transport->f_fmtaddr) {
diff --git a/perl/TrapReceiver/const-c.inc b/perl/TrapReceiver/const-c.inc
deleted file mode 100644
index 4ebc407..0000000
--- a/perl/TrapReceiver/const-c.inc
+++ /dev/null
@@ -1,146 +0,0 @@
-#define PERL_constant_NOTFOUND	1
-#define PERL_constant_NOTDEF	2
-#define PERL_constant_ISIV	3
-#define PERL_constant_ISNO	4
-#define PERL_constant_ISNV	5
-#define PERL_constant_ISPV	6
-#define PERL_constant_ISPVN	7
-#define PERL_constant_ISSV	8
-#define PERL_constant_ISUNDEF	9
-#define PERL_constant_ISUV	10
-#define PERL_constant_ISYES	11
-
-#ifndef NVTYPE
-typedef double NV; /* 5.6 and later define NVTYPE, and typedef NV to it.  */
-#endif
-#ifndef aTHX_
-#define aTHX_ /* 5.6 or later define this for threading support.  */
-#endif
-#ifndef pTHX_
-#define pTHX_ /* 5.6 or later define this for threading support.  */
-#endif
-
-static int
-constant_25 (pTHX_ const char *name, IV *iv_return) {
-  /* When generated this function returned values for the list of names given
-     here.  However, subsequent manual editing may have added or removed some.
-     NETSNMPTRAPD_AUTH_HANDLER NETSNMPTRAPD_HANDLER_FAIL
-     NETSNMPTRAPD_POST_HANDLER */
-  /* Offset 15 gives the best switch position.  */
-  switch (name[15]) {
-  case 'N':
-    if (memEQ(name, "NETSNMPTRAPD_HANDLER_FAIL", 25)) {
-    /*                              ^                */
-#ifdef NETSNMPTRAPD_HANDLER_FAIL
-      *iv_return = NETSNMPTRAPD_HANDLER_FAIL;
-      return PERL_constant_ISIV;
-#else
-      return PERL_constant_NOTDEF;
-#endif
-    }
-    break;
-  case 'S':
-    if (memEQ(name, "NETSNMPTRAPD_POST_HANDLER", 25)) {
-    /*                              ^                */
-#ifdef NETSNMPTRAPD_POST_HANDLER
-      *iv_return = NETSNMPTRAPD_POST_HANDLER;
-      return PERL_constant_ISIV;
-#else
-      return PERL_constant_NOTDEF;
-#endif
-    }
-    break;
-  case 'T':
-    if (memEQ(name, "NETSNMPTRAPD_AUTH_HANDLER", 25)) {
-    /*                              ^                */
-#ifdef NETSNMPTRAPD_AUTH_HANDLER
-      *iv_return = NETSNMPTRAPD_AUTH_HANDLER;
-      return PERL_constant_ISIV;
-#else
-      return PERL_constant_NOTDEF;
-#endif
-    }
-    break;
-  }
-  return PERL_constant_NOTFOUND;
-}
-
-static int
-constant (pTHX_ const char *name, STRLEN len, IV *iv_return) {
-  /* Initially switch on the length of the name.  */
-  /* When generated this function returned values for the list of names given
-     in this section of perl code.  Rather than manually editing these functions
-     to add or remove constants, which would result in this comment and section
-     of code becoming inaccurate, we recommend that you edit this section of
-     code, and use it to regenerate a new set of constant functions which you
-     then use to replace the originals.
-
-     Regenerate these constant functions by feeding this entire source file to
-     perl -x
-
-#!/usr/bin/perl -w
-use ExtUtils::Constant qw (constant_types C_constant XS_constant);
-
-my $types = {map {($_, 1)} qw(IV)};
-my @names = (qw(NETSNMPTRAPD_AUTH_HANDLER NETSNMPTRAPD_HANDLER_BREAK
-	       NETSNMPTRAPD_HANDLER_FAIL NETSNMPTRAPD_HANDLER_FINISH
-	       NETSNMPTRAPD_HANDLER_OK NETSNMPTRAPD_POST_HANDLER
-	       NETSNMPTRAPD_PRE_HANDLER));
-
-print constant_types(), "\n"; # macro defs
-foreach (C_constant ("NetSNMP::TrapReceiver", 'constant', 'IV', $types, undef, 3, @names) ) {
-    print $_, "\n"; # C constant subs
-}
-print "\n#### XS Section:\n";
-print XS_constant ("NetSNMP::TrapReceiver", $types);
-__END__
-   */
-
-  switch (len) {
-  case 23:
-    if (memEQ(name, "NETSNMPTRAPD_HANDLER_OK", 23)) {
-#ifdef NETSNMPTRAPD_HANDLER_OK
-      *iv_return = NETSNMPTRAPD_HANDLER_OK;
-      return PERL_constant_ISIV;
-#else
-      return PERL_constant_NOTDEF;
-#endif
-    }
-    break;
-  case 24:
-    if (memEQ(name, "NETSNMPTRAPD_PRE_HANDLER", 24)) {
-#ifdef NETSNMPTRAPD_PRE_HANDLER
-      *iv_return = NETSNMPTRAPD_PRE_HANDLER;
-      return PERL_constant_ISIV;
-#else
-      return PERL_constant_NOTDEF;
-#endif
-    }
-    break;
-  case 25:
-    return constant_25 (aTHX_ name, iv_return);
-    break;
-  case 26:
-    if (memEQ(name, "NETSNMPTRAPD_HANDLER_BREAK", 26)) {
-#ifdef NETSNMPTRAPD_HANDLER_BREAK
-      *iv_return = NETSNMPTRAPD_HANDLER_BREAK;
-      return PERL_constant_ISIV;
-#else
-      return PERL_constant_NOTDEF;
-#endif
-    }
-    break;
-  case 27:
-    if (memEQ(name, "NETSNMPTRAPD_HANDLER_FINISH", 27)) {
-#ifdef NETSNMPTRAPD_HANDLER_FINISH
-      *iv_return = NETSNMPTRAPD_HANDLER_FINISH;
-      return PERL_constant_ISIV;
-#else
-      return PERL_constant_NOTDEF;
-#endif
-    }
-    break;
-  }
-  return PERL_constant_NOTFOUND;
-}
-
diff --git a/perl/TrapReceiver/const-xs.inc b/perl/TrapReceiver/const-xs.inc
deleted file mode 100644
index 3b05e55..0000000
--- a/perl/TrapReceiver/const-xs.inc
+++ /dev/null
@@ -1,90 +0,0 @@
-void
-constant(sv)
-    PREINIT:
-#ifdef dXSTARG
-	dXSTARG; /* Faster if we have it.  */
-#else
-	dTARGET;
-#endif
-	STRLEN		len;
-        int		type;
-	IV		iv;
-	/* NV		nv;	Uncomment this if you need to return NVs */
-	/* const char	*pv;	Uncomment this if you need to return PVs */
-    INPUT:
-	SV *		sv;
-        const char *	s = SvPV(sv, len);
-    PPCODE:
-        /* Change this to constant(aTHX_ s, len, &iv, &nv);
-           if you need to return both NVs and IVs */
-	type = constant(aTHX_ s, len, &iv);
-      /* Return 1 or 2 items. First is error message, or undef if no error.
-           Second, if present, is found value */
-        switch (type) {
-        case PERL_constant_NOTFOUND:
-          sv =
-	    sv_2mortal(newSVpvf("%s is not a valid NetSNMP::TrapReceiver macro", s));
-          PUSHs(sv);
-          break;
-        case PERL_constant_NOTDEF:
-          sv = sv_2mortal(newSVpvf(
-	    "Your vendor has not defined NetSNMP::TrapReceiver macro %s, used",
-				   s));
-          PUSHs(sv);
-          break;
-        case PERL_constant_ISIV:
-          EXTEND(SP, 1);
-          PUSHs(&PL_sv_undef);
-          PUSHi(iv);
-          break;
-	/* Uncomment this if you need to return NOs
-        case PERL_constant_ISNO:
-          EXTEND(SP, 1);
-          PUSHs(&PL_sv_undef);
-          PUSHs(&PL_sv_no);
-          break; */
-	/* Uncomment this if you need to return NVs
-        case PERL_constant_ISNV:
-          EXTEND(SP, 1);
-          PUSHs(&PL_sv_undef);
-          PUSHn(nv);
-          break; */
-	/* Uncomment this if you need to return PVs
-        case PERL_constant_ISPV:
-          EXTEND(SP, 1);
-          PUSHs(&PL_sv_undef);
-          PUSHp(pv, strlen(pv));
-          break; */
-	/* Uncomment this if you need to return PVNs
-        case PERL_constant_ISPVN:
-          EXTEND(SP, 1);
-          PUSHs(&PL_sv_undef);
-          PUSHp(pv, iv);
-          break; */
-	/* Uncomment this if you need to return SVs
-        case PERL_constant_ISSV:
-          EXTEND(SP, 1);
-          PUSHs(&PL_sv_undef);
-          PUSHs(sv);
-          break; */
-	/* Uncomment this if you need to return UNDEFs
-        case PERL_constant_ISUNDEF:
-          break; */
-	/* Uncomment this if you need to return UVs
-        case PERL_constant_ISUV:
-          EXTEND(SP, 1);
-          PUSHs(&PL_sv_undef);
-          PUSHu((UV)iv);
-          break; */
-	/* Uncomment this if you need to return YESs
-        case PERL_constant_ISYES:
-          EXTEND(SP, 1);
-          PUSHs(&PL_sv_undef);
-          PUSHs(&PL_sv_yes);
-          break; */
-        default:
-          sv = sv_2mortal(newSVpvf(
-	    "Unexpected return type %d while processing NetSNMP::TrapReceiver macro %s, used",
-               type, s));
-          PUSHs(sv);
-        }
diff --git a/perl/agent/Support/Support.pm b/perl/agent/Support/Support.pm
index 79529db..03f54d9 100644
--- a/perl/agent/Support/Support.pm
+++ b/perl/agent/Support/Support.pm
@@ -26,7 +26,7 @@ use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION);
 @ISA       = qw(Exporter getLeaf);
 @EXPORT    = qw(registerAgent getOidElement setOidElement);
 @EXPORT_OK = qw();
-$VERSION = '5.07021';
+$VERSION = '5.0703';
 
 use strict;
 use warnings;
diff --git a/perl/agent/agent.pm b/perl/agent/agent.pm
index 53c2756..46500ff 100644
--- a/perl/agent/agent.pm
+++ b/perl/agent/agent.pm
@@ -87,7 +87,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @EXPORT $VERSION $AUTOLOAD);
 	SNMP_ERR_AUTHORIZATIONERROR
 	SNMP_ERR_NOTWRITABLE
 );
-$VERSION = '5.07021';
+$VERSION = '5.0703';
 
 sub AUTOLOAD {
     # This AUTOLOAD is used to 'autoload' constants from the constant()
diff --git a/perl/agent/default_store/default_store.pm b/perl/agent/default_store/default_store.pm
index afca604..a8812eb 100644
--- a/perl/agent/default_store/default_store.pm
+++ b/perl/agent/default_store/default_store.pm
@@ -96,7 +96,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @EXPORT $VERSION $AUTOLOAD);
 				   NETSNMP_DS_AGENT_MAX_GETBULKREPEATS
 				   NETSNMP_DS_AGENT_MAX_GETBULKRESPONSES
 );
-$VERSION = '5.07021';
+$VERSION = '5.0703';
 
 sub AUTOLOAD {
     # This AUTOLOAD is used to 'autoload' constants from the constant()
diff --git a/perl/default_store/default_store.pm b/perl/default_store/default_store.pm
index d4499c1..b898501 100644
--- a/perl/default_store/default_store.pm
+++ b/perl/default_store/default_store.pm
@@ -200,7 +200,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.07021';
+$VERSION = '5.0703';
 
 sub AUTOLOAD {
     # This AUTOLOAD is used to 'autoload' constants from the constant()
diff --git a/python/netsnmp/client_intf.c b/python/netsnmp/client_intf.c
index 0b74e0e..8b8805d 100644
--- a/python/netsnmp/client_intf.c
+++ b/python/netsnmp/client_intf.c
@@ -658,6 +658,9 @@ int    best_guess;
 	newname_len = MAX_OID_LEN;
 	if (read_objid(tag, newname, &newname_len)) {	/* long name */
 	  rtp = tp = get_tree(newname, newname_len, get_tree_head());
+	} else {
+	  /* failed to parse the OID */
+	  newname_len = 0;
 	}
       }
       else {
@@ -764,7 +767,7 @@ __add_var_val_str(pdu, name, name_length, val, len, type)
       case TYPE_INTEGER:
       case TYPE_INTEGER32:
         vars->type = ASN_INTEGER;
-        vars->val.integer = (long *)malloc(sizeof(long));
+        vars->val.integer = malloc(sizeof(long));
         if (val)
             *(vars->val.integer) = strtol(val,NULL,0);
         else {
@@ -787,7 +790,7 @@ __add_var_val_str(pdu, name, name_length, val, len, type)
       case TYPE_UINTEGER:
         vars->type = ASN_UINTEGER;
 UINT:
-        vars->val.integer = (long *)malloc(sizeof(long));
+        vars->val.integer = malloc(sizeof(long));
         if (val)
             sscanf(val,"%lu",vars->val.integer);
         else {
@@ -808,7 +811,7 @@ UINT:
       case TYPE_OPAQUE:
         vars->type = ASN_OCTET_STR;
 OCT:
-        vars->val.string = (u_char *)malloc(len);
+        vars->val.string = malloc(len);
         vars->val_len = len;
         if (val && len)
             memcpy((char *)vars->val.string, val, len);
@@ -821,14 +824,18 @@ OCT:
 
       case TYPE_IPADDR:
         vars->type = ASN_IPADDRESS;
-        vars->val.integer = (long *)malloc(sizeof(long));
-        if (val)
-            *(vars->val.integer) = inet_addr(val);
-        else {
-            ret = FAILURE;
-            *(vars->val.integer) = 0;
+        {
+            in_addr_t addr;
+
+            if (val)
+                addr = inet_addr(val);
+            else {
+                ret = FAILURE;
+                addr = 0;
+            }
+            vars->val.integer = netsnmp_memdup(&addr, sizeof(addr));
+            vars->val_len = sizeof(addr);
         }
-        vars->val_len = sizeof(long);
         break;
 
       case TYPE_OBJID:
@@ -858,15 +865,8 @@ OCT:
 /* takes ss and pdu as input and updates the 'response' argument */
 /* the input 'pdu' argument will be freed */
 static int
-__send_sync_pdu(ss, pdu, response, retry_nosuch,
-	        err_str, err_num, err_ind)
-netsnmp_session *ss;
-netsnmp_pdu *pdu;
-netsnmp_pdu **response;
-int retry_nosuch;
-char *err_str;
-int *err_num;
-int *err_ind;
+__send_sync_pdu(netsnmp_session *ss, netsnmp_pdu *pdu, netsnmp_pdu **response,
+                int retry_nosuch, char *err_str, int *err_num, int *err_ind)
 {
    int status = 0;
    long command = pdu->command;
@@ -881,6 +881,7 @@ int *err_ind;
    if (ss == NULL) {
        *err_num = 0;
        *err_ind = SNMPERR_BAD_SESSION;
+       status = SNMPERR_BAD_SESSION;
        strlcpy(err_str, snmp_api_errstring(*err_ind), STR_BUF_SIZE);
        goto done;
    }
@@ -1488,6 +1489,7 @@ netsnmp_get(PyObject *self, PyObject *args)
 	    printf("error: get: unknown object ID (%s)",
 		   (tag ? tag : "<null>"));
 	  snmp_free_pdu(pdu);
+	  Py_DECREF(varbind); 
 	  goto done;
 	}
 	/* release reference when done */
@@ -1589,13 +1591,20 @@ netsnmp_get(PyObject *self, PyObject *args)
 	py_netsnmp_attr_set_string(varbind, "val", (char *) str_buf, len);
 
 	/* save in return tuple as well */
-	PyTuple_SetItem(val_tuple, varlist_ind, 
-			(len ? Py_BuildValue("s#", str_buf, len) :
-			 Py_BuildValue("")));
-
+	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); 
       }	
     }
 
@@ -1702,6 +1711,7 @@ netsnmp_getnext(PyObject *self, PyObject *args)
 	    printf("error: get: unknown object ID (%s)",
 		   (tag ? tag : "<null>"));
 	  snmp_free_pdu(pdu);
+	  Py_DECREF(varbind); 
 	  goto done;
 	}
 	/* release reference when done */
@@ -1801,13 +1811,20 @@ netsnmp_getnext(PyObject *self, PyObject *args)
 	py_netsnmp_attr_set_string(varbind, "val", (char *) str_buf, len);
 
 	/* save in return tuple as well */
-	PyTuple_SetItem(val_tuple, varlist_ind, 
-			(len ? Py_BuildValue("s#", str_buf, len) :
-			 Py_BuildValue("")));
-
+	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_getnext: bad varbind (%d)\n", varlist_ind);
+	Py_XDECREF(varbind); 
       }
     }
 
@@ -1952,6 +1969,7 @@ netsnmp_walk(PyObject *self, PyObject *args)
           printf("error: walk: unknown object ID (%s)",
       	   (tag ? tag : "<null>"));
         snmp_free_pdu(pdu);
+        Py_DECREF(varbind); 
         goto done;
       }
       /* release reference when done */
@@ -2130,10 +2148,7 @@ 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++, 
-                                  (len ? Py_BuildValue("s#", str_buf, len) :
-                                   Py_BuildValue("")));
-            
-
+                                  Py_BuildValue("s#", str_buf, len));
               } else {
                   /* Return None for this variable. */
                   _PyTuple_Resize(&val_tuple, result_count+1);
@@ -2276,6 +2291,7 @@ netsnmp_getbulk(PyObject *self, PyObject *args)
 	    printf("error: get: unknown object ID (%s)",
 		   (tag ? tag : "<null>"));
 	  snmp_free_pdu(pdu);
+	  Py_DECREF(varbind); 
 	  goto done;
 	}
 	/* release reference when done */
@@ -2395,6 +2411,7 @@ netsnmp_getbulk(PyObject *self, PyObject *args)
 	    PyList_Append(varbinds, none); /* increments ref */
 	    /* Return None for this variable. */
 	    PyTuple_SetItem(val_tuple, varbind_ind, none); /* steals ref */
+	    Py_XDECREF(varbind); 
 	  }	
 	}
       }
@@ -2562,6 +2579,7 @@ netsnmp_set(PyObject *self, PyObject *args)
       ret = Py_BuildValue("i",0); /* fail, return False */
   } 
  done:
+  Py_XDECREF(varbind); 
   SAFE_FREE(oid_arr);
   return (ret ? ret : Py_BuildValue(""));
 }
diff --git a/snmplib/Makefile.depend b/snmplib/Makefile.depend
index 8881276..01f4557 100644
--- a/snmplib/Makefile.depend
+++ b/snmplib/Makefile.depend
@@ -3,7 +3,7 @@
 ./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/system/generic.h
 ./asn1.lo: ../include/net-snmp/output_api.h ../include/net-snmp/types.h
 ./asn1.lo: ../include/net-snmp/library/oid.h
 ./asn1.lo: ../include/net-snmp/library/types.h
@@ -17,7 +17,7 @@
 ./asn1.lo: ../include/net-snmp/library/snmp_transport.h
 ./asn1.lo: ../include/net-snmp/library/snmp_service.h
 ./asn1.lo: ../include/net-snmp/library/snmpCallbackDomain.h
-./asn1.lo: ../include/net-snmp/library/snmpUnixDomain.h 
+./asn1.lo: ../include/net-snmp/library/snmpUnixDomain.h
 ./asn1.lo: ../include/net-snmp/library/snmpUDPDomain.h
 ./asn1.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h
 ./asn1.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h
@@ -25,8 +25,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/ucd_compat.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
 ./asn1.lo: ../include/net-snmp/library/oid_stash.h
@@ -35,8 +36,8 @@
 ./asn1.lo: ../include/net-snmp/library/snmp.h
 ./asn1.lo: ../include/net-snmp/library/snmp-tc.h
 ./asn1.lo: ../include/net-snmp/library/snmp_debug.h
-./asn1.lo: ../include/net-snmp/library/snmp_logging.h 
-./asn1.lo: ../include/net-snmp/utilities.h 
+./asn1.lo: ../include/net-snmp/library/snmp_logging.h
+./asn1.lo: ../include/net-snmp/utilities.h
 ./asn1.lo: ../include/net-snmp/library/system.h
 ./asn1.lo: ../include/net-snmp/library/tools.h
 ./asn1.lo: ../include/net-snmp/library/int64.h
@@ -57,7 +58,7 @@
 ./callback.lo: ../include/net-snmp/system/sysv.h
 ./callback.lo: ../include/net-snmp/system/generic.h
 ./callback.lo: ../include/net-snmp/net-snmp-features.h
-./callback.lo: ../include/net-snmp/types.h 
+./callback.lo: ../include/net-snmp/types.h
 ./callback.lo: ../include/net-snmp/library/oid.h
 ./callback.lo: ../include/net-snmp/library/types.h
 ./callback.lo: ../include/net-snmp/definitions.h
@@ -82,6 +83,7 @@
 ./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/ucd_compat.h
 ./callback.lo: ../include/net-snmp/library/mib.h
@@ -111,62 +113,14 @@
 ./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/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/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/snmpIPXDomain.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: ../include/net-snmp/library/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
+./cert_util.lo: ../include/net-snmp/net-snmp-features.h
 ./check_varbind.lo: ../include/net-snmp/net-snmp-config.h
+./check_varbind.lo: ../include/net-snmp/system/linux.h
+./check_varbind.lo: ../include/net-snmp/system/sysv.h
+./check_varbind.lo: ../include/net-snmp/system/generic.h
 ./check_varbind.lo: ../include/net-snmp/net-snmp-includes.h
-./check_varbind.lo:  ../include/net-snmp/definitions.h
-./check_varbind.lo: ../include/net-snmp/types.h 
+./check_varbind.lo: ../include/net-snmp/definitions.h
+./check_varbind.lo: ../include/net-snmp/types.h
 ./check_varbind.lo: ../include/net-snmp/library/oid.h
 ./check_varbind.lo: ../include/net-snmp/library/types.h
 ./check_varbind.lo: ../include/net-snmp/library/snmp_api.h
@@ -190,6 +144,7 @@
 ./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/ucd_compat.h
 ./check_varbind.lo: ../include/net-snmp/library/mib.h
@@ -201,7 +156,7 @@
 ./check_varbind.lo: ../include/net-snmp/library/snmp.h
 ./check_varbind.lo: ../include/net-snmp/library/snmp-tc.h
 ./check_varbind.lo: ../include/net-snmp/library/getopt.h
-./check_varbind.lo: ../include/net-snmp/utilities.h 
+./check_varbind.lo: ../include/net-snmp/utilities.h
 ./check_varbind.lo: ../include/net-snmp/library/system.h
 ./check_varbind.lo: ../include/net-snmp/library/tools.h
 ./check_varbind.lo: ../include/net-snmp/library/int64.h
@@ -220,6 +175,7 @@
 ./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
@@ -234,7 +190,7 @@
 ./check_varbind.lo: ../include/net-snmp/library/snmptsm.h
 ./check_varbind.lo: ../include/net-snmp/library/snmpusm.h
 ./closedir.lo: ../include/net-snmp/net-snmp-config.h
-./closedir.lo: ../include/net-snmp/types.h 
+./closedir.lo: ../include/net-snmp/types.h
 ./closedir.lo: ../include/net-snmp/library/oid.h
 ./closedir.lo: ../include/net-snmp/library/types.h
 ./closedir.lo: ../include/net-snmp/definitions.h
@@ -259,6 +215,7 @@
 ./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/ucd_compat.h
 ./closedir.lo: ../include/net-snmp/library/mib.h
@@ -297,6 +254,7 @@
 ./container_binary_array.lo: ../include/net-snmp/library/snmpTCPDomain.h
 ./container_binary_array.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./container_binary_array.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h
+./container_binary_array.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./container_binary_array.lo: ../include/net-snmp/library/snmpIPXDomain.h
 ./container_binary_array.lo: ../include/net-snmp/library/ucd_compat.h
 ./container_binary_array.lo: ../include/net-snmp/library/mib.h
@@ -342,7 +300,7 @@
 ./container_binary_array.lo: ../include/net-snmp/library/snmpusm.h
 ./container.lo: ../include/net-snmp/net-snmp-config.h
 ./container.lo: ../include/net-snmp/net-snmp-features.h
-./container.lo: ../include/net-snmp/net-snmp-includes.h 
+./container.lo: ../include/net-snmp/net-snmp-includes.h
 ./container.lo: ../include/net-snmp/definitions.h ../include/net-snmp/types.h
 ./container.lo: ../include/net-snmp/library/oid.h
 ./container.lo: ../include/net-snmp/library/types.h
@@ -367,6 +325,7 @@
 ./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/ucd_compat.h
 ./container.lo: ../include/net-snmp/library/mib.h
@@ -377,7 +336,7 @@
 ./container.lo: ../include/net-snmp/library/snmp.h
 ./container.lo: ../include/net-snmp/library/snmp-tc.h
 ./container.lo: ../include/net-snmp/library/getopt.h
-./container.lo: ../include/net-snmp/utilities.h 
+./container.lo: ../include/net-snmp/utilities.h
 ./container.lo: ../include/net-snmp/library/system.h
 ./container.lo: ../include/net-snmp/library/tools.h
 ./container.lo: ../include/net-snmp/library/int64.h
@@ -385,7 +344,7 @@
 ./container.lo: ../include/net-snmp/library/snmp_alarm.h
 ./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/container.h
 ./container.lo: ../include/net-snmp/library/factory.h
 ./container.lo: ../include/net-snmp/library/container_binary_array.h
 ./container.lo: ../include/net-snmp/library/container_list_ssll.h
@@ -414,7 +373,7 @@
 ./container_iterator.lo: ../include/net-snmp/net-snmp-features.h
 ./container_iterator.lo: ../include/net-snmp/net-snmp-includes.h
 ./container_iterator.lo: ../include/net-snmp/definitions.h
-./container_iterator.lo: ../include/net-snmp/types.h 
+./container_iterator.lo: ../include/net-snmp/types.h
 ./container_iterator.lo: ../include/net-snmp/library/oid.h
 ./container_iterator.lo: ../include/net-snmp/library/types.h
 ./container_iterator.lo: ../include/net-snmp/library/snmp_api.h
@@ -438,6 +397,7 @@
 ./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/ucd_compat.h
 ./container_iterator.lo: ../include/net-snmp/library/mib.h
@@ -484,7 +444,7 @@
 ./container_list_ssll.lo: ../include/net-snmp/net-snmp-features.h
 ./container_list_ssll.lo: ../include/net-snmp/net-snmp-includes.h
 ./container_list_ssll.lo: ../include/net-snmp/definitions.h
-./container_list_ssll.lo: ../include/net-snmp/types.h 
+./container_list_ssll.lo: ../include/net-snmp/types.h
 ./container_list_ssll.lo: ../include/net-snmp/library/oid.h
 ./container_list_ssll.lo: ../include/net-snmp/library/types.h
 ./container_list_ssll.lo: ../include/net-snmp/library/snmp_api.h
@@ -508,6 +468,7 @@
 ./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/ucd_compat.h
 ./container_list_ssll.lo: ../include/net-snmp/library/mib.h
@@ -554,8 +515,8 @@
 ./container_null.lo: ../include/net-snmp/net-snmp-features.h
 ./container_null.lo: ../include/net-snmp/net-snmp-includes.h
 ./container_null.lo: ../include/net-snmp/definitions.h
-./container_null.lo: ../include/net-snmp/types.h 
-./container_null.lo:  ../include/net-snmp/library/oid.h
+./container_null.lo: ../include/net-snmp/types.h
+./container_null.lo: ../include/net-snmp/library/oid.h
 ./container_null.lo: ../include/net-snmp/library/types.h
 ./container_null.lo: ../include/net-snmp/library/snmp_api.h
 ./container_null.lo: ../include/net-snmp/varbind_api.h
@@ -578,6 +539,7 @@
 ./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/ucd_compat.h
 ./container_null.lo: ../include/net-snmp/library/mib.h
@@ -588,7 +550,7 @@
 ./container_null.lo: ../include/net-snmp/library/snmp.h
 ./container_null.lo: ../include/net-snmp/library/snmp-tc.h
 ./container_null.lo: ../include/net-snmp/library/getopt.h
-./container_null.lo: ../include/net-snmp/utilities.h 
+./container_null.lo: ../include/net-snmp/utilities.h
 ./container_null.lo: ../include/net-snmp/library/system.h
 ./container_null.lo: ../include/net-snmp/library/tools.h
 ./container_null.lo: ../include/net-snmp/library/int64.h
@@ -623,7 +585,7 @@
 ./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
-./data_list.lo: ../include/net-snmp/net-snmp-includes.h 
+./data_list.lo: ../include/net-snmp/net-snmp-includes.h
 ./data_list.lo: ../include/net-snmp/definitions.h ../include/net-snmp/types.h
 ./data_list.lo: ../include/net-snmp/library/oid.h
 ./data_list.lo: ../include/net-snmp/library/types.h
@@ -648,6 +610,7 @@
 ./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/ucd_compat.h
 ./data_list.lo: ../include/net-snmp/library/mib.h
@@ -658,7 +621,7 @@
 ./data_list.lo: ../include/net-snmp/library/snmp.h
 ./data_list.lo: ../include/net-snmp/library/snmp-tc.h
 ./data_list.lo: ../include/net-snmp/library/getopt.h
-./data_list.lo: ../include/net-snmp/utilities.h 
+./data_list.lo: ../include/net-snmp/utilities.h
 ./data_list.lo: ../include/net-snmp/library/system.h
 ./data_list.lo: ../include/net-snmp/library/tools.h
 ./data_list.lo: ../include/net-snmp/library/int64.h
@@ -666,7 +629,7 @@
 ./data_list.lo: ../include/net-snmp/library/snmp_alarm.h
 ./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/container.h
 ./data_list.lo: ../include/net-snmp/library/factory.h
 ./data_list.lo: ../include/net-snmp/library/container_binary_array.h
 ./data_list.lo: ../include/net-snmp/library/container_list_ssll.h
@@ -692,7 +655,7 @@
 ./data_list.lo: ../include/net-snmp/library/snmpusm.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
+./default_store.lo: ../include/net-snmp/types.h
 ./default_store.lo: ../include/net-snmp/library/oid.h
 ./default_store.lo: ../include/net-snmp/library/types.h
 ./default_store.lo: ../include/net-snmp/definitions.h
@@ -717,6 +680,7 @@
 ./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/ucd_compat.h
 ./default_store.lo: ../include/net-snmp/library/mib.h
@@ -732,7 +696,7 @@
 ./default_store.lo: ../include/net-snmp/library/snmp_parse_args.h
 ./default_store.lo: ../include/net-snmp/library/snmp_enum.h
 ./default_store.lo: ../include/net-snmp/library/vacm.h
-./default_store.lo: ../include/net-snmp/utilities.h 
+./default_store.lo: ../include/net-snmp/utilities.h
 ./default_store.lo: ../include/net-snmp/library/system.h
 ./default_store.lo: ../include/net-snmp/library/tools.h
 ./default_store.lo: ../include/net-snmp/library/int64.h
@@ -750,7 +714,7 @@
 ./default_store.lo: ../include/net-snmp/version.h
 ./dir_utils.lo: ../include/net-snmp/net-snmp-config.h
 ./dir_utils.lo: ../include/net-snmp/net-snmp-features.h
-./dir_utils.lo: ../include/net-snmp/net-snmp-includes.h 
+./dir_utils.lo: ../include/net-snmp/net-snmp-includes.h
 ./dir_utils.lo: ../include/net-snmp/definitions.h ../include/net-snmp/types.h
 ./dir_utils.lo: ../include/net-snmp/library/oid.h
 ./dir_utils.lo: ../include/net-snmp/library/types.h
@@ -775,6 +739,7 @@
 ./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/ucd_compat.h
 ./dir_utils.lo: ../include/net-snmp/library/mib.h
@@ -785,7 +750,7 @@
 ./dir_utils.lo: ../include/net-snmp/library/snmp.h
 ./dir_utils.lo: ../include/net-snmp/library/snmp-tc.h
 ./dir_utils.lo: ../include/net-snmp/library/getopt.h
-./dir_utils.lo: ../include/net-snmp/utilities.h 
+./dir_utils.lo: ../include/net-snmp/utilities.h
 ./dir_utils.lo: ../include/net-snmp/library/system.h
 ./dir_utils.lo: ../include/net-snmp/library/tools.h
 ./dir_utils.lo: ../include/net-snmp/library/int64.h
@@ -793,7 +758,7 @@
 ./dir_utils.lo: ../include/net-snmp/library/snmp_alarm.h
 ./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/container.h
 ./dir_utils.lo: ../include/net-snmp/library/factory.h
 ./dir_utils.lo: ../include/net-snmp/library/container_binary_array.h
 ./dir_utils.lo: ../include/net-snmp/library/container_list_ssll.h
@@ -816,13 +781,13 @@
 ./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/snmpusm.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
 ./fd_event_manager.lo: ../include/net-snmp/net-snmp-includes.h
 ./fd_event_manager.lo: ../include/net-snmp/definitions.h
-./fd_event_manager.lo: ../include/net-snmp/types.h 
+./fd_event_manager.lo: ../include/net-snmp/types.h
 ./fd_event_manager.lo: ../include/net-snmp/library/oid.h
 ./fd_event_manager.lo: ../include/net-snmp/library/types.h
 ./fd_event_manager.lo: ../include/net-snmp/library/snmp_api.h
@@ -846,6 +811,7 @@
 ./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/ucd_compat.h
 ./fd_event_manager.lo: ../include/net-snmp/library/mib.h
@@ -857,7 +823,7 @@
 ./fd_event_manager.lo: ../include/net-snmp/library/snmp.h
 ./fd_event_manager.lo: ../include/net-snmp/library/snmp-tc.h
 ./fd_event_manager.lo: ../include/net-snmp/library/getopt.h
-./fd_event_manager.lo: ../include/net-snmp/utilities.h 
+./fd_event_manager.lo: ../include/net-snmp/utilities.h
 ./fd_event_manager.lo: ../include/net-snmp/library/system.h
 ./fd_event_manager.lo: ../include/net-snmp/library/tools.h
 ./fd_event_manager.lo: ../include/net-snmp/library/int64.h
@@ -893,9 +859,9 @@
 ./fd_event_manager.lo: ../include/net-snmp/library/large_fd_set.h
 ./file_utils.lo: ../include/net-snmp/net-snmp-config.h
 ./file_utils.lo: ../include/net-snmp/net-snmp-features.h
-./file_utils.lo: ../include/net-snmp/net-snmp-includes.h 
-./file_utils.lo:  ../include/net-snmp/definitions.h
-./file_utils.lo: ../include/net-snmp/types.h 
+./file_utils.lo: ../include/net-snmp/net-snmp-includes.h
+./file_utils.lo: ../include/net-snmp/definitions.h
+./file_utils.lo: ../include/net-snmp/types.h
 ./file_utils.lo: ../include/net-snmp/library/oid.h
 ./file_utils.lo: ../include/net-snmp/library/types.h
 ./file_utils.lo: ../include/net-snmp/library/snmp_api.h
@@ -919,6 +885,7 @@
 ./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/ucd_compat.h
 ./file_utils.lo: ../include/net-snmp/library/mib.h
@@ -929,7 +896,7 @@
 ./file_utils.lo: ../include/net-snmp/library/snmp.h
 ./file_utils.lo: ../include/net-snmp/library/snmp-tc.h
 ./file_utils.lo: ../include/net-snmp/library/getopt.h
-./file_utils.lo: ../include/net-snmp/utilities.h 
+./file_utils.lo: ../include/net-snmp/utilities.h
 ./file_utils.lo: ../include/net-snmp/library/system.h
 ./file_utils.lo: ../include/net-snmp/library/tools.h
 ./file_utils.lo: ../include/net-snmp/library/int64.h
@@ -960,12 +927,12 @@
 ./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/snmpusm.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
+./getopt.lo: ../include/net-snmp/net-snmp-config.h
+./getopt.lo: ../include/net-snmp/library/getopt.h
 ./gettimeofday.lo: ../include/net-snmp/net-snmp-config.h
-./gettimeofday.lo: ../include/net-snmp/types.h 
+./gettimeofday.lo: ../include/net-snmp/types.h
 ./gettimeofday.lo: ../include/net-snmp/library/oid.h
 ./gettimeofday.lo: ../include/net-snmp/library/types.h
 ./gettimeofday.lo: ../include/net-snmp/definitions.h
@@ -990,6 +957,7 @@
 ./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/ucd_compat.h
 ./gettimeofday.lo: ../include/net-snmp/library/mib.h
@@ -1001,8 +969,8 @@
 ./gettimeofday.lo: ../include/net-snmp/library/snmp.h
 ./gettimeofday.lo: ../include/net-snmp/library/snmp-tc.h
 ./gettimeofday.lo: ../include/net-snmp/library/system.h
-./inet_ntop.lo: ../include/net-snmp/net-snmp-config.h 
-./inet_ntop.lo:  ../include/net-snmp/types.h
+./inet_ntop.lo: ../include/net-snmp/net-snmp-config.h
+./inet_ntop.lo: ../include/net-snmp/types.h
 ./inet_ntop.lo: ../include/net-snmp/library/oid.h
 ./inet_ntop.lo: ../include/net-snmp/library/types.h
 ./inet_ntop.lo: ../include/net-snmp/definitions.h
@@ -1027,6 +995,7 @@
 ./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/ucd_compat.h
 ./inet_ntop.lo: ../include/net-snmp/library/mib.h
@@ -1037,9 +1006,9 @@
 ./inet_ntop.lo: ../include/net-snmp/library/snmp_impl.h
 ./inet_ntop.lo: ../include/net-snmp/library/snmp.h
 ./inet_ntop.lo: ../include/net-snmp/library/snmp-tc.h inet_ntop.h
-./inet_pton.lo: ../include/net-snmp/net-snmp-config.h 
-./inet_pton.lo: ../include/net-snmp/types.h 
-./inet_pton.lo:  ../include/net-snmp/library/oid.h
+./inet_pton.lo: ../include/net-snmp/net-snmp-config.h
+./inet_pton.lo: ../include/net-snmp/types.h
+./inet_pton.lo: ../include/net-snmp/library/oid.h
 ./inet_pton.lo: ../include/net-snmp/library/types.h
 ./inet_pton.lo: ../include/net-snmp/definitions.h
 ./inet_pton.lo: ../include/net-snmp/library/snmp_api.h
@@ -1063,6 +1032,7 @@
 ./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/ucd_compat.h
 ./inet_pton.lo: ../include/net-snmp/library/mib.h
@@ -1073,9 +1043,9 @@
 ./inet_pton.lo: ../include/net-snmp/library/snmp_impl.h
 ./inet_pton.lo: ../include/net-snmp/library/snmp.h
 ./inet_pton.lo: ../include/net-snmp/library/snmp-tc.h inet_pton.h
-./int64.lo: ../include/net-snmp/net-snmp-config.h 
-./int64.lo: ../include/net-snmp/types.h 
-./int64.lo:  ../include/net-snmp/library/oid.h
+./int64.lo: ../include/net-snmp/net-snmp-config.h
+./int64.lo: ../include/net-snmp/types.h
+./int64.lo: ../include/net-snmp/library/oid.h
 ./int64.lo: ../include/net-snmp/library/types.h
 ./int64.lo: ../include/net-snmp/definitions.h
 ./int64.lo: ../include/net-snmp/library/snmp_api.h
@@ -1084,7 +1054,7 @@
 ./int64.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h
 ./int64.lo: ../include/net-snmp/output_api.h
 ./int64.lo: ../include/net-snmp/library/snmp_debug.h
-./int64.lo: ../include/net-snmp/library/snmp_logging.h 
+./int64.lo: ../include/net-snmp/library/snmp_logging.h
 ./int64.lo: ../include/net-snmp/session_api.h
 ./int64.lo: ../include/net-snmp/library/callback.h
 ./int64.lo: ../include/net-snmp/library/snmp_transport.h
@@ -1098,6 +1068,7 @@
 ./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/ucd_compat.h
 ./int64.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h
@@ -1110,9 +1081,9 @@
 ./int64.lo: ../include/net-snmp/library/int64.h
 ./int64.lo: ../include/net-snmp/library/snmp_assert.h
 ./keytools.lo: ../include/net-snmp/net-snmp-config.h
-./keytools.lo: ../include/net-snmp/net-snmp-features.h 
-./keytools.lo: ../include/net-snmp/types.h 
-./keytools.lo:  ../include/net-snmp/library/oid.h
+./keytools.lo: ../include/net-snmp/net-snmp-features.h
+./keytools.lo: ../include/net-snmp/types.h
+./keytools.lo: ../include/net-snmp/library/oid.h
 ./keytools.lo: ../include/net-snmp/library/types.h
 ./keytools.lo: ../include/net-snmp/definitions.h
 ./keytools.lo: ../include/net-snmp/library/snmp_api.h
@@ -1136,6 +1107,7 @@
 ./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/ucd_compat.h
 ./keytools.lo: ../include/net-snmp/library/mib.h
@@ -1145,7 +1117,7 @@
 ./keytools.lo: ../include/net-snmp/library/snmp_impl.h
 ./keytools.lo: ../include/net-snmp/library/snmp.h
 ./keytools.lo: ../include/net-snmp/library/snmp-tc.h
-./keytools.lo: ../include/net-snmp/utilities.h 
+./keytools.lo: ../include/net-snmp/utilities.h
 ./keytools.lo: ../include/net-snmp/library/system.h
 ./keytools.lo: ../include/net-snmp/library/tools.h
 ./keytools.lo: ../include/net-snmp/library/int64.h
@@ -1153,7 +1125,7 @@
 ./keytools.lo: ../include/net-snmp/library/snmp_alarm.h
 ./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/container.h
 ./keytools.lo: ../include/net-snmp/library/factory.h
 ./keytools.lo: ../include/net-snmp/library/container_binary_array.h
 ./keytools.lo: ../include/net-snmp/library/container_list_ssll.h
@@ -1164,10 +1136,10 @@
 ./keytools.lo: ../include/net-snmp/library/scapi.h
 ./keytools.lo: ../include/net-snmp/library/keytools.h
 ./keytools.lo: ../include/net-snmp/library/transform_oids.h
-./large_fd_set.lo: ../include/net-snmp/net-snmp-config.h 
+./large_fd_set.lo: ../include/net-snmp/net-snmp-config.h
 ./large_fd_set.lo: ../include/net-snmp/net-snmp-includes.h
 ./large_fd_set.lo: ../include/net-snmp/definitions.h
-./large_fd_set.lo: ../include/net-snmp/types.h 
+./large_fd_set.lo: ../include/net-snmp/types.h
 ./large_fd_set.lo: ../include/net-snmp/library/oid.h
 ./large_fd_set.lo: ../include/net-snmp/library/types.h
 ./large_fd_set.lo: ../include/net-snmp/library/snmp_api.h
@@ -1191,6 +1163,7 @@
 ./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/ucd_compat.h
 ./large_fd_set.lo: ../include/net-snmp/library/mib.h
@@ -1202,7 +1175,7 @@
 ./large_fd_set.lo: ../include/net-snmp/library/snmp.h
 ./large_fd_set.lo: ../include/net-snmp/library/snmp-tc.h
 ./large_fd_set.lo: ../include/net-snmp/library/getopt.h
-./large_fd_set.lo: ../include/net-snmp/utilities.h 
+./large_fd_set.lo: ../include/net-snmp/utilities.h
 ./large_fd_set.lo: ../include/net-snmp/library/system.h
 ./large_fd_set.lo: ../include/net-snmp/library/tools.h
 ./large_fd_set.lo: ../include/net-snmp/library/int64.h
@@ -1237,7 +1210,7 @@
 ./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/types.h
 ./lcd_time.lo: ../include/net-snmp/library/oid.h
 ./lcd_time.lo: ../include/net-snmp/library/types.h
 ./lcd_time.lo: ../include/net-snmp/definitions.h
@@ -1262,6 +1235,7 @@
 ./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/ucd_compat.h
 ./lcd_time.lo: ../include/net-snmp/library/mib.h
@@ -1271,7 +1245,7 @@
 ./lcd_time.lo: ../include/net-snmp/library/snmp_impl.h
 ./lcd_time.lo: ../include/net-snmp/library/snmp.h
 ./lcd_time.lo: ../include/net-snmp/library/snmp-tc.h
-./lcd_time.lo: ../include/net-snmp/utilities.h 
+./lcd_time.lo: ../include/net-snmp/utilities.h
 ./lcd_time.lo: ../include/net-snmp/library/system.h
 ./lcd_time.lo: ../include/net-snmp/library/tools.h
 ./lcd_time.lo: ../include/net-snmp/library/int64.h
@@ -1279,7 +1253,7 @@
 ./lcd_time.lo: ../include/net-snmp/library/snmp_alarm.h
 ./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/container.h
 ./lcd_time.lo: ../include/net-snmp/library/factory.h
 ./lcd_time.lo: ../include/net-snmp/library/container_binary_array.h
 ./lcd_time.lo: ../include/net-snmp/library/container_list_ssll.h
@@ -1293,8 +1267,8 @@
 ./lcd_time.lo: ../include/net-snmp/library/scapi.h
 ./lcd_time.lo: ../include/net-snmp/library/snmpv3.h
 ./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/net-snmp-config.h
+./md5.lo: ../include/net-snmp/net-snmp-includes.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
@@ -1304,22 +1278,23 @@
 ./md5.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h
 ./md5.lo: ../include/net-snmp/output_api.h
 ./md5.lo: ../include/net-snmp/library/snmp_debug.h
-./md5.lo: ../include/net-snmp/library/snmp_logging.h 
+./md5.lo: ../include/net-snmp/library/snmp_logging.h
 ./md5.lo: ../include/net-snmp/session_api.h
 ./md5.lo: ../include/net-snmp/library/callback.h
 ./md5.lo: ../include/net-snmp/library/snmp_transport.h
 ./md5.lo: ../include/net-snmp/library/snmp_service.h
 ./md5.lo: ../include/net-snmp/library/snmpCallbackDomain.h
-./md5.lo: ../include/net-snmp/library/snmpUnixDomain.h 
-./md5.lo:  ../include/net-snmp/library/snmpUDPDomain.h
+./md5.lo: ../include/net-snmp/library/snmpUnixDomain.h
+./md5.lo: ../include/net-snmp/library/snmpUDPDomain.h
 ./md5.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h
 ./md5.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h
 ./md5.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h
 ./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/ucd_compat.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
 ./md5.lo: ../include/net-snmp/library/oid_stash.h
@@ -1328,7 +1303,7 @@
 ./md5.lo: ../include/net-snmp/library/snmp.h
 ./md5.lo: ../include/net-snmp/library/snmp-tc.h
 ./md5.lo: ../include/net-snmp/library/getopt.h
-./md5.lo: ../include/net-snmp/utilities.h 
+./md5.lo: ../include/net-snmp/utilities.h
 ./md5.lo: ../include/net-snmp/library/system.h
 ./md5.lo: ../include/net-snmp/library/tools.h
 ./md5.lo: ../include/net-snmp/library/int64.h
@@ -1336,7 +1311,7 @@
 ./md5.lo: ../include/net-snmp/library/snmp_alarm.h
 ./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/container.h
 ./md5.lo: ../include/net-snmp/library/factory.h
 ./md5.lo: ../include/net-snmp/library/container_binary_array.h
 ./md5.lo: ../include/net-snmp/library/container_list_ssll.h
@@ -1360,8 +1335,8 @@
 ./md5.lo: ../include/net-snmp/library/snmpusm.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/net-snmp-features.h
+./mib.lo: ../include/net-snmp/types.h
 ./mib.lo: ../include/net-snmp/library/oid.h
 ./mib.lo: ../include/net-snmp/library/types.h
 ./mib.lo: ../include/net-snmp/definitions.h
@@ -1371,22 +1346,23 @@
 ./mib.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h
 ./mib.lo: ../include/net-snmp/output_api.h
 ./mib.lo: ../include/net-snmp/library/snmp_debug.h
-./mib.lo: ../include/net-snmp/library/snmp_logging.h 
+./mib.lo: ../include/net-snmp/library/snmp_logging.h
 ./mib.lo: ../include/net-snmp/session_api.h
 ./mib.lo: ../include/net-snmp/library/callback.h
 ./mib.lo: ../include/net-snmp/library/snmp_transport.h
 ./mib.lo: ../include/net-snmp/library/snmp_service.h
 ./mib.lo: ../include/net-snmp/library/snmpCallbackDomain.h
-./mib.lo: ../include/net-snmp/library/snmpUnixDomain.h 
-./mib.lo:  ../include/net-snmp/library/snmpUDPDomain.h
+./mib.lo: ../include/net-snmp/library/snmpUnixDomain.h
+./mib.lo: ../include/net-snmp/library/snmpUDPDomain.h
 ./mib.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h
 ./mib.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h
 ./mib.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h
 ./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/ucd_compat.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
 ./mib.lo: ../include/net-snmp/library/oid_stash.h
@@ -1399,14 +1375,14 @@
 ./mib.lo: ../include/net-snmp/library/snmp_parse_args.h
 ./mib.lo: ../include/net-snmp/library/snmp_enum.h
 ./mib.lo: ../include/net-snmp/library/vacm.h ../include/net-snmp/utilities.h
-./mib.lo:  ../include/net-snmp/library/system.h
+./mib.lo: ../include/net-snmp/library/system.h
 ./mib.lo: ../include/net-snmp/library/tools.h
 ./mib.lo: ../include/net-snmp/library/int64.h
 ./mib.lo: ../include/net-snmp/library/mt_support.h
 ./mib.lo: ../include/net-snmp/library/snmp_alarm.h
 ./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/container.h
 ./mib.lo: ../include/net-snmp/library/factory.h
 ./mib.lo: ../include/net-snmp/library/container_binary_array.h
 ./mib.lo: ../include/net-snmp/library/container_list_ssll.h
@@ -1414,11 +1390,11 @@
 ./mib.lo: ../include/net-snmp/library/container.h
 ./mib.lo: ../include/net-snmp/library/snmp_assert.h
 ./mib.lo: ../include/net-snmp/version.h
-./mt_support.lo: ../include/net-snmp/net-snmp-config.h 
+./mt_support.lo: ../include/net-snmp/net-snmp-config.h
 ./mt_support.lo: ../include/net-snmp/library/mt_support.h
-./oid_stash.lo: ../include/net-snmp/net-snmp-config.h 
+./oid_stash.lo: ../include/net-snmp/net-snmp-config.h
 ./oid_stash.lo: ../include/net-snmp/net-snmp-features.h
-./oid_stash.lo: ../include/net-snmp/net-snmp-includes.h 
+./oid_stash.lo: ../include/net-snmp/net-snmp-includes.h
 ./oid_stash.lo: ../include/net-snmp/definitions.h ../include/net-snmp/types.h
 ./oid_stash.lo: ../include/net-snmp/library/oid.h
 ./oid_stash.lo: ../include/net-snmp/library/types.h
@@ -1443,6 +1419,7 @@
 ./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/ucd_compat.h
 ./oid_stash.lo: ../include/net-snmp/library/mib.h
@@ -1453,7 +1430,7 @@
 ./oid_stash.lo: ../include/net-snmp/library/snmp.h
 ./oid_stash.lo: ../include/net-snmp/library/snmp-tc.h
 ./oid_stash.lo: ../include/net-snmp/library/getopt.h
-./oid_stash.lo: ../include/net-snmp/utilities.h 
+./oid_stash.lo: ../include/net-snmp/utilities.h
 ./oid_stash.lo: ../include/net-snmp/library/system.h
 ./oid_stash.lo: ../include/net-snmp/library/tools.h
 ./oid_stash.lo: ../include/net-snmp/library/int64.h
@@ -1486,7 +1463,7 @@
 ./oid_stash.lo: ../include/net-snmp/library/snmptsm.h
 ./oid_stash.lo: ../include/net-snmp/library/snmpusm.h
 ./opendir.lo: ../include/net-snmp/net-snmp-config.h
-./opendir.lo: ../include/net-snmp/types.h 
+./opendir.lo: ../include/net-snmp/types.h
 ./opendir.lo: ../include/net-snmp/library/oid.h
 ./opendir.lo: ../include/net-snmp/library/types.h
 ./opendir.lo: ../include/net-snmp/definitions.h
@@ -1511,6 +1488,7 @@
 ./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/ucd_compat.h
 ./opendir.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h
@@ -1522,8 +1500,8 @@
 ./opendir.lo: ../include/net-snmp/library/snmp-tc.h
 ./opendir.lo: ../include/net-snmp/library/system.h
 ./parse.lo: ../include/net-snmp/net-snmp-config.h
-./parse.lo: ../include/net-snmp/net-snmp-features.h 
-./parse.lo:  ../include/net-snmp/types.h
+./parse.lo: ../include/net-snmp/net-snmp-features.h
+./parse.lo: ../include/net-snmp/types.h
 ./parse.lo: ../include/net-snmp/library/oid.h
 ./parse.lo: ../include/net-snmp/library/types.h
 ./parse.lo: ../include/net-snmp/definitions.h
@@ -1533,7 +1511,7 @@
 ./parse.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h
 ./parse.lo: ../include/net-snmp/output_api.h
 ./parse.lo: ../include/net-snmp/library/snmp_debug.h
-./parse.lo: ../include/net-snmp/library/snmp_logging.h 
+./parse.lo: ../include/net-snmp/library/snmp_logging.h
 ./parse.lo: ../include/net-snmp/session_api.h
 ./parse.lo: ../include/net-snmp/library/callback.h
 ./parse.lo: ../include/net-snmp/library/snmp_transport.h
@@ -1547,6 +1525,7 @@
 ./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/ucd_compat.h
 ./parse.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h
@@ -1561,7 +1540,7 @@
 ./parse.lo: ../include/net-snmp/library/snmp_parse_args.h
 ./parse.lo: ../include/net-snmp/library/snmp_enum.h
 ./parse.lo: ../include/net-snmp/library/vacm.h
-./parse.lo: ../include/net-snmp/utilities.h 
+./parse.lo: ../include/net-snmp/utilities.h
 ./parse.lo: ../include/net-snmp/library/system.h
 ./parse.lo: ../include/net-snmp/library/tools.h
 ./parse.lo: ../include/net-snmp/library/int64.h
@@ -1569,7 +1548,7 @@
 ./parse.lo: ../include/net-snmp/library/snmp_alarm.h
 ./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/container.h
 ./parse.lo: ../include/net-snmp/library/factory.h
 ./parse.lo: ../include/net-snmp/library/container_binary_array.h
 ./parse.lo: ../include/net-snmp/library/container_list_ssll.h
@@ -1580,7 +1559,7 @@
 ./pkcs.lo: ../include/net-snmp/net-snmp-config.h
 ./read_config.lo: ../include/net-snmp/net-snmp-config.h
 ./read_config.lo: ../include/net-snmp/net-snmp-features.h
-./read_config.lo: ../include/net-snmp/types.h 
+./read_config.lo: ../include/net-snmp/types.h
 ./read_config.lo: ../include/net-snmp/library/oid.h
 ./read_config.lo: ../include/net-snmp/library/types.h
 ./read_config.lo: ../include/net-snmp/definitions.h
@@ -1605,6 +1584,7 @@
 ./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/ucd_compat.h
 ./read_config.lo: ../include/net-snmp/library/mib.h
@@ -1620,7 +1600,7 @@
 ./read_config.lo: ../include/net-snmp/library/snmp_parse_args.h
 ./read_config.lo: ../include/net-snmp/library/snmp_enum.h
 ./read_config.lo: ../include/net-snmp/library/vacm.h
-./read_config.lo: ../include/net-snmp/utilities.h 
+./read_config.lo: ../include/net-snmp/utilities.h
 ./read_config.lo: ../include/net-snmp/library/system.h
 ./read_config.lo: ../include/net-snmp/library/tools.h
 ./read_config.lo: ../include/net-snmp/library/int64.h
@@ -1637,7 +1617,7 @@
 ./read_config.lo: ../include/net-snmp/library/snmp_assert.h
 ./read_config.lo: ../include/net-snmp/version.h
 ./readdir.lo: ../include/net-snmp/net-snmp-config.h
-./readdir.lo: ../include/net-snmp/types.h 
+./readdir.lo: ../include/net-snmp/types.h
 ./readdir.lo: ../include/net-snmp/library/oid.h
 ./readdir.lo: ../include/net-snmp/library/types.h
 ./readdir.lo: ../include/net-snmp/definitions.h
@@ -1662,6 +1642,7 @@
 ./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/ucd_compat.h
 ./readdir.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h
@@ -1673,9 +1654,9 @@
 ./readdir.lo: ../include/net-snmp/library/snmp-tc.h
 ./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: ../include/net-snmp/types.h 
-./scapi.lo:  ../include/net-snmp/library/oid.h
+./scapi.lo: ../include/net-snmp/net-snmp-features.h
+./scapi.lo: ../include/net-snmp/types.h
+./scapi.lo: ../include/net-snmp/library/oid.h
 ./scapi.lo: ../include/net-snmp/library/types.h
 ./scapi.lo: ../include/net-snmp/definitions.h
 ./scapi.lo: ../include/net-snmp/library/snmp_api.h
@@ -1684,7 +1665,7 @@
 ./scapi.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h
 ./scapi.lo: ../include/net-snmp/output_api.h
 ./scapi.lo: ../include/net-snmp/library/snmp_debug.h
-./scapi.lo: ../include/net-snmp/library/snmp_logging.h 
+./scapi.lo: ../include/net-snmp/library/snmp_logging.h
 ./scapi.lo: ../include/net-snmp/session_api.h
 ./scapi.lo: ../include/net-snmp/library/callback.h
 ./scapi.lo: ../include/net-snmp/library/snmp_transport.h
@@ -1698,6 +1679,7 @@
 ./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/ucd_compat.h
 ./scapi.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h
@@ -1706,7 +1688,7 @@
 ./scapi.lo: ../include/net-snmp/library/snmp_impl.h
 ./scapi.lo: ../include/net-snmp/library/snmp.h
 ./scapi.lo: ../include/net-snmp/library/snmp-tc.h
-./scapi.lo: ../include/net-snmp/utilities.h 
+./scapi.lo: ../include/net-snmp/utilities.h
 ./scapi.lo: ../include/net-snmp/library/system.h
 ./scapi.lo: ../include/net-snmp/library/tools.h
 ./scapi.lo: ../include/net-snmp/library/int64.h
@@ -1714,7 +1696,7 @@
 ./scapi.lo: ../include/net-snmp/library/snmp_alarm.h
 ./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/container.h
 ./scapi.lo: ../include/net-snmp/library/factory.h
 ./scapi.lo: ../include/net-snmp/library/container_binary_array.h
 ./scapi.lo: ../include/net-snmp/library/container_list_ssll.h
@@ -1727,8 +1709,8 @@
 ./scapi.lo: ../include/net-snmp/library/keytools.h
 ./scapi.lo: ../include/net-snmp/library/scapi.h
 ./scapi.lo: ../include/net-snmp/library/transform_oids.h
-./snmp_alarm.lo: ../include/net-snmp/net-snmp-config.h 
-./snmp_alarm.lo: ../include/net-snmp/types.h 
+./snmp_alarm.lo: ../include/net-snmp/net-snmp-config.h
+./snmp_alarm.lo: ../include/net-snmp/types.h
 ./snmp_alarm.lo: ../include/net-snmp/library/oid.h
 ./snmp_alarm.lo: ../include/net-snmp/library/types.h
 ./snmp_alarm.lo: ../include/net-snmp/definitions.h
@@ -1753,6 +1735,7 @@
 ./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/ucd_compat.h
 ./snmp_alarm.lo: ../include/net-snmp/library/mib.h
@@ -1769,7 +1752,7 @@
 ./snmp_alarm.lo: ../include/net-snmp/library/snmp_parse_args.h
 ./snmp_alarm.lo: ../include/net-snmp/library/snmp_enum.h
 ./snmp_alarm.lo: ../include/net-snmp/library/vacm.h
-./snmp_alarm.lo: ../include/net-snmp/utilities.h 
+./snmp_alarm.lo: ../include/net-snmp/utilities.h
 ./snmp_alarm.lo: ../include/net-snmp/library/system.h
 ./snmp_alarm.lo: ../include/net-snmp/library/tools.h
 ./snmp_alarm.lo: ../include/net-snmp/library/int64.h
@@ -1786,9 +1769,9 @@
 ./snmp_alarm.lo: ../include/net-snmp/library/snmp_assert.h
 ./snmp_alarm.lo: ../include/net-snmp/version.h
 ./snmp_api.lo: ../include/net-snmp/net-snmp-config.h
-./snmp_api.lo: ../include/net-snmp/net-snmp-features.h 
-./snmp_api.lo: ../include/net-snmp/types.h 
-./snmp_api.lo:  ../include/net-snmp/library/oid.h
+./snmp_api.lo: ../include/net-snmp/net-snmp-features.h
+./snmp_api.lo: ../include/net-snmp/types.h
+./snmp_api.lo: ../include/net-snmp/library/oid.h
 ./snmp_api.lo: ../include/net-snmp/library/types.h
 ./snmp_api.lo: ../include/net-snmp/definitions.h
 ./snmp_api.lo: ../include/net-snmp/library/snmp_api.h
@@ -1812,6 +1795,7 @@
 ./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/ucd_compat.h
 ./snmp_api.lo: ../include/net-snmp/library/mib.h
@@ -1827,7 +1811,7 @@
 ./snmp_api.lo: ../include/net-snmp/library/snmp_parse_args.h
 ./snmp_api.lo: ../include/net-snmp/library/snmp_enum.h
 ./snmp_api.lo: ../include/net-snmp/library/vacm.h
-./snmp_api.lo: ../include/net-snmp/utilities.h 
+./snmp_api.lo: ../include/net-snmp/utilities.h
 ./snmp_api.lo: ../include/net-snmp/library/system.h
 ./snmp_api.lo: ../include/net-snmp/library/tools.h
 ./snmp_api.lo: ../include/net-snmp/library/int64.h
@@ -1835,7 +1819,7 @@
 ./snmp_api.lo: ../include/net-snmp/library/snmp_alarm.h
 ./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/container.h
 ./snmp_api.lo: ../include/net-snmp/library/factory.h
 ./snmp_api.lo: ../include/net-snmp/library/container_binary_array.h
 ./snmp_api.lo: ../include/net-snmp/library/container_list_ssll.h
@@ -1850,9 +1834,9 @@
 ./snmp_api.lo: ../include/net-snmp/library/lcd_time.h
 ./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/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/library/types.h
 ./snmp_auth.lo: ../include/net-snmp/definitions.h
 ./snmp_auth.lo: ../include/net-snmp/library/snmp_api.h
@@ -1876,6 +1860,7 @@
 ./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/ucd_compat.h
 ./snmp_auth.lo: ../include/net-snmp/library/mib.h
@@ -1886,7 +1871,7 @@
 ./snmp_auth.lo: ../include/net-snmp/library/snmp_impl.h
 ./snmp_auth.lo: ../include/net-snmp/library/snmp.h
 ./snmp_auth.lo: ../include/net-snmp/library/snmp-tc.h
-./snmp_auth.lo: ../include/net-snmp/utilities.h 
+./snmp_auth.lo: ../include/net-snmp/utilities.h
 ./snmp_auth.lo: ../include/net-snmp/library/system.h
 ./snmp_auth.lo: ../include/net-snmp/library/tools.h
 ./snmp_auth.lo: ../include/net-snmp/library/int64.h
@@ -1894,7 +1879,7 @@
 ./snmp_auth.lo: ../include/net-snmp/library/snmp_alarm.h
 ./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/container.h
 ./snmp_auth.lo: ../include/net-snmp/library/factory.h
 ./snmp_auth.lo: ../include/net-snmp/library/container_binary_array.h
 ./snmp_auth.lo: ../include/net-snmp/library/container_list_ssll.h
@@ -1904,8 +1889,8 @@
 ./snmp_auth.lo: ../include/net-snmp/version.h
 ./snmp_auth.lo: ../include/net-snmp/library/md5.h
 ./snmp_auth.lo: ../include/net-snmp/library/scapi.h
-./snmp.lo: ../include/net-snmp/net-snmp-config.h 
-./snmp.lo:  ../include/net-snmp/types.h
+./snmp.lo: ../include/net-snmp/net-snmp-config.h
+./snmp.lo: ../include/net-snmp/types.h
 ./snmp.lo: ../include/net-snmp/library/oid.h
 ./snmp.lo: ../include/net-snmp/library/types.h
 ./snmp.lo: ../include/net-snmp/definitions.h
@@ -1915,22 +1900,23 @@
 ./snmp.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h
 ./snmp.lo: ../include/net-snmp/output_api.h
 ./snmp.lo: ../include/net-snmp/library/snmp_debug.h
-./snmp.lo: ../include/net-snmp/library/snmp_logging.h 
+./snmp.lo: ../include/net-snmp/library/snmp_logging.h
 ./snmp.lo: ../include/net-snmp/session_api.h
 ./snmp.lo: ../include/net-snmp/library/callback.h
 ./snmp.lo: ../include/net-snmp/library/snmp_transport.h
 ./snmp.lo: ../include/net-snmp/library/snmp_service.h
 ./snmp.lo: ../include/net-snmp/library/snmpCallbackDomain.h
-./snmp.lo: ../include/net-snmp/library/snmpUnixDomain.h 
-./snmp.lo:  ../include/net-snmp/library/snmpUDPDomain.h
+./snmp.lo: ../include/net-snmp/library/snmpUnixDomain.h
+./snmp.lo: ../include/net-snmp/library/snmpUDPDomain.h
 ./snmp.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h
 ./snmp.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h
 ./snmp.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h
 ./snmp.lo: ../include/net-snmp/library/snmpTCPDomain.h
 ./snmp.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./snmp.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h
+./snmp.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./snmp.lo: ../include/net-snmp/library/snmpIPXDomain.h
-./snmp.lo:  ../include/net-snmp/library/ucd_compat.h
+./snmp.lo: ../include/net-snmp/library/ucd_compat.h
 ./snmp.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h
 ./snmp.lo: ../include/net-snmp/library/parse.h
 ./snmp.lo: ../include/net-snmp/library/oid_stash.h
@@ -1940,7 +1926,7 @@
 ./snmp.lo: ../include/net-snmp/library/snmp-tc.h
 ./snmp_client.lo: ../include/net-snmp/net-snmp-config.h
 ./snmp_client.lo: ../include/net-snmp/net-snmp-features.h
-./snmp_client.lo: ../include/net-snmp/types.h 
+./snmp_client.lo: ../include/net-snmp/types.h
 ./snmp_client.lo: ../include/net-snmp/library/oid.h
 ./snmp_client.lo: ../include/net-snmp/library/types.h
 ./snmp_client.lo: ../include/net-snmp/definitions.h
@@ -1965,6 +1951,7 @@
 ./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/ucd_compat.h
 ./snmp_client.lo: ../include/net-snmp/library/mib.h
@@ -1979,8 +1966,8 @@
 ./snmp_client.lo: ../include/net-snmp/library/snmp_secmod.h
 ./snmp_client.lo: ../include/net-snmp/library/snmpusm.h
 ./snmp_client.lo: ../include/net-snmp/library/snmp_assert.h
-./snmp_debug.lo: ../include/net-snmp/net-snmp-config.h 
-./snmp_debug.lo:  ../include/net-snmp/types.h
+./snmp_debug.lo: ../include/net-snmp/net-snmp-config.h
+./snmp_debug.lo: ../include/net-snmp/types.h
 ./snmp_debug.lo: ../include/net-snmp/library/oid.h
 ./snmp_debug.lo: ../include/net-snmp/library/types.h
 ./snmp_debug.lo: ../include/net-snmp/definitions.h
@@ -2005,6 +1992,7 @@
 ./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/ucd_compat.h
 ./snmp_debug.lo: ../include/net-snmp/library/mib.h
@@ -2021,7 +2009,7 @@
 ./snmp_debug.lo: ../include/net-snmp/library/snmp_parse_args.h
 ./snmp_debug.lo: ../include/net-snmp/library/snmp_enum.h
 ./snmp_debug.lo: ../include/net-snmp/library/vacm.h
-./snmp_debug.lo: ../include/net-snmp/utilities.h 
+./snmp_debug.lo: ../include/net-snmp/utilities.h
 ./snmp_debug.lo: ../include/net-snmp/library/system.h
 ./snmp_debug.lo: ../include/net-snmp/library/tools.h
 ./snmp_debug.lo: ../include/net-snmp/library/int64.h
@@ -2038,9 +2026,9 @@
 ./snmp_debug.lo: ../include/net-snmp/library/snmp_assert.h
 ./snmp_debug.lo: ../include/net-snmp/version.h
 ./snmp_enum.lo: ../include/net-snmp/net-snmp-config.h
-./snmp_enum.lo: ../include/net-snmp/net-snmp-features.h 
-./snmp_enum.lo: ../include/net-snmp/types.h 
-./snmp_enum.lo:  ../include/net-snmp/library/oid.h
+./snmp_enum.lo: ../include/net-snmp/net-snmp-features.h
+./snmp_enum.lo: ../include/net-snmp/types.h
+./snmp_enum.lo: ../include/net-snmp/library/oid.h
 ./snmp_enum.lo: ../include/net-snmp/library/types.h
 ./snmp_enum.lo: ../include/net-snmp/definitions.h
 ./snmp_enum.lo: ../include/net-snmp/library/snmp_api.h
@@ -2064,6 +2052,7 @@
 ./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/ucd_compat.h
 ./snmp_enum.lo: ../include/net-snmp/library/mib.h
@@ -2081,8 +2070,9 @@
 ./snmp_enum.lo: ../include/net-snmp/library/vacm.h
 ./snmp_enum.lo: ../include/net-snmp/library/tools.h
 ./snmp_enum.lo: ../include/net-snmp/library/snmp_assert.h
-./snmpksm.lo: ../include/net-snmp/net-snmp-config.h 
-./snmpksm.lo: ../include/net-snmp/output_api.h ../include/net-snmp/types.h
+./snmpksm.lo: ../include/net-snmp/net-snmp-config.h
+./snmpksm.lo: ../include/net-snmp/output_api.h
+./snmpksm.lo: ../include/net-snmp/types.h
 ./snmpksm.lo: ../include/net-snmp/library/oid.h
 ./snmpksm.lo: ../include/net-snmp/library/types.h
 ./snmpksm.lo: ../include/net-snmp/definitions.h
@@ -2104,6 +2094,7 @@
 ./snmpksm.lo: ../include/net-snmp/library/snmpTCPDomain.h
 ./snmpksm.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./snmpksm.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h
+./snmpksm.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./snmpksm.lo: ../include/net-snmp/library/snmpIPXDomain.h
 ./snmpksm.lo: ../include/net-snmp/library/ucd_compat.h
 ./snmpksm.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h
@@ -2121,7 +2112,7 @@
 ./snmpksm.lo: ../include/net-snmp/library/snmp_parse_args.h
 ./snmpksm.lo: ../include/net-snmp/library/snmp_enum.h
 ./snmpksm.lo: ../include/net-snmp/library/vacm.h
-./snmpksm.lo: ../include/net-snmp/utilities.h 
+./snmpksm.lo: ../include/net-snmp/utilities.h
 ./snmpksm.lo: ../include/net-snmp/library/system.h
 ./snmpksm.lo: ../include/net-snmp/library/tools.h
 ./snmpksm.lo: ../include/net-snmp/library/int64.h
@@ -2145,7 +2136,7 @@
 ./snmpksm.lo: ../include/net-snmp/library/snmpksm.h
 ./snmp_logging.lo: ../include/net-snmp/net-snmp-config.h
 ./snmp_logging.lo: ../include/net-snmp/net-snmp-features.h
-./snmp_logging.lo: ../include/net-snmp/types.h 
+./snmp_logging.lo: ../include/net-snmp/types.h
 ./snmp_logging.lo: ../include/net-snmp/library/oid.h
 ./snmp_logging.lo: ../include/net-snmp/library/types.h
 ./snmp_logging.lo: ../include/net-snmp/definitions.h
@@ -2170,6 +2161,7 @@
 ./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/ucd_compat.h
 ./snmp_logging.lo: ../include/net-snmp/library/mib.h
@@ -2185,7 +2177,7 @@
 ./snmp_logging.lo: ../include/net-snmp/library/snmp_parse_args.h
 ./snmp_logging.lo: ../include/net-snmp/library/snmp_enum.h
 ./snmp_logging.lo: ../include/net-snmp/library/vacm.h
-./snmp_logging.lo: ../include/net-snmp/utilities.h 
+./snmp_logging.lo: ../include/net-snmp/utilities.h
 ./snmp_logging.lo: ../include/net-snmp/library/system.h
 ./snmp_logging.lo: ../include/net-snmp/library/tools.h
 ./snmp_logging.lo: ../include/net-snmp/library/int64.h
@@ -2203,8 +2195,8 @@
 ./snmp_logging.lo: ../include/net-snmp/version.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
-./snmp_openssl.lo: ../include/net-snmp/types.h 
+./snmp_openssl.lo: ../include/net-snmp/definitions.h
+./snmp_openssl.lo: ../include/net-snmp/types.h
 ./snmp_openssl.lo: ../include/net-snmp/library/oid.h
 ./snmp_openssl.lo: ../include/net-snmp/library/types.h
 ./snmp_openssl.lo: ../include/net-snmp/library/snmp_api.h
@@ -2228,6 +2220,7 @@
 ./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/ucd_compat.h
 ./snmp_openssl.lo: ../include/net-snmp/library/mib.h
@@ -2239,7 +2232,7 @@
 ./snmp_openssl.lo: ../include/net-snmp/library/snmp.h
 ./snmp_openssl.lo: ../include/net-snmp/library/snmp-tc.h
 ./snmp_openssl.lo: ../include/net-snmp/library/getopt.h
-./snmp_openssl.lo: ../include/net-snmp/utilities.h 
+./snmp_openssl.lo: ../include/net-snmp/utilities.h
 ./snmp_openssl.lo: ../include/net-snmp/library/system.h
 ./snmp_openssl.lo: ../include/net-snmp/library/tools.h
 ./snmp_openssl.lo: ../include/net-snmp/library/int64.h
@@ -2274,7 +2267,7 @@
 ./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
-./snmp_parse_args.lo: ../include/net-snmp/types.h 
+./snmp_parse_args.lo: ../include/net-snmp/types.h
 ./snmp_parse_args.lo: ../include/net-snmp/library/oid.h
 ./snmp_parse_args.lo: ../include/net-snmp/library/types.h
 ./snmp_parse_args.lo: ../include/net-snmp/library/snmp_api.h
@@ -2298,6 +2291,7 @@
 ./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/ucd_compat.h
 ./snmp_parse_args.lo: ../include/net-snmp/library/mib.h
@@ -2309,7 +2303,7 @@
 ./snmp_parse_args.lo: ../include/net-snmp/library/snmp.h
 ./snmp_parse_args.lo: ../include/net-snmp/library/snmp-tc.h
 ./snmp_parse_args.lo: ../include/net-snmp/library/getopt.h
-./snmp_parse_args.lo: ../include/net-snmp/utilities.h 
+./snmp_parse_args.lo: ../include/net-snmp/utilities.h
 ./snmp_parse_args.lo: ../include/net-snmp/library/system.h
 ./snmp_parse_args.lo: ../include/net-snmp/library/tools.h
 ./snmp_parse_args.lo: ../include/net-snmp/library/int64.h
@@ -2341,8 +2335,8 @@
 ./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_secmod.lo: ../include/net-snmp/net-snmp-config.h 
-./snmp_secmod.lo:  ../include/net-snmp/types.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
 ./snmp_secmod.lo: ../include/net-snmp/library/types.h
 ./snmp_secmod.lo: ../include/net-snmp/definitions.h
@@ -2367,6 +2361,7 @@
 ./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/ucd_compat.h
 ./snmp_secmod.lo: ../include/net-snmp/library/mib.h
@@ -2383,7 +2378,7 @@
 ./snmp_secmod.lo: ../include/net-snmp/library/snmp_parse_args.h
 ./snmp_secmod.lo: ../include/net-snmp/library/snmp_enum.h
 ./snmp_secmod.lo: ../include/net-snmp/library/vacm.h
-./snmp_secmod.lo: ../include/net-snmp/utilities.h 
+./snmp_secmod.lo: ../include/net-snmp/utilities.h
 ./snmp_secmod.lo: ../include/net-snmp/library/system.h
 ./snmp_secmod.lo: ../include/net-snmp/library/tools.h
 ./snmp_secmod.lo: ../include/net-snmp/library/int64.h
@@ -2407,7 +2402,7 @@
 ./snmp_service.lo: ../include/net-snmp/net-snmp-config.h
 ./snmp_service.lo: ../include/net-snmp/net-snmp-includes.h
 ./snmp_service.lo: ../include/net-snmp/definitions.h
-./snmp_service.lo: ../include/net-snmp/types.h 
+./snmp_service.lo: ../include/net-snmp/types.h
 ./snmp_service.lo: ../include/net-snmp/library/oid.h
 ./snmp_service.lo: ../include/net-snmp/library/types.h
 ./snmp_service.lo: ../include/net-snmp/library/snmp_api.h
@@ -2431,6 +2426,7 @@
 ./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/ucd_compat.h
 ./snmp_service.lo: ../include/net-snmp/library/mib.h
@@ -2442,7 +2438,7 @@
 ./snmp_service.lo: ../include/net-snmp/library/snmp.h
 ./snmp_service.lo: ../include/net-snmp/library/snmp-tc.h
 ./snmp_service.lo: ../include/net-snmp/library/getopt.h
-./snmp_service.lo: ../include/net-snmp/utilities.h 
+./snmp_service.lo: ../include/net-snmp/utilities.h
 ./snmp_service.lo: ../include/net-snmp/library/system.h
 ./snmp_service.lo: ../include/net-snmp/library/tools.h
 ./snmp_service.lo: ../include/net-snmp/library/int64.h
@@ -2476,7 +2472,7 @@
 ./snmp_service.lo: ../include/net-snmp/library/snmpusm.h
 ./snmp-tc.lo: ../include/net-snmp/net-snmp-config.h
 ./snmp-tc.lo: ../include/net-snmp/net-snmp-features.h
-./snmp-tc.lo:  ../include/net-snmp/types.h
+./snmp-tc.lo: ../include/net-snmp/types.h
 ./snmp-tc.lo: ../include/net-snmp/library/oid.h
 ./snmp-tc.lo: ../include/net-snmp/library/types.h
 ./snmp-tc.lo: ../include/net-snmp/definitions.h
@@ -2501,6 +2497,7 @@
 ./snmp-tc.lo: ../include/net-snmp/library/snmpTCPDomain.h
 ./snmp-tc.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./snmp-tc.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h
+./snmp-tc.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./snmp-tc.lo: ../include/net-snmp/library/snmpIPXDomain.h
 ./snmp-tc.lo: ../include/net-snmp/library/ucd_compat.h
 ./snmp-tc.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h
@@ -2511,8 +2508,8 @@
 ./snmp-tc.lo: ../include/net-snmp/library/snmp-tc.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 
-./snmp_transport.lo:  ../include/net-snmp/library/oid.h
+./snmp_transport.lo: ../include/net-snmp/types.h
+./snmp_transport.lo: ../include/net-snmp/library/oid.h
 ./snmp_transport.lo: ../include/net-snmp/library/types.h
 ./snmp_transport.lo: ../include/net-snmp/definitions.h
 ./snmp_transport.lo: ../include/net-snmp/library/snmp_api.h
@@ -2536,6 +2533,7 @@
 ./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/ucd_compat.h
 ./snmp_transport.lo: ../include/net-snmp/library/mib.h
@@ -2545,7 +2543,7 @@
 ./snmp_transport.lo: ../include/net-snmp/library/snmp_impl.h
 ./snmp_transport.lo: ../include/net-snmp/library/snmp.h
 ./snmp_transport.lo: ../include/net-snmp/library/snmp-tc.h
-./snmp_transport.lo: ../include/net-snmp/utilities.h 
+./snmp_transport.lo: ../include/net-snmp/utilities.h
 ./snmp_transport.lo: ../include/net-snmp/library/system.h
 ./snmp_transport.lo: ../include/net-snmp/library/tools.h
 ./snmp_transport.lo: ../include/net-snmp/library/int64.h
@@ -2570,8 +2568,9 @@
 ./snmp_transport.lo: transports/snmp_transport_inits.h
 ./snmptsm.lo: ../include/net-snmp/net-snmp-config.h
 ./snmptsm.lo: ../include/net-snmp/net-snmp-features.h
-./snmptsm.lo: ../include/net-snmp/net-snmp-includes.h 
-./snmptsm.lo: ../include/net-snmp/definitions.h ../include/net-snmp/types.h
+./snmptsm.lo: ../include/net-snmp/net-snmp-includes.h
+./snmptsm.lo: ../include/net-snmp/definitions.h
+./snmptsm.lo: ../include/net-snmp/types.h
 ./snmptsm.lo: ../include/net-snmp/library/oid.h
 ./snmptsm.lo: ../include/net-snmp/library/types.h
 ./snmptsm.lo: ../include/net-snmp/library/snmp_api.h
@@ -2595,6 +2594,7 @@
 ./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/ucd_compat.h
 ./snmptsm.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h
@@ -2604,7 +2604,7 @@
 ./snmptsm.lo: ../include/net-snmp/library/snmp.h
 ./snmptsm.lo: ../include/net-snmp/library/snmp-tc.h
 ./snmptsm.lo: ../include/net-snmp/library/getopt.h
-./snmptsm.lo: ../include/net-snmp/utilities.h 
+./snmptsm.lo: ../include/net-snmp/utilities.h
 ./snmptsm.lo: ../include/net-snmp/library/system.h
 ./snmptsm.lo: ../include/net-snmp/library/tools.h
 ./snmptsm.lo: ../include/net-snmp/library/int64.h
@@ -2612,7 +2612,7 @@
 ./snmptsm.lo: ../include/net-snmp/library/snmp_alarm.h
 ./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/container.h
 ./snmptsm.lo: ../include/net-snmp/library/factory.h
 ./snmptsm.lo: ../include/net-snmp/library/container_binary_array.h
 ./snmptsm.lo: ../include/net-snmp/library/container_list_ssll.h
@@ -2634,10 +2634,10 @@
 ./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/snmpusm.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/types.h
 ./snmpusm.lo: ../include/net-snmp/library/oid.h
 ./snmpusm.lo: ../include/net-snmp/library/types.h
 ./snmpusm.lo: ../include/net-snmp/definitions.h
@@ -2662,6 +2662,7 @@
 ./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/ucd_compat.h
 ./snmpusm.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h
@@ -2676,7 +2677,7 @@
 ./snmpusm.lo: ../include/net-snmp/library/snmp_parse_args.h
 ./snmpusm.lo: ../include/net-snmp/library/snmp_enum.h
 ./snmpusm.lo: ../include/net-snmp/library/vacm.h
-./snmpusm.lo: ../include/net-snmp/utilities.h 
+./snmpusm.lo: ../include/net-snmp/utilities.h
 ./snmpusm.lo: ../include/net-snmp/library/system.h
 ./snmpusm.lo: ../include/net-snmp/library/tools.h
 ./snmpusm.lo: ../include/net-snmp/library/int64.h
@@ -2684,7 +2685,7 @@
 ./snmpusm.lo: ../include/net-snmp/library/snmp_alarm.h
 ./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/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
@@ -2698,9 +2699,9 @@
 ./snmpusm.lo: ../include/net-snmp/library/scapi.h
 ./snmpusm.lo: ../include/net-snmp/library/snmp_secmod.h
 ./snmpusm.lo: ../include/net-snmp/library/snmpusm.h
-./snmpv3.lo: ../include/net-snmp/net-snmp-config.h 
-./snmpv3.lo: ../include/net-snmp/types.h 
-./snmpv3.lo:  ../include/net-snmp/library/oid.h
+./snmpv3.lo: ../include/net-snmp/net-snmp-config.h
+./snmpv3.lo: ../include/net-snmp/types.h
+./snmpv3.lo: ../include/net-snmp/library/oid.h
 ./snmpv3.lo: ../include/net-snmp/library/types.h
 ./snmpv3.lo: ../include/net-snmp/definitions.h
 ./snmpv3.lo: ../include/net-snmp/library/snmp_api.h
@@ -2709,7 +2710,7 @@
 ./snmpv3.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h
 ./snmpv3.lo: ../include/net-snmp/output_api.h
 ./snmpv3.lo: ../include/net-snmp/library/snmp_debug.h
-./snmpv3.lo: ../include/net-snmp/library/snmp_logging.h 
+./snmpv3.lo: ../include/net-snmp/library/snmp_logging.h
 ./snmpv3.lo: ../include/net-snmp/session_api.h
 ./snmpv3.lo: ../include/net-snmp/library/callback.h
 ./snmpv3.lo: ../include/net-snmp/library/snmp_transport.h
@@ -2723,6 +2724,7 @@
 ./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/ucd_compat.h
 ./snmpv3.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h
@@ -2738,7 +2740,7 @@
 ./snmpv3.lo: ../include/net-snmp/library/snmp_parse_args.h
 ./snmpv3.lo: ../include/net-snmp/library/snmp_enum.h
 ./snmpv3.lo: ../include/net-snmp/library/vacm.h
-./snmpv3.lo: ../include/net-snmp/utilities.h 
+./snmpv3.lo: ../include/net-snmp/utilities.h
 ./snmpv3.lo: ../include/net-snmp/library/system.h
 ./snmpv3.lo: ../include/net-snmp/library/tools.h
 ./snmpv3.lo: ../include/net-snmp/library/int64.h
@@ -2746,7 +2748,7 @@
 ./snmpv3.lo: ../include/net-snmp/library/snmp_alarm.h
 ./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/container.h
 ./snmpv3.lo: ../include/net-snmp/library/factory.h
 ./snmpv3.lo: ../include/net-snmp/library/container_binary_array.h
 ./snmpv3.lo: ../include/net-snmp/library/container_list_ssll.h
@@ -2763,11 +2765,11 @@
 ./snmpv3.lo: ../include/net-snmp/library/transform_oids.h
 ./snmp_version.lo: ../include/net-snmp/net-snmp-config.h
 ./snmp_version.lo: ../include/net-snmp/version.h
-./snprintf.lo: ../include/net-snmp/net-snmp-config.h 
-./strlcat.lo: ../include/net-snmp/net-snmp-config.h 
+./snprintf.lo: ../include/net-snmp/net-snmp-config.h
+./strlcat.lo: ../include/net-snmp/net-snmp-config.h
 ./strlcat.lo: ../include/net-snmp/library/system.h
-./strlcat.lo: ../include/net-snmp/types.h 
-./strlcat.lo:  ../include/net-snmp/library/oid.h
+./strlcat.lo: ../include/net-snmp/types.h
+./strlcat.lo: ../include/net-snmp/library/oid.h
 ./strlcat.lo: ../include/net-snmp/library/types.h
 ./strlcat.lo: ../include/net-snmp/definitions.h
 ./strlcat.lo: ../include/net-snmp/library/snmp_api.h
@@ -2791,6 +2793,7 @@
 ./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/ucd_compat.h
 ./strlcat.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h
@@ -2800,10 +2803,10 @@
 ./strlcat.lo: ../include/net-snmp/library/snmp_impl.h
 ./strlcat.lo: ../include/net-snmp/library/snmp.h
 ./strlcat.lo: ../include/net-snmp/library/snmp-tc.h
-./strlcpy.lo: ../include/net-snmp/net-snmp-config.h 
+./strlcpy.lo: ../include/net-snmp/net-snmp-config.h
 ./strlcpy.lo: ../include/net-snmp/library/system.h
-./strlcpy.lo: ../include/net-snmp/types.h 
-./strlcpy.lo:  ../include/net-snmp/library/oid.h
+./strlcpy.lo: ../include/net-snmp/types.h
+./strlcpy.lo: ../include/net-snmp/library/oid.h
 ./strlcpy.lo: ../include/net-snmp/library/types.h
 ./strlcpy.lo: ../include/net-snmp/definitions.h
 ./strlcpy.lo: ../include/net-snmp/library/snmp_api.h
@@ -2827,6 +2830,7 @@
 ./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/ucd_compat.h
 ./strlcpy.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h
@@ -2836,10 +2840,10 @@
 ./strlcpy.lo: ../include/net-snmp/library/snmp_impl.h
 ./strlcpy.lo: ../include/net-snmp/library/snmp.h
 ./strlcpy.lo: ../include/net-snmp/library/snmp-tc.h
-./strtok_r.lo: ../include/net-snmp/net-snmp-config.h 
+./strtok_r.lo: ../include/net-snmp/net-snmp-config.h
 ./strtok_r.lo: ../include/net-snmp/library/system.h
-./strtok_r.lo: ../include/net-snmp/types.h 
-./strtok_r.lo:  ../include/net-snmp/library/oid.h
+./strtok_r.lo: ../include/net-snmp/types.h
+./strtok_r.lo: ../include/net-snmp/library/oid.h
 ./strtok_r.lo: ../include/net-snmp/library/types.h
 ./strtok_r.lo: ../include/net-snmp/definitions.h
 ./strtok_r.lo: ../include/net-snmp/library/snmp_api.h
@@ -2863,6 +2867,7 @@
 ./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/ucd_compat.h
 ./strtok_r.lo: ../include/net-snmp/library/mib.h
@@ -2873,10 +2878,10 @@
 ./strtok_r.lo: ../include/net-snmp/library/snmp_impl.h
 ./strtok_r.lo: ../include/net-snmp/library/snmp.h
 ./strtok_r.lo: ../include/net-snmp/library/snmp-tc.h
-./strtol.lo: ../include/net-snmp/net-snmp-config.h 
-./strtoul.lo: ../include/net-snmp/net-snmp-config.h 
-./strtoull.lo: ../include/net-snmp/net-snmp-config.h 
-./strtoull.lo: ../include/net-snmp/types.h 
+./strtol.lo: ../include/net-snmp/net-snmp-config.h
+./strtoul.lo: ../include/net-snmp/net-snmp-config.h
+./strtoull.lo: ../include/net-snmp/net-snmp-config.h
+./strtoull.lo: ../include/net-snmp/types.h
 ./strtoull.lo: ../include/net-snmp/library/oid.h
 ./strtoull.lo: ../include/net-snmp/library/types.h
 ./strtoull.lo: ../include/net-snmp/definitions.h
@@ -2901,6 +2906,7 @@
 ./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/ucd_compat.h
 ./strtoull.lo: ../include/net-snmp/library/mib.h
@@ -2913,9 +2919,9 @@
 ./strtoull.lo: ../include/net-snmp/library/snmp-tc.h
 ./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/net-snmp-features.h
+./system.lo: ../include/net-snmp/types.h
+./system.lo: ../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
@@ -2924,7 +2930,7 @@
 ./system.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h
 ./system.lo: ../include/net-snmp/output_api.h
 ./system.lo: ../include/net-snmp/library/snmp_debug.h
-./system.lo: ../include/net-snmp/library/snmp_logging.h 
+./system.lo: ../include/net-snmp/library/snmp_logging.h
 ./system.lo: ../include/net-snmp/session_api.h
 ./system.lo: ../include/net-snmp/library/callback.h
 ./system.lo: ../include/net-snmp/library/snmp_transport.h
@@ -2938,6 +2944,7 @@
 ./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/ucd_compat.h
 ./system.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h
@@ -2946,7 +2953,7 @@
 ./system.lo: ../include/net-snmp/library/snmp_impl.h
 ./system.lo: ../include/net-snmp/library/snmp.h
 ./system.lo: ../include/net-snmp/library/snmp-tc.h
-./system.lo: ../include/net-snmp/utilities.h 
+./system.lo: ../include/net-snmp/utilities.h
 ./system.lo: ../include/net-snmp/library/system.h
 ./system.lo: ../include/net-snmp/library/tools.h
 ./system.lo: ../include/net-snmp/library/int64.h
@@ -2954,7 +2961,7 @@
 ./system.lo: ../include/net-snmp/library/snmp_alarm.h
 ./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/container.h
 ./system.lo: ../include/net-snmp/library/factory.h
 ./system.lo: ../include/net-snmp/library/container_binary_array.h
 ./system.lo: ../include/net-snmp/library/container_list_ssll.h
@@ -2970,9 +2977,9 @@
 ./system.lo: ../include/net-snmp/library/vacm.h inet_ntop.h
 ./text_utils.lo: ../include/net-snmp/net-snmp-config.h
 ./text_utils.lo: ../include/net-snmp/net-snmp-features.h
-./text_utils.lo: ../include/net-snmp/net-snmp-includes.h 
-./text_utils.lo:  ../include/net-snmp/definitions.h
-./text_utils.lo: ../include/net-snmp/types.h 
+./text_utils.lo: ../include/net-snmp/net-snmp-includes.h
+./text_utils.lo: ../include/net-snmp/definitions.h
+./text_utils.lo: ../include/net-snmp/types.h
 ./text_utils.lo: ../include/net-snmp/library/oid.h
 ./text_utils.lo: ../include/net-snmp/library/types.h
 ./text_utils.lo: ../include/net-snmp/library/snmp_api.h
@@ -2996,6 +3003,7 @@
 ./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/ucd_compat.h
 ./text_utils.lo: ../include/net-snmp/library/mib.h
@@ -3006,7 +3014,7 @@
 ./text_utils.lo: ../include/net-snmp/library/snmp.h
 ./text_utils.lo: ../include/net-snmp/library/snmp-tc.h
 ./text_utils.lo: ../include/net-snmp/library/getopt.h
-./text_utils.lo: ../include/net-snmp/utilities.h 
+./text_utils.lo: ../include/net-snmp/utilities.h
 ./text_utils.lo: ../include/net-snmp/library/system.h
 ./text_utils.lo: ../include/net-snmp/library/tools.h
 ./text_utils.lo: ../include/net-snmp/library/int64.h
@@ -3037,12 +3045,12 @@
 ./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/snmpusm.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
-./tools.lo: ../include/net-snmp/net-snmp-features.h 
-./tools.lo:  ../include/net-snmp/types.h
+./tools.lo: ../include/net-snmp/net-snmp-features.h
+./tools.lo: ../include/net-snmp/types.h
 ./tools.lo: ../include/net-snmp/library/oid.h
 ./tools.lo: ../include/net-snmp/library/types.h
 ./tools.lo: ../include/net-snmp/definitions.h
@@ -3052,7 +3060,7 @@
 ./tools.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h
 ./tools.lo: ../include/net-snmp/output_api.h
 ./tools.lo: ../include/net-snmp/library/snmp_debug.h
-./tools.lo: ../include/net-snmp/library/snmp_logging.h 
+./tools.lo: ../include/net-snmp/library/snmp_logging.h
 ./tools.lo: ../include/net-snmp/session_api.h
 ./tools.lo: ../include/net-snmp/library/callback.h
 ./tools.lo: ../include/net-snmp/library/snmp_transport.h
@@ -3066,6 +3074,7 @@
 ./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/ucd_compat.h
 ./tools.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h
@@ -3074,7 +3083,7 @@
 ./tools.lo: ../include/net-snmp/library/snmp_impl.h
 ./tools.lo: ../include/net-snmp/library/snmp.h
 ./tools.lo: ../include/net-snmp/library/snmp-tc.h
-./tools.lo: ../include/net-snmp/utilities.h 
+./tools.lo: ../include/net-snmp/utilities.h
 ./tools.lo: ../include/net-snmp/library/system.h
 ./tools.lo: ../include/net-snmp/library/tools.h
 ./tools.lo: ../include/net-snmp/library/int64.h
@@ -3082,7 +3091,7 @@
 ./tools.lo: ../include/net-snmp/library/snmp_alarm.h
 ./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/container.h
 ./tools.lo: ../include/net-snmp/library/factory.h
 ./tools.lo: ../include/net-snmp/library/container_binary_array.h
 ./tools.lo: ../include/net-snmp/library/container_list_ssll.h
@@ -3092,7 +3101,7 @@
 ./tools.lo: ../include/net-snmp/version.h ../include/net-snmp/library/scapi.h
 ./ucd_compat.lo: ../include/net-snmp/net-snmp-config.h
 ./ucd_compat.lo: ../include/net-snmp/net-snmp-features.h
-./ucd_compat.lo: ../include/net-snmp/types.h 
+./ucd_compat.lo: ../include/net-snmp/types.h
 ./ucd_compat.lo: ../include/net-snmp/library/oid.h
 ./ucd_compat.lo: ../include/net-snmp/library/types.h
 ./ucd_compat.lo: ../include/net-snmp/definitions.h
@@ -3117,6 +3126,7 @@
 ./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/ucd_compat.h
 ./ucd_compat.lo: ../include/net-snmp/library/mib.h
@@ -3132,8 +3142,8 @@
 ./ucd_compat.lo: ../include/net-snmp/library/snmp_parse_args.h
 ./ucd_compat.lo: ../include/net-snmp/library/snmp_enum.h
 ./ucd_compat.lo: ../include/net-snmp/library/vacm.h
-./vacm.lo: ../include/net-snmp/net-snmp-config.h 
-./vacm.lo:  ../include/net-snmp/types.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/library/types.h
 ./vacm.lo: ../include/net-snmp/definitions.h
@@ -3143,22 +3153,23 @@
 ./vacm.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h
 ./vacm.lo: ../include/net-snmp/output_api.h
 ./vacm.lo: ../include/net-snmp/library/snmp_debug.h
-./vacm.lo: ../include/net-snmp/library/snmp_logging.h 
+./vacm.lo: ../include/net-snmp/library/snmp_logging.h
 ./vacm.lo: ../include/net-snmp/session_api.h
 ./vacm.lo: ../include/net-snmp/library/callback.h
 ./vacm.lo: ../include/net-snmp/library/snmp_transport.h
 ./vacm.lo: ../include/net-snmp/library/snmp_service.h
 ./vacm.lo: ../include/net-snmp/library/snmpCallbackDomain.h
-./vacm.lo: ../include/net-snmp/library/snmpUnixDomain.h 
-./vacm.lo:  ../include/net-snmp/library/snmpUDPDomain.h
+./vacm.lo: ../include/net-snmp/library/snmpUnixDomain.h
+./vacm.lo: ../include/net-snmp/library/snmpUDPDomain.h
 ./vacm.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h
 ./vacm.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h
 ./vacm.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h
 ./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/ucd_compat.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
 ./vacm.lo: ../include/net-snmp/library/oid_stash.h
@@ -3180,20 +3191,20 @@
 ./openssl/openssl_cbc_enc.lo: ./openssl/openssl_ncbc_enc.c
 ./openssl/openssl_cbc_enc.lo: ./openssl/openssl_des_local.h
 ./openssl/openssl_cbc_enc.lo: ../include/net-snmp/library/openssl_des.h
-./openssl/openssl_cfb128.lo: ./openssl/openssl_modes.h 
+./openssl/openssl_cfb128.lo: ./openssl/openssl_modes.h
 ./openssl/openssl_des_enc.lo: ./openssl/openssl_des_local.h
 ./openssl/openssl_des_enc.lo: ../include/net-snmp/library/openssl_des.h
-./openssl/openssl_des_enc.lo:  ./openssl/openssl_spr.h
+./openssl/openssl_des_enc.lo: ./openssl/openssl_spr.h
 ./openssl/openssl_des_enc.lo: ./openssl/openssl_ncbc_enc.c
-./openssl/openssl_md5.lo: ./openssl/openssl_md5_local.h 
+./openssl/openssl_md5.lo: ./openssl/openssl_md5_local.h
 ./openssl/openssl_md5.lo: ../include/net-snmp/openssl_md5.h
 ./openssl/openssl_md5.lo: ./openssl/openssl_md32_common.h
 ./openssl/openssl_ncbc_enc.lo: ./openssl/openssl_des_local.h
 ./openssl/openssl_ncbc_enc.lo: ../include/net-snmp/library/openssl_des.h
 ./openssl/openssl_set_key.lo: ./openssl/openssl_des_local.h
 ./openssl/openssl_set_key.lo: ../include/net-snmp/library/openssl_des.h
-./openssl/openssl_sha1.lo: openssl/openssl_sha_local.h 
-./openssl/openssl_sha1.lo:  openssl/openssl_sha.h
+./openssl/openssl_sha1.lo: openssl/openssl_sha_local.h
+./openssl/openssl_sha1.lo: openssl/openssl_sha.h
 ./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
@@ -3222,6 +3233,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
@@ -3265,6 +3277,7 @@
 ./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/ucd_compat.h
 ./transports/snmpAliasDomain.lo: ../include/net-snmp/library/mib.h
@@ -3336,6 +3349,7 @@
 ./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/ucd_compat.h
 ./transports/snmpCallbackDomain.lo: ../include/net-snmp/library/mib.h
@@ -3395,6 +3409,7 @@
 ./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpTCPDomain.h
 ./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h
+./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpIPXDomain.h
 ./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/ucd_compat.h
 ./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/mib.h
@@ -3435,6 +3450,7 @@
 ./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/ucd_compat.h
 ./transports/snmpIPXDomain.lo: ../include/net-snmp/library/mib.h
 ./transports/snmpIPXDomain.lo: ../include/net-snmp/mib_api.h
@@ -3477,6 +3493,7 @@
 ./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpTCPDomain.h
 ./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h
 ./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h
+./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h
 ./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpIPXDomain.h
 ./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/ucd_compat.h
 ./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/mib.h
@@ -3495,7 +3512,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/snmpSSHDomain.h
-./transports/snmpSSHDomain.lo:  ../include/net-snmp/types.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
 ./transports/snmpSSHDomain.lo: ../include/net-snmp/definitions.h
@@ -3520,6 +3537,7 @@
 ./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/ucd_compat.h
 ./transports/snmpSSHDomain.lo: ../include/net-snmp/library/mib.h
@@ -3565,6 +3583,7 @@
 ./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/ucd_compat.h
 ./transports/snmpSTDDomain.lo: ../include/net-snmp/library/mib.h
@@ -3602,6 +3621,7 @@
 ./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/ucd_compat.h
 ./transports/snmpTCPBaseDomain.lo: ../include/net-snmp/library/mib.h
@@ -3639,6 +3659,7 @@
 ./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/ucd_compat.h
 ./transports/snmpTCPDomain.lo: ../include/net-snmp/library/mib.h
@@ -3682,6 +3703,7 @@
 ./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/ucd_compat.h
 ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/mib.h
@@ -3732,6 +3754,7 @@
 ./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/ucd_compat.h
 ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/mib.h
@@ -3782,6 +3805,7 @@
 ./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/ucd_compat.h
 ./transports/snmpUDPBaseDomain.lo: ../include/net-snmp/library/mib.h
@@ -3823,6 +3847,7 @@
 ./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/ucd_compat.h
 ./transports/snmpUDPDomain.lo: ../include/net-snmp/library/mib.h
@@ -3869,6 +3894,7 @@
 ./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/ucd_compat.h
 ./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/library/mib.h
@@ -3908,6 +3934,8 @@
 ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h
 ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h
 ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/snmpTCPDomain.h
+./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h
+./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h
 ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/snmpIPXDomain.h
 ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/ucd_compat.h
 ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/mib.h
@@ -3918,7 +3946,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/snmpUnixDomain.lo: ../include/net-snmp/net-snmp-config.h
 ./transports/snmpUnixDomain.lo: ../include/net-snmp/net-snmp-features.h
@@ -3947,6 +3974,7 @@
 ./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/ucd_compat.h
 ./transports/snmpUnixDomain.lo: ../include/net-snmp/library/mib.h
diff --git a/snmplib/asn1.c b/snmplib/asn1.c
index e4da6be..bea8d0b 100644
--- a/snmplib/asn1.c
+++ b/snmplib/asn1.c
@@ -507,7 +507,7 @@ asn_parse_int(u_char * data,
         (errpre, bufp, data, asn_length, *datalength))
         return NULL;
 
-    if ((size_t) asn_length > intsize) {
+    if ((size_t) asn_length > intsize || (int) asn_length == 0) {
         _asn_length_err(errpre, (size_t) asn_length, intsize);
         return NULL;
     }
@@ -579,7 +579,7 @@ asn_parse_unsigned_int(u_char * data,
         (errpre, bufp, data, asn_length, *datalength))
         return NULL;
 
-    if ((asn_length > (intsize + 1)) ||
+    if ((asn_length > (intsize + 1)) || ((int) asn_length == 0) ||
         ((asn_length == intsize + 1) && *bufp != 0x00)) {
         _asn_length_err(errpre, (size_t) asn_length, intsize);
         return NULL;
@@ -1831,7 +1831,7 @@ asn_parse_unsigned_int64(u_char * data,
     *type = *bufp++;
     if (*type != ASN_COUNTER64
 #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES
-            && *type != ASN_OPAQUE_COUNTER64 && *type != ASN_OPAQUE_U64
+            && *type != ASN_OPAQUE
 #endif
             ) {
         _asn_type_err(errpre, *type);
@@ -3463,9 +3463,10 @@ asn_realloc_rbuild_signed_int64(u_char ** pkt, size_t * pkt_len,
     /*
      * ASN.1 integer ::= 0x02 asnlength byte {byte}*
      */
-    register long low = cp->low, high = cp->high;
-    size_t          intsize, start_offset = *offset;
-    int             count, testvalue = (high & 0x80000000) ? -1 : 0;
+    register int32_t low = cp->low, high = cp->high;
+    size_t           intsize, start_offset = *offset;
+    int              count;
+    int32_t          testvalue = (high & 0x80000000) ? -1 : 0;
 
     if (countersize != sizeof(struct counter64)) {
         _asn_size_err("build uint64", countersize,
diff --git a/snmplib/container_binary_array.c b/snmplib/container_binary_array.c
index 249a3a9..0f5cf62 100644
--- a/snmplib/container_binary_array.c
+++ b/snmplib/container_binary_array.c
@@ -284,6 +284,24 @@ netsnmp_binary_array_get(netsnmp_container *c, const void *key, int exact)
     if (key) {
         if ((index = binary_search(key, c, exact)) == -1)
             return NULL;
+        if (!exact &&
+            c->flags & CONTAINER_KEY_ALLOW_DUPLICATES) {
+            int result;
+
+            /*
+             * If duplicates are allowed, we have to be extra
+             * sure that we didn't just increment to a duplicate,
+             * thus causing a getnext loop.
+             */
+            result = c->compare(t->data[index], key);
+            while (result == 0) {
+		DEBUGMSGTL(("container","skipping duplicate key in %s\n",
+					    c->container_name));
+                if (++index == t->count)
+                   return NULL;
+                result = c->compare(t->data[index], key);
+            }
+        }
     }
 
     return t->data[index];
diff --git a/snmplib/dir_utils.c b/snmplib/dir_utils.c
index cbb6d00..d35e700 100644
--- a/snmplib/dir_utils.c
+++ b/snmplib/dir_utils.c
@@ -237,10 +237,13 @@ _insert_nsfile( netsnmp_container *c, const char *name, struct stat *stats,
         }
     
         /** use stats from earlier if we have them */
-        if (stats)
+        if (stats) {
             memcpy(ns_file->stats, stats, sizeof(*stats));
-        else
-            stat(ns_file->name, ns_file->stats);
+        } else if (stat(ns_file->name, ns_file->stats) < 0) {
+            snmp_log(LOG_ERR, "stat() failed for ns_file\n");
+            netsnmp_file_release(ns_file);
+            return -1;
+        }
     }
 
     rc = CONTAINER_INSERT(c, ns_file);
diff --git a/snmplib/inet_ntop.c b/snmplib/inet_ntop.c
index 62dd36d..05bafbe 100644
--- a/snmplib/inet_ntop.c
+++ b/snmplib/inet_ntop.c
@@ -72,7 +72,7 @@ static const char *inet_ntop6(const u_char *src, char *dst, size_t size);
  *	Paul Vixie, 1996.
  */
 const char *
-inet_ntop(int af, const void *src, char *dst, size_t size)
+netsnmp_inet_ntop(int af, const void *src, char *dst, size_t size)
 {
 
 	switch (af) {
diff --git a/snmplib/inet_ntop.h b/snmplib/inet_ntop.h
index a73ba78..011d8a6 100644
--- a/snmplib/inet_ntop.h
+++ b/snmplib/inet_ntop.h
@@ -2,9 +2,11 @@
 #define _INET_NTOP_H
 
 #include <net-snmp/net-snmp-config.h>
+#include <net-snmp/types.h>
 
 #ifndef HAVE_INET_NTOP
-const char     *inet_ntop(int af, const void *src, char *dst, size_t size);
+const char     *netsnmp_inet_ntop(int af, const void *src, char *dst, size_t size);
+#define inet_ntop netsnmp_inet_ntop
 #endif /*HAVE_INET_NTOP */
 
 #endif /*_INET_NTOP_H*/
diff --git a/snmplib/inet_pton.c b/snmplib/inet_pton.c
index 0ac1d60..47fe3ec 100644
--- a/snmplib/inet_pton.c
+++ b/snmplib/inet_pton.c
@@ -74,7 +74,7 @@ static int	inet_pton6(const char *src, u_char *dst);
  *	Paul Vixie, 1996.
  */
 int
-inet_pton(int af, const char *src, void *dst)
+netsnmp_inet_pton(int af, const char *src, void *dst)
 {
 
 	switch (af) {
diff --git a/snmplib/inet_pton.h b/snmplib/inet_pton.h
index c33f695..7696671 100644
--- a/snmplib/inet_pton.h
+++ b/snmplib/inet_pton.h
@@ -2,9 +2,11 @@
 #define _INET_PTON_H
 
 #include <net-snmp/net-snmp-config.h>
+#include <net-snmp/types.h>
 
 #ifndef HAVE_INET_PTON
-int             inet_pton(int af, const char *src, void *dst);
+int             netsnmp_inet_pton(int af, const char *src, void *dst);
+#define inet_pton netsnmp_inet_pton
 #endif /*HAVE_INET_PTON */
 
 #endif /*_INET_PTON_H*/
diff --git a/snmplib/keytools.c b/snmplib/keytools.c
index 0faa0de..0ccb3a6 100644
--- a/snmplib/keytools.c
+++ b/snmplib/keytools.c
@@ -153,26 +153,31 @@ generate_Ku(const oid * hashtype, u_int hashtype_len,
     ctx = EVP_MD_CTX_create();
 #else
     ctx = malloc(sizeof(*ctx));
-    EVP_MD_CTX_init(ctx);
+    if (!EVP_MD_CTX_init(ctx))
+        return SNMPERR_GENERR;
 #endif
 #ifndef NETSNMP_DISABLE_MD5
-    if (ISTRANSFORM(hashtype, HMACMD5Auth))
-        EVP_DigestInit(ctx, EVP_md5());
-    else
+    if (ISTRANSFORM(hashtype, HMACMD5Auth)) {
+        if (!EVP_DigestInit(ctx, EVP_md5()))
+            return SNMPERR_GENERR;
+    } else
 #endif
-        if (ISTRANSFORM(hashtype, HMACSHA1Auth))
-        EVP_DigestInit(ctx, EVP_sha1());
-    else
+        if (ISTRANSFORM(hashtype, HMACSHA1Auth)) {
+            if (!EVP_DigestInit(ctx, EVP_sha1()))
+                return SNMPERR_GENERR;
+        } else
         QUITFUN(SNMPERR_GENERR, generate_Ku_quit);
 #elif NETSNMP_USE_INTERNAL_CRYPTO
 #ifndef NETSNMP_DISABLE_MD5
     if (ISTRANSFORM(hashtype, HMACMD5Auth)) {
-        MD5_Init(&cmd5);
+        if (!MD5_Init(&cmd5))
+            return SNMPERR_GENERR;
         cryptotype = TYPE_MD5;
     } else
 #endif
            if (ISTRANSFORM(hashtype, HMACSHA1Auth)) {
-        SHA1_Init(&csha1);
+        if (!SHA1_Init(&csha1))
+            return SNMPERR_GENERR;
         cryptotype = TYPE_SHA1;
     } else {
         return (SNMPERR_GENERR);
diff --git a/snmplib/large_fd_set.c b/snmplib/large_fd_set.c
index 32f57b3..88dd481 100644
--- a/snmplib/large_fd_set.c
+++ b/snmplib/large_fd_set.c
@@ -21,6 +21,10 @@
 
 #if !defined(cygwin) && defined(HAVE_WINSOCK_H)
 
+#define LFD_SET(n, p)    FD_SET(n, p)
+#define LFD_CLR(n, p)    FD_CLR(n, p)
+#define LFD_ISSET(n, p)  FD_ISSET(n, p)
+
 void
 netsnmp_large_fd_setfd(SOCKET fd, netsnmp_large_fd_set * fdset)
 {
@@ -79,6 +83,14 @@ netsnmp_large_fd_is_set(SOCKET fd, netsnmp_large_fd_set * fdset)
 
 #else
 
+/*
+ * Recent versions of glibc trigger abort() if FD_SET(), FD_CLR() or
+ * FD_ISSET() is invoked with n >= FD_SETSIZE. Hence these replacement macros.
+ */
+#define LFD_SET(n, p)    ((p)->fds_bits[(n)/NFDBITS] |=  (1ULL << ((n) % NFDBITS)))
+#define LFD_CLR(n, p)    ((p)->fds_bits[(n)/NFDBITS] &= ~(1ULL << ((n) % NFDBITS)))
+#define LFD_ISSET(n, p)  ((p)->fds_bits[(n)/NFDBITS] &   (1ULL << ((n) % NFDBITS)))
+
 void
 netsnmp_large_fd_setfd(int fd, netsnmp_large_fd_set * fdset)
 {
@@ -87,7 +99,7 @@ netsnmp_large_fd_setfd(int fd, netsnmp_large_fd_set * fdset)
     while (fd >= (int)fdset->lfs_setsize)
         netsnmp_large_fd_set_resize(fdset, 2 * (fdset->lfs_setsize + 1));
 
-    FD_SET(fd, fdset->lfs_setptr);
+    LFD_SET(fd, fdset->lfs_setptr);
 }
 
 void
@@ -96,7 +108,7 @@ netsnmp_large_fd_clr(int fd, netsnmp_large_fd_set * fdset)
     netsnmp_assert(fd >= 0);
 
     if ((unsigned)fd < fdset->lfs_setsize)
-        FD_CLR(fd, fdset->lfs_setptr);
+        LFD_CLR(fd, fdset->lfs_setptr);
 }
 
 int
@@ -104,7 +116,8 @@ netsnmp_large_fd_is_set(int fd, netsnmp_large_fd_set * fdset)
 {
     netsnmp_assert(fd >= 0);
 
-    return (unsigned)fd < fdset->lfs_setsize && FD_ISSET(fd, fdset->lfs_setptr);
+    return ((unsigned)fd < fdset->lfs_setsize &&
+            LFD_ISSET(fd, fdset->lfs_setptr));
 }
 
 #endif
@@ -174,15 +187,18 @@ netsnmp_large_fd_set_resize(netsnmp_large_fd_set * fdset, int setsize)
     }
 
 #if defined(cygwin) || !defined(HAVE_WINSOCK_H)
-    {
+    /*
+     * Unix: when enlarging, clear the file descriptors defined in the
+     * resized *fdset but that were not defined in the original *fdset.
+     */
+    if ( fdset->lfs_setsize == 0 && setsize == FD_SETSIZE ) {
+        /* In this case we can use the OS's FD_ZERO */
+        FD_ZERO(fdset->lfs_setptr);
+    } else {
         int             i;
 
-        /*
-         * Unix: when enlarging, clear the file descriptors defined in the
-         * resized *fdset but that were not defined in the original *fdset.
-         */
         for (i = fdset->lfs_setsize; i < setsize; i++)
-            FD_CLR(i, fdset->lfs_setptr);
+            LFD_CLR(i, fdset->lfs_setptr);
     }
 #endif
 
diff --git a/snmplib/lcd_time.c b/snmplib/lcd_time.c
index a69c072..2bfa549 100644
--- a/snmplib/lcd_time.c
+++ b/snmplib/lcd_time.c
@@ -505,6 +505,12 @@ hash_engineID(const u_char * engineID, u_int engineID_len)
     rval = sc_hash(usmHMACMD5AuthProtocol,
                    sizeof(usmHMACMD5AuthProtocol) / sizeof(oid),
                    engineID, engineID_len, buf, &buf_len);
+    if (rval == SNMPERR_SC_NOT_CONFIGURED) {
+        /* fall back to sha1 */
+        rval = sc_hash(usmHMACSHA1AuthProtocol,
+                   sizeof(usmHMACSHA1AuthProtocol) / sizeof(oid),
+                   engineID, engineID_len, buf, &buf_len);
+    }
 #else
     rval = sc_hash(usmHMACSHA1AuthProtocol,
                    sizeof(usmHMACSHA1AuthProtocol) / sizeof(oid),
diff --git a/snmplib/md5.c b/snmplib/md5.c
index fbfd43f..1ce0727 100644
--- a/snmplib/md5.c
+++ b/snmplib/md5.c
@@ -469,7 +469,7 @@ MDsign(const u_char * data, size_t len, u_char * mac, size_t maclen,
          * this relies on the ability to use integer math and thus we
          * must rely on data that aligns on 32-bit-word-boundries 
          */
-        memdup(&newdata, data, len);
+        newdata = netsnmp_memdup(data, len);
         cp = newdata;
     } else {
         cp = data;
diff --git a/snmplib/mib.c b/snmplib/mib.c
index cbabf25..e790878 100644
--- a/snmplib/mib.c
+++ b/snmplib/mib.c
@@ -464,17 +464,16 @@ sprint_realloc_octet_string(u_char ** buf, size_t * buf_len,
     u_char         *cp;
     int             output_format, cnt;
 
-    if ((var->type != ASN_OCTET_STR) && 
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        const char      str[] = "Wrong Type (should be OCTET STRING): ";
-        if (snmp_cstrcat
-            (buf, buf_len, out_len, allow_realloc, str)) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_OCTET_STR) {
+        if (!netsnmp_ds_get_boolean(
+                    NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            const char      str[] = "Wrong Type (should be OCTET STRING): ";
+            if (!snmp_cstrcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
 
@@ -742,16 +741,16 @@ sprint_realloc_float(u_char ** buf, size_t * buf_len,
                      const struct enum_list *enums,
                      const char *hint, const char *units)
 {
-    if ((var->type != ASN_OPAQUE_FLOAT) &&
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        if (snmp_cstrcat(buf, buf_len, out_len, allow_realloc, 
-                         "Wrong Type (should be Float): ")) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_OPAQUE_FLOAT) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be Float): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
     if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -812,17 +811,16 @@ sprint_realloc_double(u_char ** buf, size_t * buf_len,
                       const struct enum_list *enums,
                       const char *hint, const char *units)
 {
-    if ((var->type != ASN_OPAQUE_DOUBLE) && 
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        if (snmp_cstrcat
-            (buf, buf_len, out_len, allow_realloc, 
-             "Wrong Type (should be Double): ")) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_OPAQUE_DOUBLE) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be Double): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
     if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -887,20 +885,21 @@ sprint_realloc_counter64(u_char ** buf, size_t * buf_len, size_t * out_len,
 {
     char            a64buf[I64CHARSZ + 1];
 
-    if ((var->type != ASN_COUNTER64
+    if (var->type != ASN_COUNTER64
 #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES
         && var->type != ASN_OPAQUE_COUNTER64
         && var->type != ASN_OPAQUE_I64 && var->type != ASN_OPAQUE_U64
 #endif
-        ) && (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        if (snmp_cstrcat(buf, buf_len, out_len, allow_realloc, 
-                        "Wrong Type (should be Counter64): ")) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+        ) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be Counter64): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
     if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -988,23 +987,25 @@ sprint_realloc_opaque(u_char ** buf, size_t * buf_len,
                       const struct enum_list *enums,
                       const char *hint, const char *units)
 {
-    if ((var->type != ASN_OPAQUE
+    if (var->type != ASN_OPAQUE
 #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES
         && var->type != ASN_OPAQUE_COUNTER64
         && var->type != ASN_OPAQUE_U64
         && var->type != ASN_OPAQUE_I64
         && var->type != ASN_OPAQUE_FLOAT && var->type != ASN_OPAQUE_DOUBLE
 #endif                          /* NETSNMP_WITH_OPAQUE_SPECIAL_TYPES */
-        ) && (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        if (snmp_cstrcat(buf, buf_len, out_len, allow_realloc, 
-                         "Wrong Type (should be Opaque): ")) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+        ) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be Opaque): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
+
 #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES
     switch (var->type) {
     case ASN_OPAQUE_COUNTER64:
@@ -1080,17 +1081,16 @@ sprint_realloc_object_identifier(u_char ** buf, size_t * buf_len,
 {
     int             buf_overflow = 0;
 
-    if ((var->type != ASN_OBJECT_ID) &&
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        u_char          str[] =
-            "Wrong Type (should be OBJECT IDENTIFIER): ";
-        if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_OBJECT_ID) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be OBJECT IDENTIFIER): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
     if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -1150,16 +1150,16 @@ sprint_realloc_timeticks(u_char ** buf, size_t * buf_len, size_t * out_len,
 {
     char            timebuf[40];
 
-    if ((var->type != ASN_TIMETICKS) && 
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        u_char          str[] = "Wrong Type (should be Timeticks): ";
-        if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_TIMETICKS) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be Timeticks): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
     if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_NUMERIC_TIMETICKS)) {
@@ -1207,7 +1207,7 @@ sprint_realloc_timeticks(u_char ** buf, size_t * buf_len, size_t * out_len,
  * @param allow_realloc if not zero reallocate the buffer to fit the 
  *                      needed size.
  * @param val      The variable to encode.
- * @param decimaltype The enumeration ff this variable is enumerated. may be NULL.
+ * @param decimaltype 'd' or 'u' depending on integer type
  * @param hint     Contents of the DISPLAY-HINT clause of the MIB.
  *                 See RFC 1903 Section 3.1 for details. may _NOT_ be NULL.
  * @param units    Contents of the UNITS clause of the MIB. may be NULL.
@@ -1222,19 +1222,19 @@ sprint_realloc_hinted_integer(u_char ** buf, size_t * buf_len,
                               const char *hint, const char *units)
 {
     char            fmt[10] = "%l@", tmp[256];
-    int             shift, len;
-
-    if (hint[1] == '-') {
-        shift = atoi(hint + 2);
-    } else {
-        shift = 0;
-    }
+    int             shift = 0, len, negative = 0;
 
     if (hint[0] == 'd') {
         /*
          * We might *actually* want a 'u' here.  
          */
+        if (hint[1] == '-')
+            shift = atoi(hint + 2);
         fmt[2] = decimaltype;
+        if (val < 0) {
+            negative = 1;
+            val = -val;
+        }
     } else {
         /*
          * DISPLAY-HINT character is 'b', 'o', or 'x'.  
@@ -1242,7 +1242,18 @@ sprint_realloc_hinted_integer(u_char ** buf, size_t * buf_len,
         fmt[2] = hint[0];
     }
 
-    sprintf(tmp, fmt, val);
+    if (hint[0] == 'b') {
+	unsigned long int bit = 0x80000000LU;
+	char *bp = tmp;
+	while (bit) {
+	    *bp++ = val & bit ? '1' : '0';
+	    bit >>= 1;
+	}
+	*bp = 0;
+    }
+    else
+	sprintf(tmp, fmt, val);
+
     if (shift != 0) {
         len = strlen(tmp);
         if (shift <= len) {
@@ -1265,6 +1276,14 @@ sprint_realloc_hinted_integer(u_char ** buf, size_t * buf_len,
             tmp[0] = '.';
         }
     }
+    if (negative) {
+        len = strlen(tmp)+1;
+        while (len) {
+            tmp[len] = tmp[len-1];
+            len--;
+        }
+        tmp[0] = '-';
+    }
     return snmp_strcat(buf, buf_len, out_len, allow_realloc, (u_char *)tmp);
 }
 
@@ -1298,17 +1317,18 @@ sprint_realloc_integer(u_char ** buf, size_t * buf_len, size_t * out_len,
 {
     char           *enum_string = NULL;
 
-    if ((var->type != ASN_INTEGER) && 
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        u_char          str[] = "Wrong Type (should be INTEGER): ";
-        if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_INTEGER) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be INTEGER): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
+
     for (; enums; enums = enums->next) {
         if (enums->value == *var->val.integer) {
             enum_string = enums->label;
@@ -1401,16 +1421,16 @@ sprint_realloc_uinteger(u_char ** buf, size_t * buf_len, size_t * out_len,
 {
     char           *enum_string = NULL;
 
-    if ((var->type != ASN_UINTEGER) && 
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        u_char          str[] = "Wrong Type (should be UInteger32): ";
-        if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_UINTEGER) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be UInteger32): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
     for (; enums; enums = enums->next) {
@@ -1498,17 +1518,16 @@ sprint_realloc_gauge(u_char ** buf, size_t * buf_len, size_t * out_len,
 {
     char            tmp[32];
 
-    if ((var->type != ASN_GAUGE) && 
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        u_char          str[] =
-            "Wrong Type (should be Gauge32 or Unsigned32): ";
-        if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_GAUGE) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be Gauge32 or Unsigned32): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
     if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -1571,16 +1590,16 @@ sprint_realloc_counter(u_char ** buf, size_t * buf_len, size_t * out_len,
 {
     char            tmp[32];
 
-    if ((var->type != ASN_COUNTER) && 
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        u_char          str[] = "Wrong Type (should be Counter32): ";
-        if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_COUNTER) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be Counter32): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
     if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -1634,16 +1653,16 @@ sprint_realloc_networkaddress(u_char ** buf, size_t * buf_len,
 {
     size_t          i;
 
-    if ((var->type != ASN_IPADDRESS) && 
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        u_char          str[] = "Wrong Type (should be NetworkAddress): ";
-        if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_IPADDRESS) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be NetworkAddress): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
     if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -1700,16 +1719,16 @@ sprint_realloc_ipaddress(u_char ** buf, size_t * buf_len, size_t * out_len,
 {
     u_char         *ip = var->val.string;
 
-    if ((var->type != ASN_IPADDRESS) && 
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        u_char          str[] = "Wrong Type (should be IpAddress): ";
-        if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_IPADDRESS) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be IpAddress): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
     if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -1758,20 +1777,21 @@ sprint_realloc_null(u_char ** buf, size_t * buf_len, size_t * out_len,
                     const struct enum_list *enums,
                     const char *hint, const char *units)
 {
-    if ((var->type != ASN_NULL) && 
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        u_char          str[] = "Wrong Type (should be NULL): ";
-        if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    u_char          str[] = "NULL";
+
+    if (var->type != ASN_NULL) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be NULL): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
-    } else {
-        u_char          str[] = "NULL";
-        return snmp_strcat(buf, buf_len, out_len, allow_realloc, str);
     }
+
+    return snmp_strcat(buf, buf_len, out_len, allow_realloc, str);
 }
 
 
@@ -1806,16 +1826,16 @@ sprint_realloc_bitstring(u_char ** buf, size_t * buf_len, size_t * out_len,
     u_char         *cp;
     char           *enum_string;
 
-    if ((var->type != ASN_BIT_STR && var->type != ASN_OCTET_STR) &&
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        u_char          str[] = "Wrong Type (should be BITS): ";
-        if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_BIT_STR && var->type != ASN_OCTET_STR) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be BITS): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
     if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -1890,16 +1910,16 @@ sprint_realloc_nsapaddress(u_char ** buf, size_t * buf_len,
                            const struct enum_list *enums, const char *hint,
                            const char *units)
 {
-    if ((var->type != ASN_NSAP) && 
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        u_char          str[] = "Wrong Type (should be NsapAddress): ";
-        if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_NSAP) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be NsapAddress): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
     if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -2832,7 +2852,7 @@ netsnmp_mibindex_lookup( const char *dirname )
 int
 _mibindex_add( const char *dirname, int i )
 {
-    const int old_mibindex = _mibindex;
+    const int old_mibindex_max = _mibindex_max;
 
     DEBUGMSGTL(("mibindex", "add: %s (%d)\n", dirname, i ));
     if ( i == -1 )
@@ -2846,15 +2866,15 @@ _mibindex_add( const char *dirname, int i )
         _mibindexes = realloc(_mibindexes,
                               _mibindex_max * sizeof(_mibindexes[0]));
         netsnmp_assert(_mibindexes);
-        memset(_mibindexes + old_mibindex, 0,
-               (i - old_mibindex) * sizeof(_mibindexes[0]));
+        memset(_mibindexes + old_mibindex_max, 0,
+               (_mibindex_max - old_mibindex_max) * sizeof(_mibindexes[0]));
     }
-    DEBUGMSGTL(("mibindex", "add: %d/%d/%d\n", i, _mibindex, _mibindex_max ));
 
     _mibindexes[ i ] = strdup( dirname );
     if ( i >= _mibindex )
         _mibindex = i+1;
 
+    DEBUGMSGTL(("mibindex", "add: %d/%d/%d\n", i, _mibindex, _mibindex_max ));
     return i;
 }
     
@@ -4006,79 +4026,95 @@ dump_realloc_oid_to_inetaddress(const int addr_type, const oid * objid, size_t o
                                 size_t * out_len, int allow_realloc, 
                                 char quotechar)
 {
-    if (buf) {
-        int             i, len;
-        char            intbuf[64], * p;
-        unsigned char  *zc;
-        unsigned long   zone;
-
-        memset(intbuf, 0, 64);
-
-        p = intbuf;
-        *p = quotechar;
-        p++;
-        switch (addr_type) {
-            case IPV4:
-            case IPV4Z:
-                if ((addr_type == IPV4  && objidlen != 4) ||
-                    (addr_type == IPV4Z && objidlen != 8))
-                    return 2;
-
-                len = sprintf(p, "%" NETSNMP_PRIo "u.%" NETSNMP_PRIo "u."
-                              "%" NETSNMP_PRIo "u.%" NETSNMP_PRIo "u",
-                              objid[0], objid[1], objid[2], objid[3]);
-                p += len;
-                if (addr_type == IPV4Z) {
-                    zc = (unsigned char*)&zone;
-                    zc[0] = (u_char)(objid[4]);
-                    zc[1] = (u_char)(objid[5]);
-                    zc[2] = (u_char)(objid[6]);
-                    zc[3] = (u_char)(objid[7]);
-                    zone = ntohl(zone);
-                    len = sprintf(p, "%%%lu", zone);
-                    p += len;
-                }
+    int             i, len;
+    char            intbuf[64], *p;
+    char *const     end = intbuf + sizeof(intbuf);
+    unsigned char  *zc;
+    unsigned long   zone;
 
-                break;
+    if (!buf)
+        return 1;
 
-            case IPV6:
-            case IPV6Z:
-                if ((addr_type == IPV6 && objidlen != 16) ||
-                    (addr_type == IPV6Z && objidlen != 20))
-                    return 2;
+    for (i = 0; i < objidlen; i++)
+        if (objid[i] < 0 || objid[i] > 255)
+            return 2;
+
+    p = intbuf;
+    *p++ = quotechar;
+
+    switch (addr_type) {
+    case IPV4:
+    case IPV4Z:
+        if ((addr_type == IPV4  && objidlen != 4) ||
+            (addr_type == IPV4Z && objidlen != 8))
+            return 2;
+
+        len = snprintf(p, end - p, "%" NETSNMP_PRIo "u.%" NETSNMP_PRIo "u."
+                      "%" NETSNMP_PRIo "u.%" NETSNMP_PRIo "u",
+                      objid[0], objid[1], objid[2], objid[3]);
+        p += len;
+        if (p >= end)
+            return 2;
+        if (addr_type == IPV4Z) {
+            zc = (unsigned char*)&zone;
+            zc[0] = objid[4];
+            zc[1] = objid[5];
+            zc[2] = objid[6];
+            zc[3] = objid[7];
+            zone = ntohl(zone);
+            len = snprintf(p, end - p, "%%%lu", zone);
+            p += len;
+            if (p >= end)
+                return 2;
+        }
 
-                len = 0;
-                for (i = 0; i < 16; i ++) {
-                    len = snprintf(p, 4, "%02" NETSNMP_PRIo "x:", objid[i]);
-                    p += len;
-                }
-                p-- ; /* do not include the last ':' */
-
-                if (addr_type == IPV6Z) {
-                    zc = (unsigned char*)&zone;
-                    zc[0] = (u_char)(objid[16]);
-                    zc[1] = (u_char)(objid[17]);
-                    zc[2] = (u_char)(objid[18]);
-                    zc[3] = (u_char)(objid[19]);
-                    zone = ntohl(zone);
-                    len = sprintf(p, "%%%lu", zone);
-                    p += len;
-                }
+        break;
 
-                break;
+    case IPV6:
+    case IPV6Z:
+        if ((addr_type == IPV6 && objidlen != 16) ||
+            (addr_type == IPV6Z && objidlen != 20))
+            return 2;
+
+        len = 0;
+        for (i = 0; i < 16; i ++) {
+            len = snprintf(p, end - p, "%s%02" NETSNMP_PRIo "x", i ? ":" : "",
+                           objid[i]);
+            p += len;
+            if (p >= end)
+                return 2;
+        }
 
-            case DNS:
-            default: 
-                /* DNS can just be handled by dump_realloc_oid_to_string() */
+        if (addr_type == IPV6Z) {
+            zc = (unsigned char*)&zone;
+            zc[0] = objid[16];
+            zc[1] = objid[17];
+            zc[2] = objid[18];
+            zc[3] = objid[19];
+            zone = ntohl(zone);
+            len = snprintf(p, end - p, "%%%lu", zone);
+            p += len;
+            if (p >= end)
                 return 2;
         }
 
-        *p = quotechar;
+        break;
 
-        return snmp_strcat(buf, buf_len, out_len, allow_realloc, 
-                                               (const u_char *) intbuf);
+    case DNS:
+    default: 
+        /* DNS can just be handled by dump_realloc_oid_to_string() */
+        return 2;
     }
-    return 1;
+
+    *p++ = quotechar;
+    if (p >= end)
+        return 2;
+
+    *p++ = '\0';
+    if (p >= end)
+        return 2;
+
+    return snmp_cstrcat(buf, buf_len, out_len, allow_realloc, intbuf);
 }
 
 int
diff --git a/snmplib/parse.c b/snmplib/parse.c
index 1114586..4d44d88 100644
--- a/snmplib/parse.c
+++ b/snmplib/parse.c
@@ -918,9 +918,9 @@ free_tree(struct tree *Tree)
 
     unlink_tbucket(Tree);
     free_partial_tree(Tree, FALSE);
-    if (Tree->number_modules > 1)
-        free((char *) Tree->module_list);
-    free((char *) Tree);
+    if (Tree->module_list != &Tree->modid)
+        free(Tree->module_list);
+    free(Tree);
 }
 
 static void
@@ -1571,15 +1571,14 @@ do_subtree(struct tree *root, struct node **nodes)
                 /*
                  * Update list of modules 
                  */
-                int_p =
-                    (int *) malloc((tp->number_modules + 1) * sizeof(int));
+                int_p = malloc((tp->number_modules + 1) * sizeof(int));
                 if (int_p == NULL)
                     return;
                 memcpy(int_p, tp->module_list,
                        tp->number_modules * sizeof(int));
                 int_p[tp->number_modules] = np->modid;
-                if (tp->number_modules > 1)
-                    free((char *) tp->module_list);
+                if (tp->module_list != &tp->modid)
+                    free(tp->module_list);
                 ++tp->number_modules;
                 tp->module_list = int_p;
 
@@ -3409,8 +3408,8 @@ parse_capabilities(FILE * fp, char *name)
                         level++;
                     else if (type == RIGHTBRACKET)
                         level--;
-                } while (type != RIGHTBRACKET && type != ENDOFFILE
-                         && level != 0);
+                } while ((type != RIGHTBRACKET || level != 0)
+                         && type != ENDOFFILE);
                 if (type != RIGHTBRACKET) {
                     print_error("Missing \"}\" after DEFVAL", token, type);
                     goto skip;
@@ -4193,6 +4192,8 @@ unload_all_mibs(void)
         free(ptc->descriptor);
         if (ptc->hint)
             free(ptc->hint);
+        if (ptc->description)
+            free(ptc->description);
     }
     memset(tclist, 0, MAXTC * sizeof(struct tc));
 
diff --git a/snmplib/read_config.c b/snmplib/read_config.c
index d512c5d..3167674 100644
--- a/snmplib/read_config.c
+++ b/snmplib/read_config.c
@@ -536,13 +536,13 @@ run_config_handler(struct config_line *lptr,
     lptr = read_config_find_handler(lptr, token);
     if (lptr != NULL) {
         if (when == EITHER_CONFIG || lptr->config_time == when) {
+            char tmpbuf[1];
             DEBUGMSGTL(("read_config:parser",
                         "Found a parser.  Calling it: %s / %s\n", token,
                         cptr));
             /*
              * Make sure cptr is non-null
              */
-            char tmpbuf[1];
             if (!cptr) {
                 tmpbuf[0] = '\0';
                 cptr = tmpbuf;
@@ -907,7 +907,7 @@ read_config(const char *filename,
                         continue;
                     }
                     while ((entry = readdir( d )) != NULL ) {
-                        if ( entry->d_name && entry->d_name[0] != '.') {
+                        if ( entry->d_name[0] != '.') {
                             len = NAMLEN(entry);
                             if ((len > 5) && (strcmp(&(entry->d_name[len-5]),".conf") == 0)) {
                                 snprintf(fname, SNMP_MAXPATH, "%s/%s",
@@ -1885,23 +1885,32 @@ copy_word(char *from, char *to)
     return copy_nword(from, to, SPRINT_MAX_LEN);
 }                               /* copy_word */
 
-/*
- * read_config_save_octet_string(): saves an octet string as a length
- * followed by a string of hex 
+/**
+ * Stores an quoted version of the first len bytes from str into saveto.
+ *
+ * If all octets in str are in the set [[:alnum:] ] then the quotation
+ * is to enclose the string in quotation marks ("str") otherwise the
+ * quotation is to prepend the string 0x and then add the hex representation
+ * of all characters from str (0x737472)
+ *
+ * @param[in] saveto pointer to output stream, is assumed to be big enough.
+ * @param[in] str pointer of the data that is to be stored.
+ * @param[in] len length of the data that is to be stored.
+ * @return A pointer to saveto after str is added to it.
  */
 char           *
-read_config_save_octet_string(char *saveto, u_char * str, size_t len)
+read_config_save_octet_string(char *saveto, const u_char * str, size_t len)
 {
-    int             i;
-    u_char         *cp;
+    size_t          i;
+    const u_char   *cp;
 
     /*
-     * is everything easily printable 
+     * is everything easily printable
      */
-    for (i = 0, cp = str; i < (int) len && cp &&
+    for (i = 0, cp = str; i < len && cp &&
          (isalpha(*cp) || isdigit(*cp) || *cp == ' '); cp++, i++);
 
-    if (len != 0 && i == (int) len) {
+    if (len != 0 && i == len) {
         *saveto++ = '"';
         memcpy(saveto, str, len);
         saveto += len;
@@ -1911,7 +1920,7 @@ read_config_save_octet_string(char *saveto, u_char * str, size_t len)
         if (str != NULL) {
             sprintf(saveto, "0x");
             saveto += 2;
-            for (i = 0; i < (int) len; i++) {
+            for (i = 0; i < len; i++) {
                 sprintf(saveto, "%02x", str[i]);
                 saveto = saveto + 2;
             }
diff --git a/snmplib/scapi.c b/snmplib/scapi.c
index fdd33ff..16ac829 100644
--- a/snmplib/scapi.c
+++ b/snmplib/scapi.c
@@ -438,6 +438,7 @@ sc_generate_keyed_hash(const oid * authtype, size_t authtypelen,
  * Returns:
  * SNMPERR_SUCCESS              Success.
  * SNMP_SC_GENERAL_FAILURE      Any error.
+ * SNMPERR_SC_NOT_CONFIGURED    Hash type not supported.
  */
 int
 sc_hash(const oid * hashtype, size_t hashtypelen, const u_char * buf,
@@ -495,7 +496,10 @@ sc_hash(const oid * hashtype, size_t hashtypelen, const u_char * buf,
     EVP_MD_CTX_init(cptr);
 #endif
 #endif
-    EVP_DigestInit(cptr, hashfn);
+    if (!EVP_DigestInit(cptr, hashfn)) {
+        /* requested hash function is not available */
+        return SNMPERR_SC_NOT_CONFIGURED;
+    }
 
 /** pass the data */
     EVP_DigestUpdate(cptr, buf, buf_len);
@@ -1211,7 +1215,7 @@ MD5_hmac(const u_char * data, size_t len, u_char * mac, size_t maclen,
          * this relies on the ability to use integer math and thus we
          * must rely on data that aligns on 32-bit-word-boundries 
          */
-        memdup(&newdata, data, len);
+        newdata = netsnmp_memdup(data, len);
         cp = newdata;
     } else {
         cp = data;
@@ -1309,7 +1313,7 @@ SHA1_hmac(const u_char * data, size_t len, u_char * mac, size_t maclen,
          * this relies on the ability to use integer math and thus we
          * must rely on data that aligns on 32-bit-word-boundries 
          */
-        memdup(&newdata, data, len);
+        newdata = netsnmp_memdup(data, len);
         cp = newdata;
     } else {
         cp = data;
diff --git a/snmplib/snmp_alarm.c b/snmplib/snmp_alarm.c
index c015102..af4800f 100644
--- a/snmplib/snmp_alarm.c
+++ b/snmplib/snmp_alarm.c
@@ -319,7 +319,7 @@ set_an_alarm(void)
         signal(SIGALRM, alarm_handler);
         setitimer(ITIMER_REAL, &it, NULL);
         DEBUGMSGTL(("snmp_alarm", "schedule alarm %d in %ld.%03ld seconds\n",
-                    nextalarm, (long) delta.tv_sec, (delta.tv_usec / 1000)));
+                    nextalarm, (long) delta.tv_sec, (long)(delta.tv_usec / 1000)));
 # else  /* HAVE_SETITIMER */
 #  ifdef SIGALRM
         signal(SIGALRM, alarm_handler);
@@ -446,7 +446,7 @@ snmp_alarm_register_hr(struct timeval t, unsigned int flags,
 
     DEBUGMSGTL(("snmp_alarm",
                 "registered alarm %d, t = %ld.%03ld, flags=0x%02x\n",
-                (*s)->clientreg, (long) (*s)->t.tv_sec, ((*s)->t.tv_usec / 1000),
+                (*s)->clientreg, (long) (*s)->t.tv_sec, (long)((*s)->t.tv_usec / 1000),
                 (*s)->flags));
 
     if (start_alarms) {
diff --git a/snmplib/snmp_api.c b/snmplib/snmp_api.c
index 33e6157..191debf 100644
--- a/snmplib/snmp_api.c
+++ b/snmplib/snmp_api.c
@@ -1282,8 +1282,8 @@ snmpv3_probe_contextEngineID_rfc5343(void *slp, netsnmp_session *session) {
     }
     pdu->securityLevel = SNMP_SEC_LEVEL_NOAUTH;
     pdu->securityModel = session->securityModel;
-    if (memdup(&pdu->contextEngineID, probeEngineID, probeEngineID_len) !=
-        SNMPERR_SUCCESS) {
+    pdu->contextEngineID = netsnmp_memdup(probeEngineID, probeEngineID_len);
+    if (!pdu->contextEngineID) {
         snmp_log(LOG_ERR, "failed to clone memory for rfc5343 probe\n");
         snmp_free_pdu(pdu);
         return SNMP_ERR_GENERR;
@@ -1310,18 +1310,20 @@ snmpv3_probe_contextEngineID_rfc5343(void *slp, netsnmp_session *session) {
         ASN_OCTET_STR == response->variables->type  &&
         NULL != response->variables->val.string &&
         response->variables->val_len > 0) {
-        if (memdup(&session->contextEngineID,
-                   response->variables->val.string,
-                   response->variables->val_len) != SNMPERR_SUCCESS) {
+        session->contextEngineID =
+            netsnmp_memdup(response->variables->val.string,
+                           response->variables->val_len);
+        if (!session->contextEngineID) {
             snmp_log(LOG_ERR, "failed rfc5343 contextEngineID probing: memory allocation failed\n");
             return SNMP_ERR_GENERR;
         }
         
         /* technically there likely isn't a securityEngineID but just
            in case anyone goes looking we might as well have one */
-        if (memdup(&session->securityEngineID,
-                   response->variables->val.string,
-                   response->variables->val_len) != SNMPERR_SUCCESS) {
+        session->securityEngineID =
+            netsnmp_memdup(response->variables->val.string,
+                           response->variables->val_len);
+        if (!session->securityEngineID) {
             snmp_log(LOG_ERR, "failed rfc5343 securityEngineID probing: memory allocation failed\n");
             return SNMP_ERR_GENERR;
         }
@@ -1395,7 +1397,10 @@ snmpv3_engineID_probe(struct session_list *slp,
         }
     }
 
-    /* see if there was any hooks to call after the engineID probing */
+    /*
+     * see if there is a hook to call now that we're done probing for an
+     * engineID
+     */
     if (sptr && sptr->post_probe_engineid) {
         status = (*sptr->post_probe_engineid)(slp, in_session);
         if (status != SNMPERR_SUCCESS)
@@ -1551,12 +1556,12 @@ _sess_open(netsnmp_session * in_session)
         if (in_session->flags & SNMP_FLAGS_STREAM_SOCKET) {
             transport =
                 netsnmp_tdomain_transport_full("snmp", in_session->peername,
-                                               in_session->local_port, "tcp",
+                                               in_session->local_port, "tcp,tcp6",
                                                NULL);
         } else {
             transport =
                 netsnmp_tdomain_transport_full("snmp", in_session->peername,
-                                               in_session->local_port, "udp",
+                                               in_session->local_port, "udp,udp6",
                                                NULL);
         }
 
@@ -3070,7 +3075,7 @@ snmp_build(u_char ** pkt, size_t * pkt_len, size_t * offset,
     rc = _snmp_build(pkt, pkt_len, offset, pss, pdu);
     if (rc) {
         if (!pss->s_snmp_errno) {
-            snmp_log(LOG_ERR, "snmp_build: unknown failure");
+            snmp_log(LOG_ERR, "snmp_build: unknown failure\n");
             pss->s_snmp_errno = SNMPERR_BAD_ASN1_BUILD;
         }
         SET_SNMP_ERROR(pss->s_snmp_errno);
@@ -4350,6 +4355,7 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length)
     size_t          four;
     netsnmp_variable_list *vp = NULL;
     oid             objid[MAX_OID_LEN];
+    u_char         *p;
 
     /*
      * Get the PDU type 
@@ -4526,9 +4532,11 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length)
         case ASN_INTEGER:
             vp->val.integer = (long *) vp->buf;
             vp->val_len = sizeof(long);
-            asn_parse_int(var_val, &len, &vp->type,
+            p = asn_parse_int(var_val, &len, &vp->type,
                           (long *) vp->val.integer,
                           sizeof(*vp->val.integer));
+            if (!p)
+                return -1;
             break;
         case ASN_COUNTER:
         case ASN_GAUGE:
@@ -4536,9 +4544,11 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length)
         case ASN_UINTEGER:
             vp->val.integer = (long *) vp->buf;
             vp->val_len = sizeof(u_long);
-            asn_parse_unsigned_int(var_val, &len, &vp->type,
+            p = asn_parse_unsigned_int(var_val, &len, &vp->type,
                                    (u_long *) vp->val.integer,
                                    vp->val_len);
+            if (!p)
+                return -1;
             break;
 #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES
         case ASN_OPAQUE_COUNTER64:
@@ -4547,34 +4557,45 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length)
         case ASN_COUNTER64:
             vp->val.counter64 = (struct counter64 *) vp->buf;
             vp->val_len = sizeof(struct counter64);
-            asn_parse_unsigned_int64(var_val, &len, &vp->type,
+            p = asn_parse_unsigned_int64(var_val, &len, &vp->type,
                                      (struct counter64 *) vp->val.
                                      counter64, vp->val_len);
+            if (!p)
+                return -1;
             break;
 #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES
         case ASN_OPAQUE_FLOAT:
             vp->val.floatVal = (float *) vp->buf;
             vp->val_len = sizeof(float);
-            asn_parse_float(var_val, &len, &vp->type,
+            p = asn_parse_float(var_val, &len, &vp->type,
                             vp->val.floatVal, vp->val_len);
+            if (!p)
+                return -1;
             break;
         case ASN_OPAQUE_DOUBLE:
             vp->val.doubleVal = (double *) vp->buf;
             vp->val_len = sizeof(double);
-            asn_parse_double(var_val, &len, &vp->type,
+            p = asn_parse_double(var_val, &len, &vp->type,
                              vp->val.doubleVal, vp->val_len);
+            if (!p)
+                return -1;
             break;
         case ASN_OPAQUE_I64:
             vp->val.counter64 = (struct counter64 *) vp->buf;
             vp->val_len = sizeof(struct counter64);
-            asn_parse_signed_int64(var_val, &len, &vp->type,
+            p = asn_parse_signed_int64(var_val, &len, &vp->type,
                                    (struct counter64 *) vp->val.counter64,
                                    sizeof(*vp->val.counter64));
 
+            if (!p)
+                return -1;
             break;
 #endif                          /* NETSNMP_WITH_OPAQUE_SPECIAL_TYPES */
-        case ASN_OCTET_STR:
         case ASN_IPADDRESS:
+            if (vp->val_len != 4)
+                return -1;
+            /* fallthrough */
+        case ASN_OCTET_STR:
         case ASN_OPAQUE:
         case ASN_NSAP:
             if (vp->val_len < sizeof(vp->buf)) {
@@ -4585,12 +4606,16 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length)
             if (vp->val.string == NULL) {
                 return -1;
             }
-            asn_parse_string(var_val, &len, &vp->type, vp->val.string,
+            p = asn_parse_string(var_val, &len, &vp->type, vp->val.string,
                              &vp->val_len);
+            if (!p)
+                return -1;
             break;
         case ASN_OBJECT_ID:
             vp->val_len = MAX_OID_LEN;
-            asn_parse_objid(var_val, &len, &vp->type, objid, &vp->val_len);
+            p = asn_parse_objid(var_val, &len, &vp->type, objid, &vp->val_len);
+            if (!p)
+                return -1;
             vp->val_len *= sizeof(oid);
             vp->val.objid = (oid *) malloc(vp->val_len);
             if (vp->val.objid == NULL) {
@@ -4608,8 +4633,10 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length)
             if (vp->val.bitstring == NULL) {
                 return -1;
             }
-            asn_parse_bitstring(var_val, &len, &vp->type,
+            p = asn_parse_bitstring(var_val, &len, &vp->type,
                                 vp->val.bitstring, &vp->val_len);
+            if (!p)
+                return -1;
             break;
         default:
             snmp_log(LOG_ERR, "bad type returned (%x)\n", vp->type);
@@ -4905,7 +4932,7 @@ _sess_async_send(void *sessp,
      * specified in the received PDU.  
      */
 
-    if (session->sndMsgMaxSize != 0 && length > session->sndMsgMaxSize) {
+    if (pdu->version == SNMP_VERSION_3 && session->sndMsgMaxSize != 0 && length > session->sndMsgMaxSize) {
         DEBUGMSGTL(("sess_async_send",
                     "length of packet (%lu) exceeds session maximum (%lu)\n",
                     (unsigned long)length, (unsigned long)session->sndMsgMaxSize));
@@ -5333,13 +5360,17 @@ _sess_process_packet(void *sessp, netsnmp_session * sp,
 	      break;
 	    } else {
 	      /* We're done with retries, so no longer waiting for a response */
-	      ((struct synch_state*)magic)->waiting = 0;
+	      if (magic) {
+		((struct synch_state*)magic)->waiting = 0;
+	      }
 	    }
 	  } else {
 	    if (SNMPV3_IGNORE_UNAUTH_REPORTS) {
 	      break;
 	    } else { /* Set the state to no longer be waiting, since we're done with retries */
-	      ((struct synch_state*)magic)->waiting = 0;
+	      if (magic) {
+		((struct synch_state*)magic)->waiting = 0;
+	      }
 	    }
 	  }
 
@@ -5380,19 +5411,14 @@ _sess_process_packet(void *sessp, netsnmp_session * sp,
 	/*
 	 * Successful, so delete request.  
 	 */
-	if (isp->requests == rp) {
-	  isp->requests = rp->next_request;
-	  if (isp->requestsEnd == rp) {
-	    isp->requestsEnd = NULL;
-	  }
-	} else {
+	if (orp)
 	  orp->next_request = rp->next_request;
-	  if (isp->requestsEnd == rp) {
-	    isp->requestsEnd = orp;
-	  }
-	}
+        else
+	  isp->requests = rp->next_request;
+        if (isp->requestsEnd == rp)
+	  isp->requestsEnd = orp;
 	snmp_free_pdu(rp->pdu);
-	free((char *) rp);
+	free(rp);
 	/*
 	 * There shouldn't be any more requests with the same reqid.  
 	 */
@@ -5596,8 +5622,8 @@ _sess_read(void *sessp, netsnmp_large_fd_set * fdset)
              * We have no saved packet.  Allocate one.  
              */
             if ((isp->packet = (u_char *) malloc(rxbuf_len)) == NULL) {
-                DEBUGMSGTL(("sess_read", "can't malloc %lu bytes for rxbuf\n",
-                            (unsigned long)rxbuf_len));
+                DEBUGMSGTL(("sess_read", "can't malloc %" NETSNMP_PRIz
+                            "u bytes for rxbuf\n", rxbuf_len));
                 return 0;
             } else {
                 rxbuf = isp->packet;
@@ -5617,8 +5643,9 @@ _sess_read(void *sessp, netsnmp_large_fd_set * fdset)
                                        isp->packet_len + rxbuf_len);
                 if (newbuf == NULL) {
                     DEBUGMSGTL(("sess_read",
-                                "can't malloc %lu more for rxbuf (%lu tot)\n",
-                                (unsigned long)rxbuf_len, (unsigned long)(isp->packet_len + rxbuf_len)));
+                                "can't malloc %" NETSNMP_PRIz
+                                "u more for rxbuf (%" NETSNMP_PRIz "u tot)\n",
+                                rxbuf_len, isp->packet_len + rxbuf_len));
                     return 0;
                 } else {
                     isp->packet = newbuf;
@@ -5632,8 +5659,8 @@ _sess_read(void *sessp, netsnmp_large_fd_set * fdset)
         }
     } else {
         if ((rxbuf = (u_char *) malloc(rxbuf_len)) == NULL) {
-            DEBUGMSGTL(("sess_read", "can't malloc %lu bytes for rxbuf\n",
-                        (unsigned long)rxbuf_len));
+            DEBUGMSGTL(("sess_read", "can't malloc %" NETSNMP_PRIz
+                        "u bytes for rxbuf\n", rxbuf_len));
             return 0;
         }
     }
@@ -5702,9 +5729,10 @@ _sess_read(void *sessp, netsnmp_large_fd_set * fdset)
                 pdulen = asn_check_packet(pptr, isp->packet_len);
             }
 
-            DEBUGMSGTL(("sess_read", "  loop packet_len %lu, PDU length %lu\n",
-                        (unsigned long)isp->packet_len, (unsigned long)pdulen));
-             
+            DEBUGMSGTL(("sess_read",
+                        "  loop packet_len %" NETSNMP_PRIz "u, PDU length %"
+                        NETSNMP_PRIz "u\n", isp->packet_len, pdulen));
+
             if (pdulen > MAX_PACKET_LENGTH) {
                 /*
                  * Illegal length, drop the connection.  
@@ -5732,8 +5760,9 @@ _sess_read(void *sessp, netsnmp_large_fd_set * fdset)
                  * start, simply return and wait for more data to arrive.
                  */
                 DEBUGMSGTL(("sess_read",
-                            "pkt not complete (need %lu got %lu so far)\n",
-                            (unsigned long)pdulen, (unsigned long)isp->packet_len));
+                            "pkt not complete (need %" NETSNMP_PRIz "u got %"
+                            NETSNMP_PRIz "u so far)\n", pdulen,
+                            isp->packet_len));
 
                 if (pptr != isp->packet)
                     break; /* opaque freed for us outside of loop. */
@@ -5794,8 +5823,9 @@ _sess_read(void *sessp, netsnmp_large_fd_set * fdset)
              * Obviously this should never happen!  
              */
             snmp_log(LOG_ERR,
-                     "too large packet_len = %lu, dropping connection %d\n",
-                     (unsigned long)(isp->packet_len), transport->sock);
+                     "too large packet_len = %" NETSNMP_PRIz
+                     "u, dropping connection %d\n",
+                     isp->packet_len, transport->sock);
             transport->f_close(transport);
             /** XXX-rks: why no SNMP_FREE(isp->packet); ?? */
             return -1;
@@ -5820,9 +5850,11 @@ _sess_read(void *sessp, netsnmp_large_fd_set * fdset)
          */
 
         memmove(isp->packet, pptr, isp->packet_len);
-        DEBUGMSGTL(("sess_read", "end: memmove(%p, %p, %lu); realloc(%p, %lu)\n",
-                    isp->packet, pptr, (unsigned long)isp->packet_len,
-		    isp->packet, (unsigned long)isp->packet_len));
+        DEBUGMSGTL(("sess_read",
+                    "end: memmove(%p, %p, %" NETSNMP_PRIz "u); realloc(%p, %"
+                    NETSNMP_PRIz "u)\n",
+                    isp->packet, pptr, isp->packet_len,
+		    isp->packet, isp->packet_len));
 
         if ((rxbuf = (u_char *)realloc(isp->packet, isp->packet_len)) == NULL) {
             /*
@@ -6310,18 +6342,13 @@ snmp_sess_timeout(void *sessp)
                     callback(NETSNMP_CALLBACK_OP_TIMED_OUT, sp,
                              rp->pdu->reqid, rp->pdu, magic);
                 }
-                if (isp->requests == rp) {
-                    isp->requests = rp->next_request;
-                    if (isp->requestsEnd == rp) {
-                        isp->requestsEnd = NULL;
-                    }
-                } else {
+                if (orp)
                     orp->next_request = rp->next_request;
-                    if (isp->requestsEnd == rp) {
-                        isp->requestsEnd = orp;
-                    }
-                }
-                snmp_free_pdu(rp->pdu); /* FIX  rp is already free'd! */
+                else
+                    isp->requests = rp->next_request;
+                if (isp->requestsEnd == rp)
+                    isp->requestsEnd = orp;
+                snmp_free_pdu(rp->pdu);
                 freeme = rp;
                 continue;       /* don't update orp below */
             } else {
@@ -7378,5 +7405,5 @@ snmp_init_statistics(void)
 {
     memset(statistics, 0, sizeof(statistics));
 }
-/**  @} */
 #endif /* NETSNMP_FEATURE_REMOVE_STATISTICS */
+/**  @} */
diff --git a/snmplib/snmp_client.c b/snmplib/snmp_client.c
index c1aa9c4..ab7a58c 100644
--- a/snmplib/snmp_client.c
+++ b/snmplib/snmp_client.c
@@ -1412,6 +1412,11 @@ int netsnmp_query_walk(netsnmp_variable_list *list,
         snmp_oidtree_compare( list->name, list->name_length,
                                 vb->name,   vb->name_length ) == 0) {
 
+	if (vb->type == SNMP_ENDOFMIBVIEW ||
+	    vb->type == SNMP_NOSUCHOBJECT ||
+	    vb->type == SNMP_NOSUCHINSTANCE)
+	    break;
+
         /*
          * Copy each response varbind to the end of the result list
          * and then re-use this to ask for the next entry.
diff --git a/snmplib/snmp_parse_args.c b/snmplib/snmp_parse_args.c
index c73b84c..6842d0e 100644
--- a/snmplib/snmp_parse_args.c
+++ b/snmplib/snmp_parse_args.c
@@ -124,13 +124,15 @@ snmp_parse_args_descriptions(FILE * outf)
             "  -t TIMEOUT\t\tset the request timeout (in seconds)\n");
     fprintf(outf, "Debugging\n");
     fprintf(outf, "  -d\t\t\tdump input/output packets in hexadecimal\n");
+#ifndef NETSNMP_DISABLE_DEBUGGING
     fprintf(outf,
             "  -D[TOKEN[,...]]\tturn on debugging output for the specified TOKENs\n\t\t\t   (ALL gives extremely verbose debugging output)\n");
+#endif
     fprintf(outf, "General options\n");
     fprintf(outf,
-            "  -m MIB[:...]\t\tload given list of MIBs (ALL loads everything)\n");
+            "  -m MIB[" ENV_SEPARATOR "...]\t\tload given list of MIBs (ALL loads everything)\n");
     fprintf(outf,
-            "  -M DIR[:...]\t\tlook in given list of directories for MIBs\n");
+            "  -M DIR[" ENV_SEPARATOR "...]\t\tlook in given list of directories for MIBs\n");
 #ifndef NETSNMP_DISABLE_MIB_LOADING
     fprintf(outf,
             "    (default: %s)\n", netsnmp_get_mib_directory());
@@ -208,7 +210,7 @@ netsnmp_parse_args(int argc,
      * initialize session to default values 
      */
     snmp_sess_init(session);
-    strcpy(Opts, "Y:VhHm:M:O:I:P:D:dv:r:t:c:Z:e:E:n:u:l:x:X:a:A:p:T:-:3:s:S:L:");
+    strcpy(Opts, "Y:VhHm:M:O:I:P:D:dv:r:t:c:Z:e:E:n:u:l:x:X:a:A:p:T:-:3:L:");
     if (localOpts) {
         if (strlen(localOpts) + strlen(Opts) >= sizeof(Opts)) {
             snmp_log(LOG_ERR, "Too many localOpts in snmp_parse_args()\n");
@@ -300,8 +302,13 @@ netsnmp_parse_args(int argc,
 #endif /* NETSNMP_DISABLE_MIB_LOADING */
 
         case 'D':
+#ifdef NETSNMP_NO_DEBUGGING
+            fprintf(stderr, "Debug not configured in\n");
+            return (NETSNMP_PARSE_ARGS_ERROR_USAGE);
+#else
             debug_register_tokens(optarg);
             snmp_set_do_debugging(1);
+#endif
             break;
 
         case 'd':
diff --git a/snmplib/snmp_transport.c b/snmplib/snmp_transport.c
index 9b16245..ada4781 100644
--- a/snmplib/snmp_transport.c
+++ b/snmplib/snmp_transport.c
@@ -498,6 +498,7 @@ netsnmp_tdomain_transport_full(const char *application,
     const char * const *spec = NULL;
     int                 any_found = 0;
     char buf[SNMP_MAXPATH];
+    char **lspec = 0;
 
     DEBUGMSGTL(("tdomain",
                 "tdomain_transport_full(\"%s\", \"%s\", %d, \"%s\", \"%s\")\n",
@@ -587,7 +588,21 @@ netsnmp_tdomain_transport_full(const char *application,
             DEBUGMSGTL(("tdomain",
                         "Use user specified default domain \"%s\"\n",
                         default_domain));
-            match = find_tdomain(default_domain);
+            if (!strchr(default_domain, ','))
+                match = find_tdomain(default_domain);
+            else {
+                int commas = 0;
+                const char *cp = default_domain;
+                char *dup = strdup(default_domain);
+
+                while (*++cp) if (*cp == ',') commas++;
+                lspec = calloc(commas+2, sizeof(char *));
+                commas = 1;
+                lspec[0] = strtok(dup, ",");
+                while ((lspec[commas++] = strtok(NULL, ",")))
+                    ;
+                spec = (const char * const *)lspec;
+            }
         } else {
             spec = netsnmp_lookup_default_domains(application);
             if (spec == NULL) {
@@ -636,6 +651,10 @@ netsnmp_tdomain_transport_full(const char *application,
             else
                 t = match->f_create_from_tstring_new(addr, local, addr2);
             if (t) {
+                if (lspec) {
+                    free(lspec[0]);
+                    free(lspec);
+                }
                 return t;
             }
         }
@@ -647,6 +666,10 @@ netsnmp_tdomain_transport_full(const char *application,
     }
     if (!any_found)
         snmp_log(LOG_ERR, "No support for any checked transport domain\n");
+    if (lspec) {
+        free(lspec[0]);
+        free(lspec);
+    }
     return NULL;
 }
 
diff --git a/snmplib/snmpksm.c b/snmplib/snmpksm.c
index 06febe2..7d30612 100644
--- a/snmplib/snmpksm.c
+++ b/snmplib/snmpksm.c
@@ -42,20 +42,21 @@
 #ifndef NETSNMP_USE_KERBEROS_MIT
 #define OLD_HEIMDAL
 #endif 				/* ! NETSNMP_USE_KERBEROS_MIT */
+#else
+#define KRB5_DEPRECATED 1
 #endif 				/* NETSNMP_USE_KERBEROS_HEIMDAL */
 
 #ifdef NETSNMP_USE_KERBEROS_HEIMDAL
 #define oid heimdal_oid_renamed
 #endif				/* NETSNMP_USE_KERBEROS_HEIMDAL */
 #include <krb5.h>
-#include <com_err.h>
 #ifdef NETSNMP_USE_KERBEROS_HEIMDAL
 #undef oid
 #endif				/* NETSNMP_USE_KERBEROS_HEIMDAL */
 
 #ifdef NETSNMP_USE_KERBEROS_HEIMDAL
 #define CHECKSUM_TYPE(x)	(x)->cksumtype
-#define CHECKSUM_CONTENTS(x)	((char *)((x)->checksum.data))
+#define CHECKSUM_CONTENTS(x)	(x)->checksum.data
 #define CHECKSUM_LENGTH(x)	(x)->checksum.length
 #define TICKET_CLIENT(x)	(x)->client
 #else				/* NETSNMP_USE_KERBEROS_HEIMDAL */
@@ -65,6 +66,12 @@
 #define TICKET_CLIENT(x)	(x)->enc_part2->client
 #endif				/* NETSNMP_USE_KERBEROS_HEIMDAL */
 
+#if HAVE_ET_COM_ERR_H
+#include <et/com_err.h>
+#elif HAVE_COM_ERR_H
+#include <com_err.h>
+#endif
+
 #include <net-snmp/output_api.h>
 #include <net-snmp/config_api.h>
 #include <net-snmp/utilities.h>
@@ -84,7 +91,9 @@ static krb5_context kcontext = NULL;
 static krb5_rcache rcache = NULL;
 static krb5_keytab keytab = NULL;
 static int keytab_setup = 0;
-static const char *service_name = NULL;
+static char *service_name = NULL;
+static char service_host[] = "host";
+static u_char null_id[] = {0};
 
 static int      ksm_session_init(netsnmp_session *);
 static void     ksm_free_state_ref(void *);
@@ -97,6 +106,24 @@ static void     ksm_decrement_ref_count(long);
 static void     ksm_increment_ref_count(long);
 static struct ksm_cache_entry *ksm_get_cache(long);
 
+#if !defined(HAVE_KRB5_AUTH_CON_GETSENDSUBKEY) /* Heimdal */
+
+krb5_error_code krb5_auth_con_getsendsubkey(krb5_context context,
+				krb5_auth_context auth_context, 
+				krb5_keyblock **keyblock)
+{
+    return krb5_auth_con_getlocalsubkey(context, auth_context, keyblock);
+}
+
+krb5_error_code krb5_auth_con_getrecvsubkey(krb5_context context,
+				krb5_auth_context auth_context, 
+				krb5_keyblock **keyblock)
+{
+    return krb5_auth_con_getremotesubkey(context, auth_context, keyblock);
+}
+
+#endif
+
 #define HASHSIZE	64
 
 /*
@@ -152,7 +179,7 @@ init_snmpksm_post_config(int majorid, int minorid, void *serverarg,
 		service_name = c;
 	}
 	else {
-		service_name = "host";
+		service_name = service_host;
 	}
     }
 
@@ -171,7 +198,7 @@ init_snmpksm_post_config(int majorid, int minorid, void *serverarg,
 	    }
 	}
 	else {
-	    DEBUGMSGTL(("ksm", "Using default keytab\n", c));
+	    DEBUGMSGTL(("ksm", "Using default keytab\n"));
 	}
 	keytab_setup = 1;
     }
@@ -252,22 +279,18 @@ ksm_insert_cache(long msgid, krb5_auth_context auth_context,
 {
     struct ksm_cache_entry *entry;
     int             bucket;
-    int             retval;
 
     entry = SNMP_MALLOC_STRUCT(ksm_cache_entry);
-
     if (!entry)
         return SNMPERR_MALLOC;
 
     entry->msgid = msgid;
     entry->auth_context = auth_context;
     entry->refcount = 1;
-
-    retval = memdup(&entry->secName, secName, secNameLen);
-
-    if (retval != SNMPERR_SUCCESS) {
+    entry->secName = netsnmp_memdup(secName, secNameLen);
+    if (secName && !entry->secName) {
         free(entry);
-        return retval;
+        return SNMPERR_GENERR;
     }
 
     entry->secNameLen = secNameLen;
@@ -460,7 +483,7 @@ ksm_rgenerate_out_msg(struct snmp_secmod_outgoing_params *parms)
     unsigned char  *encrypted_data = NULL;
     long            zero = 0, tmp;
     int             i;
-    u_char         *cksum_pointer, *endp = *parms->wholeMsg;
+    u_char         *cksum_pointer;
     krb5_cksumtype  cksumtype;
     krb5_checksum   pdu_checksum;
     u_char         **wholeMsg = parms->wholeMsg;
@@ -487,7 +510,7 @@ ksm_rgenerate_out_msg(struct snmp_secmod_outgoing_params *parms)
          * suppress this (temporarily) while we build the credential info.
          *   XXX - what about "udp:host" style addresses?
          */
-        colon = strrchr(params->session->peername, ':');
+        colon = strrchr(parms->session->peername, ':');
         if (colon != NULL) {
             *colon='\0';
         }
@@ -520,7 +543,7 @@ ksm_rgenerate_out_msg(struct snmp_secmod_outgoing_params *parms)
         retcode =
             krb5_mk_req(kcontext, &auth_context,
                         AP_OPTS_MUTUAL_REQUIRED | AP_OPTS_USE_SUBKEY,
-                        (char *) service_name, parms->session->peername, NULL,
+                        service_name, parms->session->peername, NULL,
                         cc, &outdata);
 
         if (colon != NULL)
@@ -586,15 +609,15 @@ ksm_rgenerate_out_msg(struct snmp_secmod_outgoing_params *parms)
          */
 
         if (ksm_state)
-            retcode = krb5_auth_con_getremotesubkey(kcontext, auth_context,
+            retcode = krb5_auth_con_getrecvsubkey(kcontext, auth_context,
                                                     &subkey);
         else
-            retcode = krb5_auth_con_getlocalsubkey(kcontext, auth_context,
+            retcode = krb5_auth_con_getsendsubkey(kcontext, auth_context,
                                                    &subkey);
 
         if (retcode) {
             DEBUGMSGTL(("ksm",
-                        "KSM: krb5_auth_con_getlocalsubkey failed: %s\n",
+                        "KSM: krb5_auth_con_getsendsubkey failed: %s\n",
                         error_message(retcode)));
             snmp_set_detail(error_message(retcode));
             retval = SNMPERR_KRB5;
@@ -654,7 +677,7 @@ ksm_rgenerate_out_msg(struct snmp_secmod_outgoing_params *parms)
         if (!encrypted_data) {
             DEBUGMSGTL(("ksm",
                         "KSM: Unable to malloc %d bytes for encrypt "
-                        "buffer: %s\n", parms->scopedPduLen,
+                        "buffer: %s\n", (int)parms->scopedPduLen,
                         strerror(errno)));
             retval = SNMPERR_MALLOC;
 #ifndef NETSNMP_USE_KERBEROS_MIT
@@ -696,7 +719,7 @@ ksm_rgenerate_out_msg(struct snmp_secmod_outgoing_params *parms)
 
         if (!ivector.data) {
             DEBUGMSGTL(("ksm", "Unable to allocate %d bytes for ivector\n",
-                        blocksize));
+                        (int)blocksize));
             retval = SNMPERR_MALLOC;
             goto error;
         }
@@ -823,13 +846,13 @@ ksm_rgenerate_out_msg(struct snmp_secmod_outgoing_params *parms)
 
     if (!subkey) {
         if (ksm_state)
-            retcode = krb5_auth_con_getremotesubkey(kcontext, auth_context,
+            retcode = krb5_auth_con_getrecvsubkey(kcontext, auth_context,
                                                     &subkey);
         else
-            retcode = krb5_auth_con_getlocalsubkey(kcontext, auth_context,
+            retcode = krb5_auth_con_getsendsubkey(kcontext, auth_context,
                                                    &subkey);
         if (retcode) {
-            DEBUGMSGTL(("ksm", "krb5_auth_con_getlocalsubkey failed: %s\n",
+            DEBUGMSGTL(("ksm", "krb5_auth_con_getsendsubkey failed: %s\n",
                         error_message(retcode)));
             snmp_set_detail(error_message(retcode));
             retval = SNMPERR_KRB5;
@@ -1116,13 +1139,14 @@ ksm_rgenerate_out_msg(struct snmp_secmod_outgoing_params *parms)
     memcpy(cksum_pointer, CHECKSUM_CONTENTS(&pdu_checksum), CHECKSUM_LENGTH(&pdu_checksum));
 
     DEBUGMSGTL(("ksm", "KSM: Writing checksum of %d bytes at offset %d\n",
-                CHECKSUM_LENGTH(&pdu_checksum), cksum_pointer - (*wholeMsg + 1)));
+                (int)CHECKSUM_LENGTH(&pdu_checksum),
+		(int)(cksum_pointer - (*wholeMsg + 1))));
 
     DEBUGMSGTL(("ksm", "KSM: Checksum:"));
 
     for (i = 0; i < CHECKSUM_LENGTH(&pdu_checksum); i++)
         DEBUGMSG(("ksm", " %02x",
-                  (unsigned int) CHECKSUM_CONTENTS(&pdu_checksum)[i]));
+                  (unsigned int) ((unsigned char *)CHECKSUM_CONTENTS(&pdu_checksum))[i]));
 
     DEBUGMSG(("ksm", "\n"));
 
@@ -1348,7 +1372,7 @@ ksm_process_in_msg(struct snmp_secmod_incoming_params *parms)
     CHECKSUM_CONTENTS(&checksum) = malloc(cksumlength);
     if (!CHECKSUM_CONTENTS(&checksum)) {
         DEBUGMSGTL(("ksm", "Unable to malloc %d bytes for checksum.\n",
-                    cksumlength));
+                    (int)cksumlength));
         retval = SNMPERR_MALLOC;
         goto error;
     }
@@ -1383,7 +1407,7 @@ ksm_process_in_msg(struct snmp_secmod_incoming_params *parms)
     if (!ap_req.data) {
         DEBUGMSGTL(("ksm",
                     "KSM unable to malloc %d bytes for AP_REQ/REP.\n",
-                    length));
+                    (int)length));
         retval = SNMPERR_MALLOC;
         goto error;
     }
@@ -1442,7 +1466,7 @@ ksm_process_in_msg(struct snmp_secmod_incoming_params *parms)
 
         if (!rcache) {
             krb5_data       server;
-            server.data = "host";
+            server.data = service_host;
             server.length = strlen(server.data);
 
             retcode = krb5_get_server_rcache(kcontext, &server, &rcache);
@@ -1501,7 +1525,7 @@ ksm_process_in_msg(struct snmp_secmod_incoming_params *parms)
         }
 
         retcode =
-            krb5_auth_con_getremotesubkey(kcontext, auth_context, &subkey);
+            krb5_auth_con_getrecvsubkey(kcontext, auth_context, &subkey);
 
         if (retcode) {
             DEBUGMSGTL(("ksm", "KSM remote subkey retrieval failed: %s\n",
@@ -1558,7 +1582,7 @@ ksm_process_in_msg(struct snmp_secmod_incoming_params *parms)
         DEBUGMSGTL(("ksm", "KSM: krb5_rd_rep() decoded successfully.\n"));
 
         retcode =
-            krb5_auth_con_getlocalsubkey(kcontext, auth_context, &subkey);
+            krb5_auth_con_getsendsubkey(kcontext, auth_context, &subkey);
 
         if (retcode) {
             DEBUGMSGTL(("ksm", "Unable to retrieve local subkey: %s\n",
@@ -1687,7 +1711,7 @@ ksm_process_in_msg(struct snmp_secmod_incoming_params *parms)
 
         if (!ivector.data) {
             DEBUGMSGTL(("ksm", "Unable to allocate %d bytes for ivector\n",
-                        blocksize));
+                        (int)blocksize));
             retval = SNMPERR_MALLOC;
             goto error;
         }
@@ -1714,8 +1738,8 @@ ksm_process_in_msg(struct snmp_secmod_incoming_params *parms)
 
         if (length > *parms->scopedPduLen) {
             DEBUGMSGTL(("ksm", "KSM not enough room - have %d bytes to "
-                        "decrypt but only %d bytes available\n", length,
-                        *parms->scopedPduLen));
+                        "decrypt but only %d bytes available\n", (int)length,
+                        (int)*parms->scopedPduLen));
             retval = SNMPERR_TOO_LONG;
 #ifndef NETSNMP_USE_KERBEROS_MIT
 #ifndef OLD_HEIMDAL
@@ -1801,7 +1825,7 @@ ksm_process_in_msg(struct snmp_secmod_incoming_params *parms)
         if (strlen(cname) > *parms->secNameLen + 1) {
             DEBUGMSGTL(("ksm",
                         "KSM: Principal length (%d) is too long (%d)\n",
-                        strlen(cname), parms->secNameLen));
+                        (int)strlen(cname), (int)*parms->secNameLen));
             retval = SNMPERR_TOO_LONG;
             free(cname);
             goto error;
@@ -1847,7 +1871,7 @@ ksm_process_in_msg(struct snmp_secmod_incoming_params *parms)
      * Just in case
      */
 
-    parms->secEngineID = (u_char *) "";
+    parms->secEngineID = null_id;
     *parms->secEngineIDLen = 0;
 
     auth_context = NULL;        /* So we don't try to free it on success */
diff --git a/snmplib/snmptsm.c b/snmplib/snmptsm.c
index bf4b612..42de682 100644
--- a/snmplib/snmptsm.c
+++ b/snmplib/snmptsm.c
@@ -151,8 +151,8 @@ tsm_clone_pdu(netsnmp_pdu *pdu, netsnmp_pdu *pdu2)
        which was already copied by snmp_clone_pdu before handing it to
        us. */
 
-    memdup((u_char **) &newref->tmStateRef, oldref->tmStateRef,
-           sizeof(*oldref->tmStateRef));
+    newref->tmStateRef = netsnmp_memdup(oldref->tmStateRef,
+                                        sizeof(*oldref->tmStateRef));
     return SNMPERR_SUCCESS;
 }
 
@@ -367,11 +367,9 @@ tsm_rgenerate_out_msg(struct snmp_secmod_outgoing_params *parms)
     }
 
     /* put the transport state reference into the PDU for the transport */
-    if (SNMPERR_SUCCESS !=
-        memdup((u_char **) &parms->pdu->transport_data,
-               tmStateRef, sizeof(*tmStateRef))) {
+    parms->pdu->transport_data = netsnmp_memdup(tmStateRef, sizeof(*tmStateRef));
+    if (!parms->pdu->transport_data)
         snmp_log(LOG_ERR, "tsm: malloc failure\n");
-    }
     parms->pdu->transport_data_length = sizeof(*tmStateRef);
 
     if (tmStateRefLocal)
diff --git a/snmplib/snmpusm.c b/snmplib/snmpusm.c
index d8d8932..6a9cec3 100644
--- a/snmplib/snmpusm.c
+++ b/snmplib/snmpusm.c
@@ -2922,8 +2922,9 @@ usm_create_user_from_session(netsnmp_session * session)
         /*
          * copy in the engineID 
          */
-        if (memdup(&user->engineID, session->securityEngineID,
-                   session->securityEngineIDLen) != SNMPERR_SUCCESS) {
+        user->engineID = netsnmp_memdup(session->securityEngineID,
+                                        session->securityEngineIDLen);
+        if (session->securityEngineID && !user->engineID) {
             usm_free_user(user);
             return SNMPERR_GENERR;
         }
@@ -2970,8 +2971,9 @@ usm_create_user_from_session(netsnmp_session * session)
             && session->securityAuthLocalKeyLen != 0) {
             /* already localized key passed in.  use it */
             SNMP_FREE(user->authKey);
-            if (memdup(&user->authKey, session->securityAuthLocalKey,
-                       session->securityAuthLocalKeyLen) != SNMPERR_SUCCESS) {
+            user->authKey = netsnmp_memdup(session->securityAuthLocalKey,
+                                           session->securityAuthLocalKeyLen);
+            if (!user->authKey) {
                 usm_free_user(user);
                 return SNMPERR_GENERR;
             }
@@ -3017,8 +3019,9 @@ usm_create_user_from_session(netsnmp_session * session)
             && session->securityPrivLocalKeyLen != 0) {
             /* already localized key passed in.  use it */
             SNMP_FREE(user->privKey);
-            if (memdup(&user->privKey, session->securityPrivLocalKey,
-                       session->securityPrivLocalKeyLen) != SNMPERR_SUCCESS) {
+            user->privKey = netsnmp_memdup(session->securityPrivLocalKey,
+                                           session->securityPrivLocalKeyLen);
+            if (!user->privKey) {
                 usm_free_user(user);
                 return SNMPERR_GENERR;
             }
@@ -4512,7 +4515,8 @@ usm_parse_create_usmUser(const char *token, char *line)
         /*
          * assume the same as the authentication key 
          */
-        memdup(&newuser->privKey, newuser->authKey, newuser->authKeyLen);
+        newuser->privKey = netsnmp_memdup(newuser->authKey,
+                                          newuser->authKeyLen);
         newuser->privKeyLen = newuser->authKeyLen;
     } else {
         cp = copy_nword(cp, buf, sizeof(buf));
diff --git a/snmplib/strlcat.c b/snmplib/strlcat.c
index 90713ca..4325410 100644
--- a/snmplib/strlcat.c
+++ b/snmplib/strlcat.c
@@ -37,7 +37,7 @@
  * If retval >= siz, truncation occurred.
  */
 size_t
-strlcat(char * __restrict dst, const char * __restrict src, size_t siz)
+strlcat(char *dst, const char *src, size_t siz)
 {
 	char *d = dst;
 	const char *s = src;
diff --git a/snmplib/strtoull.c b/snmplib/strtoull.c
index 6c98fc4..9ee53b4 100644
--- a/snmplib/strtoull.c
+++ b/snmplib/strtoull.c
@@ -20,6 +20,8 @@
 
 #include <net-snmp/net-snmp-config.h>
 
+#ifndef HAVE_STRTOULL
+
 #include <errno.h>
 #include <ctype.h>
 #include <limits.h>
@@ -156,3 +158,5 @@ strtoull(const char *nptr, char **endptr, int base)
         *endptr = (char *) nptr;
     return 0;
 }
+
+#endif /* HAVE_STRTOULL */
diff --git a/snmplib/system.c b/snmplib/system.c
index 207762d..cc7cf3c 100644
--- a/snmplib/system.c
+++ b/snmplib/system.c
@@ -592,14 +592,17 @@ get_boottime(void)
     size_t          len;
 #elif defined(NETSNMP_CAN_USE_NLIST)
     int             kmem;
-    static struct nlist nl[] = {
 #if !defined(hpux)
-        {(char *) "_boottime"},
+    static char boottime_name[] = "_boottime";
 #else
-        {(char *) "boottime"},
+    static char boottime_name[] = "boottime";
 #endif
-        {(char *) ""}
-    };
+    static char empty_name[] = "";
+    struct nlist nl[2];
+
+    memset(nl, 0, sizeof(nl));
+    nl[0].n_name = boottime_name;
+    nl[1].n_name = empty_name;
 #endif                          /* NETSNMP_CAN_USE_SYSCTL */
 #endif                          /* hpux10 || hpux 11 */
 
@@ -653,10 +656,11 @@ long
 get_uptime(void)
 {
 #if defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7)
+    static char lbolt_name[] = "lbolt";
     struct nlist nl;
     int kmem;
     time_t lbolt;
-    nl.n_name = "lbolt";
+    nl.n_name = lbolt_name;
     if(knlist(&nl, 1, sizeof(struct nlist)) != 0) return(0);
     if(nl.n_type == 0 || nl.n_value == 0) return(0);
     if((kmem = open("/dev/mem", 0)) < 0) return 0;
@@ -750,13 +754,6 @@ netsnmp_gethostbyname_v4(const char* name, in_addr_t *addr_out)
 
     err = netsnmp_getaddrinfo(name, NULL, &hint, &addrs);
     if (err != 0) {
-#if HAVE_GAI_STRERROR
-        snmp_log(LOG_ERR, "getaddrinfo: %s %s\n", name,
-                 gai_strerror(err));
-#else
-        snmp_log(LOG_ERR, "getaddrinfo: %s (error %d)\n", name,
-                 err);
-#endif
         return -1;
     }
 
@@ -822,7 +819,21 @@ netsnmp_getaddrinfo(const char *name, const char *service,
     val_status_t    val_status;
 #endif
 
-    DEBUGMSGTL(("dns:getaddrinfo", "looking up %s:%s\n", name, service));
+    DEBUGMSGTL(("dns:getaddrinfo", "looking up "));
+    if (name)
+        DEBUGMSG(("dns:getaddrinfo", "\"%s\"", name));
+    else
+        DEBUGMSG(("dns:getaddrinfo", "<NULL>"));
+
+    if (service)
+	DEBUGMSG(("dns:getaddrinfo", ":\"%s\"", service));
+
+    if (hints)
+	DEBUGMSG(("dns:getaddrinfo", " with hint ({ ... })"));
+    else
+	DEBUGMSG(("dns:getaddrinfo", " with no hint"));
+
+    DEBUGMSG(("dns:getaddrinfo", "\n"));
 
     if (NULL == hints) {
         memset(&hint, 0, sizeof hint);
@@ -1307,9 +1318,9 @@ netsnmp_os_prematch(const char *ospmname,
                     const char *ospmrelprefix)
 {
 #if HAVE_SYS_UTSNAME_H
-static int printOSonce = 1;
+  static int printOSonce = 1;
   struct utsname utsbuf;
-  if ( 0 != uname(&utsbuf))
+  if ( 0 > uname(&utsbuf))
     return -1;
 
   if (printOSonce) {
diff --git a/snmplib/tools.c b/snmplib/tools.c
index 8e4852a..29e5fef 100644
--- a/snmplib/tools.c
+++ b/snmplib/tools.c
@@ -207,6 +207,9 @@ snmp_strcat(u_char ** buf, size_t * buf_len, size_t * out_len,
         }
     }
 
+    if (!*buf)
+        return 0;
+
     strcpy((char *) (*buf + *out_len), (const char *) s);
     *out_len += strlen((char *) (*buf + *out_len));
     return 1;
@@ -260,31 +263,26 @@ malloc_random(size_t * size)
 }                               /* end malloc_random() */
 #endif /* NETSNMP_FEATURE_REMOVE_USM_SCAPI */
 
-/** Duplicates a memory block.
- *  Copies a existing memory location from a pointer to another, newly
-    malloced, pointer.
-
- *	@param to       Pointer to allocate and copy memory to.
- *      @param from     Pointer to copy memory from.
- *      @param size     Size of the data to be copied.
+/**
+ * Duplicates a memory block.
+ *
+ * @param[in] from Pointer to copy memory from.
+ * @param[in] size Size of the data to be copied.
  *      
- *	@return SNMPERR_SUCCESS	on success, SNMPERR_GENERR on failure.
+ * @return Pointer to the duplicated memory block, or NULL if memory allocation
+ * failed.
  */
-int
-memdup(u_char ** to, const void * from, size_t size)
+void *netsnmp_memdup(const void *from, size_t size)
 {
-    if (to == NULL)
-        return SNMPERR_GENERR;
-    if (from == NULL) {
-        *to = NULL;
-        return SNMPERR_SUCCESS;
-    }
-    if ((*to = (u_char *) malloc(size)) == NULL)
-        return SNMPERR_GENERR;
-    memcpy(*to, from, size);
-    return SNMPERR_SUCCESS;
+    void *to = NULL;
 
-}                               /* end memdup() */
+    if (from) {
+        to = malloc(size);
+        if (to)
+            memcpy(to, from, size);
+    }
+    return to;
+}                               /* end netsnmp_memdup() */
 
 #ifndef NETSNMP_FEATURE_REMOVE_NETSNMP_CHECK_DEFINEDNESS
 /**
@@ -437,11 +435,14 @@ int
 hex_to_binary2(const u_char * input, size_t len, char **output)
 {
     u_int           olen = (len / 2) + (len % 2);
-    char           *s = (char *) calloc(1, (olen) ? olen : 1), *op = s;
+    char           *s = calloc(1, olen ? olen : 1), *op = s;
     const u_char   *ip = input;
 
 
     *output = NULL;
+    if (!s)
+        goto hex_to_binary2_quit;
+
     *op = 0;
     if (len % 2) {
         if (!isxdigit(*ip))
@@ -450,7 +451,7 @@ hex_to_binary2(const u_char * input, size_t len, char **output)
         ip++;
     }
 
-    while (ip - input < (int) len) {
+    while (ip < input + len) {
         if (!isxdigit(*ip))
             goto hex_to_binary2_quit;
         *op = HEX2VAL(*ip) << 4;
@@ -921,8 +922,7 @@ void netsnmp_get_monotonic_clock(struct timeval* tv)
         tv->tv_sec = ts.tv_sec;
         tv->tv_usec = ts.tv_nsec / 1000;
     } else {
-        netsnmp_assert(FALSE);
-        memset(tv, 0, sizeof(*tv));
+        gettimeofday(tv, NULL);
     }
 #elif defined(WIN32)
     /*
diff --git a/snmplib/transports/snmpDTLSUDPDomain.c b/snmplib/transports/snmpDTLSUDPDomain.c
index 9c56d19..b7dc767 100644
--- a/snmplib/transports/snmpDTLSUDPDomain.c
+++ b/snmplib/transports/snmpDTLSUDPDomain.c
@@ -588,8 +588,8 @@ _netsnmp_add_buffered_data(bio_cache *cachep, char *buf, size_t size) {
                buf, size);
         cachep->write_cache_len = newsize;
     } else {
-        if (SNMPERR_SUCCESS !=
-            memdup((u_char **) &cachep->write_cache, buf, size)) {
+        cachep->write_cache = netsnmp_memdup(buf, size);
+        if (!cachep->write_cache) {
             /* ack! malloc failure */
             /* XXX: free and close */
             return SNMPERR_GENERR;
diff --git a/snmplib/transports/snmpIPXDomain.c b/snmplib/transports/snmpIPXDomain.c
index 24c13a4..1346156 100644
--- a/snmplib/transports/snmpIPXDomain.c
+++ b/snmplib/transports/snmpIPXDomain.c
@@ -363,7 +363,9 @@ netsnmp_sockaddr_ipx2(struct sockaddr_ipx *addr, const char *peername,
         node = "000000000000";
 
     if (port == NULL || *port == '\0')
-        port = __STRING(SNMP_IPX_DEFAULT_PORT);
+#define val(x) __STRING(x)
+        port = val(SNMP_IPX_DEFAULT_PORT);
+#undef val
 
     DEBUGMSGTL(("netsnmp_sockaddr_ipx", "Address: %s:%s/%s\n",
                 network ? network : "[NIL]", node ? node : "[NIL]",
diff --git a/snmplib/transports/snmpIPv4BaseDomain.c b/snmplib/transports/snmpIPv4BaseDomain.c
index 41a6cb6..05e150b 100644
--- a/snmplib/transports/snmpIPv4BaseDomain.c
+++ b/snmplib/transports/snmpIPv4BaseDomain.c
@@ -207,7 +207,7 @@ netsnmp_ipv4_fmtaddr(const char *prefix, netsnmp_transport *t,
         } else if ( t && t->flags & NETSNMP_TRANSPORT_FLAG_HOSTNAME ) {
             /* XXX: hmm...  why isn't this prefixed */
             /* assuming intentional */
-            host = netsnmp_gethostbyaddr((char *)&to->sin_addr, 4, AF_INET);
+            host = netsnmp_gethostbyaddr((char *)&to->sin_addr, sizeof(struct in_addr), AF_INET);
             return (host ? strdup(host->h_name) : NULL); 
         } else {
             snprintf(tmp, sizeof(tmp), "%s: [%s]:%hu->", prefix,
diff --git a/snmplib/transports/snmpIPv6BaseDomain.c b/snmplib/transports/snmpIPv6BaseDomain.c
index 9bad950..1ad6888 100644
--- a/snmplib/transports/snmpIPv6BaseDomain.c
+++ b/snmplib/transports/snmpIPv6BaseDomain.c
@@ -140,7 +140,7 @@ netsnmp_sockaddr_in6_2(struct sockaddr_in6 *addr,
         return 0;
     }
 
-    DEBUGMSGTL(("netsnmp_sockaddr_in6",
+    DEBUGMSGTL(("netsnmp_sockaddr_in6_2",
 		"addr %p, peername \"%s\", default_target \"%s\"\n",
                 addr, inpeername ? inpeername : "[NIL]",
 		default_target ? default_target : "[NIL]"));
@@ -151,12 +151,12 @@ netsnmp_sockaddr_in6_2(struct sockaddr_in6 *addr,
     addr->sin6_port = htons((u_short)SNMP_PORT);
 
     {
-      int port = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID,
-				    NETSNMP_DS_LIB_DEFAULT_PORT);
-      if (port != 0)
-        addr->sin6_port = htons((u_short)port);
-      else if (default_target != NULL)
-	netsnmp_sockaddr_in6_2(addr, default_target, NULL);
+        int port = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID,
+                                      NETSNMP_DS_LIB_DEFAULT_PORT);
+        if (port != 0)
+            addr->sin6_port = htons((u_short)port);
+        else if (default_target != NULL)
+            netsnmp_sockaddr_in6_2(addr, default_target, NULL);
     }
 
     if (inpeername != NULL) {
@@ -170,13 +170,15 @@ netsnmp_sockaddr_in6_2(struct sockaddr_in6 *addr,
             return 0;
         }
 
-        for (cp = peername; *cp && isdigit((unsigned char) *cp); cp++);
-        portno = atoi(peername);
+        cp = peername;
+        if (*cp == ':') cp++;
+        portno = atoi(cp);
+        while (*cp && isdigit((unsigned char) *cp)) cp++;
         if (!*cp &&  portno != 0) {
             /*
              * Okay, it looks like JUST a port number.  
              */
-            DEBUGMSGTL(("netsnmp_sockaddr_in6", "totally numeric: %d\n",
+            DEBUGMSGTL(("netsnmp_sockaddr_in6_2", "totally numeric: %d\n",
                         portno));
             addr->sin6_port = htons((u_short)portno);
             goto resolved;
@@ -209,13 +211,13 @@ netsnmp_sockaddr_in6_2(struct sockaddr_in6 *addr,
                     if (portno != 0 &&
                         inet_pton(AF_INET6, peername + 1,
                                   (void *) &(addr->sin6_addr))) {
-                        DEBUGMSGTL(("netsnmp_sockaddr_in6",
+                        DEBUGMSGTL(("netsnmp_sockaddr_in6_2",
                                     "IPv6 address with port suffix :%d\n",
                                     portno));
-                        if (portno > 0 && portno < 0xffff) {
+                        if (portno > 0 && portno <= 0xffff) {
                             addr->sin6_port = htons((u_short)portno);
                         } else {
-                            DEBUGMSGTL(("netsnmp_sockaddr_in6", "invalid port number: %d", portno));
+                            DEBUGMSGTL(("netsnmp_sockaddr_in6_2", "invalid port number: %d", portno));
                             return 0;
                         }
 
@@ -228,10 +230,12 @@ netsnmp_sockaddr_in6_2(struct sockaddr_in6 *addr,
                     if (inet_pton
                         (AF_INET6, peername + 1,
                          (void *) &(addr->sin6_addr))) {
-                        DEBUGMSGTL(("netsnmp_sockaddr_in6",
+                        DEBUGMSGTL(("netsnmp_sockaddr_in6_2",
                                     "IPv6 address with square brackets\n"));
-                        portno = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, 
-				                    NETSNMP_DS_LIB_DEFAULT_PORT);
+                        portno = ntohs(addr->sin6_port);
+                        if (portno == 0)
+                            portno = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, 
+                                                    NETSNMP_DS_LIB_DEFAULT_PORT);
                         if (portno <= 0)
                             portno = SNMP_PORT;
                         addr->sin6_port = htons((u_short)portno);
@@ -262,13 +266,13 @@ netsnmp_sockaddr_in6_2(struct sockaddr_in6 *addr,
             if (portno != 0 &&
                 inet_pton(AF_INET6, peername,
                           (void *) &(addr->sin6_addr))) {
-                DEBUGMSGTL(("netsnmp_sockaddr_in6",
+                DEBUGMSGTL(("netsnmp_sockaddr_in6_2",
                             "IPv6 address with port suffix :%d\n",
                             atoi(cp + 1)));
-                if (portno > 0 && portno < 0xffff) {
+                if (portno > 0 && portno <= 0xffff) {
                     addr->sin6_port = htons((u_short)portno);
                 } else {
-                    DEBUGMSGTL(("netsnmp_sockaddr_in6", "invalid port number: %d", portno));
+                    DEBUGMSGTL(("netsnmp_sockaddr_in6_2", "invalid port number: %d", portno));
                     return 0;
                 }
 
@@ -287,7 +291,7 @@ netsnmp_sockaddr_in6_2(struct sockaddr_in6 *addr,
          * See if it is JUST an IPv6 address.  
          */
         if (inet_pton(AF_INET6, peername, (void *) &(addr->sin6_addr))) {
-            DEBUGMSGTL(("netsnmp_sockaddr_in6", "just IPv6 address\n"));
+            DEBUGMSGTL(("netsnmp_sockaddr_in6_2", "just IPv6 address\n"));
             goto resolved;
         }
 
@@ -301,13 +305,13 @@ netsnmp_sockaddr_in6_2(struct sockaddr_in6 *addr,
             *cp = '\0';
             portno = atoi(cp + 1);
             if (portno != 0) {
-                DEBUGMSGTL(("netsnmp_sockaddr_in6",
+                DEBUGMSGTL(("netsnmp_sockaddr_in6_2",
                             "hostname(?) with port suffix :%d\n",
                             portno));
-                if (portno > 0 && portno < 0xffff) {
+                if (portno > 0 && portno <= 0xffff) {
                     addr->sin6_port = htons((u_short)portno);
                 } else {
-                    DEBUGMSGTL(("netsnmp_sockaddr_in6", "invalid port number: %d", portno));
+                    DEBUGMSGTL(("netsnmp_sockaddr_in6_2", "invalid port number: %d", portno));
                     return 0;
                 }
 
@@ -317,7 +321,7 @@ netsnmp_sockaddr_in6_2(struct sockaddr_in6 *addr,
                  * the name resolver below.  
                  */
                 *cp = ':';
-                DEBUGMSGTL(("netsnmp_sockaddr_in6",
+                DEBUGMSGTL(("netsnmp_sockaddr_in6_2",
                             "hostname(?) with embedded ':'?\n"));
             }
             /*
@@ -326,7 +330,7 @@ netsnmp_sockaddr_in6_2(struct sockaddr_in6 *addr,
         }
 
         if (peername[0] == '\0') {
-          DEBUGMSGTL(("netsnmp_sockaddr_in6", "empty hostname\n"));
+          DEBUGMSGTL(("netsnmp_sockaddr_in6_2", "empty hostname\n"));
           free(peername);
           return 0;
         }
@@ -342,51 +346,44 @@ netsnmp_sockaddr_in6_2(struct sockaddr_in6 *addr,
             err = netsnmp_getaddrinfo(peername, NULL, &hint, &addrs);
         }
         if (err != 0) {
-#if HAVE_GAI_STRERROR
-            snmp_log(LOG_ERR, "getaddrinfo(\"%s\", NULL, ...): %s\n", peername,
-                     gai_strerror(err));
-#else
-            snmp_log(LOG_ERR, "getaddrinfo(\"%s\", NULL, ...): (error %d)\n",
-                     peername, err);
-#endif
             free(peername);
             return 0;
         }
         if (addrs != NULL) {
-        DEBUGMSGTL(("netsnmp_sockaddr_in6", "hostname (resolved okay)\n"));
-        memcpy(&addr->sin6_addr,
-               &((struct sockaddr_in6 *) addrs->ai_addr)->sin6_addr,
-               sizeof(struct in6_addr));
-		freeaddrinfo(addrs);
+            DEBUGMSGTL(("netsnmp_sockaddr_in6_2", "hostname (resolved okay)\n"));
+            memcpy(&addr->sin6_addr,
+                   &((struct sockaddr_in6 *) addrs->ai_addr)->sin6_addr,
+                   sizeof(struct in6_addr));
+            freeaddrinfo(addrs);
+        }
+        else {
+            DEBUGMSGTL(("netsnmp_sockaddr_in6_2", "Failed to resolve IPv6 hostname\n"));
         }
-		else {
-        DEBUGMSGTL(("netsnmp_sockaddr_in6", "Failed to resolve IPv6 hostname\n"));
-		}
 #elif HAVE_GETIPNODEBYNAME
         hp = getipnodebyname(peername, AF_INET6, 0, &err);
         if (hp == NULL) {
-            DEBUGMSGTL(("netsnmp_sockaddr_in6",
+            DEBUGMSGTL(("netsnmp_sockaddr_in6_2",
                         "hostname (couldn't resolve = %d)\n", err));
             free(peername);
             return 0;
         }
-        DEBUGMSGTL(("netsnmp_sockaddr_in6", "hostname (resolved okay)\n"));
+        DEBUGMSGTL(("netsnmp_sockaddr_in6_2", "hostname (resolved okay)\n"));
         memcpy(&(addr->sin6_addr), hp->h_addr, hp->h_length);
 #elif HAVE_GETHOSTBYNAME
         hp = netsnmp_gethostbyname(peername);
         if (hp == NULL) {
-            DEBUGMSGTL(("netsnmp_sockaddr_in6",
+            DEBUGMSGTL(("netsnmp_sockaddr_in6_2",
                         "hostname (couldn't resolve)\n"));
             free(peername);
             return 0;
         } else {
             if (hp->h_addrtype != AF_INET6) {
-                DEBUGMSGTL(("netsnmp_sockaddr_in6",
+                DEBUGMSGTL(("netsnmp_sockaddr_in6_2",
                             "hostname (not AF_INET6!)\n"));
                 free(peername);
                 return 0;
             } else {
-                DEBUGMSGTL(("netsnmp_sockaddr_in6",
+                DEBUGMSGTL(("netsnmp_sockaddr_in6_2",
                             "hostname (resolved okay)\n"));
                 memcpy(&(addr->sin6_addr), hp->h_addr, hp->h_length);
             }
@@ -401,12 +398,12 @@ netsnmp_sockaddr_in6_2(struct sockaddr_in6 *addr,
         return 0;
 #endif                          /*HAVE_GETHOSTBYNAME */
     } else {
-        DEBUGMSGTL(("netsnmp_sockaddr_in6", "NULL peername"));
+        DEBUGMSGTL(("netsnmp_sockaddr_in6_2", "NULL peername"));
         return 0;
     }
 
   resolved:
-    DEBUGMSGTL(("netsnmp_sockaddr_in6", "return { AF_INET6, [%s]:%hu }\n",
+    DEBUGMSGTL(("netsnmp_sockaddr_in6_2", "return { AF_INET6, [%s]:%hu }\n",
                 inet_ntop(AF_INET6, &addr->sin6_addr, debug_addr,
                           sizeof(debug_addr)), ntohs(addr->sin6_port)));
     free(peername);
diff --git a/snmplib/transports/snmpTCPDomain.c b/snmplib/transports/snmpTCPDomain.c
index b8bdba4..7feb028 100644
--- a/snmplib/transports/snmpTCPDomain.c
+++ b/snmplib/transports/snmpTCPDomain.c
@@ -204,8 +204,8 @@ netsnmp_tcp_transport(struct sockaddr_in *addr, int local)
             return NULL;
         }
         memcpy(t->local, (u_char *) & (addr->sin_addr.s_addr), 4);
-        t->local[4] = (htons(addr->sin_port) & 0xff00) >> 8;
-        t->local[5] = (htons(addr->sin_port) & 0x00ff) >> 0;
+        t->local[4] = (ntohs(addr->sin_port) & 0xff00) >> 8;
+        t->local[5] = (ntohs(addr->sin_port) & 0x00ff) >> 0;
         t->local_length = 6;
 
         /*
@@ -257,8 +257,8 @@ netsnmp_tcp_transport(struct sockaddr_in *addr, int local)
             return NULL;
         }
         memcpy(t->remote, (u_char *) & (addr->sin_addr.s_addr), 4);
-        t->remote[4] = (htons(addr->sin_port) & 0xff00) >> 8;
-        t->remote[5] = (htons(addr->sin_port) & 0x00ff) >> 0;
+        t->remote[4] = (ntohs(addr->sin_port) & 0xff00) >> 8;
+        t->remote[5] = (ntohs(addr->sin_port) & 0x00ff) >> 0;
         t->remote_length = 6;
 
         /*
diff --git a/snmplib/transports/snmpTCPIPv6Domain.c b/snmplib/transports/snmpTCPIPv6Domain.c
index 3c96856..d2e0a2d 100644
--- a/snmplib/transports/snmpTCPIPv6Domain.c
+++ b/snmplib/transports/snmpTCPIPv6Domain.c
@@ -210,8 +210,8 @@ netsnmp_tcp6_transport(struct sockaddr_in6 *addr, int local)
             return NULL;
         }
         memcpy(t->local, addr->sin6_addr.s6_addr, 16);
-        t->local[16] = (addr->sin6_port & 0xff00) >> 8;
-        t->local[17] = (addr->sin6_port & 0x00ff) >> 0;
+        t->local[16] = (ntohs(addr->sin6_port) & 0xff00) >> 8;
+        t->local[17] = (ntohs(addr->sin6_port) & 0x00ff) >> 0;
         t->local_length = 18;
 
         /*
@@ -263,8 +263,8 @@ netsnmp_tcp6_transport(struct sockaddr_in6 *addr, int local)
             return NULL;
         }
         memcpy(t->remote, addr->sin6_addr.s6_addr, 16);
-        t->remote[16] = (addr->sin6_port & 0xff00) >> 8;
-        t->remote[17] = (addr->sin6_port & 0x00ff) >> 0;
+        t->remote[16] = (ntohs(addr->sin6_port) & 0xff00) >> 8;
+        t->remote[17] = (ntohs(addr->sin6_port) & 0x00ff) >> 0;
         t->remote_length = 18;
 
         /*
@@ -347,7 +347,7 @@ netsnmp_tcp6_create_ostring(const u_char * o, size_t o_len, int local)
         memset((u_char *) & addr, 0, sizeof(struct sockaddr_in6));
         addr.sin6_family = AF_INET6;
         memcpy((u_char *) & (addr.sin6_addr.s6_addr), o, 16);
-        addr.sin6_port = (o[16] << 8) + o[17];
+        addr.sin6_port = htons((o[16] << 8) + o[17]);
         return netsnmp_tcp6_transport(&addr, local);
     }
     return NULL;
diff --git a/snmplib/transports/snmpTLSTCPDomain.c b/snmplib/transports/snmpTLSTCPDomain.c
index a92091e..473d02c 100644
--- a/snmplib/transports/snmpTLSTCPDomain.c
+++ b/snmplib/transports/snmpTLSTCPDomain.c
@@ -134,8 +134,8 @@ netsnmp_tlstcp_copy(netsnmp_transport *oldt, netsnmp_transport *newt)
     if (oldtlsdata->trust_cert)
         newtlsdata->trust_cert = strdup(oldtlsdata->trust_cert);
     if (oldtlsdata->addr)
-        memdup((u_char**)&newtlsdata->addr, oldtlsdata->addr,
-               sizeof(*oldtlsdata->addr));
+        newtlsdata->addr = netsnmp_memdup(oldtlsdata->addr,
+                                          sizeof(*oldtlsdata->addr));
 
     return 0;
 }
diff --git a/snmplib/transports/snmpUDPBaseDomain.c b/snmplib/transports/snmpUDPBaseDomain.c
index 612fe74..8497f71 100644
--- a/snmplib/transports/snmpUDPBaseDomain.c
+++ b/snmplib/transports/snmpUDPBaseDomain.c
@@ -30,6 +30,9 @@
 #if HAVE_SYS_UIO_H
 #include <sys/uio.h>
 #endif
+#ifdef WIN32
+#include <mswsock.h>
+#endif
 #include <errno.h>
 
 #include <net-snmp/types.h>
@@ -41,6 +44,14 @@
 #include <net-snmp/library/system.h>
 #include <net-snmp/library/snmp_assert.h>
 
+#ifndef  MSG_DONTWAIT
+#define MSG_DONTWAIT 0
+#endif
+
+#ifndef  MSG_NOSIGNAL
+#define MSG_NOSIGNAL 0
+#endif
+
 void
 _netsnmp_udp_sockopt_set(int fd, int local)
 {
@@ -89,32 +100,41 @@ _netsnmp_udp_sockopt_set(int fd, int local)
     netsnmp_sock_buffer_set(fd, SO_RCVBUF, local, 0);
 }
 
-#if (defined(linux) && defined(IP_PKTINFO)) \
-    || defined(IP_RECVDSTADDR) && HAVE_STRUCT_MSGHDR_MSG_CONTROL \
-                               && HAVE_STRUCT_MSGHDR_MSG_FLAGS
-#if  defined(linux) && defined(IP_PKTINFO)
-#elif defined(IP_RECVDSTADDR)
-# ifndef IP_SENDSRCADDR
+#if defined(HAVE_IP_PKTINFO) || defined(HAVE_IP_RECVDSTADDR)
+# if defined(IP_RECVDSTADDR) && !defined(IP_SENDSRCADDR)
 #  define IP_SENDSRCADDR IP_RECVDSTADDR /* DragonFly BSD */
 # endif
-#endif
 
 #define netsnmp_udpbase_recvfrom_sendto_defined
 
 enum {
-#if  defined(linux) && defined(IP_PKTINFO)
+#if defined(HAVE_IP_PKTINFO)
     cmsg_data_size = sizeof(struct in_pktinfo)
-#elif defined(IP_RECVDSTADDR)
+#elif defined(HAVE_IP_RECVDSTADDR)
     cmsg_data_size = sizeof(struct in_addr)
 #endif
 };
 
+#ifdef WIN32
+#ifndef WSAID_WSASENDMSG
+#define WSAID_WSASENDMSG \
+    {0xa441e712,0x754f,0x43ca,{0x84,0xa7,0x0d,0xee,0x44,0xcf,0x60,0x6d}}
+typedef INT (WINAPI * LPFN_WSASENDMSG)(SOCKET, LPWSAMSG, DWORD, LPDWORD,
+                                       LPWSAOVERLAPPED,
+                                       LPWSAOVERLAPPED_COMPLETION_ROUTINE);
+#endif
+
+static LPFN_WSARECVMSG pfWSARecvMsg;
+static LPFN_WSASENDMSG pfWSASendMsg;
+#endif
+
 int
 netsnmp_udpbase_recvfrom(int s, void *buf, int len, struct sockaddr *from,
                          socklen_t *fromlen, struct sockaddr *dstip,
                          socklen_t *dstlen, int *if_index)
 {
     int r;
+#if !defined(WIN32)
     struct iovec iov;
     char cmsg[CMSG_SPACE(cmsg_data_size)];
     struct cmsghdr *cm;
@@ -131,7 +151,33 @@ netsnmp_udpbase_recvfrom(int s, void *buf, int len, struct sockaddr *from,
     msg.msg_control = &cmsg;
     msg.msg_controllen = sizeof(cmsg);
 
-    r = recvmsg(s, &msg, NETSNMP_DONTWAIT);
+    r = recvmsg(s, &msg, MSG_DONTWAIT);
+#else /* !defined(WIN32) */
+    WSABUF wsabuf;
+    char cmsg[WSA_CMSG_SPACE(sizeof(struct in_pktinfo))];
+    WSACMSGHDR *cm;
+    WSAMSG msg;
+    DWORD bytes_received;
+
+    wsabuf.buf = buf;
+    wsabuf.len = len;
+
+    msg.name = from;
+    msg.namelen = *fromlen;
+    msg.lpBuffers = &wsabuf;
+    msg.dwBufferCount = 1;
+    msg.Control.len = sizeof(cmsg);
+    msg.Control.buf = cmsg;
+    msg.dwFlags = 0;
+
+    if (pfWSARecvMsg) {
+        r = pfWSARecvMsg(s, &msg, &bytes_received, NULL, NULL) == 0 ?
+            bytes_received : -1;
+        *fromlen = msg.namelen;
+    } else {
+        r = recvfrom(s, buf, len, MSG_DONTWAIT, from, fromlen);
+    }
+#endif /* !defined(WIN32) */
 
     if (r == -1) {
         return -1;
@@ -146,8 +192,9 @@ netsnmp_udpbase_recvfrom(int s, void *buf, int len, struct sockaddr *from,
         netsnmp_assert(r2 == 0);
     }
 
+#if !defined(WIN32)
     for (cm = CMSG_FIRSTHDR(&msg); cm != NULL; cm = CMSG_NXTHDR(&msg, cm)) {
-#if  defined(linux) && defined(IP_PKTINFO)
+#if defined(HAVE_IP_PKTINFO)
         if (cm->cmsg_level == SOL_IP && cm->cmsg_type == IP_PKTINFO) {
             struct in_pktinfo* src = (struct in_pktinfo *)CMSG_DATA(cm);
             netsnmp_assert(dstip->sa_family == AF_INET);
@@ -155,24 +202,37 @@ netsnmp_udpbase_recvfrom(int s, void *buf, int len, struct sockaddr *from,
             *if_index = src->ipi_ifindex;
             DEBUGMSGTL(("udpbase:recv",
                         "got destination (local) addr %s, iface %d\n",
-                        inet_ntoa(((struct sockaddr_in*)dstip)->sin_addr),
-                        *if_index));
+                        inet_ntoa(src->ipi_addr), *if_index));
         }
-#elif defined(IP_RECVDSTADDR)
+#elif defined(HAVE_IP_RECVDSTADDR)
         if (cm->cmsg_level == IPPROTO_IP && cm->cmsg_type == IP_RECVDSTADDR) {
             struct in_addr* src = (struct in_addr *)CMSG_DATA(cm);
             ((struct sockaddr_in*)dstip)->sin_addr = *src;
             DEBUGMSGTL(("netsnmp_udp", "got destination (local) addr %s\n",
-                        inet_ntoa(((struct sockaddr_in*)dstip)->sin_addr)));
+                        inet_ntoa(*src)));
         }
 #endif
     }
+#else /* !defined(WIN32) */
+    for (cm = WSA_CMSG_FIRSTHDR(&msg); cm; cm = WSA_CMSG_NXTHDR(&msg, cm)) {
+        if (cm->cmsg_level == IPPROTO_IP && cm->cmsg_type == IP_PKTINFO) {
+            struct in_pktinfo* src = (struct in_pktinfo *)WSA_CMSG_DATA(cm);
+            netsnmp_assert(dstip->sa_family == AF_INET);
+            ((struct sockaddr_in*)dstip)->sin_addr = src->ipi_addr;
+            *if_index = src->ipi_ifindex;
+            DEBUGMSGTL(("udpbase:recv",
+                        "got destination (local) addr %s, iface %d\n",
+                        inet_ntoa(src->ipi_addr), *if_index));
+        }
+    }
+#endif /* !defined(WIN32) */
     return r;
 }
 
 int netsnmp_udpbase_sendto(int fd, struct in_addr *srcip, int if_index,
                            struct sockaddr *remote, void *data, int len)
 {
+#if !defined(WIN32)
     struct iovec iov;
     struct msghdr m = { 0 };
     char          cmsg[CMSG_SPACE(cmsg_data_size)];
@@ -200,18 +260,32 @@ int netsnmp_udpbase_sendto(int fd, struct in_addr *srcip, int if_index,
         cm = CMSG_FIRSTHDR(&m);
         cm->cmsg_len = CMSG_LEN(cmsg_data_size);
 
-#if  defined(linux) && defined(IP_PKTINFO)
+#if defined(HAVE_IP_PKTINFO)
         cm->cmsg_level = SOL_IP;
         cm->cmsg_type = IP_PKTINFO;
 
         {
-            struct in_pktinfo ipi = { 0 };
+            struct in_pktinfo ipi;
+
+            memset(&ipi, 0, sizeof(ipi));
+            /*
+             * Except in the case of responding
+             * to a broadcast, setting the ifindex
+             * when responding results in incorrect
+             * behavior of changing the source address
+             * that the manager sees the response
+             * come from.
+             */
             ipi.ipi_ifindex = 0;
+#if defined(cygwin)
+            ipi.ipi_addr.s_addr = srcip->s_addr;
+#else
             ipi.ipi_spec_dst.s_addr = srcip->s_addr;
+#endif
             memcpy(CMSG_DATA(cm), &ipi, sizeof(ipi));
         }
 
-        rc = sendmsg(fd, &m, NETSNMP_NOSIGNAL|NETSNMP_DONTWAIT);
+        rc = sendmsg(fd, &m, MSG_NOSIGNAL|MSG_DONTWAIT);
         if (rc >= 0 || errno != EINVAL)
             return rc;
 
@@ -224,9 +298,15 @@ int netsnmp_udpbase_sendto(int fd, struct in_addr *srcip, int if_index,
         DEBUGMSGTL(("udpbase:sendto", "re-sending on iface %d\n", if_index));
 
         {
-            struct in_pktinfo ipi = { 0 };
+            struct in_pktinfo ipi;
+
+            memset(&ipi, 0, sizeof(ipi));
             ipi.ipi_ifindex = if_index;
+#if defined(cygwin)
+            ipi.ipi_addr.s_addr = INADDR_ANY;
+#else
             ipi.ipi_spec_dst.s_addr = INADDR_ANY;
+#endif
             memcpy(CMSG_DATA(cm), &ipi, sizeof(ipi));
         }
 #elif defined(IP_SENDSRCADDR)
@@ -234,7 +314,7 @@ int netsnmp_udpbase_sendto(int fd, struct in_addr *srcip, int if_index,
         cm->cmsg_type = IP_SENDSRCADDR;
         memcpy((struct in_addr *)CMSG_DATA(cm), srcip, sizeof(struct in_addr));
 #endif
-        rc = sendmsg(fd, &m, NETSNMP_NOSIGNAL|NETSNMP_DONTWAIT);
+        rc = sendmsg(fd, &m, MSG_NOSIGNAL|MSG_DONTWAIT);
         if (rc >= 0 || errno != EINVAL)
             return rc;
 
@@ -243,9 +323,57 @@ int netsnmp_udpbase_sendto(int fd, struct in_addr *srcip, int if_index,
         m.msg_controllen = 0;
     }
 
-    return sendmsg(fd, &m, NETSNMP_NOSIGNAL|NETSNMP_DONTWAIT);
+    return sendmsg(fd, &m, MSG_NOSIGNAL|MSG_DONTWAIT);
+#else /* !defined(WIN32) */
+    WSABUF        wsabuf;
+    WSAMSG        m;
+    char          cmsg[WSA_CMSG_SPACE(sizeof(struct in_pktinfo))];
+    DWORD         bytes_sent;
+    int           rc;
+
+    wsabuf.buf = data;
+    wsabuf.len = len;
+
+    memset(&m, 0, sizeof(m));
+    m.name          = remote;
+    m.namelen       = sizeof(struct sockaddr_in);
+    m.lpBuffers     = &wsabuf;
+    m.dwBufferCount = 1;
+
+    if (pfWSASendMsg && srcip && srcip->s_addr != INADDR_ANY) {
+        WSACMSGHDR *cm;
+
+        DEBUGMSGTL(("udpbase:sendto", "sending from [%d] %s\n", if_index,
+                    inet_ntoa(*srcip)));
+
+        memset(cmsg, 0, sizeof(cmsg));
+
+        m.Control.buf = cmsg;
+        m.Control.len = sizeof(cmsg);
+
+        cm = WSA_CMSG_FIRSTHDR(&m);
+        cm->cmsg_len = WSA_CMSG_LEN(cmsg_data_size);
+        cm->cmsg_level = IPPROTO_IP;
+        cm->cmsg_type = IP_PKTINFO;
+
+        {
+            struct in_pktinfo ipi = { 0 };
+            ipi.ipi_ifindex = if_index;
+            ipi.ipi_addr.s_addr = srcip->s_addr;
+            memcpy(WSA_CMSG_DATA(cm), &ipi, sizeof(ipi));
+        }
+
+        rc = pfWSASendMsg(fd, &m, 0, &bytes_sent, NULL, NULL);
+        if (rc == 0)
+            return bytes_sent;
+        DEBUGMSGTL(("udpbase:sendto", "sending from [%d] %s failed: %d\n",
+                    if_index, inet_ntoa(*srcip), WSAGetLastError()));
+    }
+    rc = sendto(fd, data, len, 0, remote, sizeof(struct sockaddr));
+    return rc;
+#endif /* !defined(WIN32) */
 }
-#endif /* (linux && IP_PKTINFO) || IP_RECVDSTADDR */
+#endif /* HAVE_IP_PKTINFO || HAVE_IP_RECVDSTADDR */
 
 /*
  * You can write something into opaque that will subsequently get passed back 
@@ -258,7 +386,7 @@ netsnmp_udpbase_recv(netsnmp_transport *t, void *buf, int size,
                      void **opaque, int *olength)
 {
     int             rc = -1;
-    socklen_t       fromlen = sizeof(struct sockaddr);
+    socklen_t       fromlen = sizeof(netsnmp_sockaddr_storage);
     netsnmp_indexed_addr_pair *addr_pair = NULL;
     struct sockaddr *from;
 
@@ -280,7 +408,7 @@ netsnmp_udpbase_recv(netsnmp_transport *t, void *buf, int size,
                                       (struct sockaddr*)&(addr_pair->local_addr),
                                       &local_addr_len, &(addr_pair->if_index));
 #else
-            rc = recvfrom(t->sock, buf, size, NETSNMP_DONTWAIT, from, &fromlen);
+            rc = recvfrom(t->sock, buf, size, MSG_DONTWAIT, from, &fromlen);
 #endif /* netsnmp_udpbase_recvfrom_sendto_defined */
 	    if (rc < 0 && errno != EINTR) {
 		break;
@@ -352,3 +480,34 @@ netsnmp_udpbase_send(netsnmp_transport *t, void *buf, int size,
     }
     return rc;
 }
+
+void
+netsnmp_udp_base_ctor(void)
+{
+#if defined(WIN32) && defined(HAVE_IP_PKTINFO)
+    SOCKET s = socket(AF_INET, SOCK_DGRAM, 0);
+    GUID WSARecvMsgGuid = WSAID_WSARECVMSG;
+    GUID WSASendMsgGuid = WSAID_WSASENDMSG;
+    DWORD nbytes;
+    int result;
+
+    netsnmp_assert(s != SOCKET_ERROR);
+    /* WSARecvMsg(): Windows XP / Windows Server 2003 and later */
+    result = WSAIoctl(s, SIO_GET_EXTENSION_FUNCTION_POINTER,
+                      &WSARecvMsgGuid, sizeof(WSARecvMsgGuid),
+                      &pfWSARecvMsg, sizeof(pfWSARecvMsg), &nbytes, NULL, NULL);
+    if (result == SOCKET_ERROR)
+        DEBUGMSGTL(("netsnmp_udp", "WSARecvMsg() not found (errno %ld)\n",
+                    WSAGetLastError()));
+
+    /* WSASendMsg(): Windows Vista / Windows Server 2008 and later */
+    result = WSAIoctl(s, SIO_GET_EXTENSION_FUNCTION_POINTER,
+                      &WSASendMsgGuid, sizeof(WSASendMsgGuid),
+                      &pfWSASendMsg, sizeof(pfWSASendMsg), &nbytes, NULL, NULL);
+    if (result == SOCKET_ERROR)
+        DEBUGMSGTL(("netsnmp_udp", "WSASendMsg() not found (errno %ld)\n",
+                    WSAGetLastError()));
+
+    closesocket(s);
+#endif
+}
diff --git a/snmplib/transports/snmpUDPDomain.c b/snmplib/transports/snmpUDPDomain.c
index 638c2b1..a0abd8c 100644
--- a/snmplib/transports/snmpUDPDomain.c
+++ b/snmplib/transports/snmpUDPDomain.c
@@ -101,10 +101,7 @@ netsnmp_udp_fmtaddr(netsnmp_transport *t, void *data, int len)
 }
 
 
-
-#if (defined(linux) && defined(IP_PKTINFO)) \
-    || defined(IP_RECVDSTADDR) && HAVE_STRUCT_MSGHDR_MSG_CONTROL \
-                               && HAVE_STRUCT_MSGHDR_MSG_FLAGS
+#if defined(HAVE_IP_PKTINFO) || defined(HAVE_IP_RECVDSTADDR)
 
 int netsnmp_udp_recvfrom(int s, void *buf, int len, struct sockaddr *from, socklen_t *fromlen, struct sockaddr *dstip, socklen_t *dstlen, int *if_index)
 {
@@ -119,7 +116,7 @@ int netsnmp_udp_sendto(int fd, struct in_addr *srcip, int if_index, struct socka
     /** udpiv4 just calls udpbase. should we skip directly to there? */
     return netsnmp_udpipv4_sendto(fd, srcip, if_index, remote, data, len);
 }
-#endif /* (linux && IP_PKTINFO) || IP_RECVDSTADDR */
+#endif /* HAVE_IP_PKTINFO || HAVE_IP_RECVDSTADDR */
 
 /*
  * Open a UDP-based transport for SNMP.  Local is TRUE if addr is the local
diff --git a/snmplib/transports/snmpUDPIPv4BaseDomain.c b/snmplib/transports/snmpUDPIPv4BaseDomain.c
index c67427b..8c0fb05 100644
--- a/snmplib/transports/snmpUDPIPv4BaseDomain.c
+++ b/snmplib/transports/snmpUDPIPv4BaseDomain.c
@@ -40,10 +40,7 @@
 
 #include <net-snmp/library/snmpSocketBaseDomain.h>
 
-#if (defined(linux) && defined(IP_PKTINFO)) \
-    || defined(IP_RECVDSTADDR) && HAVE_STRUCT_MSGHDR_MSG_CONTROL \
-                               && HAVE_STRUCT_MSGHDR_MSG_FLAGS
-
+#if defined(HAVE_IP_PKTINFO) || defined(HAVE_IP_RECVDSTADDR)
 int netsnmp_udpipv4_recvfrom(int s, void *buf, int len, struct sockaddr *from,
                              socklen_t *fromlen, struct sockaddr *dstip,
                              socklen_t *dstlen, int *if_index)
@@ -57,7 +54,7 @@ int netsnmp_udpipv4_sendto(int fd, struct in_addr *srcip, int if_index,
 {
     return netsnmp_udpbase_sendto(fd, srcip, if_index, remote, data, len);
 }
-#endif /* (linux && IP_PKTINFO) || IP_RECVDSTADDR */
+#endif /* HAVE_IP_PKTINFO || HAVE_IP_RECVDSTADDR */
 
 netsnmp_transport *
 netsnmp_udpipv4base_transport(struct sockaddr_in *addr, int local)
@@ -114,11 +111,12 @@ netsnmp_udpipv4base_transport(struct sockaddr_in *addr, int local)
             return NULL;
         }
         memcpy(t->local, (u_char *) & (addr->sin_addr.s_addr), 4);
-        t->local[4] = (htons(addr->sin_port) & 0xff00) >> 8;
-        t->local[5] = (htons(addr->sin_port) & 0x00ff) >> 0;
+        t->local[4] = (ntohs(addr->sin_port) & 0xff00) >> 8;
+        t->local[5] = (ntohs(addr->sin_port) & 0x00ff) >> 0;
         t->local_length = 6;
 
-#if defined(linux) && defined(IP_PKTINFO)
+#ifndef WIN32
+#if defined(HAVE_IP_PKTINFO)
         { 
             int sockopt = 1;
             if (setsockopt(t->sock, SOL_IP, IP_PKTINFO, &sockopt, sizeof sockopt) == -1) {
@@ -129,7 +127,7 @@ netsnmp_udpipv4base_transport(struct sockaddr_in *addr, int local)
             }
             DEBUGMSGTL(("netsnmp_udpbase", "set IP_PKTINFO\n"));
         }
-#elif defined(IP_RECVDSTADDR)
+#elif defined(HAVE_IP_RECVDSTADDR)
         {
             int sockopt = 1;
             if (setsockopt(t->sock, IPPROTO_IP, IP_RECVDSTADDR, &sockopt, sizeof sockopt) == -1) {
@@ -141,6 +139,18 @@ netsnmp_udpipv4base_transport(struct sockaddr_in *addr, int local)
             DEBUGMSGTL(("netsnmp_udp", "set IP_RECVDSTADDR\n"));
         }
 #endif
+#else /* !defined(WIN32) */
+        { 
+            int sockopt = 1;
+            if (setsockopt(t->sock, IPPROTO_IP, IP_PKTINFO, (void *)&sockopt,
+			   sizeof(sockopt)) == -1) {
+                DEBUGMSGTL(("netsnmp_udpbase", "couldn't set IP_PKTINFO: %d\n",
+                            WSAGetLastError()));
+            } else {
+                DEBUGMSGTL(("netsnmp_udpbase", "set IP_PKTINFO\n"));
+            }
+        }
+#endif /* !defined(WIN32) */
         rc = bind(t->sock, (struct sockaddr *) addr,
                   sizeof(struct sockaddr));
         if (rc != 0) {
@@ -200,8 +210,8 @@ netsnmp_udpipv4base_transport(struct sockaddr_in *addr, int local)
             return NULL;
         }
         memcpy(t->remote, (u_char *) & (addr->sin_addr.s_addr), 4);
-        t->remote[4] = (htons(addr->sin_port) & 0xff00) >> 8;
-        t->remote[5] = (htons(addr->sin_port) & 0x00ff) >> 0;
+        t->remote[4] = (ntohs(addr->sin_port) & 0xff00) >> 8;
+        t->remote[5] = (ntohs(addr->sin_port) & 0x00ff) >> 0;
         t->remote_length = 6;
         memcpy(t->data, &addr_pair, sizeof(netsnmp_indexed_addr_pair));
         t->data_length = sizeof(netsnmp_indexed_addr_pair);
diff --git a/snmplib/transports/snmpUDPIPv6Domain.c b/snmplib/transports/snmpUDPIPv6Domain.c
index b3eaae4..18de876 100644
--- a/snmplib/transports/snmpUDPIPv6Domain.c
+++ b/snmplib/transports/snmpUDPIPv6Domain.c
@@ -236,11 +236,11 @@ netsnmp_udp6_transport(struct sockaddr_in6 *addr, int local)
 #ifdef IPV6_V6ONLY
         /* Try to restrict PF_INET6 socket to IPv6 communications only. */
         {
-	  int one=1;
-	  if (setsockopt(t->sock, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&one, sizeof(one)) != 0) {
-	    DEBUGMSGTL(("netsnmp_udp6", "couldn't set IPV6_V6ONLY to %d bytes: %s\n", one, strerror(errno)));
-	  } 
-	}
+            int one=1;
+            if (setsockopt(t->sock, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&one, sizeof(one)) != 0) {
+                DEBUGMSGTL(("netsnmp_udp6", "couldn't set IPV6_V6ONLY to %d bytes: %s\n", one, strerror(errno)));
+            } 
+        }
 #endif
 
         rc = bind(t->sock, (struct sockaddr *) addr,
@@ -257,8 +257,8 @@ netsnmp_udp6_transport(struct sockaddr_in6 *addr, int local)
             return NULL;
         }
         memcpy(t->local, addr->sin6_addr.s6_addr, 16);
-        t->local[16] = (addr->sin6_port & 0xff00) >> 8;
-        t->local[17] = (addr->sin6_port & 0x00ff) >> 0;
+        t->local[16] = (ntohs(addr->sin6_port) & 0xff00) >> 8;
+        t->local[17] = (ntohs(addr->sin6_port) & 0x00ff) >> 0;
         t->local_length = 18;
         t->data = NULL;
         t->data_length = 0;
@@ -286,8 +286,8 @@ netsnmp_udp6_transport(struct sockaddr_in6 *addr, int local)
             return NULL;
         }
         memcpy(t->remote, addr->sin6_addr.s6_addr, 16);
-        t->remote[16] = (addr->sin6_port & 0xff00) >> 8;
-        t->remote[17] = (addr->sin6_port & 0x00ff) >> 0;
+        t->remote[16] = (ntohs(addr->sin6_port) & 0xff00) >> 8;
+        t->remote[17] = (ntohs(addr->sin6_port) & 0x00ff) >> 0;
         t->remote_length = 18;
     }
 
@@ -707,10 +707,13 @@ netsnmp_udp6_getSecName(void *opaque, int olength,
                     *secName = c->secName;
                     *contextName = c->contextName;
                 }
+                break;
             }
         }
+        else {
+            DEBUGMSG(("netsnmp_udp6_getSecName", "... nope\n"));
+        }
     }
-    DEBUGMSG(("netsnmp_udp6_getSecName", "... nope\n"));
 
     if (ztcommunity != NULL) {
         free(ztcommunity);
@@ -751,7 +754,7 @@ netsnmp_udp6_create_ostring(const u_char * o, size_t o_len, int local)
         memset((u_char *) & addr, 0, sizeof(struct sockaddr_in6));
         addr.sin6_family = AF_INET6;
         memcpy((u_char *) & (addr.sin6_addr.s6_addr), o, 16);
-        addr.sin6_port = (o[16] << 8) + o[17];
+        addr.sin6_port = htons((o[16] << 8) + o[17]);
         return netsnmp_udp6_transport(&addr, local);
     }
     return NULL;
diff --git a/snmplib/transports/snmpUnixDomain.c b/snmplib/transports/snmpUnixDomain.c
index 674dc2b..47dffc1 100644
--- a/snmplib/transports/snmpUnixDomain.c
+++ b/snmplib/transports/snmpUnixDomain.c
@@ -248,7 +248,7 @@ netsnmp_unix_accept(netsnmp_transport *t)
         }
 
         DEBUGMSGTL(("netsnmp_unix", "accept succeeded (farend %p len %d)\n",
-                    farend, farendlen));
+                    farend, (int) farendlen));
         t->data = farend;
         t->data_length = sizeof(struct sockaddr_un);
        netsnmp_sock_buffer_set(newsock, SO_SNDBUF, 1, 0);
diff --git a/snmplib/winservice.c b/snmplib/winservice.c
index 10b6e1c..bc27f8c 100644
--- a/snmplib/winservice.c
+++ b/snmplib/winservice.c
@@ -39,6 +39,8 @@ labelFIN: \
 
 #if defined(WIN32) && defined(HAVE_WIN32_PLATFORM_SDK) && !defined(mingw32)
 #pragma comment(lib, "iphlpapi.lib")
+#endif
+#if defined(WIN32) && !defined(mingw32)
 #ifdef USING_WINEXTDLL_MODULE
 #pragma comment(lib, "snmpapi.lib")
 #pragma comment(lib, "mgmtapi.lib")
diff --git a/testing/Makefile.in b/testing/Makefile.in
index 0e70132..2a64137 100644
--- a/testing/Makefile.in
+++ b/testing/Makefile.in
@@ -34,7 +34,7 @@ test:
 	@if test "x$(PERL)" = "x" \
 	         -o "x at PERL_SYSTEM_INVOKES_POSIX_SHELL@" != xyes \
 		 || { ! $(PERL) -e 'require TAP::Harness;' >/dev/null 2>&1 \
-		    && ! $(PERL) -e 'require Test::Harness;' >/dev/null 2>&1; };\
+		    && ! $(PERL) -e 'require Test::Harness; die if $$Test::Harness::VERSION < 1.21;' >/dev/null 2>&1; };\
 	then \
 		echo $(srcdir)/RUNTESTS ; \
 		$(srcdir)/RUNTESTS ; \
diff --git a/testing/RUNFULLTESTS b/testing/RUNFULLTESTS
index 7f60157..40a40b8 100755
--- a/testing/RUNFULLTESTS
+++ b/testing/RUNFULLTESTS
@@ -94,6 +94,9 @@ Either:
 ";
 	exit 1;
     }
+    DIE("Test::Harness must be of version 1.21 or newer\n" .
+	"Install the TAP::Harness module or use the RUNTESTS script\n")
+      if $Test::Harness::VERSION < 1.21;
 }
 
 
@@ -264,7 +267,7 @@ sub rename_tests {
     return @newtests;
 }
 
-# called to possibly manipluate the list of tests to run by building some
+# called to possibly manipulate the list of tests to run by building some
 sub build_tests {
     my (@tests) = @_;
     my @newtests;
diff --git a/testing/RUNTESTS b/testing/RUNTESTS
index e11c969..4933307 100755
--- a/testing/RUNTESTS
+++ b/testing/RUNTESTS
@@ -12,13 +12,17 @@ fi
 
 # Make sure MinGW / MSYS users have the pskill.exe program to stop the agent and
 # snmptrapd
-if [ "x$OSTYPE" = "xmsys" -a "x`type pskill.exe 2>/dev/null`" = "x" ]; then
-    echo "Could not find pskill.exe. Aborting tests."
-    echo "pskill.exe can be installed as follows:"
-    echo "- Download pskill.exe from http://technet.microsoft.com/en-us/sysinternals/default.aspx."
-    echo "- Copy pskill.exe to C:\\MinGW\\msys\\1.0\\bin."
-    exit 1
-fi 
+if [ "x$OSTYPE" = "xmsys" ]; then
+    for e in pskill.exe pslist.exe; do
+	if [ "x`type $e 2>/dev/null`" = "x" ]; then
+	    echo "Could not find $e. Aborting tests."
+	    echo "$e can be installed as follows:"
+	    echo "- Download PSTools.zip from http://technet.microsoft.com/en-us/sysinternals/default."
+	    echo "- Copy $e to C:\\MinGW\\msys\\1.0\\bin."
+	    exit 1
+	fi
+    done
+fi
 
 success_count=0
 failed_count=0
diff --git a/testing/failed_tests b/testing/failed_tests
deleted file mode 100644
index 0a01dbd..0000000
--- a/testing/failed_tests
+++ /dev/null
@@ -1 +0,0 @@
-/home/hardaker/src/snmp/net-snmp/net-snmp-5.7.2.1/testing/fulltests/default/T115agentxperl_simple
diff --git a/testing/fulltests/default/Sv3usmconfigbase b/testing/fulltests/default/Sv3usmconfigbase
index d2fb981..b2e1eb2 100644
--- a/testing/fulltests/default/Sv3usmconfigbase
+++ b/testing/fulltests/default/Sv3usmconfigbase
@@ -57,8 +57,8 @@ CREATEUSERCMD="createUser"
 
 ## auth setup
 if [ "x$DEFSECURITYLEVEL" = "xauthPriv" -o "x$DEFSECURITYLEVEL" = "xauthNoPriv" ]; then
-  [ "x$MAXAUTHTYPE" = "x" ] && SKIP
-  [ "x$DEFAUTHTYPE" = "xSHA" -a "x$MAXAUTHTYPE" != "xSHA" ] && SKIP
+  [ "x$MAXAUTHTYPE" = "x" ] && SKIP MAXAUTHTYPE not set
+  [ "x$DEFAUTHTYPE" = "xSHA" -a "x$MAXAUTHTYPE" != "xSHA" ] && SKIP Cannot do SHA
   [ "x$DEFAUTHTYPE" = "x" ] && DEFAUTHTYPE=$MAXAUTHTYPE
   # user/pass setup (XXX: randomize)
   [ "x$TESTAUTHUSER" = "x" ] && TESTAUTHUSER=initial_auth
@@ -76,8 +76,8 @@ fi
 
 ## priv setup
 if [ "x$DEFSECURITYLEVEL" = "xauthPriv" ]; then
-  [ "x$MAXPRIVTYPE" = "x" ] && SKIP
-  [ "x$DEFPRIVTYPE" = "xAES" -a "x$MAXPRIVTYPE" != "xAES" ] && SKIP
+  [ "x$MAXPRIVTYPE" = "x" ] && SKIP MAXPRIVTYPE not set
+  [ "x$DEFPRIVTYPE" = "xAES" -a "x$MAXPRIVTYPE" != "xAES" ] && SKIP Cannot do AES
   [ "x$DEFPRIVTYPE" = "x" ] && DEFPRIVTYPE=$MAXPRIVTYPE
   # user/pass setup (XXX: randomize)
   [ "x$TESTPRIVUSER" = "x" ] && TESTPRIVUSER=initial_priv
diff --git a/testing/fulltests/default/T027snmpv3Defaults_simple b/testing/fulltests/default/T027snmpv3Defaults_simple
index ea42f47..3bbf5e0 100644
--- a/testing/fulltests/default/T027snmpv3Defaults_simple
+++ b/testing/fulltests/default/T027snmpv3Defaults_simple
@@ -19,6 +19,7 @@ DEFAUTHTYPE="SHA"
 
 STARTAGENT
 
+CONFIGAPP defVersion 3
 CONFIGAPP defPrivType AES
 CONFIGAPP defAuthType SHA
 CONFIGAPP defContext \"\"
diff --git a/testing/fulltests/default/T060trapdperl_simple b/testing/fulltests/default/T060trapdperl_simple
index 33741e0..70decf4 100755
--- a/testing/fulltests/default/T060trapdperl_simple
+++ b/testing/fulltests/default/T060trapdperl_simple
@@ -31,11 +31,11 @@ echo "use NetSNMP::TrapReceiver;" >> ${SNMP_TMPDIR}/snmp_perl_trapd.pl
 
 CONFIGTRAPD authcommunity execute $TESTCOMMUNITY
 CONFIGTRAPD perlInitFile ${SNMP_TMPDIR}/snmp_perl_trapd.pl
-CONFIGTRAPD 'perl sub my_receiver { open LOG,">>'$EMBPERL_LOGFILE'"; print LOG "handled_by_embperl\n"; close LOG };'
-CONFIGTRAPD 'perl sub my_receiver2 { open LOG,">>'$EMBPERL_LOGFILE'"; print LOG "handled_again_by_embperl\n"; close LOG };'
+CONFIGTRAPD 'perl sub my_receiver { open LOG,">>'$EMBPERL_LOGFILE'"; print LOG "handled_by_embperl\\n"; close LOG };'
+CONFIGTRAPD 'perl sub my_receiver2 { open LOG,">>'$EMBPERL_LOGFILE'"; print LOG "handled_again_by_embperl\\n"; close LOG };'
 CONFIGTRAPD 'perl NetSNMP::TrapReceiver::register("'$TESTOID'", \&my_receiver) || warn "register_perl_handler_failed";'
 CONFIGTRAPD 'perl NetSNMP::TrapReceiver::register("'$TESTOID2'", \&my_receiver2) || warn "register_second_perl_handler_failed";'
-CONFIGTRAPD 'perl print STDERR "registered_perl_handler_ok\n";'
+CONFIGTRAPD 'perl print STDERR "registered_perl_handler_ok\\n";'
 CONFIGTRAPD agentxsocket /dev/null
 
 STARTTRAPD
diff --git a/testing/fulltests/default/T065agentextend_sh_simple b/testing/fulltests/default/T065agentextend_sh_simple
new file mode 100644
index 0000000..52ea826
--- /dev/null
+++ b/testing/fulltests/default/T065agentextend_sh_simple
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+# See also http://sourceforge.net/p/net-snmp/bugs/2575/
+
+pwd
+
+. ../support/simple_eval_tools.sh
+
+HEADER "extending agent functionality with extend and an external shell script"
+
+[ "x$OSTYPE" = xmsys -a "x$MSYS_SH" = x ] && SKIP "\$MSYS_SH has not been set"
+SKIPIF NETSNMP_DISABLE_SNMPV2C
+SKIPIFNOT USING_AGENT_EXTEND_MODULE
+SKIPIFNOT USING_UTILITIES_EXECUTE_MODULE
+
+# make sure snmpget can be executed
+SNMPGET="${SNMP_UPDIR}/apps/snmpget"
+[ -x "$SNMPGET" ] || SKIP snmpget not compiled
+SNMPSET="${builddir}/apps/snmpset"
+[ -x "$SNMPSET" ] || SKIP snmpset not compiled
+
+snmp_write_access='all'
+TESTCOMMUNITY=testcommunity
+. ./Sv2cconfig
+
+#
+# Begin test
+#
+
+oid=.1.3.6.1.4.1.8072.1.3.2
+index='"two_numbers"'
+echo_two_numbers=$SNMP_TMPDIR/echo_two_numbers
+number1=111
+number2=222
+rm -f $echo_two_numbers
+cat <<EOF >$echo_two_numbers
+#!$(if [ "x$MSYS_SH" != x ]; then echo "$MSYS_SH"; else echo /bin/sh; fi)
+echo $number1
+echo $number2
+EOF
+chmod a+x $echo_two_numbers
+CONFIGAGENT extend $index $echo_two_numbers
+
+STARTAGENT
+
+CAPTURE "$SNMPSET $SNMP_FLAGS -$snmp_version -c $TESTCOMMUNITY $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT versionUpdateConfig.0 i 1"
+CHECKORDIE "versionUpdateConfig.0 = INTEGER: 1"
+
+CAPTURE "$SNMPGET $SNMP_FLAGS -$snmp_version -c $TESTCOMMUNITY $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT ${oid}.3.1.1.$index"
+CHECKORDIE "STRING: ${number1}"
+
+CAPTURE "$SNMPGET $SNMP_FLAGS -$snmp_version -c $TESTCOMMUNITY $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT ${oid}.3.1.2.$index"
+CHECKORDIE "STRING: ${number1}"
+
+CAPTURE "$SNMPGET $SNMP_FLAGS -$snmp_version -c $TESTCOMMUNITY $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT ${oid}.4.1.2.$index.1"
+CHECKORDIE "STRING: ${number1}"
+
+CAPTURE "$SNMPGET $SNMP_FLAGS -$snmp_version -c $TESTCOMMUNITY $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT ${oid}.3.1.3.$index"
+CHECKORDIE "INTEGER: 2"
+
+CAPTURE "$SNMPGET $SNMP_FLAGS -$snmp_version -c $TESTCOMMUNITY $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT ${oid}.3.1.4.$index"
+CHECKORDIE "INTEGER: 0"
+
+STOPAGENT
+FINISHED
diff --git a/testing/fulltests/default/T065agentextend_simple b/testing/fulltests/default/T065agentextend_simple
index 07dcae3..f419266 100644
--- a/testing/fulltests/default/T065agentextend_simple
+++ b/testing/fulltests/default/T065agentextend_simple
@@ -11,7 +11,7 @@ SKIPIFNOT USING_UTILITIES_EXECUTE_MODULE
 
 # make sure snmpget can be executed
 SNMPGET="${SNMP_UPDIR}/apps/snmpget"
-[ -x "$SNMPGET" ] || SKIP
+[ -x "$SNMPGET" ] || SKIP snmpget not compiled
 
 snmp_version=v2c
 TESTCOMMUNITY=testcommunity
diff --git a/testing/fulltests/default/T066pass_simple b/testing/fulltests/default/T066pass_simple
index 6396ed1..bdee164 100644
--- a/testing/fulltests/default/T066pass_simple
+++ b/testing/fulltests/default/T066pass_simple
@@ -14,9 +14,9 @@ SKIPIFNOT USING_UTILITIES_EXECUTE_MODULE
 
 # make sure snmpget and snmpwalk can be executed
 SNMPGET="${builddir}/apps/snmpget"
-[ -x "$SNMPGET" ] || SKIP
+[ -x "$SNMPGET" ] || SKIP snmpget not compiled
 SNMPWALK="${builddir}/apps/snmpwalk"
-[ -x "$SNMPWALK" ] || SKIP
+[ -x "$SNMPWALK" ] || SKIP snmpwalk not compiled
 
 snmp_version=v2c
 TESTCOMMUNITY=testcommunity
diff --git a/testing/fulltests/default/T067passpersist_simple b/testing/fulltests/default/T067passpersist_simple
index 6051b8f..40f1333 100644
--- a/testing/fulltests/default/T067passpersist_simple
+++ b/testing/fulltests/default/T067passpersist_simple
@@ -15,9 +15,9 @@ SKIPIFNOT USING_UCD_SNMP_PASS_PERSIST_MODULE
 
 # make sure snmpget and snmpwalk can be executed
 SNMPGET="${builddir}/apps/snmpget"
-[ -x "$SNMPGET" ] || SKIP
+[ -x "$SNMPGET" ] || SKIP snmpget not compiled
 SNMPWALK="${builddir}/apps/snmpwalk"
-[ -x "$SNMPWALK" ] || SKIP
+[ -x "$SNMPWALK" ] || SKIP snmpwalk not compiled
 
 snmp_version=v2c
 TESTCOMMUNITY=testcommunity
diff --git a/testing/fulltests/default/T068execfix_simple b/testing/fulltests/default/T068execfix_simple
new file mode 100644
index 0000000..fa81835
--- /dev/null
+++ b/testing/fulltests/default/T068execfix_simple
@@ -0,0 +1,72 @@
+#!/bin/sh
+
+. ../support/simple_eval_tools.sh
+
+HEADER "execfix configuration directive"
+
+SKIPIFNOT USING_UCD_SNMP_EXTENSIBLE_MODULE
+SKIPIF NETSNMP_DISABLE_SET_SUPPORT
+SKIPIF NETSNMP_NO_WRITE_SUPPORT
+SKIPIF NETSNMP_DISABLE_SNMPV2C
+
+# make sure snmpset and snmpwalk can be executed
+SNMPSET="${builddir}/apps/snmpset"
+[ -x "$SNMPSET" ] || SKIP snmpset not compiled
+SNMPWALK="${builddir}/apps/snmpwalk"
+[ -x "$SNMPWALK" ] || SKIP snmpwalk not compiled
+
+snmp_version=v2c
+snmp_write_access='all'
+TESTCOMMUNITY=testcommunity
+. ./Sv2cconfig
+
+#
+# Begin test
+#
+if [ "x$OSTYPE" = xmsys ]; then
+    cmd1="true"
+    cmd2="false"
+    echo="echo"
+else
+    cmd1="$(which true)"
+    cmd2="$(which false)"
+    echo="$(which echo)"
+fi
+CONFIGAGENT exec    true-command    $cmd1
+CONFIGAGENT execfix true-command    $cmd1
+CONFIGAGENT exec    false-command   $cmd2
+CONFIGAGENT execfix false-command   $cmd2
+CONFIGAGENT exec    echo-%s-command ${echo} %s
+CONFIGAGENT execfix echo-%s-command ${echo} fix-%s
+
+STARTAGENT
+
+# Check a full walk of UCD-SNMP-MIB::extTable
+CAPTURE "$SNMPWALK $SNMP_FLAGS -$snmp_version -c $TESTCOMMUNITY $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT UCD-SNMP-MIB::extEntry"
+CHECK 'UCD-SNMP-MIB::extNames.1 = STRING: true-command$'
+CHECK 'UCD-SNMP-MIB::extCommand.1 = STRING: '"$cmd1"
+CHECK 'UCD-SNMP-MIB::extResult.1 = INTEGER: 0$'
+CHECK 'UCD-SNMP-MIB::extOutput.1 = STRING: $'
+CHECK 'UCD-SNMP-MIB::extErrFix.1 = INTEGER: noError(0)$'
+CHECK 'UCD-SNMP-MIB::extErrFixCmd.1 = STRING: '"$cmd1"
+CHECK 'UCD-SNMP-MIB::extNames.2 = STRING: false-command$'
+CHECK 'UCD-SNMP-MIB::extCommand.2 = STRING: '"$cmd2"'$'
+CHECK 'UCD-SNMP-MIB::extResult.2 = INTEGER: 1$'
+CHECK 'UCD-SNMP-MIB::extOutput.2 = STRING: $'
+CHECK 'UCD-SNMP-MIB::extErrFix.2 = INTEGER: noError(0)$'
+CHECK 'UCD-SNMP-MIB::extErrFixCmd.2 = STRING: '"$cmd2"'$'
+CHECK 'UCD-SNMP-MIB::extNames.3 = STRING: echo-%s-command$'
+CHECK 'UCD-SNMP-MIB::extCommand.3 = STRING: '"${echo}"' %s$'
+CHECK 'UCD-SNMP-MIB::extResult.3 = INTEGER: 0$'
+CHECK 'UCD-SNMP-MIB::extOutput.3 = STRING: %s$'
+CHECK 'UCD-SNMP-MIB::extErrFix.3 = INTEGER: noError(0)$'
+CHECK 'UCD-SNMP-MIB::extErrFixCmd.3 = STRING: '"${echo}"' fix-%s$'
+
+CAPTURE "$SNMPSET $SNMP_FLAGS -$snmp_version -c $TESTCOMMUNITY -r0 $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT UCD-SNMP-MIB::extErrFix.3 i 1"
+CHECK 'UCD-SNMP-MIB::extErrFix.3 = INTEGER: runFix(1)'
+
+CAPTURE "$SNMPWALK $SNMP_FLAGS -$snmp_version -c $TESTCOMMUNITY $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT UCD-SNMP-MIB::extEntry"
+CHECK 'UCD-SNMP-MIB::extErrFixCmd.3 = STRING: '"${echo}"' fix-%s'
+
+STOPAGENT
+FINISHED
diff --git a/testing/fulltests/default/T071com2sec6_simple b/testing/fulltests/default/T071com2sec6_simple
index 550a25b..8c90ad0 100644
--- a/testing/fulltests/default/T071com2sec6_simple
+++ b/testing/fulltests/default/T071com2sec6_simple
@@ -76,9 +76,9 @@ CONFIGAGENT 'com2sec6 t607b a234567890123456789012345678901234567890123456789012
 
 # 608 Lookup tests, require network access
 # 608a Test lookup returning a single host
-CONFIGAGENT 'com2sec6 t608a www.ietf.org c608a'
+CONFIGAGENT 'com2sec6 t608a oneaaaa.net-snmp.org c608a'
 # 608b Test lookup returning multiple hosts
-CONFIGAGENT 'com2sec6 t608b ipv6.google.com c608b'
+CONFIGAGENT 'com2sec6 t608b twoaaaa.net-snmp.org c608b'
 
 # Default agent setup
 CONFIGAGENT "[snmp] persistentdir $SNMP_TMP_PERSISTENTDIR"
diff --git a/testing/fulltests/default/T072com2secunix_simple b/testing/fulltests/default/T072com2secunix_simple
index a89de5d..1f380f2 100644
--- a/testing/fulltests/default/T072com2secunix_simple
+++ b/testing/fulltests/default/T072com2secunix_simple
@@ -16,7 +16,7 @@ then AWK=nawk
 else AWK=awk
 fi
 
-sun_path_sized=`$AWK '/^#define SIZEOF_SOCKADDR_UN_SUN_PATH/ { res = "a"; for(n = 2; n < $3; ++n) { res = res substr("1234567890", n % 10, 1); } print res; }' $SNMP_UPDIR/include/net-snmp/net-snmp-config.h`
+sun_path_sized=`$AWK '/^#define SIZEOF_SOCKADDR_UN_SUN_PATH/ { res = "a"; for(n = 2; n < $3; ++n) { res = res substr("1234567890", n % 10 + 1, 1); } print res; }' $SNMP_UPDIR/include/net-snmp/net-snmp-config.h`
 
 #
 # Begin test
diff --git a/testing/fulltests/default/T115agentxperl_simple b/testing/fulltests/default/T115agentxperl_simple
index a44a202..bdf6471 100755
--- a/testing/fulltests/default/T115agentxperl_simple
+++ b/testing/fulltests/default/T115agentxperl_simple
@@ -9,7 +9,7 @@ SKIPIFNOT USING_AGENTX_MASTER_MODULE
 SKIPIFNOT USING_AGENTX_SUBAGENT_MODULE
 SKIPIFNOT HAVE_SIGHUP
 # make sure the toolkit has been configured --with-perl-modules
-[ -d ${SNMP_UPDIR}/perl/blib/arch/auto/NetSNMP/agent ] || SKIP
+[ -d ${SNMP_UPDIR}/perl/blib/arch/auto/NetSNMP/agent ] || SKIP Not --with-perl-modules
 
 #
 # Begin test
diff --git a/testing/fulltests/default/T120proxyget_simple b/testing/fulltests/default/T120proxyget_simple
index 12c58fd..16e9478 100644
--- a/testing/fulltests/default/T120proxyget_simple
+++ b/testing/fulltests/default/T120proxyget_simple
@@ -9,7 +9,7 @@ SKIPIFNOT USING_MIBII_SYSTEM_MIB_MODULE
 SKIPIF NETSNMP_DISABLE_SNMPV2C
 
 # XXX: ucd-snmp/proxy doesn't properly support TCP -- remove this once it does
-[ "x$SNMP_TRANSPORT_SPEC" = "xtcp" -o "x$SNMP_TRANSPORT_SPEC" = "xtcp6" ] && SKIP
+[ "x$SNMP_TRANSPORT_SPEC" = "xtcp" -o "x$SNMP_TRANSPORT_SPEC" = "xtcp6" ] && SKIP Test does not support TCP
 
 #
 # Begin test
diff --git a/testing/fulltests/default/T121proxyset_simple b/testing/fulltests/default/T121proxyset_simple
index 977ddb9..dd19641 100644
--- a/testing/fulltests/default/T121proxyset_simple
+++ b/testing/fulltests/default/T121proxyset_simple
@@ -11,7 +11,7 @@ SKIPIF    NETSNMP_DISABLE_SET_SUPPORT
 SKIPIF    NETSNMP_NO_WRITE_SUPPORT
 
 # XXX: ucd-snmp/proxy doesn't properly support TCP -- remove this once it does
-[ "x$SNMP_TRANSPORT_SPEC" = "xtcp" -o "x$SNMP_TRANSPORT_SPEC" = "xtcp6" ] && SKIP
+[ "x$SNMP_TRANSPORT_SPEC" = "xtcp" -o "x$SNMP_TRANSPORT_SPEC" = "xtcp6" ] && SKIP Test does not support TCP
 
 #
 # Begin test
diff --git a/testing/fulltests/default/T122proxysetfail_simple b/testing/fulltests/default/T122proxysetfail_simple
index 7dad797..7f27873 100644
--- a/testing/fulltests/default/T122proxysetfail_simple
+++ b/testing/fulltests/default/T122proxysetfail_simple
@@ -11,7 +11,7 @@ SKIPIF    NETSNMP_DISABLE_SET_SUPPORT
 SKIPIF    NETSNMP_NO_WRITE_SUPPORT
 
 # XXX: ucd-snmp/proxy doesn't properly support TCP -- remove this once it does
-[ "x$SNMP_TRANSPORT_SPEC" = "xtcp" ] && SKIP
+[ "x$SNMP_TRANSPORT_SPEC" = "xtcp" ] && SKIP Test does not support TCP
 
 #
 # Begin test
diff --git a/testing/fulltests/default/T160snmpnetstat_simple b/testing/fulltests/default/T160snmpnetstat_simple
index 33159d2..e20bbbd 100644
--- a/testing/fulltests/default/T160snmpnetstat_simple
+++ b/testing/fulltests/default/T160snmpnetstat_simple
@@ -13,25 +13,25 @@ elif [ "x$SNMP_TRANSPORT_SPEC" = "xtcp" ]; then
   SKIPIFNOT USING_MIBII_TCPTABLE_MODULE
 else
   HEADER "if snmpnetstat finds the running agent in udpTable/tcpTable"
-  SKIP
+  SKIP Not using TCP or UDP transport
 fi
 
 # on some systems the agent needs to be run as root to access udpTable/tcpTable
 # - else force skip
 case "x`uname -s`" in
-  xAIX)     [ "x`id -u`" != "x0" ] && SKIP;;
-  xHP-UX)   [ "x`id -u`" != "x0" ] && SKIP;;
-  xIRIX*)   [ "x`id -u`" != "x0" ] && SKIP;;
-  xNetBSD)  [ "x`id -u`" != "x0" ] && SKIP;;
-  xOpenBSD) [ "x`id -u`" != "x0" ] && SKIP;;
-  xOSF1)    [ "x`id -u`" != "x0" ] && SKIP;;
+  xAIX)     [ "x`id -u`" != "x0" ] && SKIP Not running as root;;
+  xHP-UX)   [ "x`id -u`" != "x0" ] && SKIP Not running as root;;
+  xIRIX*)   [ "x`id -u`" != "x0" ] && SKIP Not running as root;;
+  xNetBSD)  [ "x`id -u`" != "x0" ] && SKIP Not running as root;;
+  xOpenBSD) [ "x`id -u`" != "x0" ] && SKIP Not running as root;;
+  xOSF1)    [ "x`id -u`" != "x0" ] && SKIP Not running as root;;
 esac
 
 SKIPIF NETSNMP_DISABLE_SNMPV2C
 
 # make sure snmpnetstat can be executed
 SNMPNETSTAT="${SNMP_UPDIR}/apps/snmpnetstat/snmpnetstat"
-[ -x "$SNMPNETSTAT" ] || SKIP
+[ -x "$SNMPNETSTAT" ] || SKIP snmpnetstat not compiled
 
 snmp_version=v2c
 . ./Sv2cconfig
diff --git a/testing/fulltests/default/T161snmpTargetAddr_simple b/testing/fulltests/default/T161snmpTargetAddr_simple
new file mode 100644
index 0000000..00e094e
--- /dev/null
+++ b/testing/fulltests/default/T161snmpTargetAddr_simple
@@ -0,0 +1,142 @@
+#!/bin/sh
+
+. ../support/simple_eval_tools.sh
+
+HEADER snmpTargetAddrTable
+
+SKIPIF NETSNMP_DISABLE_SET_SUPPORT
+SKIPIF NETSNMP_NO_WRITE_SUPPORT
+SKIPIF NETSNMP_DISABLE_SNMPV2C
+SKIPIFNOT USING_TARGET_SNMPTARGETADDRENTRY_MODULE
+
+#
+# Begin test
+#
+
+. ./Sv3config
+
+STARTAGENT
+
+# Check that the table starts out empty
+CAPTURE "snmpgetnext -On -Oe $SNMP_FLAGS $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.6.3.12.1.2.1"
+
+CHECKANDDIE "^.1.3.6.1.6.3.12.1.2.1"
+
+# Create an entry with index '' (empty)
+CAPTURE "snmpset -On -Oe $SNMP_FLAGS $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.6.3.12.1.2.1.9 i 5"
+
+CHECKORDIE "noCreation"
+
+# Create an entry with index '0123456789A123456789B123456789C123' (overlong)
+CAPTURE "snmpset -On -Oe $SNMP_FLAGS $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.6.3.12.1.2.1.9.30.31.32.33.34.35.36.37.38.39.65.31.32.33.34.35.36.37.38.39.66.31.32.33.34.35.36.37.38.39.67.31.32.33 i 5"
+
+CHECKORDIE "noCreation"
+
+# Create an entry with index 'B\0A'
+CAPTURE "snmpset -On -Oe $SNMP_FLAGS $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.6.3.12.1.2.1.9.66.0.65 i 5"
+
+CHECKORDIE ".1.3.6.1.6.3.12.1.2.1.9.66.0.65 = INTEGER: 5"
+
+# Check that the table contains the 'B\0A' entry and no other
+CAPTURE "snmpwalk -On -Oe $SNMP_FLAGS $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.6.3.12.1.2.1.9"
+
+CHECK "^.1.3.6.1.6.3.12.1.2.1.9"
+CHECKORDIE ".1.3.6.1.6.3.12.1.2.1.9.66.0.65 ="
+
+# Delete an entry with index 'B\0A'
+CAPTURE "snmpset -On -Oe $SNMP_FLAGS $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.6.3.12.1.2.1.9.66.0.65 i 6"
+
+# Create an entry with index 'A'
+CAPTURE "snmpset -On -Oe $SNMP_FLAGS $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.6.3.12.1.2.1.9.65 i 5"
+
+CHECKORDIE ".1.3.6.1.6.3.12.1.2.1.9.65 = INTEGER: 5"
+
+# Check that the table contains one and only one entry
+CAPTURE "snmpwalk -On -Oe $SNMP_FLAGS $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.6.3.12.1.2.1.9"
+
+CHECK "^.1.3.6.1.6.3.12.1.2.1.9"
+
+# Check that the entry is the expected one
+CHECKORDIE ".1.3.6.1.6.3.12.1.2.1.9.65 = INTEGER: 3"
+
+# Check that the default values are set as expected
+CAPTURE "snmpget -On -Oe $SNMP_FLAGS $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.6.3.12.1.2.1.2.65 .1.3.6.1.6.3.12.1.2.1.3.65 .1.3.6.1.6.3.12.1.2.1.4.65 .1.3.6.1.6.3.12.1.2.1.5.65 .1.3.6.1.6.3.12.1.2.1.6.65 .1.3.6.1.6.3.12.1.2.1.7.65 .1.3.6.1.6.3.12.1.2.1.8.65 .1.3.6.1.6.3.12.1.2.1.9.65"
+
+CHECKORDIE ".1.3.6.1.6.3.12.1.2.1.2.65 = No Such Instance"
+CHECKORDIE ".1.3.6.1.6.3.12.1.2.1.3.65 = No Such Instance"
+CHECKORDIE ".1.3.6.1.6.3.12.1.2.1.4.65 = INTEGER: 1500"
+CHECKORDIE ".1.3.6.1.6.3.12.1.2.1.5.65 = INTEGER: 3"
+CHECKORDIE ".1.3.6.1.6.3.12.1.2.1.6.65 = STRING: "
+CHECKORDIE ".1.3.6.1.6.3.12.1.2.1.7.65 = No Such Instance"
+CHECKORDIE ".1.3.6.1.6.3.12.1.2.1.8.65 = INTEGER: 3"
+CHECKORDIE ".1.3.6.1.6.3.12.1.2.1.9.65 = INTEGER: 3"
+
+# Try to set timeout < 0
+CAPTURE "snmpset -On -Oe -Ir $SNMP_FLAGS $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.6.3.12.1.2.1.4.65 i -1"
+
+CHECKORDIE "wrongValue"
+
+# Try to set timeout to 2147483647
+CAPTURE "snmpset -On -Oe -Ir $SNMP_FLAGS $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.6.3.12.1.2.1.4.65 i 2147483647"
+
+CHECKORDIE "^.1.3.6.1.6.3.12.1.2.1.4.65 = INTEGER: 2147483647"
+
+# Fetch and verify that the timeout still is 2147483647
+CAPTURE "snmpget -On -Oe $SNMP_FLAGS $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.6.3.12.1.2.1.4.65"
+
+CHECKORDIE "^.1.3.6.1.6.3.12.1.2.1.4.65 = INTEGER: 2147483647"
+
+# Try to set retry count < 0
+CAPTURE "snmpset -On -Oe -Ir $SNMP_FLAGS $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.6.3.12.1.2.1.5.65 i -1"
+
+CHECKORDIE "wrongValue"
+
+# Try to set retry count > 255
+CAPTURE "snmpset -On -Oe -Ir $SNMP_FLAGS $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.6.3.12.1.2.1.5.65 i 256"
+
+CHECKORDIE "wrongValue"
+
+# Try to set taglist to a single value
+CAPTURE "snmpset -On -Oe $SNMP_FLAGS $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.6.3.12.1.2.1.6.65 s alfa"
+
+CHECKORDIE ".1.3.6.1.6.3.12.1.2.1.6.65 = STRING: alfa"
+
+# Fetch and verify that the taglist have kept it's value
+CAPTURE "snmpget -On -Oe $SNMP_FLAGS $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.6.3.12.1.2.1.6.65"
+
+CHECKORDIE ".1.3.6.1.6.3.12.1.2.1.6.65 = STRING: alfa"
+
+# Try to set taglist to multiple values
+CAPTURE "snmpset -On -Oe $SNMP_FLAGS $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.6.3.12.1.2.1.6.65 x 616c66612062657461"
+
+CHECKORDIE ".1.3.6.1.6.3.12.1.2.1.6.65 = STRING: alfa beta"
+
+# Fetch and verify that the taglist have kept it's values
+CAPTURE "snmpget -On -Oe $SNMP_FLAGS $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.6.3.12.1.2.1.6.65"
+
+CHECKORDIE ".1.3.6.1.6.3.12.1.2.1.6.65 = STRING: alfa beta"
+
+# Try to set taglist to a value with an embedded nul character
+CAPTURE "snmpset -On -Oe $SNMP_FLAGS $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.6.3.12.1.2.1.6.65 x 616c006661"
+
+CHECKORDIE ".1.3.6.1.6.3.12.1.2.1.6.65 = STRING: al.fa"
+
+# Try to set taglist to a value with a leading space
+CAPTURE "snmpset -On -Oe $SNMP_FLAGS $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.6.3.12.1.2.1.6.65 x 20616c6661"
+
+CHECKORDIE "wrongValue"
+
+# Try to set taglist to a value with a trailing space
+CAPTURE "snmpset -On -Oe $SNMP_FLAGS $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.6.3.12.1.2.1.6.65 x 616c666120"
+
+CHECKORDIE "wrongValue"
+
+# Try to set taglist to multiple values separated by more than on whitespace
+# character
+CAPTURE "snmpset -On -Oe $SNMP_FLAGS $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.6.3.12.1.2.1.6.65 x 616c6661202062657461"
+
+CHECKORDIE "wrongValue"
+
+STOPAGENT
+
+FINISHED
diff --git a/testing/fulltests/default/T200snmpv2cwalkall_simple b/testing/fulltests/default/T200snmpv2cwalkall_simple
index 3bbc2ae..5d5f16f 100644
--- a/testing/fulltests/default/T200snmpv2cwalkall_simple
+++ b/testing/fulltests/default/T200snmpv2cwalkall_simple
@@ -7,7 +7,7 @@ HEADER "full snmpwalk (SNMPv2c) against agent (may take time)"
 if test `uname -s` = "HP-UX" ; then
     if test `id -u` != "0" ; then
         # The agent needs to be run as root - else force skip
-        SKIP
+        SKIP Agent must be run at root on HP-UX
     fi
 fi
 
@@ -15,7 +15,7 @@ SKIPIF NETSNMP_DISABLE_SNMPV2C
 
 # make sure snmpwalk can be executed
 SNMPWALK="${SNMP_UPDIR}/apps/snmpwalk"
-[ -x "$SNMPWALK" ] || SKIP
+[ -x "$SNMPWALK" ] || SKIP snmpwalk not compiled
 
 snmp_version=v2c
 . ./Sv2cconfig
diff --git a/testing/fulltests/support/clib_build b/testing/fulltests/support/clib_build
index 0c7eb6d..f94bebd 100755
--- a/testing/fulltests/support/clib_build
+++ b/testing/fulltests/support/clib_build
@@ -2,6 +2,13 @@
 
 # build the C test file ...
 
+scriptname="$0"
+if [ "${scriptname#/}" = "${scriptname}" ]; then
+    scriptname="${PWD}/${scriptname}"
+fi
+scriptdir="$(dirname ${scriptname})"
+srcdir="$(dirname $(dirname $(dirname $scriptdir)))"
+
 rm -f "$2.c"
 cat >>"$2.c" <<EOF
 /* net-snmp standard headers */
@@ -16,6 +23,9 @@ cat >>"$2.c" <<EOF
 #include <errno.h>
 #include <stdio.h>
 #include <sys/types.h>
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
 #endif
@@ -40,6 +50,8 @@ cat >>"$2.c" <<EOF
 #include "snmplib/inet_ntop.h"
 #endif
 
+#define ABS_SRCDIR "${srcdir}"
+
 int
 main(int argc, char *argv[]) {
 
diff --git a/testing/fulltests/support/simple_TESTCONF.sh b/testing/fulltests/support/simple_TESTCONF.sh
index 83c38c2..2a0a8af 100644
--- a/testing/fulltests/support/simple_TESTCONF.sh
+++ b/testing/fulltests/support/simple_TESTCONF.sh
@@ -231,6 +231,10 @@ PROBE_FOR_PORT() {
                 exit 255
             fi
         done
+    else
+	echo "ERROR: Cannot probe for port - netstat not found." >&2
+	echo "NOPORT"
+	exit 255
     fi
 }
 
diff --git a/testing/fulltests/support/simple_eval_tools.sh b/testing/fulltests/support/simple_eval_tools.sh
index 314d9bb..718edc4 100644
--- a/testing/fulltests/support/simple_eval_tools.sh
+++ b/testing/fulltests/support/simple_eval_tools.sh
@@ -38,6 +38,10 @@ OK_TO_SAVE_RESULT=1
 export OK_TO_SAVE_RESULT
 fi
 
+if [ `uname -s` = SunOS ]
+then PATH=/usr/xpg4/bin:$PATH
+fi
+
 #
 # HEADER: returns a single line when SNMP_HEADERONLY mode and exits.
 #
@@ -127,7 +131,7 @@ SKIPIF() {
 #------------------------------------ -o-
 #
 VERIFY() {	# <path_to_file(s)>
-	local	missingfiles=
+	missingfiles=""
 
 	for f in $*; do
 		[ -f "$f" ] && continue
@@ -353,12 +357,18 @@ CHECKAGENTCOUNT() {
 }
 
 # Return 0 (true) if a process with pid $1 exists and 1 (false) if no process
-# with pid $1 exists. Do not use this function on MinGW: the PIDs written by
-# snmpd and snmptrapd to their pid files are not visible in the MinGW/MSYS
-# process table.
+# with pid $1 exists.
 ISRUNNING() {
-    #ps -e 2>/dev/null | egrep "^[	 ]*$1[	 ]+" >/dev/null 2>&1
-    kill -0 "$pid" 2>/dev/null
+    if [ "x$OSTYPE" = "xmsys" ]; then
+	pslist.exe "$1" 2>&1 | while read name pspid rest; do
+	    if [ "$1" = "$pspid" ]; then
+		return 0
+	    fi
+	done
+	return 1
+    else
+        kill -0 "$1" 2>/dev/null
+    fi
 }
 
 # Echo a command that asks the process with pid $1 to stop.
@@ -404,10 +414,20 @@ WAITFORCOND() {
 
 WAITFORAGENT() {
     WAITFOR "$@" $SNMP_SNMPD_LOG_FILE
+    if [ $SNMP_CAN_USLEEP = 1 ]; then
+        sleep .1
+    else
+        sleep 1
+    fi
 }
 
 WAITFORTRAPD() {
     WAITFOR "$@" $SNMP_SNMPTRAPD_LOG_FILE
+    if [ $SNMP_CAN_USLEEP = 1 ]; then
+        sleep .1
+    else
+        sleep 1
+    fi
 }
 
 # Wait until pattern "$1" appears in file "$2".
@@ -536,7 +556,7 @@ STARTAGENT() {
     fi
     STARTPROG
     WAITFORCOND test -f $SNMP_SNMPD_PID_FILE
-    WAITFORAGENT "NET-SNMP version"
+    WAITFORAGENT "NET-SNMP.version"
 }
 
 #------------------------------------ -o-
@@ -551,7 +571,7 @@ STARTTRAPD() {
     fi
     STARTPROG
     WAITFORCOND test -f $SNMP_SNMPTRAPD_PID_FILE
-    WAITFORTRAPD "NET-SNMP version"
+    WAITFORTRAPD "NET-SNMP.version"
 }
 
 ## sending SIGHUP for reconfiguration
@@ -595,12 +615,7 @@ STOPPROG() {
 	echo "$COMMAND ($1)" >> $SNMP_TMPDIR/invoked
 	VERBOSE_OUT 0 "$COMMAND ($1)"
         $COMMAND >/dev/null 2>&1
-        if [ "x$OSTYPE" = "xmsys" ]; then
-            # Wait until $pid and its parent have stopped.
-            sleep 1
-        else
-            WAITFORNOTCOND "ISRUNNING $pid"
-        fi
+        WAITFORNOTCOND "ISRUNNING $pid"
     fi
 }
 
@@ -649,10 +664,8 @@ FINISHED() {
       STOPTRAPD
     fi
     for pid in $pids; do
-        if [ "x$OSTYPE" = "xmsys" ] || ISRUNNING $pid; then
-            if [ "x$OSTYPE" != "xmsys" ]; then
-                SNMP_SAVE_TMPDIR=yes
-            fi
+        if ISRUNNING $pid; then
+	    SNMP_SAVE_TMPDIR=yes
 	    COMMAND="`ECHOSENDSIGKILL $pid`"
 	    echo "$COMMAND ($pfile)" >> $SNMP_TMPDIR/invoked
 	    VERBOSE_OUT 0 "$COMMAND ($pfile)"
diff --git a/testing/fulltests/unit-tests/T005table_dataset_cagentlib.c b/testing/fulltests/unit-tests/T005table_dataset_cagentlib.c
index cac940e..715641a 100644
--- a/testing/fulltests/unit-tests/T005table_dataset_cagentlib.c
+++ b/testing/fulltests/unit-tests/T005table_dataset_cagentlib.c
@@ -15,6 +15,8 @@ netsnmp_table_row* row;
 int32_t ival;
 int32_t i, j;
 
+SOCK_STARTUP;
+
 init_agent("snmpd");
 init_snmp("snmpd");
 
@@ -55,4 +57,6 @@ netsnmp_delete_table_data_set(tds);
 snmp_shutdown("snmpd");
 shutdown_agent();
 
+SOCK_CLEANUP;
+
 OK(TRUE, "done");
diff --git a/testing/fulltests/unit-tests/T008asn1_clib.c b/testing/fulltests/unit-tests/T008asn1_clib.c
index 73a2f73..b94714a 100644
--- a/testing/fulltests/unit-tests/T008asn1_clib.c
+++ b/testing/fulltests/unit-tests/T008asn1_clib.c
@@ -28,6 +28,9 @@ debug_register_tokens("dumpv_recv,dumpv_send,asn");
 	u_char decoded_type;
 	long decoded_value = 0;
 	u_char *parse_result;
+        u_char *rbuild_result = NULL;
+        size_t rbuild_len = 0;
+        size_t offset = 0;
 
 	encoded_length = sizeof(encoded);
 	build_result = asn_build_int(encoded, &encoded_length, ASN_INTEGER,
@@ -43,6 +46,16 @@ debug_register_tokens("dumpv_recv,dumpv_send,asn");
 	     " decoded value %ld",
 	     intval[i], parse_result == build_result ? "succeeded" : "failed",
 	     decoded_type, ASN_INTEGER, decoded_value));
+
+        OKF(asn_realloc_rbuild_int(&rbuild_result, &rbuild_len, &offset, 1,
+                                   ASN_INTEGER, &intval[i], sizeof(intval[i])),
+            ("asn_realloc_rbuild_int(%ld)", intval[i]));
+        OKF(sizeof(encoded) - encoded_length == offset &&
+            memcmp(encoded, rbuild_result + rbuild_len - offset,
+                   offset) == 0,
+            ("asn_build_int(%ld) != asn_realloc_rbuild_int(%ld)",
+             intval[i], intval[i]));
+        free (rbuild_result);
     }
 }
 
@@ -58,6 +71,9 @@ debug_register_tokens("dumpv_recv,dumpv_send,asn");
 	u_char decoded_type;
 	unsigned long decoded_value = 0;
 	u_char *parse_result;
+        u_char *rbuild_result = NULL;
+        size_t rbuild_len = 0;
+        size_t offset = 0;
 
 	encoded_length = sizeof(encoded);
 	build_result = asn_build_unsigned_int(encoded, &encoded_length,
@@ -75,6 +91,18 @@ debug_register_tokens("dumpv_recv,dumpv_send,asn");
 	     " decoded type %d <> %d; decoded value %lu",
 	     intval[i], parse_result == build_result ? "succeeded" : "failed",
 	     decoded_type, ASN_UINTEGER, decoded_value));
+
+        OKF(asn_realloc_rbuild_unsigned_int(&rbuild_result, &rbuild_len,
+                                            &offset, 1, ASN_UINTEGER,
+                                            &intval[i], sizeof(intval[i])),
+            ("asn_realloc_rbuild_unsigned_int(%lud)", intval[i]));
+        OKF(sizeof(encoded) - encoded_length == offset &&
+            memcmp(encoded, rbuild_result + rbuild_len - offset,
+                   offset) == 0,
+            ("asn_build_unsigned_int(%ld) != "
+             "asn_realloc_rbuild_unsigned_int(%ld)",
+             intval[i], intval[i]));
+        free (rbuild_result);
     }
 }
 
@@ -107,8 +135,11 @@ debug_register_tokens("dumpv_recv,dumpv_send,asn");
 	u_char *build_result;
 	size_t decoded_length;
 	u_char decoded_type;
-	struct counter64 decoded_value = { };
+	struct counter64 decoded_value = { 0 };
 	u_char *parse_result;
+        u_char *rbuild_result = NULL;
+        size_t rbuild_len = 0;
+        size_t offset = 0;
 
 	encoded_length = sizeof(encoded);
 	build_result = asn_build_signed_int64(encoded, &encoded_length,
@@ -127,6 +158,18 @@ debug_register_tokens("dumpv_recv,dumpv_send,asn");
 	     TOINT64(intval[i]),
 	     parse_result == build_result ? "succeeded" : "failed",
 	     decoded_type, ASN_OPAQUE_I64, TOINT64(decoded_value)));
+
+        OKF(asn_realloc_rbuild_signed_int64(&rbuild_result, &rbuild_len,
+                                            &offset, 1, ASN_OPAQUE_I64,
+                                            &intval[i], sizeof(intval[i])),
+            ("asn_realloc_rbuild_signed_int64(%lld)", TOINT64(intval[i])));
+        OKF(sizeof(encoded) - encoded_length == offset &&
+            memcmp(encoded, rbuild_result + rbuild_len - offset,
+                   offset) == 0,
+            ("asn_build_signed_int64(%lld) != "
+             "asn_realloc_rbuild_signed_int64(%lld)",
+             TOINT64(intval[i]), TOINT64(intval[i])));
+        free (rbuild_result);
     }
 }
 
@@ -158,8 +201,11 @@ debug_register_tokens("dumpv_recv,dumpv_send,asn");
 	u_char *build_result;
 	size_t decoded_length;
 	u_char decoded_type;
-	struct counter64 decoded_value = { };
+	struct counter64 decoded_value = { 0 };
 	u_char *parse_result;
+        u_char *rbuild_result = NULL;
+        size_t rbuild_len = 0;
+        size_t offset = 0;
 
 	encoded_length = sizeof(encoded);
 	build_result = asn_build_unsigned_int64(encoded, &encoded_length,
@@ -178,5 +224,107 @@ debug_register_tokens("dumpv_recv,dumpv_send,asn");
 	     TOUINT64(intval[i]),
 	     parse_result == build_result ? "succeeded" : "failed",
 	     decoded_type, ASN_COUNTER64, TOUINT64(decoded_value)));
+
+        OKF(asn_realloc_rbuild_unsigned_int64(&rbuild_result, &rbuild_len,
+                                              &offset, 1, ASN_COUNTER64,
+                                              &intval[i], sizeof(intval[i])),
+            ("asn_realloc_rbuild_unsigned_int64(%llud)", TOUINT64(intval[i])));
+        OKF(sizeof(encoded) - encoded_length == offset &&
+            memcmp(encoded, rbuild_result + rbuild_len - offset,
+                   offset) == 0,
+            ("asn_build_unsigned_int64(%lld) != "
+             "asn_realloc_rbuild_unsigned_int64(%lld)",
+             TOUINT64(intval[i]), TOUINT64(intval[i])));
+        free (rbuild_result);
+    }
+
+#ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES
+
+    for (i = 0; i < sizeof(intval)/sizeof(intval[0]); ++i) {
+	u_char encoded[256];
+	size_t encoded_length;
+	u_char *build_result;
+	size_t decoded_length;
+	u_char decoded_type;
+	struct counter64 decoded_value = { 0 };
+	u_char *parse_result;
+        u_char *rbuild_result = NULL;
+        size_t rbuild_len = 0;
+        size_t offset = 0;
+
+	encoded_length = sizeof(encoded);
+	build_result = asn_build_unsigned_int64(encoded, &encoded_length,
+						ASN_OPAQUE_COUNTER64,
+						&intval[i], sizeof(intval[i]));
+	OKF(build_result + encoded_length == encoded + sizeof(encoded),
+	    ("asn_build_unsigned_int64(%llu)", TOUINT64(intval[i])));
+	decoded_length = sizeof(encoded) - encoded_length;
+	parse_result = asn_parse_unsigned_int64(encoded, &decoded_length,
+						&decoded_type, &decoded_value,
+						sizeof(decoded_value));
+	OKF(parse_result && decoded_type == ASN_OPAQUE_COUNTER64
+	    && memcmp(&decoded_value, &intval[i], sizeof(decoded_value)) == 0,
+	    ("asn_parse_unsigned_int64(asn_build_unsigned_int64(%llu)) %s;"
+	     " decoded type %d <> %d; decoded value %llu",
+	     TOUINT64(intval[i]),
+	     parse_result == build_result ? "succeeded" : "failed",
+	     decoded_type, ASN_OPAQUE_COUNTER64, TOUINT64(decoded_value)));
+
+        OKF(asn_realloc_rbuild_unsigned_int64(&rbuild_result, &rbuild_len,
+                                              &offset, 1, ASN_OPAQUE_COUNTER64,
+                                              &intval[i], sizeof(intval[i])),
+            ("asn_realloc_rbuild_unsigned_int64(%llud)", TOUINT64(intval[i])));
+        OKF(sizeof(encoded) - encoded_length == offset &&
+            memcmp(encoded, rbuild_result + rbuild_len - offset,
+                   offset) == 0,
+            ("asn_build_unsigned_int64(%lld) != "
+             "asn_realloc_rbuild_unsigned_int64(%lld)",
+             TOUINT64(intval[i]), TOUINT64(intval[i])));
+        free (rbuild_result);
     }
+
+    for (i = 0; i < sizeof(intval)/sizeof(intval[0]); ++i) {
+	u_char encoded[256];
+	size_t encoded_length;
+	u_char *build_result;
+	size_t decoded_length;
+	u_char decoded_type;
+	struct counter64 decoded_value = { 0 };
+	u_char *parse_result;
+        u_char *rbuild_result = NULL;
+        size_t rbuild_len = 0;
+        size_t offset = 0;
+
+	encoded_length = sizeof(encoded);
+	build_result = asn_build_unsigned_int64(encoded, &encoded_length,
+						ASN_OPAQUE_U64,
+						&intval[i], sizeof(intval[i]));
+	OKF(build_result + encoded_length == encoded + sizeof(encoded),
+	    ("asn_build_unsigned_int64(%llu)", TOUINT64(intval[i])));
+	decoded_length = sizeof(encoded) - encoded_length;
+	parse_result = asn_parse_unsigned_int64(encoded, &decoded_length,
+						&decoded_type, &decoded_value,
+						sizeof(decoded_value));
+	OKF(parse_result && decoded_type == ASN_OPAQUE_U64
+	    && memcmp(&decoded_value, &intval[i], sizeof(decoded_value)) == 0,
+	    ("asn_parse_unsigned_int64(asn_build_unsigned_int64(%llu)) %s;"
+	     " decoded type %d <> %d; decoded value %llu",
+	     TOUINT64(intval[i]),
+	     parse_result == build_result ? "succeeded" : "failed",
+	     decoded_type, ASN_OPAQUE_U64, TOUINT64(decoded_value)));
+
+        OKF(asn_realloc_rbuild_unsigned_int64(&rbuild_result, &rbuild_len,
+                                              &offset, 1, ASN_OPAQUE_U64,
+                                              &intval[i], sizeof(intval[i])),
+            ("asn_realloc_rbuild_unsigned_int64(%llud)", TOUINT64(intval[i])));
+        OKF(sizeof(encoded) - encoded_length == offset &&
+            memcmp(encoded, rbuild_result + rbuild_len - offset,
+                   offset) == 0,
+            ("asn_build_unsigned_int64(%lld) != "
+             "asn_realloc_rbuild_unsigned_int64(%lld)",
+             TOUINT64(intval[i]), TOUINT64(intval[i])));
+        free (rbuild_result);
+    }
+
+#endif
 }
diff --git a/testing/fulltests/unit-tests/T014gethostbyaddr_clib.c b/testing/fulltests/unit-tests/T014gethostbyaddr_clib.c
index 4c633ed..41a578e 100644
--- a/testing/fulltests/unit-tests/T014gethostbyaddr_clib.c
+++ b/testing/fulltests/unit-tests/T014gethostbyaddr_clib.c
@@ -1,14 +1,16 @@
-/* HEADER Testing netsnmp_gethostbyaddr() */
+/*
+ * HEADER Testing netsnmp_gethostbyaddr() 
+ */
 
 SOCK_STARTUP;
 
 {
-    int ran_test = 0;
+    int             ran_test = 0;
 #ifdef HAVE_GETHOSTBYADDR
-    struct hostent *h;
-    struct in_addr v4loop;
+    struct hostent *h, *h2 = NULL;
+    struct in_addr  v4loop;
     struct sockaddr_in sin_addr;
-    int s;
+    int             s;
 
     v4loop.s_addr = htonl(INADDR_LOOPBACK);
     memset(&sin_addr, 0, sizeof(sin_addr));
@@ -16,10 +18,16 @@ SOCK_STARTUP;
     sin_addr.sin_addr = v4loop;
     s = socket(AF_INET, SOCK_DGRAM, 0);
     if (s >= 0) {
-        if (bind(s, (struct sockaddr *)&sin_addr, sizeof(sin_addr)) >= 0) {
+        if (bind(s, (struct sockaddr *) &sin_addr, sizeof(sin_addr)) >= 0) {
             h = netsnmp_gethostbyaddr(&v4loop, sizeof(v4loop), AF_INET);
-            OKF(h && strcmp(h->h_name, "localhost") == 0,
-                ("127.0.0.1 lookup (%s)", h ? h->h_name : "(failed)"));
+            if (h)
+                h2 = gethostbyname(h->h_name);
+            OKF(h && (strcmp(h->h_name, "localhost") == 0 ||
+                      (h2 && memcmp(h2->h_addr, &v4loop.s_addr,
+                                    sizeof(v4loop.s_addr)) == 0)),
+                ("127.0.0.1 lookup (%s -> %s)", h ? h->h_name : "(failed)",
+                 h2 ? inet_ntoa(*(struct in_addr *) h2->
+                                h_addr) : "(failed)"));
             ran_test = 1;
         }
         close(s);
@@ -31,19 +39,53 @@ SOCK_STARTUP;
 
 {
     struct hostent *h;
+#ifdef cygwin
+    static const struct in6_addr v6loop = { { IN6ADDR_LOOPBACK_INIT } };
+#else
     static const struct in6_addr v6loop = IN6ADDR_LOOPBACK_INIT;
+#endif
     struct sockaddr_in6 sin6_addr;
-    int s, ran_test = 0;
+    struct addrinfo hints, *addr = NULL, *ap;
+    char            buf[64];
+    int             s, res, ran_test = 0;
 
     memset(&sin6_addr, 0, sizeof(sin6_addr));
     sin6_addr.sin6_family = AF_INET6;
     sin6_addr.sin6_addr = v6loop;
     s = socket(AF_INET6, SOCK_DGRAM, 0);
     if (s >= 0) {
-        if (bind(s, (struct sockaddr*)&sin6_addr, sizeof(sin6_addr)) >= 0) {
+        if (bind(s, (struct sockaddr *) &sin6_addr, sizeof(sin6_addr)) >=
+            0) {
+            strcpy(buf, "(failed)");
             h = netsnmp_gethostbyaddr(&v6loop, sizeof(v6loop), AF_INET6);
-            OKF(h && strcmp(h->h_name, "localhost") == 0,
-                ("::1 lookup (%s)", h ? h->h_name : "(failed)"));
+            if (h) {
+                memset(&hints, 0, sizeof(hints));
+                hints.ai_family = AF_INET6;
+                res = getaddrinfo(h->h_name, NULL, &hints, &addr);
+                if (res == 0) {
+                    for (ap = addr; ap; ap = ap->ai_next) {
+                        if (ap->ai_family == AF_INET6) {
+                            inet_ntop(ap->ai_family,
+                                      &((struct sockaddr_in6 *) ap->
+                                        ai_addr)->sin6_addr, buf,
+                                      sizeof(buf));
+                            break;
+                        }
+                    }
+                    if (!ap)
+                        strcpy(buf, "no AF_INET6 address found");
+                    if (addr)
+                        freeaddrinfo(addr);
+                } else {
+                    snprintf(buf, sizeof(buf), "getaddrinfo() failed: %s",
+                             strerror(errno));
+                }
+            }
+            OKF(h && (strcmp(h->h_name, "localhost") == 0 ||
+                      (res == 0 && memcmp(addr->ai_addr, &sin6_addr,
+                                          sizeof(sin6_addr)) == 0)),
+                ("::1 lookup (%s -> %s)", h ? h->h_name : "(failed)",
+                 buf));
             ran_test = 1;
         }
         close(s);
diff --git a/testing/fulltests/unit-tests/T016read_config_clib.c b/testing/fulltests/unit-tests/T016read_config_clib.c
index c11a591..06ceed5 100644
--- a/testing/fulltests/unit-tests/T016read_config_clib.c
+++ b/testing/fulltests/unit-tests/T016read_config_clib.c
@@ -54,8 +54,8 @@ for (i = 0; i < sizeof(test_input) / sizeof(test_input[0]); i++) {
     result = (p->pf) (p->readfrom, &str, &len);
     offset = result ? result - p->readfrom : -1;
     OKF(offset == p->expected_offset,
-        ("test %d: expected offset %zd, got offset %" NETSNMP_PRIz "d",
-         i, p->expected_offset, offset));
+        ("test %d: expected offset %" NETSNMP_PRIz "d, got offset %"
+         NETSNMP_PRIz "d", i, p->expected_offset, offset));
     if (offset == p->expected_offset) {
         OKF(len == p->expected_len,
             ("test %d: expected length %" NETSNMP_PRIz "d, got length %"
diff --git a/testing/fulltests/unit-tests/T020netsnmp_sprint_realloc_objid_tree_clib.c b/testing/fulltests/unit-tests/T020netsnmp_sprint_realloc_objid_tree_clib.c
new file mode 100644
index 0000000..ec6fc86
--- /dev/null
+++ b/testing/fulltests/unit-tests/T020netsnmp_sprint_realloc_objid_tree_clib.c
@@ -0,0 +1,82 @@
+/* HEADER Testing netsnmp_sprint_realloc_objid_tree() */
+
+static const oid objid1[] = {
+    1, 3, 6, 1, 2, 1, 4, 32, 1, 5, 1, 1, 4, 127, 0, 0, 0, 8
+};
+static const oid objid2[] = {
+    1, 3, 6, 1, 2, 1, 4, 32, 1, 5, 1, 2, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 1, 128
+};
+static const oid objid3[] = {
+    1, 3, 6, 1, 2, 1, 4, 32, 1, 5, 1, 1, 4, 255, 255, 255, 255, 8
+};
+static const oid objid4[] = {
+    1, 3, 6, 1, 2, 1, 4, 32, 1, 5, 1, 2, 16, 255, 255, 255, 255, 255, 255, 255,
+    255, 255, 255, 255, 255, 255, 255, 255, 255, 128
+};
+static const oid objid5[] = {
+    1, 3, 6, 1, 2, 1, 4, 32, 1, 5, 1, 1, 4, 256, 256, 256, 256, 8
+};
+static const oid objid6[] = {
+    1, 3, 6, 1, 2, 1, 4, 32, 1, 5, 1, 2, 16, 256, 256, 256, 256, 256, 256, 256,
+    256, 256, 256, 256, 256, 256, 256, 256, 256, 128
+};
+static const oid objid7[] = {
+    1, 3, 6, 1, 2, 1, 4, 32, 1, 5, 1, 1, 4, -1, -1, -1, -1, 8
+};
+static const oid objid8[] = {
+    1, 3, 6, 1, 2, 1, 4, 32, 1, 5, 1, 2, 16, -1, -1, -1, -1, -1, -1, -1, -1,
+    -1, -1, -1, -1, -1, -1, -1, -1, 128
+
+};
+struct objid_data { oid const *oid; int len; const char *str; };
+static const struct objid_data objid_array[] = {
+    { objid1, sizeof(objid1) / sizeof(objid1[0]),
+      "IP-MIB::ipAddressPrefixOrigin.1.ipv4.\"127.0.0.0\".8" },
+    { objid2, sizeof(objid2) / sizeof(objid2[0]),
+      "IP-MIB::ipAddressPrefixOrigin.1.ipv6."
+      "\"00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:01\".128" },
+    { objid3, sizeof(objid3) / sizeof(objid3[0]),
+      "IP-MIB::ipAddressPrefixOrigin.1.ipv4.\"255.255.255.255\".8" },
+    { objid4, sizeof(objid4) / sizeof(objid4[0]),
+      "IP-MIB::ipAddressPrefixOrigin.1.ipv6."
+      "\"ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff\".128" },
+    { objid5, sizeof(objid5) / sizeof(objid5[0]),
+      "IP-MIB::ipAddressPrefixOrigin.1.ipv4.\"....\".8" },
+    { objid6, sizeof(objid6) / sizeof(objid6[0]),
+      "IP-MIB::ipAddressPrefixOrigin.1.ipv6.\"................\".128" },
+    { objid7, sizeof(objid7) / sizeof(objid7[0]),
+      "IP-MIB::ipAddressPrefixOrigin.1.ipv4.\"....\".8" },
+    { objid8, sizeof(objid8) / sizeof(objid8[0]),
+      "IP-MIB::ipAddressPrefixOrigin.1.ipv6.\"................\".128" },
+};
+struct tree *tree;
+char *buf;
+size_t buf_len, out_len;
+int buf_overflow, i;
+char mibdir[PATH_MAX];
+
+snprintf(mibdir, sizeof(mibdir), "%s/%s", ABS_SRCDIR, "mibs");
+netsnmp_ds_set_string(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_MIBDIRS, mibdir);
+
+init_snmp("T020");
+
+for (i = 0; i < sizeof(objid_array) / sizeof(objid_array[0]); i++) {
+    buf = NULL;
+    buf_len = out_len = buf_overflow = 0;
+    tree = netsnmp_sprint_realloc_objid_tree((u_char **) &buf, &buf_len,
+                                             &out_len, 1/*allow_realloc*/,
+                                             &buf_overflow,
+                                             objid_array[i].oid,
+                                             objid_array[i].len);
+    OK(!!objid_array[i].str == !!tree,
+       "netsnmp_sprint_realloc_objid_tree() return value");
+    if (objid_array[i].str && tree) {
+        OKF(strcmp(objid_array[i].str, buf) == 0,
+            ("Mismatch: expected %s but got %s", objid_array[i].str,
+             buf ? (const char *)buf : "(NULL)"));
+    }
+    free(buf);
+}
+
+snmp_shutdown("T020");
diff --git a/testing/fulltests/unit-tests/T021binary_array_oid_duplicates_clib.c b/testing/fulltests/unit-tests/T021binary_array_oid_duplicates_clib.c
new file mode 100644
index 0000000..c027329
--- /dev/null
+++ b/testing/fulltests/unit-tests/T021binary_array_oid_duplicates_clib.c
@@ -0,0 +1,72 @@
+/* HEADER Testing duplicate handling in binary OID array */
+
+/* Much copied from T012 */
+static const char test_name[] = "binary-array-of-OIDs-duplicate-test";
+oid o1 = 1;
+oid o2 = 2;
+oid o3 = 6;
+oid o4 = 8;
+oid o5 = 9;
+oid ox = 7;
+oid oy = 10;
+netsnmp_index i1, i2, i3, i4, i5, ix, iy, *ip;
+netsnmp_index *b[] = { &i4, &i2, &i3, &i1, &i5 };
+netsnmp_container *c;
+int i;
+
+init_snmp(test_name);
+
+c = netsnmp_container_get_binary_array();
+c->compare = netsnmp_compare_netsnmp_index;
+netsnmp_binary_array_options_set(c, 1,
+				 CONTAINER_KEY_ALLOW_DUPLICATES);
+
+i1.oids = &o1;
+i2.oids = &o2;
+i3.oids = &o3;
+i4.oids = &o4;
+i5.oids = &o5;
+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]);
+
+#define MAX_ROUNDS 6
+/* Insert some duplicates of i4; also insert a duplicate of
+ * i1 to move the contents of the array around. */
+for (i = 0; i < MAX_ROUNDS; ++i) {
+    switch (i) {
+	case 0:
+	    /* First round: no insert */
+	    break;
+	case 1:
+	case 2:
+	case 4:
+	case 5:
+	    /* Insert another duplicate of our target object */
+	    CONTAINER_INSERT(c, &i4);
+	    break;
+	case 3:
+	    /* Insert a dulicate of an earlier OID, so that it
+	     * changes the binary search behavior */
+	    CONTAINER_INSERT(c, &i1);
+	    break;
+    }
+    /* Primary requirement: getnext returns the next value! */
+    ip = CONTAINER_FIND(c, &i4);
+    OKF(ip, ("FIND returned a value"));
+    OKF(c->compare(&i4, ip) == 0,
+        ("FIND returned oid %" NETSNMP_PRIo "d", ip->oids[0]));
+    ip = CONTAINER_NEXT(c, &i4);
+    OKF(ip, ("NEXT returned a value"));
+    OKF(c->compare(&i5, ip) == 0,
+        ("NEXT returned index 5 = %" NETSNMP_PRIo "d", i5.oids[0]));
+}
+
+while ((ip = CONTAINER_FIRST(c)))
+  CONTAINER_REMOVE(c, ip);
+CONTAINER_FREE(c);
+
+snmp_shutdown(test_name);
diff --git a/testing/fulltests/unit-tests/T021netsnmp_sprint_realloc_no_type_clib.c b/testing/fulltests/unit-tests/T021netsnmp_sprint_realloc_no_type_clib.c
new file mode 100644
index 0000000..57793d4
--- /dev/null
+++ b/testing/fulltests/unit-tests/T021netsnmp_sprint_realloc_no_type_clib.c
@@ -0,0 +1,51 @@
+/* HEADER Test sprint_realloc_variable with -OQ */
+
+/*
+ * Check that sprint_realloc_variable does not crash when it prints
+ * a variable with NULL type, while MIG says it's different type (INTEGER, ...).
+ * We will use MIB definition of nlmLogVariableTable, which has a column
+ * for most of the MIB types.
+ */
+static oid objid[] = {
+        1, 3, 6, 1, 2, 1, 92, 1, 3, 2, 1, 4
+};
+
+u_char *buf;
+size_t buf_len, out_len;
+int buf_overflow, i;
+char mibdir[PATH_MAX];
+int 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");
+
+netsnmp_variable_list variable;
+variable.next_variable = NULL;
+variable.name = objid;
+variable.name_length = sizeof(objid) / sizeof(objid[0]);
+variable.type = ASN_NULL;
+variable.val.integer = NULL;
+variable.val_len = 0;
+
+
+buf = NULL;
+buf_len = out_len = buf_overflow = 0;
+
+/* Try to format variable with nlmLogVariableEntry.4 - nlmLogVariableEntry.11
+ * OIDs and with NULL type.
+ */
+for (i=4; i<=11; i++) {
+    buf = NULL;
+    buf_len = out_len = buf_overflow = 0;
+    objid[11] = i;
+    ret = sprint_realloc_variable(&buf, &buf_len, &out_len, 1, objid,
+            sizeof(objid) / sizeof(objid[0]), &variable);
+    OKF(ret == 1, ("sprint_realloc_variable for %d returned %d: %s, expected 1",
+            i, ret, buf));
+    free(buf);
+}
+
+snmp_shutdown("T021");
diff --git a/win32/Configure b/win32/Configure
old mode 100644
new mode 100755
index f3286bb..a36db0b
--- a/win32/Configure
+++ b/win32/Configure
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-# 
+#
 # Configure script for Net-SNMP and MSVC
 # Written by Alex Burger
 # March 5th, 2004
@@ -32,8 +32,8 @@ if ($help == 1)
 {
 my $USAGE = qq/
 Usage:
-    perl Configure [<options>] 
-    
+    perl Configure [<options>]
+
 Options:
 
     --config=[release | debug]       Compile as release or with debug symbols
@@ -52,13 +52,13 @@ Options:
   exit(0);
 
 }
-               
-$config = lc($config);  
+
+$config = lc($config);
 if (($config ne "debug") && ($config ne "release")) {
   $config = "release";
 }
 
-$linktype = lc($linktype);              
+$linktype = lc($linktype);
 if (($linktype ne "static") && ($linktype ne "dynamic")) {
   $linktype = "static";
 }
@@ -89,7 +89,7 @@ print "\n\n";
 # Determine version from unix configure script
 #
 ###############################################
-  
+
 my $unix_configure_in = "../configure";
 
 open (UNIX_CONFIGURE_IN, "<$unix_configure_in") || die "Can't Open $unix_configure_in\n";
@@ -104,48 +104,56 @@ while (<UNIX_CONFIGURE_IN>)
   }
 }
 
-###############################################
-#
-# Create main Makefile
-#
-###############################################
-{  
-  my $makefile_out = "Makefile";
-  my $makefile_in  = "Makefile.in";
+# Arguments:
+# $1: Name of output file
+# $2: Name of input file
+# $3: Reference to a hash with substitutions. A substitution is an array with
+#     two elements where element [0] is the pattern to search for and element
+#     [1] the replacement text.
+sub substitute
+{
+  my $out  = shift;
+  my $in   = shift;
+  my $subs = shift;
 
-  open (MAKE_OUT, ">$makefile_out") || die "Can't Open $makefile_out\n";
-  open (MAKE_IN, "<$makefile_in") || die "Can't Open $makefile_in\n";
+  open (OUT, ">$out") || die "Can't open $out\n";
+  open (IN,  "<$in")  || die "Can't open $in\n";
 
-  print "creating $makefile_out\n";
-  
-  while (<MAKE_IN>)
-  {
+  print "creating $out\n";
+
+  while (<IN>) {
     chomp;
-    if ($sdk == 1) {
-      s/^SDK=/SDK=true/;
-    }
-    else {
-      s/^SDK=/SDK=false/;
+    foreach my $e (keys %$subs) {
+        my $p = $$subs{$e}[0];
+        my $q = $$subs{$e}[1];
+        s/$p/$q/;
     }
-    
-    s/^LINKTYPE=/LINKTYPE=$linktype/;
-    s/^CFG=/CFG=$config/;
-    s/^PREFIX=/PREFIX=$prefix/;    
-    s/^PREFIX_DOS=/PREFIX_DOS=$prefixdos/;    
-    s/^SSL=.*/SSL=$openssl/;
-
-    print MAKE_OUT $_ . "\n";
+    print OUT $_ . "\n";
   }
+
+  close IN;
+  close OUT;
 }
 
 ###############################################
 #
-# Create Makefiles for applications from 
-# Makefile-apps.in
-# (except for snmpnetstat)
+# Perform substitutions
 #
 ###############################################
-my @programs = qw 
+my %subs = (
+    "cfg" => [ "^CFG=",        "CFG=$config"                        ],
+    "int" => [ "^INTDIR=",     "INTDIR=.\\$config"                  ],
+    "lnk" => [ "^LINKTYPE=",   "LINKTYPE=$linktype"                 ],
+    "out" => [ "^OUTDIR=",     "OUTDIR=.\\$config"                  ],
+    "pfx" => [ "^PREFIX=",     "PREFIX=$prefix"                     ],
+    "dos" => [ "^PREFIX_DOS=", "PREFIX_DOS=$prefixdos"              ],
+    "sdk" => [ "^SDK=",        $sdk == 1 ? "SDK=true" : "SDK=false" ],
+    );
+
+substitute("Makefile", "Makefile.in", \%subs);
+substitute("local/Makefile", "local/Makefile.in", \%subs);
+
+my @programs = qw
 /encode_keychange
 snmpbulkget
 snmpbulkwalk
@@ -165,240 +173,51 @@ snmpwalk
 /;
 
 foreach my $progName (@programs) {
-  
-  my $makefile_out = "$progName\\Makefile";
-  my $makefile_in = "Makefile-apps.in";
-
-  my $outdir = $config;
-  my $intdir = $config;
-  
-  open (MAKE_OUT, ">$makefile_out") || die "Can't Open $makefile_out\n";
-  open (MAKE_IN, "<$makefile_in") || die "Can't Open $makefile_in\n";
-
-  print "creating $makefile_out\n";
-  
-  while (<MAKE_IN>)
-  {
-    chomp;
-    
-    s/^LINKTYPE=/LINKTYPE=$linktype/;
-    s/^PROGNAME=/PROGNAME=$progName/;
-    s/^CFG=/CFG=$config/;
-    s/^OUTDIR=/OUTDIR=.\\$outdir/;
-    s/^INTDIR=/INTDIR=.\\$intdir/;
-    s/^SSL=.*/SSL=$openssl/;
-
-    print MAKE_OUT $_ . "\n";
-  }
+    $subs{"prg"} = [ "^PROGNAME=", "PROGNAME=$progName" ];
+    substitute("$progName/Makefile", "Makefile-apps.in", \%subs);
 }
 
-###############################################
-#
-# Create Makefiles for snmpnetstat from
-# snmpnetstat\Makefile.in
-#
-###############################################
-my @programs = qw 
-/snmpnetstat
-/;
-
-foreach my $progName (@programs) {
-  
-  my $makefile_out = "$progName\\Makefile";
-  my $makefile_in = "$progName\\Makefile.in";
-
-  my $outdir = $config;
-  my $intdir = $config;
-  
-  open (MAKE_OUT, ">$makefile_out") || die "Can't Open $makefile_out\n";
-  open (MAKE_IN, "<$makefile_in") || die "Can't Open $makefile_in\n";
-
-  print "creating $makefile_out\n";
-  
-  while (<MAKE_IN>)
-  {
-    chomp;
-
-    s/^LINKTYPE=/LINKTYPE=$linktype/;    
-    s/^PROGNAME=/PROGNAME=$progName/;
-    s/^CFG=/CFG=$config/;
-    s/^OUTDIR=/OUTDIR=.\\$outdir/;
-    s/^INTDIR=/INTDIR=.\\$intdir/;
-    s/^SSL=.*/SSL=$openssl/;
-
-    print MAKE_OUT $_ . "\n";
-  }
+foreach my $progName ("libagent", "libnetsnmptrapd", "local",
+                      "netsnmpmibs", "snmpd", "snmptrapd", "snmpnetstat",
+                      $linktype eq "dynamic" ? "libsnmp_dll" : "libsnmp") {
+    $subs{"prg"} = [ "^PROGNAME=", "PROGNAME=$progName" ];
+    substitute("$progName/Makefile", "$progName/Makefile.in", \%subs);
 }
 
+my %subs = (
+    "env" => [ "\@ENV_SEPARATOR\@", ";" ]
+);
+
+substitute("../local/snmpconf", "../local/snmpconf.in", \%subs);
 
-###############################################
-#
-# Create Makefiles for libraries  
-# from name\Makefile.in
-#
-###############################################
-my @programs = qw 
-/libagent
-libnetsnmptrapd
-netsnmpmibs
-/;
 
+my %subs = (
+    "ver" => [ "^#define PACKAGE_VERSION.*",
+               "#define PACKAGE_VERSION \"$version\"" ]
+    );
+if ($prefix ne "") {
+    $subs{"pfx"} = [ "^#define INSTALL_BASE.*", "#define INSTALL_BASE \"$prefix\"" ];
+}
 if ($linktype eq "dynamic") {
-  push (@programs, "libsnmp_dll");
+    $subs{"dll"} = [ "^.*#undef NETSNMP_USE_DLL.*", "#define NETSNMP_USE_DLL 1" ];
 }
-else {
-  push (@programs, "libsnmp");
+if ($sdk == 1) {
+    $subs{"sdk"} = [ "^.*#undef HAVE_WIN32_PLATFORM_SDK.*", "#define HAVE_WIN32_PLATFORM_SDK 1" ];
 }
-
-foreach my $progName (@programs) {
-  
-  my $makefile_out = "$progName\\Makefile";
-  my $makefile_in = "$progName\\Makefile.in";
-  
-  my $outdir = $config;
-  my $intdir = $config;
-  
-  open (MAKE_OUT, ">$makefile_out") || die "Can't Open $makefile_out\n";
-  open (MAKE_IN, "<$makefile_in") || die "Can't Open $makefile_in\n";
-
-  print "creating $makefile_out\n";
-  
-  while (<MAKE_IN>)
-  {
-    chomp;
-    
-    if ($sdk == 1) {
-      s/^SDK=/SDK=true/;
-    }
-    else {
-      s/^SDK=/SDK=false/;
-    }
-
-    s/^PROGNAME=/PROGNAME=$progName/;
-    s/^CFG=/CFG=$config/;
-    s/^OUTDIR=/OUTDIR=.\\$outdir/;
-    s/^INTDIR=/INTDIR=.\\$intdir/;
-    s/^SSL=.*/SSL=$openssl/;
-    print MAKE_OUT $_ . "\n";
-  }
+if ($openssl == 1) {
+    $subs{"ssl"} = [ "^.*#undef NETSNMP_USE_OPENSSL.*", "#define NETSNMP_USE_OPENSSL 1" ];
+} else {
+    $subs{"ssl"} = [ "^.*#undef NETSNMP_USE_INTERNAL_MD5.*", "#define NETSNMP_USE_INTERNAL_MD5 1" ];
 }
-
-###############################################
-#
-# Create Makefiles for daemons
-# from name\Makefile.in
-#
-###############################################
-my @programs = qw 
-/snmpd
-snmptrapd
-/;
-
-foreach my $progName (@programs) {
-  
-  my $makefile_out = "$progName\\Makefile";
-  my $makefile_in = "$progName\\Makefile.in";
-  
-  my $outdir = $config;
-  my $intdir = $config;
-  
-  open (MAKE_OUT, ">$makefile_out") || die "Can't Open $makefile_out\n";
-  open (MAKE_IN, "<$makefile_in") || die "Can't Open $makefile_in\n";
-
-  print "creating $makefile_out\n";
-  
-  while (<MAKE_IN>)
-  {
-    chomp;
-    
-    if ($sdk == 1) {
-      s/^SDK=/SDK=true/;
-    }
-    else {
-      s/^SDK=/SDK=false/;
-    }
-
-    s/^LINKTYPE=/LINKTYPE=$linktype/;
-    s/^PROGNAME=/PROGNAME=$progName/;
-    s/^CFG=/CFG=$config/;
-    s/^OUTDIR=/OUTDIR=.\\$outdir/;
-    s/^INTDIR=/INTDIR=.\\$intdir/;
-    s/^SSL=.*/SSL=$openssl/;
-
-    print MAKE_OUT $_ . "\n";
-  }
-}
-
-###############################################
-#
-# Create Makefile for Perl scripts in local
-# from local\Makefile.in
-#
-###############################################
-  
-my $makefile_out = "local\\Makefile";
-my $makefile_in = "local\\Makefile.in";
-
-my $outdir = $config;
-
-open (MAKE_OUT, ">$makefile_out") || die "Can't Open $makefile_out\n";
-open (MAKE_IN, "<$makefile_in") || die "Can't Open $makefile_in\n";
-
-print "creating $makefile_out\n";
-
-while (<MAKE_IN>)
-{
-  chomp;
-  
-  s/^OUTDIR=/OUTDIR=.\\$outdir/;
-  s/^PREFIX=/PREFIX=$prefix/;   
-  s/^PREFIX_DOS=/PREFIX_DOS=$prefixdos/;    
-  
-  print MAKE_OUT $_ . "\n";
+if ($b_ipv6 == 1) {
+    $subs{"ipv6"} = [ "^.*#undef NETSNMP_ENABLE_IPV6.*", "#define NETSNMP_ENABLE_IPV6 1" ];
 }
-
-
-###############################################
-#
-# Create net-snmp-config.h
-#
-###############################################
-{
-  my $file_out = "net-snmp\\net-snmp-config.h";
-  my $file_in = "net-snmp\\net-snmp-config.h.in";
-
-  open (FILE_OUT, ">$file_out") || die "Can't Open $file_out\n";
-  open (FILE_IN, "<$file_in") || die "Can't Open $file_in\n";
-  
-  print "creating $file_out\n";
-
-  while (<FILE_IN>)
-  {
-    chomp;
-    s/^#define PACKAGE_VERSION.*/#define PACKAGE_VERSION \"$version\"/;
-    if ($prefix ne "") {
-      s/^#define INSTALL_BASE.*/#define INSTALL_BASE \"$prefix\"/;
-    }
-    if ($linktype eq "dynamic") {
-      s/^.*#undef NETSNMP_USE_DLL.*/#define NETSNMP_USE_DLL 1/;
-    }
-    if ($sdk == 1) {
-      s/^.*#undef HAVE_WIN32_PLATFORM_SDK.*/#define HAVE_WIN32_PLATFORM_SDK 1/;
-    }
-    if ($openssl == 1) {
-      s/^.*#undef NETSNMP_USE_OPENSSL.*/#define NETSNMP_USE_OPENSSL 1/;
-    }
-    if ($b_ipv6 == 1) {
-      s/^.*#undef NETSNMP_ENABLE_IPV6.*/#define NETSNMP_ENABLE_IPV6 1/;
-    }
-    if ($b_winextdll == 1) {
-      s/^.*#undef USING_WINEXTDLL_MODULE.*/#define USING_WINEXTDLL_MODULE 1/;
-    }
-
-    print FILE_OUT $_ . "\n";
-  }
+if ($b_winextdll == 1) {
+    $subs{"winextdll"} = [ "^.*#undef USING_WINEXTDLL_MODULE.*", "#define USING_WINEXTDLL_MODULE 1" ];
 }
 
+substitute("net-snmp/net-snmp-config.h", "net-snmp/net-snmp-config.h.in",
+           \%subs);
 
 print qq/
 ---------------------------------------------------------
diff --git a/win32/Makefile-apps.in b/win32/Makefile-apps.in
index 2113ade..bcfb26e 100644
--- a/win32/Makefile-apps.in
+++ b/win32/Makefile-apps.in
@@ -3,7 +3,6 @@ CFG=
 OUTDIR=
 INTDIR=
 LINKTYPE=
-SSL=
 
 # Set to 1 to allow the building using the DLL version of SNMPLIB.
 ALLOW_DLL=1
diff --git a/win32/MgmtApi-winExtDLL.h b/win32/MgmtApi-winExtDLL.h
deleted file mode 100644
index 9905a9c..0000000
--- a/win32/MgmtApi-winExtDLL.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * This file is a copy of the header file <snmp.h> from the MinGW project.
- * The licensing for the Win32 API is defined in the
- * MinGW file README.w32api, which states:
-
-   "Unless otherwise stated in individual source files,
-
-    THIS SOFTWARE IS NOT COPYRIGHTED
-
-    This source code is offered for use in the public domain.  You may use,
-    modify or distribute it freely.
-
-    This source code is distributed in the hope that it will be useful but
-    WITHOUT ANY WARRANTY.  ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
-    DISCLAIMED.  This includes but is not limited to warranties of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
- */
-
-/*
-  mgmtapi.h - Header file for the SNMP Management API
-
-  Written by Filip Navara <xnavara at volny.cz>
-
-  References (2003-08-25):
-    http://msdn.microsoft.com/library/en-us/snmp/snmp/snmp_reference.asp
-
-  This library 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.
-*/
-
-#ifndef _MGMTAPI_H
-#define _MGMTAPI_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifndef _SNMP_H
-#include <snmp.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define SNMP_MGMTAPI_TIMEOUT	40
-#define SNMP_MGMTAPI_SELECT_FDERRORS	41
-#define SNMP_MGMTAPI_TRAP_ERRORS	42
-#define SNMP_MGMTAPI_TRAP_DUPINIT	43
-#define SNMP_MGMTAPI_NOTRAPS	44
-#define SNMP_MGMTAPI_AGAIN	45
-#define SNMP_MGMTAPI_INVALID_CTL	46
-#define SNMP_MGMTAPI_INVALID_SESSION	47
-#define SNMP_MGMTAPI_INVALID_BUFFER	48
-#define MGMCTL_SETAGENTPORT	1
-
-#ifndef RC_INVOKED
-
-typedef PVOID LPSNMP_MGR_SESSION;
-
-BOOL WINSNMPAPI SnmpMgrClose(LPSNMP_MGR_SESSION);
-BOOL WINSNMPAPI SnmpMgrCtl(LPSNMP_MGR_SESSION,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD);
-BOOL WINSNMPAPI SnmpMgrGetTrap(AsnObjectIdentifier*,AsnNetworkAddress*,AsnInteger*,AsnInteger*,AsnTimeticks*,SnmpVarBindList*);
-BOOL WINSNMPAPI SnmpMgrGetTrapEx(AsnObjectIdentifier*,AsnNetworkAddress*,AsnNetworkAddress*,AsnInteger*,AsnInteger*,AsnOctetString*,AsnTimeticks*,SnmpVarBindList*);
-BOOL WINSNMPAPI SnmpMgrOidToStr(AsnObjectIdentifier*,LPSTR*);
-LPSNMP_MGR_SESSION WINSNMPAPI SnmpMgrOpen(LPSTR,LPSTR,INT,INT);
-INT WINSNMPAPI SnmpMgrRequest(LPSNMP_MGR_SESSION,BYTE,SnmpVarBindList*,AsnInteger*,AsnInteger*);
-BOOL WINSNMPAPI SnmpMgrStrToOid(LPSTR,AsnObjectIdentifier*);
-BOOL WINSNMPAPI SnmpMgrTrapListen(HANDLE*);
-
-#endif /* RC_INVOKED */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/win32/build.pl b/win32/build.pl
index 196b779..4007fae 100644
--- a/win32/build.pl
+++ b/win32/build.pl
@@ -1,37 +1,53 @@
 #!/usr/bin/perl
-# 
+#
 # Build script for Net-SNMP and MSVC
 # Written by Alex Burger - alex_b at users.sourceforge.net
 # March 12th, 2004
 #
 use strict;
-my $openssl = "disabled";
-my $b_ipv6 = "disabled";
-my $b_winextdll = "disabled";
-my $sdk = "disabled";
+use warnings;
+use Config;
+use Cwd 'abs_path';
+use File::Basename;
+use constant false => 0;
+use constant true => 1;
+my $target_arch = $ENV{TARGET_CPU} ? $ENV{TARGET_CPU} : $ENV{Platform} ?
+                  $ENV{Platform} : "x86";
+if ($target_arch ne "x86" && $target_arch ne "x64") {
+    print "Error: unsupported target architecture $target_arch\n";
+    die;
+}
+my @perl_arch = split(/-/, $Config{archname});
+if ($perl_arch[1] ne $target_arch) {
+    print "perl_arch = $perl_arch[1] does not match target_arch = $target_arch\n";
+    die;
+}
+my $openssl = false;
+my $default_openssldir = $target_arch eq "x64" ?
+    "C:\\OpenSSL-Win64" : "C:\\OpenSSL-Win32";
+my $default_opensslincdir = $default_openssldir . "\\include";
+my $opensslincdir = $default_opensslincdir;
+my $default_openssllibdir = $default_openssldir . "\\lib\\VC";
+my $openssllibdir = $default_openssllibdir;
+my $b_ipv6 = false;
+my $b_winextdll = false;
+my $sdk = false;
 my $default_install_base = "c:/usr";
 my $install_base = $default_install_base;
-my $install = "enabled";
-my $install_devel = "disabled";
-my $perl = "disabled";
-my $perl_install = "disabled";
-my $logging = "enabled";
-my $debug = "disabled";
+my $install = true;
+my $install_devel = false;
+my $perl = false;
+my $perl_install = false;
+my $logging = true;
+my $debug = false;
 my $configOpts = "";
-my $cTmp = "";
-my $linktype = "static";
+my $link_dynamic = false;
 my $option;
 
-# Prepend win32\ if running from main directory
-my $current_pwd = `%COMSPEC% /c cd`;
-chomp $current_pwd;
-if (! ($current_pwd =~ /\\win32$/)) {
-  chdir ("win32");
-  $current_pwd = `%COMSPEC% /c cd`;
-  chomp $current_pwd;
-}
+# Path of this script (source tree path + "win32").
+my $current_pwd = dirname(abs_path($0));
 
-if ( -d $ENV{MSVCDir} || -d $ENV{VCINSTALLDIR}) {
+if ( -d $ENV{MSVCDir} || -d $ENV{VCINSTALLDIR} || defined($ENV{TARGET_CPU}) ) {
 }
 else {
   print "\nPlease run VCVARS32.BAT first to set up the Visual Studio build\n" .
@@ -43,132 +59,89 @@ else {
 while (1) {
   print "\n\nNet-SNMP build and install options\n";
   print "==================================\n\n";
-  print "1.  OpenSSL support:                " . $openssl. "\n";
-  print "2.  Platform SDK support:           " . $sdk . "\n";
+  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 "3.  Install path:                   " . $install_base . "\n";
-  print "4.  Install after build:            " . $install . "\n";
+  print "5.  Install path:                   " . $install_base . "\n";
+  print "6.  Install after build:            " . ($install ? "enabled" : "disabled") . "\n";
   print "\n";
-  print "5.  Perl modules:                   " . $perl . "\n";
-  print "6.  Install perl modules:           " . $perl_install . "\n";
+  print "7.  Perl modules:                   " . ($perl ? "enabled" : "disabled") . "\n";
+  print "8.  Install perl modules:           " . ($perl_install ? "enabled" : "disabled") . "\n";
   print "\n";
-  print "7.  Quiet build (logged):           " . $logging . "\n";
-  print "8.  Debug mode:                     " . $debug . "\n";
+  print "9.  Quiet build (logged):           " . ($logging ? "enabled" : "disabled") . "\n";
+  print "10. Debug mode:                     " . ($debug ? "enabled" : "disabled") . "\n";
   print "\n";
-  print "9.  IPv6 transports (requires SDK): " . $b_ipv6 . "\n";
-  print "10. winExtDLL agent (requires SDK): " . $b_winextdll . "\n";
+  print "11. IPv6 transports (requires SDK): " . ($b_ipv6 ? "enabled" : "disabled") . "\n";
+  print "12. winExtDLL agent (requires SDK): " . ($b_winextdll ? "enabled" : "disabled") . "\n";
   print "\n";
-  print "11. Link type:                      " . $linktype . "\n";
+  print "13. Link type:                      " . ($link_dynamic ? "dynamic" : "static") . "\n";
   print "\n";
-  print "12. Install development files       " . $install_devel . "\n";
+  print "14. 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: ";
 
   chomp ($option = <>);
   if ($option eq "1") {
-    if ($openssl eq "enabled") {
-      $openssl = "disabled";
-    }
-    else {
-      $openssl = "enabled";
-    }
+    $openssl = !$openssl;
   }
   elsif ($option eq "2") {
-    if ($sdk eq "enabled") {
-      $sdk = "disabled";
-    }
-    else {
-      $sdk = "enabled";
-    }
-  }
-  elsif ($option eq "9") {
-    if ($b_ipv6 eq "enabled") {
-      $b_ipv6 = "disabled";
-    }
-    else {
-      $b_ipv6 = "enabled";
-      if ($sdk = "disabled") {
-        print "\n\n* SDK required for IPv6 and has been automatically enabled";
-        $sdk = "enabled";
-      }
-    }
-  }
-  elsif ($option eq "10") {
-    if ($b_winextdll eq "enabled") {
-      $b_winextdll = "disabled";
-    }
-    else {
-      $b_winextdll = "enabled";
-      if ($sdk = "disabled") {
-        print "\n\n* SDK required for IPv6 and has been automatically enabled";
-        $sdk = "enabled";
-      }
-    }
+    print "Please enter the OpenSSL include directory [$opensslincdir]: ";
+    chomp ($opensslincdir = <>);
+    $opensslincdir =~ s/\\/\//g;
+    $opensslincdir = $default_opensslincdir if ($opensslincdir eq "");
   }
   elsif ($option eq "3") {
-    print "Please enter the new install path [$default_install_base]: ";
-    chomp ($install_base = <>);
-    if ($install_base eq "") {
-      $install_base = $default_install_base;
-    }
-    $install_base =~ s/\\/\//g;
+    print "Please enter the OpenSSL library directory [$openssllibdir]: ";
+    chomp ($openssllibdir = <>);
+    $openssllibdir =~ s/\\/\//g;
+    $openssllibdir = $default_openssllibdir if ($openssllibdir eq "");
   }
   elsif ($option eq "4") {
-    if ($install eq "enabled") {
-      $install = "disabled";
-    }
-    else {
-      $install = "enabled";
+    $sdk = !$sdk;
+  }
+  elsif ($option eq "11") {
+    $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") {
-    if ($install_devel eq "enabled") {
-      $install_devel = "disabled";
-    }
-    else {
-      $install_devel = "enabled";
+    $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") {
-    if ($perl eq "enabled") {
-      $perl = "disabled";
-    }
-    else {
-      $perl = "enabled";
-    }
+    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") {
-    if ($perl_install eq "enabled") {
-      $perl_install = "disabled";
-    }
-    else {
-      $perl_install = "enabled";
-    }
+    $install = !$install;
+  }
+  elsif ($option eq "14") {
+    $install_devel = !$install_devel;
   }
   elsif ($option eq "7") {
-    if ($logging eq "enabled") {
-      $logging = "disabled";
-    }
-    else {
-      $logging = "enabled";
-    }
+    $perl = !$perl;
   }
   elsif ($option eq "8") {
-    if ($debug eq "enabled") {
-      $debug = "disabled";
-    }
-    else {
-      $debug = "enabled";
-    }
+    $perl_install = !$perl_install;
   }
-  elsif ($option eq "11") {
-    if ($linktype eq "static") {
-      $linktype = "dynamic";
-    }
-    else {
-      $linktype = "static";
-    }
+  elsif ($option eq "9") {
+    $logging = !$logging;
+  }
+  elsif ($option eq "10") {
+    $debug = !$debug;
+  }
+  elsif ($option eq "13") {
+    $link_dynamic = !$link_dynamic;
   }
   elsif (lc($option) eq "f") {
     last;
@@ -178,16 +151,16 @@ while (1) {
   }
 }
 
-$cTmp = ($openssl eq "enabled" ? "--with-ssl" : "" );
-$configOpts = "$cTmp";
-$cTmp = ($sdk eq "enabled" ? "--with-sdk" : "" );
-$configOpts = "$configOpts $cTmp";
-$cTmp = ($b_ipv6 eq "enabled" ? "--with-ipv6" : "" );
-$configOpts = "$configOpts $cTmp";
-$cTmp = ($b_winextdll eq "enabled" ? "--with-winextdll" : "" );
-$configOpts = "$configOpts $cTmp";
-$cTmp = ($debug eq "enabled" ? "--config=debug" : "--config=release" );
-$configOpts = "$configOpts $cTmp";
+my $linktype = $link_dynamic ? "dynamic" : "static";
+$configOpts .= $openssl ? "--with-ssl" : "";
+$configOpts .= " ";
+$configOpts .= $sdk ? "--with-sdk" : "";
+$configOpts .= " ";
+$configOpts .= $b_ipv6 ? "--with-ipv6" : "";
+$configOpts .= " ";
+$configOpts .= $b_winextdll ? "--with-winextdll" : "";
+$configOpts .= " ";
+$configOpts .= $debug ? "--config=debug" : "--config=release";
 
 # Set environment variables
 
@@ -195,144 +168,94 @@ $configOpts = "$configOpts $cTmp";
 $ENV{NO_EXTERNAL_DEPS}="1";
 
 # Set PATH environment variable so Perl make tests can locate the DLL
-$ENV{PATH} = "$current_pwd\\bin\\" . ($debug eq "enabled" ? "debug" : "release" ) . ";$ENV{PATH}";
+$ENV{PATH} = "$current_pwd\\bin\\" . ($debug ? "debug" : "release" ) . ";$ENV{PATH}";
+
+$ENV{INCLUDE} .= ";$opensslincdir";
+$ENV{LIB}     .= ";$openssllibdir";
 
 # Set MIBDIRS environment variable so Perl make tests can locate the mibs
-my $temp_mibdir = "$current_pwd/../mibs";
-$temp_mibdir =~ s/\\/\//g;
-$ENV{MIBDIRS}=$temp_mibdir;
+$ENV{MIBDIRS} = dirname($current_pwd) . "/mibs";
 
 # Set SNMPCONFPATH environment variable so Perl conf.t test can locate
 # the configuration files.
-# See the note about environment variables in the Win32 section of 
-# perl/SNMP/README for details on why this is needed. 
-$ENV{SNMPCONFPATH}="t";$ENV{SNMPCONFPATH};
+# See the note about environment variables in the Win32 section of
+# perl/SNMP/README for details on why this is needed.
+$ENV{SNMPCONFPATH}="t";
 
 print "\nBuilding...\n";
 
-if ($logging eq "enabled") {
-  print "\nCreating *.out log files.\n\n";
-}
+print "\nCreating *.out log files.\n\n";
 
-if ($logging eq "enabled") {
-  print "Deleting old log files...\n";
-  system("del *.out > NUL: 2>&1");
+print "Deleting old log files...\n";
+system("del *.out" . ($logging ? " > NUL: 2>&1" : ""));
 
-  # Delete net-snmp-config.h from main include folder just in case it was created by a Cygwin or MinGW build
-  system("del ..\\include\\net-snmp\\net-snmp-config.h > NUL: 2>&1");
-  unlink "../snmplib/transports/snmp_transport_inits.h";
-  
-  print "Running Configure...\n";
-  system("perl Configure $configOpts --linktype=$linktype --prefix=\"$install_base\" > configure.out 2>&1") == 0 || die "Build error (see configure.out)";
+# Delete net-snmp-config.h from main include folder just in case it was created by a Cygwin or MinGW build
+unlink "../include/net-snmp/net-snmp-config.h";
+unlink "../snmplib/transports/snmp_transport_inits.h";
 
-  print "Cleaning...\n";
-  system("nmake /nologo clean > clean.out 2>&1") == 0 || die "Build error (see clean.out)";
+print "Running Configure...\n";
+system("perl Configure $configOpts --linktype=$linktype --prefix=\"$install_base\"" . ($logging ? " > configure.out 2>&1" : "")) == 0 || die ($logging ? "Build error (see configure.out)" : "Build error (see above)");
 
-  print "Building main package...\n";
-  system("nmake /nologo > make.out 2>&1") == 0 || die "Build error (see make.out)";
+print "Cleaning...\n";
+system("nmake /nologo clean" . ($logging ? " > clean.out 2>&1" : "")) == 0 || die ($logging ? "Build error (see clean.out)" : "Build error (see above)");
 
-  if ($perl eq "enabled") {
-    if ($linktype eq "static") {
-      print "Running Configure for DLL...\n";
-      system("perl Configure $configOpts --linktype=dynamic --prefix=\"$install_base\" > perlconfigure.out 2>&1") == 0 || die "Build error (see perlconfigure.out)";
-      
-      print "Cleaning libraries...\n";
-      system("nmake /nologo libs_clean >> clean.out 2>&1") == 0 || die "Build error (see clean.out)";
-      
-      print "Building DLL libraries...\n";
-      system("nmake /nologo libs > dll.out 2>&1") == 0 || die "Build error (see dll.out)";
-    }
-   
-    print "Cleaning Perl....\n";
-    system("nmake /nologo perl_clean >> clean.out 2>&1"); # If already cleaned, Makefile is gone so don't worry about errors!
+print "Building main package...\n";
+system("nmake /nologo" . ($logging ? " > make.out 2>&1" : "")) == 0 || die ($logging ? "Build error (see make.out)" : "Build error (see above)");
 
-    print "Building Perl modules...\n";
-    system("nmake /nologo perl > perlmake.out 2>&1") == 0 || die "Build error (see perlmake.out)";
+if ($perl) {
+  if (!$link_dynamic) {
+    print "Running Configure for DLL...\n";
+    system("perl Configure $configOpts --linktype=dynamic --prefix=\"$install_base\"" . ($logging ? " > perlconfigure.out 2>&1" : "")) == 0 || die ($logging ? "Build error (see perlconfigure.out)" : "Build error (see above)");
 
-    print "Testing Perl modules...\n";
-    system("nmake /nologo perl_test > perltest.out 2>&1"); # Don't die if all the tests don't pass..
-    
-    if ($perl_install eq "enabled") {
-      print "Installing Perl modules...\n";
-      system("nmake /nologo perl_install > perlinstall.out 2>&1") == 0 || die "Build error (see perlinstall.out)";
-    }
-      
-    print "\nSee perltest.out for Perl test results\n";
-  }
+    print "Cleaning libraries...\n";
+    system("nmake /nologo libs_clean" . ($logging ? " >> clean.out 2>&1" : "")) == 0 || die ($logging ? "Build error (see clean.out)" : "Build error (see above)");
 
-  print "\n";
-  if ($install eq "enabled") {
-    print "Installing main package...\n";
-    system("nmake /nologo install > install.out 2>&1") == 0 || die "Build error (see install.out)";
-  }
-  else {
-    print "Type nmake install to install the package to $install_base\n";
+    print "Building DLL libraries...\n";
+    system("nmake /nologo libs" . ($logging ? " > dll.out 2>&1" : "")) == 0 || die ($logging ? "Build error (see dll.out)" : "Build error (see above)");
   }
 
-  if ($install_devel eq "enabled") {
-    print "Installing development files...\n";
-    system("nmake /nologo install_devel > install_devel.out 2>&1") == 0 || die "Build error (see install_devel.out)";
-  }
-  else {
-    print "Type nmake install_devel to install the development files to $install_base\n";
-  }
-  
-  if ($perl_install eq "disabled" && $perl eq "enabled") {
-    print "Type nmake perl_install to install the Perl modules\n";
-  }
-}
-else {
-  system("del *.out");
+  print "Cleaning Perl....\n";
+  system("nmake /nologo perl_clean" . ($logging ? " >> clean.out 2>&1" : "")); # If already cleaned, Makefile is gone so don't worry about errors!
 
-  # Delete net-snmp-config.h from main include folder just in case it was created by a Cygwin or MinGW build
-  system("del ..\\include\\net-snmp\\net-snmp-config.h > NUL: 2>&1");
+  print "Building Perl modules...\n";
+  system("nmake /nologo perl" . ($logging ? " > perlmake.out 2>&1" : "")) == 0 || die ($logging ? "Build error (see perlmake.out)" : "Build error (see above)");
 
-  system("perl Configure $configOpts --linktype=$linktype --prefix=\"$install_base\"") == 0 || die "Build error (see above)";
-  system("nmake /nologo clean") == 0 || die "Build error (see above)";
-  system("nmake /nologo") == 0 || die "Build error (see above)";
-  
-  if ($perl eq "enabled") {
-    if ($linktype eq "static") {      
-      system("perl Configure $configOpts --linktype=dynamic --prefix=\"$install_base\"") == 0 || die "Build error (see above)";
-      system("nmake /nologo libs_clean") == 0 || die "Build error (see above)";
-      system("nmake /nologo libs") == 0 || die "Build error (see above)";
-    }
-      
-    system("nmake /nologo perl_clean"); # If already cleaned, Makefile is gone so don't worry about errors!
-    system("nmake /nologo perl") == 0 || die "Build error (see above)";
+  print "Testing Perl modules...\n";
+  system("nmake /nologo perl_test" . ($logging ? " > perltest.out 2>&1" : "")); # Don't die if all the tests don't pass..
 
-    my $path_old = $ENV{PATH};
-    $ENV{PATH} = "$current_pwd\\bin\\" . ($debug eq "enabled" ? "debug" : "release" ) . ";$ENV{PATH}";
-    system("nmake /nologo perl_test"); # Don't die if all the tests don't pass..
-    $ENV{PATH} = $path_old;
-    
-    if ($perl_install eq "enabled") {      
-      print "Installing Perl modules...\n";
-      system("nmake /nologo perl_install") == 0 || die "Build error (see above)";
-    }
+  if ($perl_install) {
+    print "Installing Perl modules...\n";
+    system("nmake /nologo perl_install" . ($logging ? " > perlinstall.out 2>&1" : "")) == 0 || die ($logging ? "Build error (see perlinstall.out)" : "Build error (see above)");
   }
 
-  print "\n";
-  if ($install eq "enabled") {
-    print "Installing main package...\n";
-    system("nmake /nologo install") == 0 || die "Build error (see above)";
-  }
-  else {
-    print "Type nmake install to install the package to $install_base\n";
-  }
+  print "\nSee perltest.out for Perl test results\n";
+}
 
-  if ($install_devel eq "enabled") {
-    print "Installing development files...\n";
-    system("nmake /nologo install_devel > install_devel.out 2>&1") == 0 || die "Build error (see install_devel.out)";
-  }
-  else {
-    print "Type nmake install_devel to install the development files to $install_base\n";
-  }
+print "\n";
+if ($install) {
+  print "Installing main package...\n";
+  system("nmake /nologo install" . ($logging ? " > install.out 2>&1" : "")) == 0 || die ($logging ? "Build error (see install.out)" : "Build error (see above)");
+}
+else {
+  print "Type nmake install to install the package to $install_base\n";
+}
 
-  if ($perl_install eq "disabled" && $perl eq "enabled") {
-    print "Type nmake perl_install to install the Perl modules\n";
-  }
+if ($install_devel) {
+  print "Installing development files...\n";
+  system("nmake /nologo install_devel > install_devel.out 2>&1") == 0 || die "Build error (see install_devel.out)";
+}
+else {
+  print "Type nmake install_devel to install the development files to $install_base\n";
+}
+
+if ($perl && !$perl_install) {
+  print "Type nmake perl_install to install the Perl modules\n";
 }
 
 print "\nDone!\n";
 
+# Local Variables:
+# mode: perl
+# perl-indent-level: 2
+# indent-tabs-mode: nil
+# End:
diff --git a/win32/libagent/Makefile.in b/win32/libagent/Makefile.in
index 30a6cf6..abcd82e 100644
--- a/win32/libagent/Makefile.in
+++ b/win32/libagent/Makefile.in
@@ -35,6 +35,7 @@ LIB32_OBJS= \
 	"$(INTDIR)\scalar_group.obj" \
 	"$(INTDIR)\serialize.obj" \
 	"$(INTDIR)\snmp_agent.obj" \
+	"$(INTDIR)\snmp_get_statistic.obj" \
 	"$(INTDIR)\snmp_vars.obj" \
 	"$(INTDIR)\stash_cache.obj" \
 	"$(INTDIR)\stash_to_next.obj" \
@@ -236,6 +237,12 @@ SOURCE=..\..\agent\helpers\serialize.c
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+SOURCE=..\..\agent\helpers\snmp_get_statistic.c
+
+"$(INTDIR)\snmp_get_statistic.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
 SOURCE=..\..\agent\helpers\stash_cache.c
 
 "$(INTDIR)\stash_cache.obj" : $(SOURCE) "$(INTDIR)"
diff --git a/win32/libagent/libagent.dsp b/win32/libagent/libagent.dsp
index 892e8d3..63642c2 100644
--- a/win32/libagent/libagent.dsp
+++ b/win32/libagent/libagent.dsp
@@ -177,6 +177,10 @@ SOURCE=..\..\agent\snmp_vars.c
 # End Source File
 # Begin Source File
 
+SOURCE=..\..\agent\helpers\snmp_get_statistic.c
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\agent\helpers\stash_cache.c
 # End Source File
 # Begin Source File
diff --git a/win32/libsnmp_dll/Makefile.in b/win32/libsnmp_dll/Makefile.in
index 42235d2..0aaf41b 100644
--- a/win32/libsnmp_dll/Makefile.in
+++ b/win32/libsnmp_dll/Makefile.in
@@ -2,7 +2,6 @@ PROGNAME=
 CFG=
 OUTDIR=
 INTDIR=
-SSL=
 SDK=
 
 !IF "$(OS)" == "Windows_NT"
diff --git a/win32/mib_module_includes.h b/win32/mib_module_includes.h
index 014ade0..9cb750c 100644
--- a/win32/mib_module_includes.h
+++ b/win32/mib_module_includes.h
@@ -61,6 +61,9 @@
 #include "mibgroup/mibII/setSerialNo.h"
 
 #ifdef USING_UCD_SNMP_MODULE
+#ifdef USING_UCD_SNMP_DLMOD_MODULE
+#include "mibgroup/ucd-snmp/dlmod.h"
+#endif
 #include "mibgroup/ucd-snmp/memory.h"
 #include "mibgroup/ucd-snmp/vmstat.h"
 #include "mibgroup/ucd-snmp/proc.h"
diff --git a/win32/mib_module_inits.h b/win32/mib_module_inits.h
index a4b39bc..f78d893 100644
--- a/win32/mib_module_inits.h
+++ b/win32/mib_module_inits.h
@@ -29,6 +29,9 @@
 #ifndef _MSC_VER
   if (should_init("disk")) init_disk();
 #endif
+#ifdef USING_UCD_SNMP_DLMOD_MODULE
+  if (should_init("dlmod")) init_dlmod();
+#endif
   if (should_init("loadave")) init_loadave();
   if (should_init("extensible")) init_extensible();
   if (should_init("extend")) init_extend();
diff --git a/win32/mib_module_shutdown.h b/win32/mib_module_shutdown.h
index 36a6dd4..caedf60 100644
--- a/win32/mib_module_shutdown.h
+++ b/win32/mib_module_shutdown.h
@@ -6,6 +6,10 @@
   if (should_init("pass_persist")) shutdown_pass_persist();
 #endif
 
+#ifdef USING_UCD_SNMP_DLMOD_MODULE
+  if (should_init("dlmod")) shutdown_dlmod();
+#endif
+
 #ifdef USING_WINEXTDLL_MODULE
    if (should_init("winExtDLL")) shutdown_winExtDLL();
 #endif
diff --git a/win32/net-snmp/net-snmp-config.h b/win32/net-snmp/net-snmp-config.h
index 7791ee0..1608563 100644
--- a/win32/net-snmp/net-snmp-config.h
+++ b/win32/net-snmp/net-snmp-config.h
@@ -5,12 +5,14 @@
 #define NET_SNMP_CONFIG_H
 
 /* _MSC_VER values
-   1600 = 10.0 (2010)
-   1500 =  9.0 (2008)
-   1400 =  8.0 (2005)
-   1310 =  7.1 (2003)
-   1300 =  7.0 (2002)
-   1200 =  6.0
+   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
@@ -41,7 +43,7 @@
  * We need at least SP1 for some IPv6 defines in ws2ipdef.h
  */
 #ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x501 /*_WIN32_WINNT_WIN2K*/
+#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.
@@ -939,6 +941,9 @@
 /* Define to 1 if you have the <ws2tcpip.h> 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 <xti.h> header file. */
 /* #undef HAVE_XTI_H */
 
@@ -1613,10 +1618,17 @@ typedef unsigned int     uintptr_t;
 #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.  */
@@ -1748,7 +1760,11 @@ enum {
 #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.
diff --git a/win32/net-snmp/net-snmp-config.h.in b/win32/net-snmp/net-snmp-config.h.in
index 5215865..9693730 100644
--- a/win32/net-snmp/net-snmp-config.h.in
+++ b/win32/net-snmp/net-snmp-config.h.in
@@ -5,12 +5,14 @@
 #define NET_SNMP_CONFIG_H
 
 /* _MSC_VER values
-   1600 = 10.0 (2010)
-   1500 =  9.0 (2008)
-   1400 =  8.0 (2005)
-   1310 =  7.1 (2003)
-   1300 =  7.0 (2002)
-   1200 =  6.0
+   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
@@ -41,7 +43,7 @@
  * We need at least SP1 for some IPv6 defines in ws2ipdef.h
  */
 #ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x501 /*_WIN32_WINNT_WIN2K*/
+#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.
@@ -939,6 +941,9 @@
 /* Define to 1 if you have the <ws2tcpip.h> 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 <xti.h> header file. */
 /* #undef HAVE_XTI_H */
 
@@ -1613,10 +1618,17 @@ typedef unsigned int     uintptr_t;
 #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.  */
@@ -1748,7 +1760,11 @@ enum {
 #endif
 
 /* Define to 1 if you have the `strtoull' function. */
+#if _MSC_VER >= 1800
+#define HAVE_STRTOULL
+#else
 /* #undef HAVE_STRTOULL */
+#endif
 
 /*
  * Module configuration and control starts here.
diff --git a/win32/netsnmpmibs/Makefile.in b/win32/netsnmpmibs/Makefile.in
old mode 100644
new mode 100755
index 44d0203..b6bacbc
--- a/win32/netsnmpmibs/Makefile.in
+++ b/win32/netsnmpmibs/Makefile.in
@@ -85,6 +85,7 @@ LIB32_OBJS1= \
 	"$(INTDIR)\mteTriggerThresholdTable.obj" \
 	"$(INTDIR)\example.obj" \
 	"$(INTDIR)\ucdDemoPublic.obj" \
+	"$(INTDIR)\dlmod.obj" \
 	"$(INTDIR)\errormib.obj" \
 	"$(INTDIR)\extensible.obj" \
 	"$(INTDIR)\file.obj"
@@ -314,6 +315,12 @@ SOURCE=..\..\agent\mibgroup\examples\ucdDemoPublic.c
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+SOURCE="..\..\agent\mibgroup\ucd-snmp\dlmod.c"
+
+"$(INTDIR)\dlmod.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
 SOURCE="..\..\agent\mibgroup\ucd-snmp\errormib.c"
 
 "$(INTDIR)\errormib.obj" : $(SOURCE) "$(INTDIR)"
diff --git a/win32/netsnmpmibs/netsnmpmibs.dsp b/win32/netsnmpmibs/netsnmpmibs.dsp
index 9034eed..cde496c 100644
--- a/win32/netsnmpmibs/netsnmpmibs.dsp
+++ b/win32/netsnmpmibs/netsnmpmibs.dsp
@@ -245,6 +245,10 @@ SOURCE=..\..\agent\mibgroup\examples\ucdDemoPublic.c
 # PROP Default_Filter ""
 # Begin Source File
 
+SOURCE="..\..\agent\mibgroup\ucd-snmp\dlmod.c"
+# End Source File
+# Begin Source File
+
 SOURCE="..\..\agent\mibgroup\ucd-snmp\errormib.c"
 # End Source File
 # Begin Source File
diff --git a/win32/snmpd/Makefile.in b/win32/snmpd/Makefile.in
index 652dd80..1b1b3ac 100644
--- a/win32/snmpd/Makefile.in
+++ b/win32/snmpd/Makefile.in
@@ -3,7 +3,6 @@ CFG=
 OUTDIR=
 INTDIR=
 SDK=
-SSL=
 LINKTYPE=
 
 # Set to 1 to allow the building using the DLL version of SNMPLIB.
diff --git a/win32/snmpnetstat/Makefile.in b/win32/snmpnetstat/Makefile.in
index e27d97d..05a01e8 100644
--- a/win32/snmpnetstat/Makefile.in
+++ b/win32/snmpnetstat/Makefile.in
@@ -2,7 +2,6 @@ PROGNAME=
 CFG=
 OUTDIR=
 INTDIR=
-SSL=
 LINKTYPE=
 
 # Set to 1 to allow the building using the DLL version of SNMPLIB.
@@ -23,8 +22,10 @@ CLEAN :
 	- at erase "$(INTDIR)\if.obj"
 	- at erase "$(INTDIR)\inet.obj"
 	- at erase "$(INTDIR)\inet6.obj"
+	- at erase "$(INTDIR)\inetx.obj"
 	- at erase "$(INTDIR)\main.obj"
 	- at erase "$(INTDIR)\route.obj"
+	- at erase "$(INTDIR)\routex.obj"
 	- at erase "$(INTDIR)\ffs.obj"
 	- at erase "$(INTDIR)\vc??.idb"
 	- at erase "$(INTDIR)\winstub.obj"
@@ -86,8 +87,10 @@ LINK32_OBJS= \
 	"$(INTDIR)\if.obj" \
 	"$(INTDIR)\inet.obj" \
 	"$(INTDIR)\inet6.obj" \
+	"$(INTDIR)\inetx.obj" \
 	"$(INTDIR)\main.obj" \
 	"$(INTDIR)\route.obj" \
+	"$(INTDIR)\routex.obj" \
 	"$(INTDIR)\ffs.obj" \
 	"$(INTDIR)\winstub.obj"
 
@@ -116,10 +119,14 @@ CLEAN :
 	- at erase "$(INTDIR)\inet.sbr"
 	- at erase "$(INTDIR)\inet6.obj"
 	- at erase "$(INTDIR)\inet6.sbr"
+	- at erase "$(INTDIR)\inetx.obj"
+	- at erase "$(INTDIR)\inetx.sbr"
 	- at erase "$(INTDIR)\main.obj"
 	- at erase "$(INTDIR)\main.sbr"
 	- at erase "$(INTDIR)\route.obj"
 	- at erase "$(INTDIR)\route.sbr"
+	- at erase "$(INTDIR)\routex.obj"
+	- at erase "$(INTDIR)\routex.sbr"
 	- at erase "$(INTDIR)\ffs.obj"
 	- at erase "$(INTDIR)\ffs.sbr"
 	- at erase "$(INTDIR)\vc??.idb"
@@ -182,8 +189,10 @@ BSC32_SBRS= \
 	"$(INTDIR)\if.sbr" \
 	"$(INTDIR)\inet.sbr" \
 	"$(INTDIR)\inet6.sbr" \
+	"$(INTDIR)\inetx.sbr" \
 	"$(INTDIR)\main.sbr" \
 	"$(INTDIR)\route.sbr" \
+	"$(INTDIR)\routex.sbr" \
 	"$(INTDIR)\ffs.sbr" \
 	"$(INTDIR)\winstub.sbr"
 
@@ -198,8 +207,10 @@ LINK32_OBJS= \
 	"$(INTDIR)\if.obj" \
 	"$(INTDIR)\inet.obj" \
 	"$(INTDIR)\inet6.obj" \
+	"$(INTDIR)\inetx.obj" \
 	"$(INTDIR)\main.obj" \
 	"$(INTDIR)\route.obj" \
+	"$(INTDIR)\routex.obj" \
 	"$(INTDIR)\ffs.obj" \
 	"$(INTDIR)\winstub.obj"
 
@@ -283,6 +294,11 @@ SOURCE=..\..\apps\$(PROGNAME)\inet6.c
 
 !ENDIF 
 
+SOURCE=..\..\apps\$(PROGNAME)\inetx.c
+
+"$(INTDIR)\inetx.obj"	"$(INTDIR)\inetx.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
 SOURCE=..\..\apps\$(PROGNAME)\main.c
 
 !IF  "$(CFG)" == "release"
@@ -319,6 +335,11 @@ SOURCE=..\..\apps\$(PROGNAME)\route.c
 
 !ENDIF 
 
+SOURCE=..\..\apps\$(PROGNAME)\routex.c
+
+"$(INTDIR)\routex.obj"	"$(INTDIR)\routex.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
 SOURCE=..\..\apps\$(PROGNAME)\ffs.c
 
 !IF  "$(CFG)" == "release"
diff --git a/win32/snmpnetstat/snmpnetstat.dsp b/win32/snmpnetstat/snmpnetstat.dsp
old mode 100644
new mode 100755
index 35dd7e8..2eda575
--- a/win32/snmpnetstat/snmpnetstat.dsp
+++ b/win32/snmpnetstat/snmpnetstat.dsp
@@ -84,6 +84,10 @@ LINK32=link.exe
 # Name "snmpnetstat - Win32 Debug"
 # Begin Source File
 
+SOURCE=..\..\apps\snmpnetstat\ffs.c
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\apps\snmpnetstat\if.c
 # End Source File
 # Begin Source File
@@ -96,6 +100,10 @@ SOURCE=..\..\apps\snmpnetstat\inet6.c
 # End Source File
 # Begin Source File
 
+SOURCE=..\..\apps\snmpnetstat\inetx.c
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\apps\snmpnetstat\main.c
 # End Source File
 # Begin Source File
@@ -104,7 +112,7 @@ SOURCE=..\..\apps\snmpnetstat\route.c
 # End Source File
 # Begin Source File
 
-SOURCE=..\..\apps\snmpnetstat\ffs.c
+SOURCE=..\..\apps\snmpnetstat\routex.c
 # End Source File
 # Begin Source File
 
diff --git a/win32/snmptrapd/Makefile.in b/win32/snmptrapd/Makefile.in
index dc4fe50..2fa5ccb 100644
--- a/win32/snmptrapd/Makefile.in
+++ b/win32/snmptrapd/Makefile.in
@@ -2,7 +2,6 @@ PROGNAME=
 CFG=
 OUTDIR=
 INTDIR=
-SSL=
 LINKTYPE=
 
 # Set to 1 to allow the building using the DLL version of SNMPLIB.
diff --git a/win32/transports/snmp_transport_inits.h b/win32/transports/snmp_transport_inits.h
index 2fa0301..1bf1409 100644
--- a/win32/transports/snmp_transport_inits.h
+++ b/win32/transports/snmp_transport_inits.h
@@ -1,4 +1,5 @@
 #ifdef NETSNMP_TRANSPORT_UDP_DOMAIN
+netsnmp_udp_base_ctor();
 netsnmp_udp_ctor();
 #endif
 #ifdef NETSNMP_TRANSPORT_TCP_DOMAIN

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git



More information about the Pkg-net-snmp-commits mailing list