summaryrefslogtreecommitdiff
path: root/net/net-snmp/patches
diff options
context:
space:
mode:
authoradam <adam@pkgsrc.org>2011-05-27 10:55:24 +0000
committeradam <adam@pkgsrc.org>2011-05-27 10:55:24 +0000
commit9ee9c25d82955074bbdcc38a56c3aada3e85d79d (patch)
treefad7c32b7932d543644efe83e908d735289d38b4 /net/net-snmp/patches
parent1e40d776bf23a73cf6caede64a2c8716e4b7e1b3 (diff)
downloadpkgsrc-9ee9c25d82955074bbdcc38a56c3aada3e85d79d.tar.gz
Changes 5.6.1.1:
* OID Typedef Bug Fix: The oid typedef was changed in 5.6.1 to an u_int32 from a u_long. This broke binary compatibility and likely 3rd-party code. 5.6.1.1 reverts this change and fixes an underlying OID printing problem in two agent modules that caused someone to change the typedef in the first place. Changes 5.6.1: * General: - The DTLS and TLS transports and the TSM security model are no longer "beta" (they've undergone rigorous interoperability testing). - Many Bug Fixes (see the CHANGES and ChangeLog files for full details) * snmpd: - 0 Patch 3141462: from fenner: fix agentx subagent issues with multiple-object requests - Patch from Niels to fix VACM persistant storage. Changes 5.6: * all: - Implemented the SNMP over TLS and SNMP over DTLS protocols [RFC-to-be] - Implemented the "Transport Security Model" [RFC5591] - Generic host-specific configuration .conf files are now read. - Include statements can now be used in .conf files. * snmpd: - Fix handling of multiple matching VACM entries. (Use the "best" match, rather than the first one). Reported by Adam Lewis. Note that this could potentially affect the behaviour of existing access control configurations. - Agent will no longer call table handlers if a set request for the handler has invalid indexes - table_data/tdata next handler will not be called during get processing if no valid rows are found for the handler - [PATCH 2952708]: Added Perl implementation of BRIDGE-MIB - moved all functions defined in libnetsnmphelpers to libnetsnmpagent. libnetsnmphelpers is now an empty library. - Implemented the TSM-MIB and the TLSTM-MIB - new API for indicating that persistent store needs to be saved after the current request finishes processing - [PATCH 2931446]: make the load averages writable. * apps: - A new tool 'net-snmp-cert' that easily creates and manages X.509 certificates for use with the SNMP over (D)TLS protocols. - Added an 'agentxtrap' command to send notifications via AgentX - -T command line flag can be used to pass configuration directly to transports that can accept configuration tokens - A new 'snmptls' command for manipulating the agent's TLS configuration * snmplib: - A more modular transport subsystem that allows third party extensions and dependencies for code reuse. - New transport functions: f_config, f_open, f_copy and f_setup_session - Transports can now specify session defaults - [PATCH 2942940]: Add a new function, netsnmp_parse_args, that is like snmp_parse_args but takes an additional bitmask, flags, to affect the behaviour. Also remove the magic handling of some application names. - A new X.509 certificate API for indexing and reading certificates - new experimental row creation API which uses a state machine to try really hard to create a row from a given varbind list - netsnmp_container enhancements: - added a free_item function - added a CONTAINER_FREE_ALL macro/function - added an interface for duplicating a container (CONTAINER_DUP) - added a remove function to container_iterators - added an ability to set options on binary_array containers - new snmp token logOption allows specifying log destinations via configuration conf files - A very significant reduction in compiler warning output - new experimental simple state machine handling API
Diffstat (limited to 'net/net-snmp/patches')
-rw-r--r--net/net-snmp/patches/patch-aa4
-rw-r--r--net/net-snmp/patches/patch-ab4
-rw-r--r--net/net-snmp/patches/patch-ac151
-rw-r--r--net/net-snmp/patches/patch-ad20
-rw-r--r--net/net-snmp/patches/patch-ae8
-rw-r--r--net/net-snmp/patches/patch-af492
-rw-r--r--net/net-snmp/patches/patch-ag4
-rw-r--r--net/net-snmp/patches/patch-ai4
-rw-r--r--net/net-snmp/patches/patch-aj4
-rw-r--r--net/net-snmp/patches/patch-ak4
-rw-r--r--net/net-snmp/patches/patch-al8
-rw-r--r--net/net-snmp/patches/patch-am18
-rw-r--r--net/net-snmp/patches/patch-an12
-rw-r--r--net/net-snmp/patches/patch-ao38
-rw-r--r--net/net-snmp/patches/patch-ap8
-rw-r--r--net/net-snmp/patches/patch-aq13
-rw-r--r--net/net-snmp/patches/patch-dc26
-rw-r--r--net/net-snmp/patches/patch-de44
-rw-r--r--net/net-snmp/patches/patch-df10
-rw-r--r--net/net-snmp/patches/patch-dh4
-rw-r--r--net/net-snmp/patches/patch-dl10
-rw-r--r--net/net-snmp/patches/patch-dm14
-rw-r--r--net/net-snmp/patches/patch-dn14
-rw-r--r--net/net-snmp/patches/patch-do6
-rw-r--r--net/net-snmp/patches/patch-dq4
-rw-r--r--net/net-snmp/patches/patch-dr10
-rw-r--r--net/net-snmp/patches/patch-ds10
-rw-r--r--net/net-snmp/patches/patch-dt12
-rw-r--r--net/net-snmp/patches/patch-eg27
-rw-r--r--net/net-snmp/patches/patch-eh27
-rw-r--r--net/net-snmp/patches/patch-ei13
-rw-r--r--net/net-snmp/patches/patch-el9
-rw-r--r--net/net-snmp/patches/patch-ep24
-rw-r--r--net/net-snmp/patches/patch-es8
-rw-r--r--net/net-snmp/patches/patch-et18
-rw-r--r--net/net-snmp/patches/patch-eu18
-rw-r--r--net/net-snmp/patches/patch-ex4
-rw-r--r--net/net-snmp/patches/patch-ey18
-rw-r--r--net/net-snmp/patches/patch-ez20
-rw-r--r--net/net-snmp/patches/patch-fa7
40 files changed, 540 insertions, 609 deletions
diff --git a/net/net-snmp/patches/patch-aa b/net/net-snmp/patches/patch-aa
index b907cb27ba3..bceaabade49 100644
--- a/net/net-snmp/patches/patch-aa
+++ b/net/net-snmp/patches/patch-aa
@@ -1,8 +1,8 @@
-$NetBSD: patch-aa,v 1.8 2008/09/08 12:58:09 adam Exp $
+$NetBSD: patch-aa,v 1.9 2011/05/27 10:55:24 adam Exp $
--- agent/mibgroup/host/hr_filesys.c.orig 2008-07-30 11:58:30.000000000 +0200
+++ agent/mibgroup/host/hr_filesys.c
-@@ -96,6 +96,11 @@ struct mnttab *HRFS_entry = &HRFS_entry
+@@ -111,6 +111,11 @@ struct mnttab *HRFS_entry = &HRFS_entry
#elif defined(HAVE_STATVFS) && defined(__NetBSD__)
diff --git a/net/net-snmp/patches/patch-ab b/net/net-snmp/patches/patch-ab
index 186c339883d..61710889259 100644
--- a/net/net-snmp/patches/patch-ab
+++ b/net/net-snmp/patches/patch-ab
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.10 2010/07/20 08:33:44 adam Exp $
+$NetBSD: patch-ab,v 1.11 2011/05/27 10:55:24 adam Exp $
--- agent/mibgroup/ucd-snmp/diskio.c.orig 2009-04-10 20:14:51.000000000 +0000
+++ agent/mibgroup/ucd-snmp/diskio.c
-@@ -421,6 +421,155 @@ var_diskio(struct variable * vp,
+@@ -446,6 +446,155 @@ var_diskio(struct variable * vp,
}
#endif /* bsdi */
diff --git a/net/net-snmp/patches/patch-ac b/net/net-snmp/patches/patch-ac
index ac87bc7f219..4d758eceb97 100644
--- a/net/net-snmp/patches/patch-ac
+++ b/net/net-snmp/patches/patch-ac
@@ -1,144 +1,13 @@
-$NetBSD: patch-ac,v 1.9 2010/07/20 08:33:44 adam Exp $
+$NetBSD: patch-ac,v 1.10 2011/05/27 10:55:24 adam Exp $
---- configure.in.orig 2010-05-23 20:39:44.000000000 +0000
-+++ configure.in
-@@ -2697,6 +2697,8 @@ AC_CHECK_LIB(kstat, kstat_lookup,
- AC_DEFINE(HAVE_LIBKSTAT, 1, [Define to 1 if you have the `kstat' library (-lkstat).])
- LNETSNMPLIBS="${LNETSNMPLIBS} -lkstat")
+--- agent/mibgroup/if-mib/data_access/interface.h.orig 2011-02-04 12:47:44.000000000 +0000
++++ agent/mibgroup/if-mib/data_access/interface.h
+@@ -36,7 +36,7 @@ config_exclude(mibII/interfaces)
+ config_require(if-mib/data_access/interface_linux)
+ config_require(if-mib/data_access/interface_ioctl)
-+AC_CHECK_LIB(des, des_cbc_encrypt)
-+
- # Check for libraries that the agent needs
- # saving old libraries
- NONAGENTLIBS=$LIBS
-@@ -3432,6 +3434,12 @@ AC_CHECK_HEADERS(netinet/ip6.h netinet6/
- #if HAVE_NETINET_IP6_H
- #include <netinet/ip6.h>
- #endif
-+#if HAVE_NET_IF_H
-+#include <net/if.h>
-+#endif
-+#if HAVE_NET_ROUTE_H
-+#include <net/route.h>
-+#endif
- ]])
- # DYNAMIC MODULE SUPPORT
- AC_CHECK_HEADERS(dlfcn.h)
-@@ -3871,8 +3879,10 @@ AC_CHECK_STRUCT_FOR([
- #include <sys/types.h>
- #ifdef IFNET_NEEDS_KERNEL
- #define KERNEL
-+#if !defined(__DragonFly__)
- #define _KERNEL
- #endif
-+#endif
- #include <sys/socket.h>
- ], sockaddr, sa_len, no)
+-# elif defined( openbsd3 ) || defined( openbsd4 ) || \
++# elif defined( netbsd ) || defined( openbsd3 ) || defined( openbsd4 ) || \
+ defined( freebsd4 ) || defined( freebsd5 ) || defined( freebsd6 ) || defined (darwin)
-@@ -3883,8 +3893,10 @@ AC_CHECK_STRUCT_FOR([
- #include <sys/types.h>
- #ifdef IFNET_NEEDS_KERNEL
- #define KERNEL
-+#if !defined(__DragonFly__)
- #define _KERNEL
- #endif
-+#endif
- #include <sys/socket.h>
- ], sockaddr, sa_union.sa_generic.sa_family2, no)
-
-@@ -3919,8 +3931,10 @@ AC_CHECK_STRUCT_FOR([
- #include <sys/types.h>
- #ifdef IFNET_NEEDS_KERNEL
- #define KERNEL
-+#if !defined(__DragonFly__)
- #define _KERNEL
- #endif
-+#endif
- #include <sys/socket.h>
- #undef KERNEL
- #undef _KERNEL
-@@ -3939,8 +3953,10 @@ AC_TRY_COMPILE([
- #include <sys/types.h>
- #ifdef IFNET_NEEDS_KERNEL
- #define KERNEL
-+#if !defined(__DragonFly__)
- #define _KERNEL
- #endif
-+#endif
- #include <sys/socket.h>
- #undef KERNEL
- #undef _KERNEL
-@@ -3965,8 +3981,10 @@ AC_TRY_COMPILE([
- #include <sys/types.h>
- #ifdef IFNET_NEEDS_KERNEL
- #define KERNEL
-+#if !defined(__DragonFly__)
- #define _KERNEL
- #endif
-+#endif
- #include <sys/socket.h>
- #undef KERNEL
- #undef _KERNEL
-@@ -4024,8 +4042,10 @@ AC_TRY_COMPILE([
- #include <sys/types.h>
- #ifdef IFNET_NEEDS_KERNEL
- #define KERNEL
-+#if !defined(__DragonFly__)
- #define _KERNEL
- #endif
-+#endif
- #include <sys/socket.h>
- #undef KERNEL
- #undef _KERNEL
-@@ -4064,8 +4084,10 @@ AC_CHECK_STRUCT_FOR([
- #include <sys/types.h>
- #ifdef IFNET_NEEDS_KERNEL
- #define KERNEL
-+#if !defined(__DragonFly__)
- #define _KERNEL
- #endif
-+#endif
- #include <sys/socket.h>
- #undef KERNEL
- #undef _KERNEL
-@@ -4079,8 +4101,10 @@ AC_CHECK_STRUCT_FOR([
- #include <sys/types.h>
- #ifdef IFNET_NEEDS_KERNEL
- #define KERNEL
-+#if !defined(__DragonFly__)
- #define _KERNEL
- #endif
-+#endif
- #include <sys/socket.h>
- #undef KERNEL
- #undef _KERNEL
-@@ -4094,8 +4118,10 @@ AC_CHECK_STRUCT_FOR([
- #include <sys/types.h>
- #ifdef IFNET_NEEDS_KERNEL
- #define KERNEL
-+#if !defined(__DragonFly__)
- #define _KERNEL
- #endif
-+#endif
- #include <sys/socket.h>
- #undef KERNEL
- #undef _KERNEL
-@@ -4109,8 +4135,10 @@ AC_CHECK_STRUCT_FOR([
- #include <sys/types.h>
- #ifdef IFNET_NEEDS_KERNEL
- #define KERNEL
-+#if !defined(__DragonFly__)
- #define _KERNEL
- #endif
-+#endif
- #include <sys/socket.h>
- #undef KERNEL
- #undef _KERNEL
-@@ -4169,6 +4197,7 @@ AC_CHECK_IFNET_FOR(if_noproto)
- AC_CHECK_IFNET_FOR(if_omcasts)
- AC_CHECK_IFNET_FOR(if_xname,no)
- AC_CHECK_IFNET_FOR(if_lastchange.tv_sec)
-+AC_CHECK_IFNET_FOR(if_lastchange.tv_nsec)
- AC_CHECK_IFNET_FOR(if_obytes)
- AC_CHECK_IFNET_FOR(if_ibytes)
- AC_CHECK_IFNET_FOR(if_addrlist)
+ config_require(if-mib/data_access/interface_sysctl)
diff --git a/net/net-snmp/patches/patch-ad b/net/net-snmp/patches/patch-ad
deleted file mode 100644
index bcf26acb356..00000000000
--- a/net/net-snmp/patches/patch-ad
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-ad,v 1.8 2010/07/20 08:33:44 adam Exp $
-
---- agent/auto_nlist.c.orig 2010-07-18 22:58:45.000000000 +0000
-+++ agent/auto_nlist.c
-@@ -70,13 +70,13 @@ auto_nlist_value(const char *string)
- #endif
- it->nl[1].n_name = 0;
- init_nlist(it->nl);
--#if !(defined(aix4) || defined(aix5) || defined(aix6))
-+/*#if !(defined(aix4) || defined(aix5) || defined(aix6))
- if (it->nl[0].n_type == 0) {
- strcpy(it->nl[0].n_name, string);
- it->nl[0].n_name[strlen(string)+1] = '\0';
- init_nlist(it->nl);
- }
--#endif
-+#endif*/
- if (it->nl[0].n_type == 0) {
- if (!netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
- NETSNMP_DS_AGENT_NO_ROOT_ACCESS)) {
diff --git a/net/net-snmp/patches/patch-ae b/net/net-snmp/patches/patch-ae
index cb4de6141e5..b448d714704 100644
--- a/net/net-snmp/patches/patch-ae
+++ b/net/net-snmp/patches/patch-ae
@@ -1,8 +1,8 @@
-$NetBSD: patch-ae,v 1.6 2010/07/20 08:33:44 adam Exp $
+$NetBSD: patch-ae,v 1.7 2011/05/27 10:55:24 adam Exp $
---- snmplib/snmpUDPIPv6Domain.c.orig 2010-04-28 07:29:33.000000000 +0000
-+++ snmplib/snmpUDPIPv6Domain.c
-@@ -58,6 +58,10 @@ const struct in6_addr in6addr_any = IN6A
+--- snmplib/transports/snmpUDPIPv6Domain.c.orig 2010-04-28 07:29:33.000000000 +0000
++++ snmplib/transports/snmpUDPIPv6Domain.c
+@@ -54,6 +54,10 @@ const struct in6_addr in6addr_any = IN6A
#define SS_FAMILY __ss_family
#endif
diff --git a/net/net-snmp/patches/patch-af b/net/net-snmp/patches/patch-af
index 3415c7259e9..4b11ce15237 100644
--- a/net/net-snmp/patches/patch-af
+++ b/net/net-snmp/patches/patch-af
@@ -1,11 +1,31 @@
-$NetBSD: patch-af,v 1.14 2010/07/20 08:33:44 adam Exp $
+$NetBSD: patch-af,v 1.15 2011/05/27 10:55:25 adam Exp $
---- configure.orig 2010-05-23 21:10:00.000000000 +0000
+--- configure.orig 2011-01-03 23:31:36.000000000 +0000
+++ configure
-@@ -27854,6 +27854,81 @@ _ACEOF
- fi
+@@ -19162,6 +19162,9 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #if HAVE_SYS_QUEUE_H
+ #include <sys/queue.h>
+ #endif
++#if HAVE_NET_ROUTE_H
++#include <net/route.h>
++#endif
+ #if HAVE_NETINET_IN_H
+ #include <netinet/in.h>
+ #endif
+@@ -19259,6 +19262,9 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #if HAVE_NET_ROUTE_H
+ #include <net/route.h>
+ #endif
++#if HAVE_NETINET_IP_H
++#include <netinet/ip.h>
++#endif
+ #include <$ac_header>
+@@ -28917,6 +28923,81 @@ fi
+ ##
+ #########################################
+
+
+echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
+echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
@@ -81,12 +101,12 @@ $NetBSD: patch-af,v 1.14 2010/07/20 08:33:44 adam Exp $
+fi
+
+
- # Check for libraries that the agent needs
- # saving old libraries
- NONAGENTLIBS=$LIBS
-@@ -36914,6 +36989,12 @@ cat >>conftest.$ac_ext <<_ACEOF
- #if HAVE_NETINET_IP6_H
- #include <netinet/ip6.h>
+ ##
+ # Compilation-related
+ ##
+@@ -37938,6 +38019,12 @@ char $ac_func ();
+ #if defined __stub_$ac_func || defined __stub___$ac_func
+ choke me
#endif
+#if HAVE_NET_IF_H
+#include <net/if.h>
@@ -95,156 +115,134 @@ $NetBSD: patch-af,v 1.14 2010/07/20 08:33:44 adam Exp $
+#include <net/route.h>
+#endif
+ int
+ main ()
+@@ -47154,6 +47241,219 @@ _ACEOF
- #include <$ac_header>
-@@ -42919,8 +43000,10 @@ cat >>conftest.$ac_ext <<_ACEOF
- #include <sys/types.h>
- #ifdef IFNET_NEEDS_KERNEL
- #define KERNEL
-+#if !defined(__DragonFly__)
- #define _KERNEL
- #endif
-+#endif
- #include <sys/socket.h>
-
-@@ -43017,8 +43100,10 @@ cat >>conftest.$ac_ext <<_ACEOF
- #include <sys/types.h>
- #ifdef IFNET_NEEDS_KERNEL
- #define KERNEL
-+#if !defined(__DragonFly__)
- #define _KERNEL
- #endif
-+#endif
- #include <sys/socket.h>
-
-
-@@ -43311,8 +43396,10 @@ cat >>conftest.$ac_ext <<_ACEOF
- #include <sys/types.h>
- #ifdef IFNET_NEEDS_KERNEL
- #define KERNEL
-+#if !defined(__DragonFly__)
- #define _KERNEL
- #endif
+ fi
++{ $as_echo "$as_me:$LINENO: checking for struct ifnet.if_lastchange.tv_nsec" >&5
++$as_echo_n "checking for struct ifnet.if_lastchange.tv_nsec... " >&6; }
++if test "${ac_cv_member_struct_ifnet_if_lastchange_tv_nsec+set}" = set; then
++ $as_echo_n "(cached) " >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#ifdef NETSNMP_IFNET_NEEDS_KERNEL
++#define _KERNEL 1
+#endif
- #include <sys/socket.h>
- #undef KERNEL
- #undef _KERNEL
-@@ -43400,8 +43487,10 @@ cat >>conftest.$ac_ext <<_ACEOF
- #include <sys/types.h>
- #ifdef IFNET_NEEDS_KERNEL
- #define KERNEL
-+#if !defined(__DragonFly__)
- #define _KERNEL
- #endif
++#ifdef HAVE_SYS_TYPES_H
++#include <sys/types.h>
+#endif
- #include <sys/socket.h>
- #undef KERNEL
- #undef _KERNEL
-@@ -43469,8 +43558,10 @@ cat >>conftest.$ac_ext <<_ACEOF
- #include <sys/types.h>
- #ifdef IFNET_NEEDS_KERNEL
- #define KERNEL
-+#if !defined(__DragonFly__)
- #define _KERNEL
- #endif
++#ifdef HAVE_SYS_SOCKET_H
++#include <sys/socket.h>
+#endif
- #include <sys/socket.h>
- #undef KERNEL
- #undef _KERNEL
-@@ -43609,8 +43700,10 @@ cat >>conftest.$ac_ext <<_ACEOF
- #include <sys/types.h>
- #ifdef IFNET_NEEDS_KERNEL
- #define KERNEL
-+#if !defined(__DragonFly__)
- #define _KERNEL
- #endif
++#ifdef HAVE_SYS_TIME_H
++#include <sys/time.h>
+#endif
- #include <sys/socket.h>
- #undef KERNEL
- #undef _KERNEL
-@@ -43842,8 +43935,10 @@ cat >>conftest.$ac_ext <<_ACEOF
- #include <sys/types.h>
- #ifdef IFNET_NEEDS_KERNEL
- #define KERNEL
-+#if !defined(__DragonFly__)
- #define _KERNEL
- #endif
++#ifdef HAVE_NET_IF_H
++#include <net/if.h>
+#endif
- #include <sys/socket.h>
- #undef KERNEL
- #undef _KERNEL
-@@ -43943,8 +44038,10 @@ cat >>conftest.$ac_ext <<_ACEOF
- #include <sys/types.h>
- #ifdef IFNET_NEEDS_KERNEL
- #define KERNEL
-+#if !defined(__DragonFly__)
- #define _KERNEL
- #endif
++#ifdef HAVE_NET_IF_VAR_H
++#include <net/if_var.h>
+#endif
- #include <sys/socket.h>
- #undef KERNEL
- #undef _KERNEL
-@@ -44044,8 +44141,10 @@ cat >>conftest.$ac_ext <<_ACEOF
- #include <sys/types.h>
- #ifdef IFNET_NEEDS_KERNEL
- #define KERNEL
-+#if !defined(__DragonFly__)
- #define _KERNEL
- #endif
++#ifdef HAVE_SYS_QUEUE_H
++#include <sys/queue.h>
+#endif
- #include <sys/socket.h>
- #undef KERNEL
- #undef _KERNEL
-@@ -44145,8 +44244,10 @@ cat >>conftest.$ac_ext <<_ACEOF
- #include <sys/types.h>
- #ifdef IFNET_NEEDS_KERNEL
- #define KERNEL
-+#if !defined(__DragonFly__)
- #define _KERNEL
- #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
- #include <sys/socket.h>
- #undef KERNEL
- #undef _KERNEL
-@@ -45800,6 +45901,143 @@ fi
-
-
- ac_safe_struct=`echo "ifnet" | sed 'y%./+-%__p_%'`
-+ac_safe_member=`echo "if_lastchange.tv_nsec" | sed 'y%./+-%__p_%'`
-+ac_safe_all="ac_cv_struct_${ac_safe_struct}_has_${ac_safe_member}"
-+ ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+
-+echo "$as_me:$LINENO: checking for ifnet.if_lastchange.tv_nsec" >&5
-+echo $ECHO_N "checking for ifnet.if_lastchange.tv_nsec... $ECHO_C" >&6
-+if eval "test \"\${$ac_safe_all+set}\" = set"; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
+
-+if test "x" = "x"; then
-+ defineit="= 0"
-+elif test "x" = "xno"; then
-+ defineit=""
++int
++main ()
++{
++static struct ifnet ac_aggr;
++if (ac_aggr.if_lastchange.tv_nsec)
++return 0;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
++$as_echo "$ac_try_echo") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
++ ac_cv_member_struct_ifnet_if_lastchange_tv_nsec=yes
+else
-+ defineit=""
-+fi
-+cat >conftest.$ac_ext <<_ACEOF
++ $as_echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
-+
-+#ifdef IFNET_NEEDS_KERNEL
++#ifdef NETSNMP_IFNET_NEEDS_KERNEL
+#define _KERNEL 1
+#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
@@ -288,66 +286,208 @@ $NetBSD: patch-af,v 1.14 2010/07/20 08:33:44 adam Exp $
+int
+main ()
+{
-+
-+struct ifnet testit;
-+testit.if_lastchange.tv_nsec $defineit;
-+
++static struct ifnet ac_aggr;
++if (sizeof ac_aggr.if_lastchange.tv_nsec)
++return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
-+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-+ (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
++$as_echo "$ac_try_echo") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } &&
-+ { ac_try='test -z "$ac_c_werror_flag"
-+ || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; }; then
-+ eval "${ac_safe_all}=yes"
++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
++ ac_cv_member_struct_ifnet_if_lastchange_tv_nsec=yes
+else
-+ echo "$as_me: failed program was:" >&5
++ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
-+eval "${ac_safe_all}=no"
++ ac_cv_member_struct_ifnet_if_lastchange_tv_nsec=no
+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
-+
-+if eval "test \"x$`echo ${ac_safe_all}`\" = \"xyes\""; then
-+ echo "$as_me:$LINENO: result: yes" >&5
-+echo "${ECHO_T}yes" >&6
-+ cat >>confdefs.h <<_ACEOF
-+#define $ac_uc_define 1
-+_ACEOF
-+
-+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
++{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifnet_if_lastchange_tv_nsec" >&5
++$as_echo "$ac_cv_member_struct_ifnet_if_lastchange_tv_nsec" >&6; }
++if test "x$ac_cv_member_struct_ifnet_if_lastchange_tv_nsec" = x""yes; then
+
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_NSEC 1
++_ACEOF
+
+
-+
-+
-+
-+ac_safe_struct=`echo "ifnet" | sed 'y%./+-%__p_%'`
- ac_safe_member=`echo "if_obytes" | sed 'y%./+-%__p_%'`
- ac_safe_all="ac_cv_struct_${ac_safe_struct}_has_${ac_safe_member}"
- ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
++fi
+ { $as_echo "$as_me:$LINENO: checking for struct ifnet.if_mtu" >&5
+ $as_echo_n "checking for struct ifnet.if_mtu... " >&6; }
+ if test "${ac_cv_member_struct_ifnet_if_mtu+set}" = set; then
+@@ -48674,8 +48974,10 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #ifdef HAVE_SYS_SOCKET_H
+ #ifdef NETSNMP_IFNET_NEEDS_KERNEL
+ #define KERNEL
++#if !defined(__DragonFly__)
+ #define _KERNEL
+ #endif
++#endif
+ #include <sys/socket.h>
+ #undef KERNEL
+ #undef _KERNEL
+@@ -48732,8 +49034,10 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #ifdef HAVE_SYS_SOCKET_H
+ #ifdef NETSNMP_IFNET_NEEDS_KERNEL
+ #define KERNEL
++#if !defined(__DragonFly__)
+ #define _KERNEL
+ #endif
++#endif
+ #include <sys/socket.h>
+ #undef KERNEL
+ #undef _KERNEL
+@@ -48813,8 +49117,10 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #ifdef HAVE_SYS_SOCKET_H
+ #ifdef NETSNMP_IFNET_NEEDS_KERNEL
+ #define KERNEL
++#if !defined(__DragonFly__)
+ #define _KERNEL
+ #endif
++#endif
+ #include <sys/socket.h>
+ #undef KERNEL
+ #undef _KERNEL
+@@ -48871,8 +49177,10 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #ifdef HAVE_SYS_SOCKET_H
+ #ifdef NETSNMP_IFNET_NEEDS_KERNEL
+ #define KERNEL
++#if !defined(__DragonFly__)
+ #define _KERNEL
+ #endif
++#endif
+ #include <sys/socket.h>
+ #undef KERNEL
+ #undef _KERNEL
+@@ -48952,8 +49260,10 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #ifdef HAVE_SYS_SOCKET_H
+ #ifdef NETSNMP_IFNET_NEEDS_KERNEL
+ #define KERNEL
++#if !defined(__DragonFly__)
+ #define _KERNEL
+ #endif
++#endif
+ #include <sys/socket.h>
+ #undef KERNEL
+ #undef _KERNEL
+@@ -49010,8 +49320,10 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #ifdef HAVE_SYS_SOCKET_H
+ #ifdef NETSNMP_IFNET_NEEDS_KERNEL
+ #define KERNEL
++#if !defined(__DragonFly__)
+ #define _KERNEL
+ #endif
++#endif
+ #include <sys/socket.h>
+ #undef KERNEL
+ #undef _KERNEL
+@@ -49091,8 +49403,10 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #ifdef HAVE_SYS_SOCKET_H
+ #ifdef NETSNMP_IFNET_NEEDS_KERNEL
+ #define KERNEL
++#if !defined(__DragonFly__)
+ #define _KERNEL
+ #endif
++#endif
+ #include <sys/socket.h>
+ #undef KERNEL
+ #undef _KERNEL
+@@ -49149,8 +49463,10 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #ifdef HAVE_SYS_SOCKET_H
+ #ifdef NETSNMP_IFNET_NEEDS_KERNEL
+ #define KERNEL
++#if !defined(__DragonFly__)
+ #define _KERNEL
+ #endif
++#endif
+ #include <sys/socket.h>
+ #undef KERNEL
+ #undef _KERNEL
+@@ -49230,8 +49546,10 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #ifdef HAVE_SYS_SOCKET_H
+ #ifdef NETSNMP_IFNET_NEEDS_KERNEL
+ #define KERNEL
++#if !defined(__DragonFly__)
+ #define _KERNEL
+ #endif
++#endif
+ #include <sys/socket.h>
+ #undef KERNEL
+ #undef _KERNEL
+@@ -49288,8 +49606,10 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #ifdef HAVE_SYS_SOCKET_H
+ #ifdef NETSNMP_IFNET_NEEDS_KERNEL
+ #define KERNEL
++#if !defined(__DragonFly__)
+ #define _KERNEL
+ #endif
++#endif
+ #include <sys/socket.h>
+ #undef KERNEL
+ #undef _KERNEL
+@@ -49369,8 +49689,10 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #ifdef HAVE_SYS_SOCKET_H
+ #ifdef NETSNMP_IFNET_NEEDS_KERNEL
+ #define KERNEL
++#if !defined(__DragonFly__)
+ #define _KERNEL
+ #endif
++#endif
+ #include <sys/socket.h>
+ #undef KERNEL
+ #undef _KERNEL
+@@ -49427,8 +49749,10 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #ifdef HAVE_SYS_SOCKET_H
+ #ifdef NETSNMP_IFNET_NEEDS_KERNEL
+ #define KERNEL
++#if !defined(__DragonFly__)
+ #define _KERNEL
+ #endif
++#endif
+ #include <sys/socket.h>
+ #undef KERNEL
+ #undef _KERNEL
+@@ -49516,8 +49840,10 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #include <sys/types.h>
+ #ifdef NETSNMP_IFNET_NEEDS_KERNEL
+ #define KERNEL
++#if !defined(__DragonFly__)
+ #define _KERNEL
+ #endif
++#endif
+ #include <sys/socket.h>
+ #undef KERNEL
+ #undef _KERNEL
+@@ -49585,8 +49911,10 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #include <sys/types.h>
+ #ifdef NETSNMP_IFNET_NEEDS_KERNEL
+ #define KERNEL
++#if !defined(__DragonFly__)
+ #define _KERNEL
+ #endif
++#endif
+ #include <sys/socket.h>
+ #undef KERNEL
+ #undef _KERNEL
diff --git a/net/net-snmp/patches/patch-ag b/net/net-snmp/patches/patch-ag
index 1c0bbd760cb..45d039eda49 100644
--- a/net/net-snmp/patches/patch-ag
+++ b/net/net-snmp/patches/patch-ag
@@ -1,8 +1,8 @@
-$NetBSD: patch-ag,v 1.10 2007/02/05 12:06:16 adam Exp $
+$NetBSD: patch-ag,v 1.11 2011/05/27 10:55:25 adam Exp $
--- agent/mibgroup/host/hr_storage.c.orig 2006-10-12 11:54:57.000000000 +0200
+++ agent/mibgroup/host/hr_storage.c
-@@ -75,6 +75,13 @@
+@@ -69,6 +69,13 @@
#endif
#endif /* vm/vm.h */
#endif /* sys/vm.h */
diff --git a/net/net-snmp/patches/patch-ai b/net/net-snmp/patches/patch-ai
index 665077a5a41..04badf519ad 100644
--- a/net/net-snmp/patches/patch-ai
+++ b/net/net-snmp/patches/patch-ai
@@ -1,8 +1,8 @@
-$NetBSD: patch-ai,v 1.5 2008/06/06 16:18:04 tron Exp $
+$NetBSD: patch-ai,v 1.6 2011/05/27 10:55:25 adam Exp $
--- agent/mibgroup/mibII/ip.c.orig 2008-06-06 15:51:31.000000000 +0100
+++ agent/mibgroup/mibII/ip.c 2008-06-06 15:55:38.000000000 +0100
-@@ -212,6 +212,18 @@
+@@ -241,6 +241,18 @@
#define USES_TRADITIONAL_IPSTAT
#endif
diff --git a/net/net-snmp/patches/patch-aj b/net/net-snmp/patches/patch-aj
index f7b32a52dcd..260ccb5f2bc 100644
--- a/net/net-snmp/patches/patch-aj
+++ b/net/net-snmp/patches/patch-aj
@@ -1,8 +1,8 @@
-$NetBSD: patch-aj,v 1.5 2008/06/05 19:09:41 christos Exp $
+$NetBSD: patch-aj,v 1.6 2011/05/27 10:55:25 adam Exp $
--- agent/mibgroup/mibII/udp.c.orig 2007-07-16 19:59:44.000000000 -0400
+++ agent/mibgroup/mibII/udp.c 2008-06-04 19:46:27.000000000 -0400
-@@ -159,6 +159,12 @@
+@@ -162,6 +162,12 @@
#define USES_TRADITIONAL_UDPSTAT
#endif
diff --git a/net/net-snmp/patches/patch-ak b/net/net-snmp/patches/patch-ak
index 2f7248cbbad..2ee21878fb5 100644
--- a/net/net-snmp/patches/patch-ak
+++ b/net/net-snmp/patches/patch-ak
@@ -1,8 +1,8 @@
-$NetBSD: patch-ak,v 1.4 2008/06/05 19:09:41 christos Exp $
+$NetBSD: patch-ak,v 1.5 2011/05/27 10:55:25 adam Exp $
--- agent/mibgroup/mibII/icmp.c.orig 2007-07-16 19:59:44.000000000 -0400
+++ agent/mibgroup/mibII/icmp.c 2008-06-04 19:42:01.000000000 -0400
-@@ -140,6 +140,13 @@
+@@ -455,6 +455,13 @@
#define USES_TRADITIONAL_ICMPSTAT
#endif
diff --git a/net/net-snmp/patches/patch-al b/net/net-snmp/patches/patch-al
index 9b845e83771..4147d428094 100644
--- a/net/net-snmp/patches/patch-al
+++ b/net/net-snmp/patches/patch-al
@@ -1,8 +1,8 @@
-$NetBSD: patch-al,v 1.4 2006/01/24 22:16:55 adam Exp $
+$NetBSD: patch-al,v 1.5 2011/05/27 10:55:25 adam Exp $
--- agent/mibgroup/host/hr_network.c.orig 2005-10-28 20:49:36.000000000 +0200
+++ agent/mibgroup/host/hr_network.c
-@@ -193,6 +193,10 @@ static netsnmp_interface_entry *HRN_ifne
+@@ -194,6 +194,10 @@ static netsnmp_interface_entry *HRN_ifne
static char HRN_name[MAX_PHYSADDR_LEN];
static nmapi_phystat HRN_ifnet;
#define M_Interface_Scan_Next(a, b, c, d) Interface_Scan_Next(a, b, c)
@@ -13,7 +13,7 @@ $NetBSD: patch-al,v 1.4 2006/01/24 22:16:55 adam Exp $
#else /* hpux11 */
static char HRN_name[16];
#ifndef WIN32
-@@ -222,7 +226,7 @@ int
+@@ -223,7 +227,7 @@ int
Get_Next_HR_Network(void)
{
short HRN_index;
@@ -22,7 +22,7 @@ $NetBSD: patch-al,v 1.4 2006/01/24 22:16:55 adam Exp $
if (M_Interface_Scan_Next(&HRN_index, HRN_name, &HRN_ifnet, NULL) == 0)
HRN_index = -1;
#else
-@@ -245,7 +249,11 @@ Save_HR_Network_Info(void)
+@@ -246,7 +250,11 @@ Save_HR_Network_Info(void)
HRN_savedFlags = HRN_ifnet.if_entry.ifOper;
HRN_savedErrors = HRN_ifnet.if_entry.ifInErrors +
HRN_ifnet.if_entry.ifOutErrors;
diff --git a/net/net-snmp/patches/patch-am b/net/net-snmp/patches/patch-am
index 7fbd05070ec..b9ec4c4cb37 100644
--- a/net/net-snmp/patches/patch-am
+++ b/net/net-snmp/patches/patch-am
@@ -1,8 +1,8 @@
-$NetBSD: patch-am,v 1.10 2010/07/20 08:33:44 adam Exp $
+$NetBSD: patch-am,v 1.11 2011/05/27 10:55:25 adam Exp $
---- agent/mibgroup/host/hr_swrun.c.orig 2009-06-14 22:01:33.000000000 +0000
+--- agent/mibgroup/host/hr_swrun.c.orig 2010-07-29 14:58:47.000000000 +0000
+++ agent/mibgroup/host/hr_swrun.c
-@@ -604,6 +604,8 @@ var_hrswrun(struct variable * vp,
+@@ -614,6 +614,8 @@ var_hrswrun(struct variable * vp,
#elif HAVE_KVM_GETPROCS
#if defined(freebsd5) && __FreeBSD_version >= 500014
strcpy(string, proc_table[LowProcIndex].ki_comm);
@@ -11,7 +11,7 @@ $NetBSD: patch-am,v 1.10 2010/07/20 08:33:44 adam Exp $
#else
strcpy(string, proc_table[LowProcIndex].kp_proc.p_comm);
#endif
-@@ -727,6 +729,8 @@ var_hrswrun(struct variable * vp,
+@@ -737,6 +739,8 @@ var_hrswrun(struct variable * vp,
#elif HAVE_KVM_GETPROCS
#if defined(freebsd5) && __FreeBSD_version >= 500014
strcpy(string, proc_table[LowProcIndex].ki_comm);
@@ -20,7 +20,7 @@ $NetBSD: patch-am,v 1.10 2010/07/20 08:33:44 adam Exp $
#else
strcpy(string, proc_table[LowProcIndex].kp_proc.p_comm);
#endif
-@@ -933,11 +937,17 @@ var_hrswrun(struct variable * vp,
+@@ -943,11 +947,17 @@ var_hrswrun(struct variable * vp,
} else
long_return = 4; /* application */
#else
@@ -38,7 +38,7 @@ $NetBSD: patch-am,v 1.10 2010/07/20 08:33:44 adam Exp $
#else
long_return = 4; /* application */
#endif
-@@ -974,6 +984,8 @@ var_hrswrun(struct variable * vp,
+@@ -984,6 +994,8 @@ var_hrswrun(struct variable * vp,
#if HAVE_KVM_GETPROCS
#if defined(freebsd5) && __FreeBSD_version >= 500014
switch (proc_table[LowProcIndex].ki_stat) {
@@ -47,7 +47,7 @@ $NetBSD: patch-am,v 1.10 2010/07/20 08:33:44 adam Exp $
#else
switch (proc_table[LowProcIndex].kp_proc.p_stat) {
#endif
-@@ -1081,6 +1093,14 @@ var_hrswrun(struct variable * vp,
+@@ -1091,6 +1103,14 @@ var_hrswrun(struct variable * vp,
long_return = 0;
#elif defined(freebsd5)
long_return = proc_table[LowProcIndex].ki_runtime / 100000;
@@ -62,7 +62,7 @@ $NetBSD: patch-am,v 1.10 2010/07/20 08:33:44 adam Exp $
#else
long_return = proc_table[LowProcIndex].kp_proc.p_uticks +
proc_table[LowProcIndex].kp_proc.p_sticks +
-@@ -1198,6 +1218,8 @@ var_hrswrun(struct variable * vp,
+@@ -1208,6 +1228,8 @@ var_hrswrun(struct variable * vp,
long_return =
#if defined(freebsd5)
proc_table[LowProcIndex].ki_size / 1024;
@@ -71,7 +71,7 @@ $NetBSD: patch-am,v 1.10 2010/07/20 08:33:44 adam Exp $
#else
proc_table[LowProcIndex].kp_eproc.e_vm.vm_map.size / 1024;
#endif
-@@ -1518,6 +1540,9 @@ Get_Next_HR_SWRun(void)
+@@ -1528,6 +1550,9 @@ Get_Next_HR_SWRun(void)
#if defined(freebsd5) && __FreeBSD_version >= 500014
if (proc_table[current_proc_entry].ki_stat != 0)
return proc_table[current_proc_entry++].ki_pid;
diff --git a/net/net-snmp/patches/patch-an b/net/net-snmp/patches/patch-an
index 98521afaea8..46809eb8724 100644
--- a/net/net-snmp/patches/patch-an
+++ b/net/net-snmp/patches/patch-an
@@ -1,8 +1,8 @@
-$NetBSD: patch-an,v 1.3 2006/01/24 22:16:55 adam Exp $
+$NetBSD: patch-an,v 1.4 2011/05/27 10:55:25 adam Exp $
---- agent/mibgroup/mibII/route_write.c.orig 2005-09-16 19:00:23.000000000 +0200
+--- agent/mibgroup/mibII/route_write.c.orig 2010-03-20 19:36:28.000000000 +0000
+++ agent/mibgroup/mibII/route_write.c
-@@ -97,7 +97,7 @@
+@@ -93,7 +93,7 @@
int
addRoute(u_long dstip, u_long gwip, u_long iff, u_short flags)
{
@@ -11,7 +11,7 @@ $NetBSD: patch-an,v 1.3 2006/01/24 22:16:55 adam Exp $
struct sockaddr_in dst;
struct sockaddr_in gateway;
int s, rc;
-@@ -132,6 +132,54 @@ addRoute(u_long dstip, u_long gwip, u_lo
+@@ -128,6 +128,54 @@ addRoute(u_long dstip, u_long gwip, u_lo
if (rc < 0)
snmp_log_perror("ioctl");
return rc;
@@ -66,7 +66,7 @@ $NetBSD: patch-an,v 1.3 2006/01/24 22:16:55 adam Exp $
#else /* SIOCADDRT */
return -1;
-@@ -143,7 +191,7 @@ addRoute(u_long dstip, u_long gwip, u_lo
+@@ -139,7 +187,7 @@ addRoute(u_long dstip, u_long gwip, u_lo
int
delRoute(u_long dstip, u_long gwip, u_long iff, u_short flags)
{
@@ -75,7 +75,7 @@ $NetBSD: patch-an,v 1.3 2006/01/24 22:16:55 adam Exp $
struct sockaddr_in dst;
struct sockaddr_in gateway;
-@@ -178,6 +226,56 @@ delRoute(u_long dstip, u_long gwip, u_lo
+@@ -174,6 +222,56 @@ delRoute(u_long dstip, u_long gwip, u_lo
close(s);
return rc;
diff --git a/net/net-snmp/patches/patch-ao b/net/net-snmp/patches/patch-ao
index f4197033cff..434b47076a5 100644
--- a/net/net-snmp/patches/patch-ao
+++ b/net/net-snmp/patches/patch-ao
@@ -1,12 +1,28 @@
-$NetBSD: patch-ao,v 1.1 2009/03/10 18:30:44 apb Exp $
+$NetBSD: patch-ao,v 1.2 2011/05/27 10:55:25 adam Exp $
---- acconfig.h.orig 2008-06-05 23:11:53.000000000 +0200
-+++ acconfig.h
-@@ -158,6 +158,7 @@
- #undef STRUCT_IFNET_HAS_IF_IMCASTS
- #undef STRUCT_IFNET_HAS_IF_IQDROPS
- #undef STRUCT_IFNET_HAS_IF_LASTCHANGE_TV_SEC
-+#undef STRUCT_IFNET_HAS_IF_LASTCHANGE_TV_NSEC
- #undef STRUCT_IFNET_HAS_IF_NOPROTO
- #undef STRUCT_IFNET_HAS_IF_OMCASTS
- #undef STRUCT_IFNET_HAS_IF_XNAME
+--- agent/mibgroup/if-mib/data_access/interface_sysctl.c.orig 2011-04-27 11:24:58.000000000 +0000
++++ agent/mibgroup/if-mib/data_access/interface_sysctl.c
+@@ -49,7 +49,11 @@
+ # define ARCH_PROMISC_FLAG IFF_PROMISC
+ #endif
+
++#if HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_NSEC
++#define starttime (*(const struct timespec*)netsnmp_get_agent_starttime())
++#else
+ #define starttime (*(const struct timeval*)netsnmp_get_agent_starttime())
++#endif
+
+ /* sa_len roundup macro. */
+ #define ROUNDUP(a) \
+@@ -472,7 +476,11 @@ netsnmp_arch_interface_container_load(ne
+ NETSNMP_INTERFACE_FLAGS_HAS_DROPS |
+ NETSNMP_INTERFACE_FLAGS_HAS_MCAST_PKTS;
+
++#if HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_NSEC
++ if (timespeccmp(&ifp->ifm_data.ifi_lastchange, &starttime, >)) {
++#else
+ if (timercmp(&ifp->ifm_data.ifi_lastchange, &starttime, >)) {
++#endif
+ entry->lastchange = (ifp->ifm_data.ifi_lastchange.tv_sec -
+ starttime.tv_sec) * 100;
+ entry->ns_flags |= NETSNMP_INTERFACE_FLAGS_HAS_LASTCHANGE;
diff --git a/net/net-snmp/patches/patch-ap b/net/net-snmp/patches/patch-ap
index bd11de73439..a7aaeaeb919 100644
--- a/net/net-snmp/patches/patch-ap
+++ b/net/net-snmp/patches/patch-ap
@@ -1,4 +1,4 @@
-$NetBSD: patch-ap,v 1.1 2009/03/10 18:30:44 apb Exp $
+$NetBSD: patch-ap,v 1.2 2011/05/27 10:55:25 adam Exp $
Some systems define ifnet.if_lastchange as struct timespec (with a
tv_nsec field measured in nanoseconds), while other systems define it
@@ -7,12 +7,12 @@ Both variants have a tv_sec field for integer seconds.
--- agent/mibgroup/mibII/interfaces.c.orig 2008-06-05 23:11:53.000000000 +0200
+++ agent/mibgroup/mibII/interfaces.c
-@@ -830,15 +830,25 @@ var_ifEntry(struct variable *vp,
+@@ -847,15 +847,25 @@ var_ifEntry(struct variable *vp,
* * this is fixed, thus the 199607 comparison.
*/
if (ifnet.if_lastchange.tv_sec == 0 &&
- ifnet.if_lastchange.tv_usec == 0)
-+#if STRUCT_IFNET_HAS_IF_LASTCHANGE_TV_NSEC
++#if HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_NSEC
+ ifnet.if_lastchange.tv_nsec == 0
+#else
+ ifnet.if_lastchange.tv_usec == 0
@@ -27,7 +27,7 @@ Both variants have a tv_sec field for integer seconds.
- + (ifnet.if_lastchange.tv_usec -
- starttime.tv_usec) / 10000);
+ + (
-+#if STRUCT_IFNET_HAS_IF_LASTCHANGE_TV_NSEC
++#if HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_NSEC
+ ifnet.if_lastchange.tv_nsec / 1000
+#else
+ ifnet.if_lastchange.tv_usec
diff --git a/net/net-snmp/patches/patch-aq b/net/net-snmp/patches/patch-aq
new file mode 100644
index 00000000000..4711c0fc5ff
--- /dev/null
+++ b/net/net-snmp/patches/patch-aq
@@ -0,0 +1,13 @@
+$NetBSD: patch-aq,v 1.1 2011/05/27 10:55:25 adam Exp $
+
+--- agent/auto_nlist.c.orig 2011-04-27 11:31:53.000000000 +0000
++++ agent/auto_nlist.c
+@@ -73,7 +73,7 @@ auto_nlist_value(const char *string)
+ #if !(defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7))
+ if (it->nl[0].n_type == 0) {
+ strcpy(it->nl[0].n_name, string);
+- it->nl[0].n_name[strlen(string)+1] = '\0';
++ *(char *)(it->nl[0].n_name[strlen(string)+1]) = '\0';
+ init_nlist(it->nl);
+ }
+ #endif
diff --git a/net/net-snmp/patches/patch-dc b/net/net-snmp/patches/patch-dc
index aa3c551b0db..f530cb148e2 100644
--- a/net/net-snmp/patches/patch-dc
+++ b/net/net-snmp/patches/patch-dc
@@ -1,16 +1,18 @@
-$NetBSD: patch-dc,v 1.7 2010/07/20 08:33:44 adam Exp $
+$NetBSD: patch-dc,v 1.8 2011/05/27 10:55:25 adam Exp $
---- include/net-snmp/net-snmp-config.h.in.orig 2010-03-03 16:11:57.000000000 +0000
+--- include/net-snmp/net-snmp-config.h.in.orig 2010-11-30 05:56:25.000000000 +0000
+++ include/net-snmp/net-snmp-config.h.in
-@@ -159,6 +159,7 @@
- #undef STRUCT_IFNET_HAS_IF_IMCASTS
- #undef STRUCT_IFNET_HAS_IF_IQDROPS
- #undef STRUCT_IFNET_HAS_IF_LASTCHANGE_TV_SEC
-+#undef STRUCT_IFNET_HAS_IF_LASTCHANGE_TV_NSEC
- #undef STRUCT_IFNET_HAS_IF_NOPROTO
- #undef STRUCT_IFNET_HAS_IF_OMCASTS
- #undef STRUCT_IFNET_HAS_IF_XNAME
-@@ -1466,6 +1467,7 @@
+@@ -767,6 +767,9 @@
+ /* Define to 1 if `if_lastchange.tv_sec' is member of `struct ifnet'. */
+ #undef HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_SEC
+
++/* Define to 1 if `if_lastchange.tv_nsec' is member of `struct ifnet'. */
++#undef HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_NSEC
++
+ /* Define to 1 if `if_mtu' is member of `struct ifnet'. */
+ #undef HAVE_STRUCT_IFNET_IF_MTU
+
+@@ -1715,6 +1718,7 @@
#define NETSNMP_HPUX11ID 14
#define NETSNMP_AIXID 15
#define NETSNMP_MACOSXID 16
@@ -18,7 +20,7 @@ $NetBSD: patch-dc,v 1.7 2010/07/20 08:33:44 adam Exp $
#define NETSNMP_UNKNOWNID 255
#ifdef hpux9
-@@ -1495,6 +1497,9 @@
+@@ -1744,6 +1748,9 @@
#if defined(__FreeBSD__)
#define NETSNMP_OSTYPE NETSNMP_FREEBSDID
#endif
diff --git a/net/net-snmp/patches/patch-de b/net/net-snmp/patches/patch-de
index b7b7fd279d2..b912a6d0616 100644
--- a/net/net-snmp/patches/patch-de
+++ b/net/net-snmp/patches/patch-de
@@ -1,7 +1,7 @@
-$NetBSD: patch-de,v 1.6 2008/07/15 09:14:01 adam Exp $
+$NetBSD: patch-de,v 1.7 2011/05/27 10:55:25 adam Exp $
---- agent/mibgroup/mibII/ipv6.c.orig 2007-05-25 01:01:04 +0300
-+++ agent/mibgroup/mibII/ipv6.c 2008-05-26 22:26:32 +0300
+--- agent/mibgroup/mibII/ipv6.c.orig 2010-12-08 13:17:10.000000000 +0000
++++ agent/mibgroup/mibII/ipv6.c
@@ -11,7 +11,7 @@
#include <sys/types.h>
#include <sys/param.h>
@@ -20,7 +20,7 @@ $NetBSD: patch-de,v 1.6 2008/07/15 09:14:01 adam Exp $
# if HAVE_NETINET_IN_PCB_H
# include <netinet/in_pcb.h>
# endif
-@@ -578,7 +578,7 @@ if_getifnet(int idx, struct ifnet *resul
+@@ -616,7 +616,7 @@ if_getifnet(int idx, struct ifnet *resul
memcpy(result, &tmp, sizeof(tmp));
return 0;
}
@@ -29,7 +29,7 @@ $NetBSD: patch-de,v 1.6 2008/07/15 09:14:01 adam Exp $
q = (caddr_t) TAILQ_NEXT(&tmp, if_link);
#else
# if defined(__NetBSD__) || defined(__OpenBSD__)
-@@ -804,13 +804,36 @@ var_ifv6Entry(register struct variable *
+@@ -846,13 +846,36 @@ var_ifv6Entry(register struct variable *
{
struct ifnet ifnet;
struct ifaddr ifaddr;
@@ -67,7 +67,7 @@ $NetBSD: patch-de,v 1.6 2008/07/15 09:14:01 adam Exp $
#else
# if defined(__NetBSD__) || defined(__OpenBSD__)
ifa = (caddr_t) TAILQ_FIRST(&ifnet.if_addrlist);
-@@ -836,8 +859,20 @@ var_ifv6Entry(register struct variable *
+@@ -878,8 +901,20 @@ var_ifv6Entry(register struct variable *
*var_len = sdl.sdl_alen;
return (u_char *) (sdl.sdl_data + sdl.sdl_nlen);
}
@@ -89,7 +89,7 @@ $NetBSD: patch-de,v 1.6 2008/07/15 09:14:01 adam Exp $
#else
# if defined(__NetBSD__) || defined(__OpenBSD__)
ifa = (caddr_t) TAILQ_NEXT(&ifaddr, ifa_list);
-@@ -1239,7 +1274,11 @@ var_udp6(register struct variable * vp,
+@@ -1285,7 +1320,11 @@ var_udp6(register struct variable * vp,
#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
struct inpcbtable udbtable;
caddr_t first;
@@ -102,7 +102,7 @@ $NetBSD: patch-de,v 1.6 2008/07/15 09:14:01 adam Exp $
char *sysctl_buf;
struct xinpgen *xig, *oxig;
#else
-@@ -1254,10 +1293,31 @@ var_udp6(register struct variable * vp,
+@@ -1300,10 +1339,31 @@ var_udp6(register struct variable * vp,
if (!auto_nlist("udbtable", (char *) &udbtable, sizeof(udbtable)))
return NULL;
first = p = (caddr_t)udbtable.inpt_queue.cqh_first;
@@ -135,7 +135,7 @@ $NetBSD: patch-de,v 1.6 2008/07/15 09:14:01 adam Exp $
#else
{
const char *udblist = "net.inet.udp.pcblist";
-@@ -1285,15 +1345,17 @@ var_udp6(register struct variable * vp,
+@@ -1331,15 +1391,17 @@ var_udp6(register struct variable * vp,
while (
#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
p && p != first
@@ -155,7 +155,7 @@ $NetBSD: patch-de,v 1.6 2008/07/15 09:14:01 adam Exp $
if (!NETSNMP_KLOOKUP(p, (char *) &in6pcb, sizeof(in6pcb))) {
DEBUGMSGTL(("mibII/ipv6", "klookup fail for udb6 at %x\n",
p));
-@@ -1306,7 +1368,7 @@ var_udp6(register struct variable * vp,
+@@ -1352,7 +1414,7 @@ var_udp6(register struct variable * vp,
#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
if (in6pcb.in6p_af != AF_INET6)
goto skip;
@@ -164,7 +164,7 @@ $NetBSD: patch-de,v 1.6 2008/07/15 09:14:01 adam Exp $
if (0 == (in6pcb.inp_vflag & INP_IPV6))
goto skip;
#endif
-@@ -1349,13 +1411,15 @@ var_udp6(register struct variable * vp,
+@@ -1395,13 +1457,15 @@ var_udp6(register struct variable * vp,
skip:
#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
p = (caddr_t)in6pcb.in6p_queue.cqe_next;
@@ -182,7 +182,7 @@ $NetBSD: patch-de,v 1.6 2008/07/15 09:14:01 adam Exp $
free(sysctl_buf);
#endif
DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found));
-@@ -1414,7 +1478,7 @@ var_tcp6(register struct variable * vp,
+@@ -1460,7 +1524,7 @@ var_tcp6(register struct variable * vp,
#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
struct inpcbtable tcbtable;
caddr_t first;
@@ -191,7 +191,7 @@ $NetBSD: patch-de,v 1.6 2008/07/15 09:14:01 adam Exp $
char *sysctl_buf;
struct xinpgen *xig, *oxig;
#else
-@@ -1444,7 +1508,7 @@ var_tcp6(register struct variable * vp,
+@@ -1490,7 +1554,7 @@ var_tcp6(register struct variable * vp,
if (!auto_nlist("tcbtable", (char *) &tcbtable, sizeof(tcbtable)))
return NULL;
first = p = (caddr_t)tcbtable.inpt_queue.cqh_first;
@@ -200,7 +200,7 @@ $NetBSD: patch-de,v 1.6 2008/07/15 09:14:01 adam Exp $
if (!auto_nlist("tcb6", (char *) &tcb6, sizeof(tcb6)))
return NULL;
p = (caddr_t) tcb6.in6p_next;
-@@ -1475,7 +1539,7 @@ var_tcp6(register struct variable * vp,
+@@ -1521,7 +1585,7 @@ var_tcp6(register struct variable * vp,
while (
#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
p && p != first
@@ -209,7 +209,7 @@ $NetBSD: patch-de,v 1.6 2008/07/15 09:14:01 adam Exp $
p && (u_long) p != auto_nlist_value("tcb6")
#else
xig->xig_len > sizeof(struct xinpgen)
-@@ -1483,7 +1547,7 @@ var_tcp6(register struct variable * vp,
+@@ -1529,7 +1593,7 @@ var_tcp6(register struct variable * vp,
) {
DEBUGMSGTL(("mibII/ipv6", "looping: p=%x\n", p));
@@ -218,7 +218,7 @@ $NetBSD: patch-de,v 1.6 2008/07/15 09:14:01 adam Exp $
if (!NETSNMP_KLOOKUP(p, (char *) &in6pcb, sizeof(in6pcb))) {
DEBUGMSGTL(("mibII/ipv6", "klookup fail for tcb6 at %x\n",
p));
-@@ -1496,7 +1560,7 @@ var_tcp6(register struct variable * vp,
+@@ -1542,7 +1606,7 @@ var_tcp6(register struct variable * vp,
#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
if (in6pcb.in6p_af != AF_INET6)
goto skip;
@@ -227,7 +227,7 @@ $NetBSD: patch-de,v 1.6 2008/07/15 09:14:01 adam Exp $
if (0 == (in6pcb.inp_vflag & INP_IPV6))
goto skip;
#endif
-@@ -1553,13 +1617,13 @@ var_tcp6(register struct variable * vp,
+@@ -1599,13 +1663,13 @@ var_tcp6(register struct variable * vp,
skip:
#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
p = (caddr_t)in6pcb.in6p_queue.cqe_next;
@@ -243,7 +243,7 @@ $NetBSD: patch-de,v 1.6 2008/07/15 09:14:01 adam Exp $
free(sysctl_buf);
#endif
DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found));
-@@ -1651,7 +1715,11 @@ var_tcp6(register struct variable * vp,
+@@ -1697,7 +1761,11 @@ var_tcp6(register struct variable * vp,
#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
struct inpcbtable tcbtable;
caddr_t first;
@@ -256,7 +256,7 @@ $NetBSD: patch-de,v 1.6 2008/07/15 09:14:01 adam Exp $
char *sysctl_buf;
struct xinpgen *xig, *oxig;
#else
-@@ -1666,10 +1734,31 @@ var_tcp6(register struct variable * vp,
+@@ -1712,10 +1780,31 @@ var_tcp6(register struct variable * vp,
if (!auto_nlist("tcbtable", (char *) &tcbtable, sizeof(tcbtable)))
return NULL;
first = p = (caddr_t)tcbtable.inpt_queue.cqh_first;
@@ -289,7 +289,7 @@ $NetBSD: patch-de,v 1.6 2008/07/15 09:14:01 adam Exp $
#else
{
const char *tcblist = "net.inet.tcp.pcblist";
-@@ -1686,7 +1775,8 @@ var_tcp6(register struct variable * vp,
+@@ -1732,7 +1821,8 @@ var_tcp6(register struct variable * vp,
return NULL;
}
oxig = (struct xinpgen *) sysctl_buf;
@@ -299,7 +299,7 @@ $NetBSD: patch-de,v 1.6 2008/07/15 09:14:01 adam Exp $
p = (caddr_t) ((char *) xig); /* silence compiler warning */
}
#endif
-@@ -1697,28 +1787,32 @@ var_tcp6(register struct variable * vp,
+@@ -1743,28 +1833,32 @@ var_tcp6(register struct variable * vp,
while (
#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
p && p != first
@@ -335,7 +335,7 @@ $NetBSD: patch-de,v 1.6 2008/07/15 09:14:01 adam Exp $
if (0 == (in6pcb.inp_vflag & INP_IPV6))
goto skip;
#endif
-@@ -1774,13 +1868,15 @@ var_tcp6(register struct variable * vp,
+@@ -1820,13 +1914,15 @@ var_tcp6(register struct variable * vp,
skip:
#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
p = (caddr_t)in6pcb.in6p_queue.cqe_next;
diff --git a/net/net-snmp/patches/patch-df b/net/net-snmp/patches/patch-df
index 2f5e450b7a4..033cf84c795 100644
--- a/net/net-snmp/patches/patch-df
+++ b/net/net-snmp/patches/patch-df
@@ -1,7 +1,7 @@
-$NetBSD: patch-df,v 1.3 2008/09/18 13:40:10 joerg Exp $
+$NetBSD: patch-df,v 1.4 2011/05/27 10:55:25 adam Exp $
---- agent/mibgroup/hardware/cpu.h.orig 2008-09-16 15:31:44 +0300
-+++ agent/mibgroup/hardware/cpu.h 2008-09-16 15:12:05 +0300
+--- agent/mibgroup/hardware/cpu.h.orig 2010-07-29 14:58:47.000000000 +0000
++++ agent/mibgroup/hardware/cpu.h
@@ -12,12 +12,12 @@ config_require(hardware/cpu/cpu_pcp)
#elif defined(irix6)
config_require(hardware/cpu/cpu_sysinfo)
@@ -9,12 +9,12 @@ $NetBSD: patch-df,v 1.3 2008/09/18 13:40:10 joerg Exp $
+#elif (defined(freebsd2) || defined(freebsd3) || defined(dragonfly))
+config_require(hardware/cpu/cpu_nlist)
+
- #elif (defined(netbsd) || defined(netbsd1) || defined(netbsdelf) || defined(netbsdelf2)|| defined(netbsdelf3) || defined(openbsd2) || defined(openbsd3) || defined(openbsd4) || defined(freebsd4) || defined(freebsd5) || defined(freebsd6))
+ #elif (defined(netbsd) || defined(netbsd1) || defined(netbsdelf) || defined(netbsdelf2)|| defined(netbsdelf3) || defined(openbsd2) || defined(openbsd3) || defined(openbsd4) || defined(freebsd4) || defined(freebsd5) || defined(freebsd6))
config_require(hardware/cpu/cpu_sysctl)
-#elif (defined(freebsd2) || defined(freebsd3))
-config_require(hardware/cpu/cpu_nlist)
-
- #elif (defined(aix4) || defined(aix5) || defined(aix6))
+ #elif (defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7))
config_require(hardware/cpu/cpu_perfstat)
diff --git a/net/net-snmp/patches/patch-dh b/net/net-snmp/patches/patch-dh
index b600780bdd6..ecf11c2245d 100644
--- a/net/net-snmp/patches/patch-dh
+++ b/net/net-snmp/patches/patch-dh
@@ -1,8 +1,8 @@
-$NetBSD: patch-dh,v 1.3 2010/07/20 08:33:44 adam Exp $
+$NetBSD: patch-dh,v 1.4 2011/05/27 10:55:25 adam Exp $
--- mibs/UCD-SNMP-MIB.txt.orig 2010-04-06 08:56:20.000000000 +0000
+++ mibs/UCD-SNMP-MIB.txt
-@@ -136,6 +136,9 @@ bsdi OBJECT IDENTIFIER ::=
+@@ -140,6 +140,9 @@ bsdi OBJECT IDENTIFIER ::=
openbsd OBJECT IDENTIFIER ::= { ucdSnmpAgent 12 }
win32 OBJECT IDENTIFIER ::= { ucdSnmpAgent 13 } -- unlucky
hpux11 OBJECT IDENTIFIER ::= { ucdSnmpAgent 14 }
diff --git a/net/net-snmp/patches/patch-dl b/net/net-snmp/patches/patch-dl
index c7f60dd4f0f..89d36b0d01d 100644
--- a/net/net-snmp/patches/patch-dl
+++ b/net/net-snmp/patches/patch-dl
@@ -1,8 +1,8 @@
-$NetBSD: patch-dl,v 1.4 2008/06/28 16:06:34 christos Exp $
+$NetBSD: patch-dl,v 1.5 2011/05/27 10:55:25 adam Exp $
---- agent/mibgroup/mibII/tcp.c.orig 2007-07-16 19:59:44.000000000 -0400
-+++ agent/mibgroup/mibII/tcp.c 2008-06-28 11:15:21.000000000 -0400
-@@ -177,6 +177,16 @@
+--- agent/mibgroup/mibII/tcp.c.orig 2010-11-30 04:04:26.000000000 +0000
++++ agent/mibgroup/mibII/tcp.c
+@@ -180,6 +180,16 @@ init_tcp(void)
#define USES_TRADITIONAL_TCPSTAT
#endif
@@ -19,7 +19,7 @@ $NetBSD: patch-dl,v 1.4 2008/06/28 16:06:34 christos Exp $
#if !defined(TCP_STAT_STRUCTURE)
#define TCP_STAT_STRUCTURE struct tcpstat
#define USES_TRADITIONAL_TCPSTAT
-@@ -309,6 +319,75 @@
+@@ -307,6 +317,75 @@ tcp_handler(netsnmp_mib_handler
#endif /* linux */
netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHOBJECT);
continue;
diff --git a/net/net-snmp/patches/patch-dm b/net/net-snmp/patches/patch-dm
index bb2dd87ec9e..219ffc25c92 100644
--- a/net/net-snmp/patches/patch-dm
+++ b/net/net-snmp/patches/patch-dm
@@ -1,6 +1,6 @@
-$NetBSD: patch-dm,v 1.1 2006/03/19 22:03:29 joerg Exp $
+$NetBSD: patch-dm,v 1.2 2011/05/27 10:55:25 adam Exp $
---- agent/mibgroup/ucd-snmp/vmstat_freebsd2.c.orig 2004-06-29 12:14:32.000000000 +0000
+--- agent/mibgroup/ucd-snmp/vmstat_freebsd2.c.orig 2008-10-21 21:10:43.000000000 +0000
+++ agent/mibgroup/ucd-snmp/vmstat_freebsd2.c
@@ -9,9 +9,15 @@
*/
@@ -18,7 +18,7 @@ $NetBSD: patch-dm,v 1.1 2006/03/19 22:03:29 joerg Exp $
#else
#include <sys/dkstat.h>
#endif
-@@ -168,11 +174,18 @@ var_extensible_vmstat(struct variable *v
+@@ -175,11 +181,18 @@ var_extensible_vmstat(struct variable *v
static time_t time_old;
static time_t time_diff;
@@ -37,7 +37,7 @@ $NetBSD: patch-dm,v 1.1 2006/03/19 22:03:29 joerg Exp $
double cpu_prc;
static struct vmmeter mem_old, mem_new;
-@@ -180,6 +193,11 @@ var_extensible_vmstat(struct variable *v
+@@ -187,6 +200,11 @@ var_extensible_vmstat(struct variable *v
static long long_ret;
static char errmsg[300];
@@ -49,7 +49,7 @@ $NetBSD: patch-dm,v 1.1 2006/03/19 22:03:29 joerg Exp $
long_ret = 0; /* set to 0 as default */
if (header_generic(vp, name, length, exact, var_len, write_method))
-@@ -195,15 +213,27 @@ var_extensible_vmstat(struct variable *v
+@@ -202,15 +220,27 @@ var_extensible_vmstat(struct variable *v
/*
* CPU usage
*/
@@ -79,7 +79,7 @@ $NetBSD: patch-dm,v 1.1 2006/03/19 22:03:29 joerg Exp $
if (cpu_total == 0)
cpu_total = 1;
-@@ -223,7 +253,11 @@ var_extensible_vmstat(struct variable *v
+@@ -230,7 +260,11 @@ var_extensible_vmstat(struct variable *v
/*
* Page-to-kb macro
*/
@@ -91,7 +91,7 @@ $NetBSD: patch-dm,v 1.1 2006/03/19 22:03:29 joerg Exp $
switch (vp->magic) {
case MIBINDEX:
-@@ -270,37 +304,73 @@ var_extensible_vmstat(struct variable *v
+@@ -277,37 +311,73 @@ var_extensible_vmstat(struct variable *v
long_ret = rate(mem_new.v_swtch - mem_old.v_swtch);
return ((u_char *) (&long_ret));
case CPUUSER:
diff --git a/net/net-snmp/patches/patch-dn b/net/net-snmp/patches/patch-dn
index 0afe12501ee..706b031223d 100644
--- a/net/net-snmp/patches/patch-dn
+++ b/net/net-snmp/patches/patch-dn
@@ -1,6 +1,6 @@
-$NetBSD: patch-dn,v 1.2 2008/09/08 12:58:09 adam Exp $
+$NetBSD: patch-dn,v 1.3 2011/05/27 10:55:25 adam Exp $
---- agent/mibgroup/ucd-snmp/memory_freebsd2.c.orig 2008-02-12 18:40:48.000000000 +0100
+--- agent/mibgroup/ucd-snmp/memory_freebsd2.c.orig 2008-10-21 21:10:43.000000000 +0000
+++ agent/mibgroup/ucd-snmp/memory_freebsd2.c
@@ -10,8 +10,12 @@
*/
@@ -15,7 +15,7 @@ $NetBSD: patch-dn,v 1.2 2008/09/08 12:58:09 adam Exp $
#ifdef freebsd5
#include <sys/bio.h>
#endif
-@@ -251,6 +255,10 @@ var_extensible_mem(struct variable *vp,
+@@ -253,6 +257,10 @@ var_extensible_mem(struct variable *vp,
static struct vmmeter mem;
static struct vmtotal total;
@@ -26,7 +26,7 @@ $NetBSD: patch-dn,v 1.2 2008/09/08 12:58:09 adam Exp $
size_t total_size = sizeof(total);
int total_mib[] = { CTL_VM, VM_METER };
-@@ -284,6 +292,8 @@ var_extensible_mem(struct variable *vp,
+@@ -286,6 +294,8 @@ var_extensible_mem(struct variable *vp,
*/
sysctl(phys_mem_mib, 2, &phys_mem, &phys_mem_size, NULL, 0);
@@ -35,7 +35,7 @@ $NetBSD: patch-dn,v 1.2 2008/09/08 12:58:09 adam Exp $
#ifdef BUFSPACE_SYMBOL
/*
* Buffer space
-@@ -296,7 +306,11 @@ var_extensible_mem(struct variable *vp,
+@@ -298,7 +308,11 @@ var_extensible_mem(struct variable *vp,
/*
* Page-to-kb macro
*/
@@ -47,7 +47,7 @@ $NetBSD: patch-dn,v 1.2 2008/09/08 12:58:09 adam Exp $
switch (vp->magic) {
case MIBINDEX:
-@@ -316,7 +330,11 @@ var_extensible_mem(struct variable *vp,
+@@ -318,7 +332,11 @@ var_extensible_mem(struct variable *vp,
long_ret = phys_mem >> 10;
return ((u_char *) (&long_ret));
case MEMAVAILREAL: /* FREE real memory */
@@ -59,7 +59,7 @@ $NetBSD: patch-dn,v 1.2 2008/09/08 12:58:09 adam Exp $
return ((u_char *) (&long_ret));
/*
-@@ -351,6 +369,8 @@ var_extensible_mem(struct variable *vp,
+@@ -353,6 +371,8 @@ var_extensible_mem(struct variable *vp,
case MEMCACHED:
#ifdef darwin
long_ret = ptok(mem.v_lookups);
diff --git a/net/net-snmp/patches/patch-do b/net/net-snmp/patches/patch-do
index ceba480c9d3..ddd32efb68c 100644
--- a/net/net-snmp/patches/patch-do
+++ b/net/net-snmp/patches/patch-do
@@ -1,8 +1,8 @@
-$NetBSD: patch-do,v 1.1 2006/03/19 22:03:29 joerg Exp $
+$NetBSD: patch-do,v 1.2 2011/05/27 10:55:25 adam Exp $
---- agent/mibgroup/ucd-snmp/disk.c.orig 2004-10-05 07:50:38.000000000 +0000
+--- agent/mibgroup/ucd-snmp/disk.c.orig 2010-06-16 21:34:42.000000000 +0000
+++ agent/mibgroup/ucd-snmp/disk.c
-@@ -45,9 +45,11 @@
+@@ -51,9 +51,11 @@
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
diff --git a/net/net-snmp/patches/patch-dq b/net/net-snmp/patches/patch-dq
index 48581b778f5..711d5f77883 100644
--- a/net/net-snmp/patches/patch-dq
+++ b/net/net-snmp/patches/patch-dq
@@ -1,8 +1,8 @@
-$NetBSD: patch-dq,v 1.1 2006/03/19 22:03:29 joerg Exp $
+$NetBSD: patch-dq,v 1.2 2011/05/27 10:55:25 adam Exp $
--- agent/mibgroup/ucd-snmp/errormib.c.orig 2006-03-19 20:41:58.000000000 +0000
+++ agent/mibgroup/ucd-snmp/errormib.c
-@@ -53,9 +53,11 @@
+@@ -49,9 +49,11 @@
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
diff --git a/net/net-snmp/patches/patch-dr b/net/net-snmp/patches/patch-dr
index f97f45469b6..0301c9796f5 100644
--- a/net/net-snmp/patches/patch-dr
+++ b/net/net-snmp/patches/patch-dr
@@ -1,8 +1,8 @@
-$NetBSD: patch-dr,v 1.2 2008/09/08 12:58:09 adam Exp $
+$NetBSD: patch-dr,v 1.3 2011/05/27 10:55:25 adam Exp $
---- agent/mibgroup/mibII/tcpTable.c.orig 2007-10-14 14:12:58.000000000 +0200
+--- agent/mibgroup/mibII/tcpTable.c.orig 2010-10-20 13:12:08.000000000 +0000
+++ agent/mibgroup/mibII/tcpTable.c
-@@ -719,7 +719,11 @@ tcpTable_load(netsnmp_cache *cache, void
+@@ -838,7 +838,11 @@ tcpTable_load(netsnmp_cache *cache, void
size_t len;
int sname[] = { CTL_NET, PF_INET, IPPROTO_TCP, TCPCTL_PCBLIST };
char *tcpcb_buf = NULL;
@@ -14,7 +14,7 @@ $NetBSD: patch-dr,v 1.2 2008/09/08 12:58:09 adam Exp $
netsnmp_inpcb *nnew;
int StateMap[] = { 1, 2, 3, 4, 5, 8, 6, 10, 9, 7, 11 };
-@@ -741,10 +745,18 @@ tcpTable_load(netsnmp_cache *cache, void
+@@ -860,10 +864,18 @@ tcpTable_load(netsnmp_cache *cache, void
* Unpick this into the constituent 'xinpgen' structures, and extract
* the 'inpcb' elements into a linked list (built in reverse)
*/
@@ -33,7 +33,7 @@ $NetBSD: patch-dr,v 1.2 2008/09/08 12:58:09 adam Exp $
nnew = SNMP_MALLOC_TYPEDEF(netsnmp_inpcb);
if (!nnew)
break;
-@@ -757,7 +769,11 @@ tcpTable_load(netsnmp_cache *cache, void
+@@ -876,7 +888,11 @@ tcpTable_load(netsnmp_cache *cache, void
nnew->inp_next = tcp_head;
tcp_head = nnew;
diff --git a/net/net-snmp/patches/patch-ds b/net/net-snmp/patches/patch-ds
index 657d1bef5fe..1932a29eb5a 100644
--- a/net/net-snmp/patches/patch-ds
+++ b/net/net-snmp/patches/patch-ds
@@ -1,8 +1,8 @@
-$NetBSD: patch-ds,v 1.4 2008/09/08 12:58:09 adam Exp $
+$NetBSD: patch-ds,v 1.5 2011/05/27 10:55:25 adam Exp $
---- agent/mibgroup/mibII/udpTable.c.orig 2008-02-13 17:12:42.000000000 +0100
+--- agent/mibgroup/mibII/udpTable.c.orig 2010-03-08 23:07:20.000000000 +0000
+++ agent/mibgroup/mibII/udpTable.c
-@@ -619,7 +619,11 @@ udpTable_load(netsnmp_cache *cache, void
+@@ -618,7 +618,11 @@ udpTable_load(netsnmp_cache *cache, void
size_t len;
int sname[] = { CTL_NET, PF_INET, IPPROTO_UDP, UDPCTL_PCBLIST };
char *udpcb_buf = NULL;
@@ -14,7 +14,7 @@ $NetBSD: patch-ds,v 1.4 2008/09/08 12:58:09 adam Exp $
UDPTABLE_ENTRY_TYPE *nnew;
udpTable_free(NULL, NULL);
-@@ -640,10 +644,18 @@ udpTable_load(netsnmp_cache *cache, void
+@@ -639,10 +643,18 @@ udpTable_load(netsnmp_cache *cache, void
* Unpick this into the constituent 'xinpgen' structures, and extract
* the 'inpcb' elements into a linked list (built in reverse)
*/
@@ -33,7 +33,7 @@ $NetBSD: patch-ds,v 1.4 2008/09/08 12:58:09 adam Exp $
nnew = SNMP_MALLOC_TYPEDEF(UDPTABLE_ENTRY_TYPE);
if (!nnew)
break;
-@@ -656,7 +668,11 @@ udpTable_load(netsnmp_cache *cache, void
+@@ -655,7 +667,11 @@ udpTable_load(netsnmp_cache *cache, void
#endif
udp_head = nnew;
diff --git a/net/net-snmp/patches/patch-dt b/net/net-snmp/patches/patch-dt
index 14a56624b22..6bef10c35b2 100644
--- a/net/net-snmp/patches/patch-dt
+++ b/net/net-snmp/patches/patch-dt
@@ -1,13 +1,13 @@
-$NetBSD: patch-dt,v 1.7 2007/08/12 13:36:38 joerg Exp $
+$NetBSD: patch-dt,v 1.8 2011/05/27 10:55:25 adam Exp $
---- agent/Makefile.in.orig 2007-08-12 13:04:23.000000000 +0000
+--- agent/Makefile.in.orig 2010-06-08 21:05:11.000000000 +0000
+++ agent/Makefile.in
-@@ -147,7 +147,7 @@ libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VE
+@@ -253,7 +253,7 @@ libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VE
$(RANLIB) $(AGENTLIB)
- libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION): ${LMIBOBJS} $(HELPERLIB) $(AGENTLIB) $(USELIBS)
-- $(LIB_LD_CMD) $(MIBLIB) ${LMIBOBJS} $(HELPERLIB) $(AGENTLIB) $(USELIBS) ${LMIBLIBS} $(LDFLAGS) $(LIB_LD_LIBS)
-+ $(LIB_LD_CMD) $(MIBLIB) ${LMIBOBJS} $(HELPERLIB) $(AGENTLIB) $(USELIBS) ${LMIBLIBS} $(LDFLAGS) $(LIB_LD_LIBS) ${MIB_SYSTEM_LIBS}
+ libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION): ${LMIBOBJS} $(AGENTLIB) $(USELIBS)
+- $(LIB_LD_CMD) $(MIBLIB) ${LMIBOBJS} $(AGENTLIB) $(USELIBS) @LD_NO_UNDEFINED@ $(LDFLAGS) ${LMIBLIBS} $(LIB_LD_LIBS) @AGENTLIBS@
++ $(LIB_LD_CMD) $(MIBLIB) ${LMIBOBJS} $(AGENTLIB) $(USELIBS) @LD_NO_UNDEFINED@ $(LDFLAGS) ${LMIBLIBS} $(LIB_LD_LIBS) ${MIB_SYSTEM_LIBS} @AGENTLIBS@
$(RANLIB) $(MIBLIB)
agentlib: $(AGENTLIB)
diff --git a/net/net-snmp/patches/patch-eg b/net/net-snmp/patches/patch-eg
deleted file mode 100644
index aead42a5c70..00000000000
--- a/net/net-snmp/patches/patch-eg
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD: patch-eg,v 1.1 2006/10/01 20:08:29 seb Exp $
-
---- agent/mibgroup/ucd-snmp/pass.c.orig 2005-08-18 00:44:02.000000000 +0000
-+++ agent/mibgroup/ucd-snmp/pass.c
-@@ -163,6 +163,7 @@ pass_parse_config(const char *token, cha
- {
- struct extensible **ppass = &passthrus, **etmp, *ptmp;
- char *tcptr, *endopt;
-+ long priorl;
- int i, priority;
-
- /*
-@@ -180,10 +181,12 @@ pass_parse_config(const char *token, cha
- config_perror("priority must be an integer");
- return;
- }
-- priority = strtol((const char*) cptr, &endopt, 0);
-- if ((priority == LONG_MIN) || (priority == LONG_MAX)) {
-+ priorl = strtol((const char*) cptr, &endopt, 0);
-+ if ((priorl <= INT_MIN) || (priorl >= INT_MAX)) {
- config_perror("priority under/overflow");
- return;
-+ } else {
-+ priority = (int)priorl;
- }
- cptr = endopt;
- cptr = skip_white(cptr);
diff --git a/net/net-snmp/patches/patch-eh b/net/net-snmp/patches/patch-eh
deleted file mode 100644
index ac2e56e9879..00000000000
--- a/net/net-snmp/patches/patch-eh
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD: patch-eh,v 1.1 2006/10/01 20:08:29 seb Exp $
-
---- agent/mibgroup/ucd-snmp/pass_persist.c.orig 2005-10-03 11:52:44.000000000 +0000
-+++ agent/mibgroup/ucd-snmp/pass_persist.c
-@@ -89,6 +89,7 @@ pass_persist_parse_config(const char *to
- {
- struct extensible **ppass = &persistpassthrus, **etmp, *ptmp;
- char *tcptr, *endopt;
-+ long priorl;
- int i, priority;
-
- /*
-@@ -106,10 +107,12 @@ pass_persist_parse_config(const char *to
- config_perror("priority must be an integer");
- return;
- }
-- priority = strtol((const char*) cptr, &endopt, 0);
-- if ((priority == LONG_MIN) || (priority == LONG_MAX)) {
-+ priorl = strtol((const char*) cptr, &endopt, 0);
-+ if ((priorl <= INT_MIN) || (priorl >= INT_MAX)) {
- config_perror("priority under/overflow");
- return;
-+ } else {
-+ priority = (int)priorl;
- }
- cptr = endopt;
- cptr = skip_white(cptr);
diff --git a/net/net-snmp/patches/patch-ei b/net/net-snmp/patches/patch-ei
deleted file mode 100644
index 6cccd405ced..00000000000
--- a/net/net-snmp/patches/patch-ei
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ei,v 1.4 2010/07/20 08:33:44 adam Exp $
-
---- agent/mibgroup/util_funcs.c.orig 2009-12-08 21:54:37.000000000 +0000
-+++ agent/mibgroup/util_funcs.c
-@@ -268,7 +268,7 @@ get_exec_output(struct extensible *ex)
- #if HAVE_EXECV
- char cachefile[STRMAX];
- char cache[NETSNMP_MAXCACHESIZE];
-- ssize_t cachebytes;
-+ int cachebytes;
- int cfd;
- #ifdef NETSNMP_EXCACHETIME
- long curtime;
diff --git a/net/net-snmp/patches/patch-el b/net/net-snmp/patches/patch-el
index 526d23c5e44..28709f27a0a 100644
--- a/net/net-snmp/patches/patch-el
+++ b/net/net-snmp/patches/patch-el
@@ -1,8 +1,8 @@
-$NetBSD: patch-el,v 1.2 2007/02/05 12:06:16 adam Exp $
+$NetBSD: patch-el,v 1.3 2011/05/27 10:55:26 adam Exp $
---- perl/OID/OID.xs.orig 2006-10-25 18:16:24.000000000 +0200
+--- perl/OID/OID.xs.orig 2011-02-01 14:34:03.000000000 +0000
+++ perl/OID/OID.xs
-@@ -177,16 +177,21 @@ MODULE = NetSNMP::OID PACKAGE = NetSNMP
+@@ -156,17 +156,22 @@ MODULE = NetSNMP::OID PACKAGE = NetSNMP
netsnmp_oid *
nso_newptr(initstring)
char *initstring
@@ -11,7 +11,7 @@ $NetBSD: patch-el,v 1.2 2007/02/05 12:06:16 adam Exp $
CODE:
if (get_tree_head() == NULL)
netsnmp_init_mib();
- RETVAL = SNMP_MALLOC_TYPEDEF(netsnmp_oid);
+ RETVAL = malloc(sizeof(netsnmp_oid));
RETVAL->name = RETVAL->namebuf;
- RETVAL->len = sizeof(RETVAL->namebuf)/sizeof(RETVAL->namebuf[0]);
- if (!snmp_parse_oid(initstring, (oid *) RETVAL->name, &RETVAL->len)) {
@@ -19,6 +19,7 @@ $NetBSD: patch-el,v 1.2 2007/02/05 12:06:16 adam Exp $
+ if (!snmp_parse_oid(initstring, (oid *) RETVAL->name, &len)) {
snmp_log(LOG_ERR, "Can't parse: %s\n", initstring);
RETVAL->len = 0;
+ free(RETVAL);
RETVAL = NULL;
+ }
+ else {
diff --git a/net/net-snmp/patches/patch-ep b/net/net-snmp/patches/patch-ep
deleted file mode 100644
index 5c1c9598462..00000000000
--- a/net/net-snmp/patches/patch-ep
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-ep,v 1.4 2008/07/15 09:14:01 adam Exp $
-
---- snmplib/scapi.c.orig 2008-06-09 21:20:35.000000000 +0200
-+++ snmplib/scapi.c
-@@ -272,7 +272,7 @@ sc_generate_keyed_hash(const oid * autht
-
- u_char buf[SNMP_MAXBUF_SMALL];
- #if defined(NETSNMP_USE_OPENSSL) || defined(NETSNMP_USE_PKCS11)
-- size_t buf_len = sizeof(buf);
-+ unsigned int buf_len = sizeof(buf);
- #endif
-
- DEBUGTRACE;
-@@ -553,6 +553,10 @@ sc_check_keyed_hash(const oid * authtype
- }
- #endif /* NETSNMP_ENABLE_TESTING_CODE */
-
-+ if (maclen != USM_MD5_AND_SHA_AUTH_LEN) {
-+ QUITFUN(SNMPERR_GENERR, sc_check_keyed_hash_quit);
-+ }
-+
- /*
- * Sanity check.
- */
diff --git a/net/net-snmp/patches/patch-es b/net/net-snmp/patches/patch-es
index b7630418bce..027976d3b13 100644
--- a/net/net-snmp/patches/patch-es
+++ b/net/net-snmp/patches/patch-es
@@ -1,8 +1,8 @@
-$NetBSD: patch-es,v 1.1 2006/10/02 00:09:55 seb Exp $
+$NetBSD: patch-es,v 1.2 2011/05/27 10:55:26 adam Exp $
---- agent/mibgroup/ucd-snmp/memory_netbsd1.c.orig 2005-08-17 12:36:14.000000000 +0000
+--- agent/mibgroup/ucd-snmp/memory_netbsd1.c.orig 2008-10-21 21:10:43.000000000 +0000
+++ agent/mibgroup/ucd-snmp/memory_netbsd1.c
-@@ -163,7 +163,7 @@ var_extensible_mem(struct variable *vp,
+@@ -165,7 +165,7 @@ var_extensible_mem(struct variable *vp,
static char errmsg[1024];
static struct uvmexp uvmexp;
@@ -11,7 +11,7 @@ $NetBSD: patch-es,v 1.1 2006/10/02 00:09:55 seb Exp $
int uvmexp_mib[] = { CTL_VM, VM_UVMEXP };
static struct vmtotal total;
size_t total_size = sizeof(total);
-@@ -179,13 +179,22 @@ var_extensible_mem(struct variable *vp,
+@@ -181,13 +181,22 @@ var_extensible_mem(struct variable *vp,
/*
* Memory info
*/
diff --git a/net/net-snmp/patches/patch-et b/net/net-snmp/patches/patch-et
index 733be6537d5..873194fe4e4 100644
--- a/net/net-snmp/patches/patch-et
+++ b/net/net-snmp/patches/patch-et
@@ -1,10 +1,10 @@
-$NetBSD: patch-et,v 1.5 2010/11/17 00:59:06 taca Exp $
+$NetBSD: patch-et,v 1.6 2011/05/27 10:55:26 adam Exp $
---- agent/mibgroup/mibII/icmp.c.orig 2010-10-19 03:54:57.000000000 +0000
+--- agent/mibgroup/mibII/icmp.c.orig 2011-02-01 14:16:23.000000000 +0000
+++ agent/mibgroup/mibII/icmp.c
-@@ -127,6 +127,12 @@ init_icmp(void)
- #define USES_SNMP_DESIGNED_ICMPSTAT
- #endif
+@@ -567,6 +567,12 @@ init_icmp(void)
+ *
+ *********************/
+#ifdef NETBSD_STATS_VIA_SYSCTL
+#define ICMP_STAT_STRUCTURE struct icmp_mib
@@ -12,10 +12,10 @@ $NetBSD: patch-et,v 1.5 2010/11/17 00:59:06 taca Exp $
+#undef ICMP_NSTATS
+#endif
+
- #if defined (WIN32) || defined (cygwin)
- #include <iphlpapi.h>
- #define ICMP_STAT_STRUCTURE MIB_ICMP
-@@ -706,6 +712,21 @@ icmp_load(netsnmp_cache *cache, void *vm
+ #ifdef hpux11
+ #define ICMP_STAT_STRUCTURE int
+ #endif
+@@ -1289,6 +1295,21 @@ icmp_load(netsnmp_cache *cache, void *vm
}
return ret_value;
}
diff --git a/net/net-snmp/patches/patch-eu b/net/net-snmp/patches/patch-eu
index 506d0904777..d2106f2945c 100644
--- a/net/net-snmp/patches/patch-eu
+++ b/net/net-snmp/patches/patch-eu
@@ -1,10 +1,10 @@
-$NetBSD: patch-eu,v 1.2 2010/11/17 00:59:06 taca Exp $
+$NetBSD: patch-eu,v 1.3 2011/05/27 10:55:26 adam Exp $
---- agent/mibgroup/mibII/ip.c.orig 2010-10-19 03:54:57.000000000 +0000
+--- agent/mibgroup/mibII/ip.c.orig 2011-02-01 14:15:54.000000000 +0000
+++ agent/mibgroup/mibII/ip.c
-@@ -199,6 +199,12 @@ init_ip(void)
- #define USES_SNMP_DESIGNED_IPSTAT
- #endif
+@@ -214,6 +214,12 @@ init_ip(void)
+ *
+ *********************/
+#ifdef NETBSD_STATS_VIA_SYSCTL
+#define IP_STAT_STRUCTURE struct ip_mib
@@ -12,10 +12,10 @@ $NetBSD: patch-eu,v 1.2 2010/11/17 00:59:06 taca Exp $
+#undef IP_NSTATS
+#endif
+
- #if defined (WIN32) || defined (cygwin)
- #include <iphlpapi.h>
- #define IP_STAT_STRUCTURE MIB_IPSTATS
-@@ -804,6 +810,21 @@ ip_load(netsnmp_cache *cache, void *vmag
+ #ifdef hpux11
+ #define IP_STAT_STRUCTURE int
+ #endif
+@@ -827,6 +833,21 @@ ip_load(netsnmp_cache *cache, void *vmag
}
return ret_value;
}
diff --git a/net/net-snmp/patches/patch-ex b/net/net-snmp/patches/patch-ex
index e76a26fb45e..6841c751146 100644
--- a/net/net-snmp/patches/patch-ex
+++ b/net/net-snmp/patches/patch-ex
@@ -1,8 +1,8 @@
-$NetBSD: patch-ex,v 1.2 2010/11/17 00:59:06 taca Exp $
+$NetBSD: patch-ex,v 1.3 2011/05/27 10:55:26 adam Exp $
--- agent/mibgroup/mibII/mibII_common.h.orig 2006-09-15 00:48:50.000000000 +0000
+++ agent/mibgroup/mibII/mibII_common.h
-@@ -100,6 +100,9 @@
+@@ -97,6 +97,9 @@
#ifdef linux
#include "kernel_linux.h"
#endif
diff --git a/net/net-snmp/patches/patch-ey b/net/net-snmp/patches/patch-ey
index 7713e75e6c6..910f594f84d 100644
--- a/net/net-snmp/patches/patch-ey
+++ b/net/net-snmp/patches/patch-ey
@@ -1,10 +1,10 @@
-$NetBSD: patch-ey,v 1.3 2010/11/17 00:59:06 taca Exp $
+$NetBSD: patch-ey,v 1.4 2011/05/27 10:55:26 adam Exp $
---- agent/mibgroup/mibII/tcp.c.orig 2010-10-19 03:54:58.000000000 +0000
+--- agent/mibgroup/mibII/tcp.c.orig 2011-02-01 14:23:55.000000000 +0000
+++ agent/mibgroup/mibII/tcp.c
-@@ -167,6 +167,12 @@ init_tcp(void)
- #define USES_SNMP_DESIGNED_TCPSTAT
- #endif
+@@ -155,6 +155,12 @@ init_tcp(void)
+ *
+ *********************/
+#ifdef NETBSD_STATS_VIA_SYSCTL
+#define TCP_STAT_STRUCTURE struct tcp_mib
@@ -12,10 +12,10 @@ $NetBSD: patch-ey,v 1.3 2010/11/17 00:59:06 taca Exp $
+#undef TCP_NSTATS
+#endif
+
- #if defined (WIN32) || defined (cygwin)
- #include <iphlpapi.h>
- #define TCP_STAT_STRUCTURE MIB_TCPSTATS
-@@ -768,6 +774,21 @@ tcp_load(netsnmp_cache *cache, void *vma
+ #ifdef hpux11
+ #define TCP_STAT_STRUCTURE int
+ #endif
+@@ -766,6 +772,21 @@ tcp_load(netsnmp_cache *cache, void *vma
}
return ret_value;
}
diff --git a/net/net-snmp/patches/patch-ez b/net/net-snmp/patches/patch-ez
index 20b74c9066e..c38a496e432 100644
--- a/net/net-snmp/patches/patch-ez
+++ b/net/net-snmp/patches/patch-ez
@@ -1,8 +1,8 @@
-$NetBSD: patch-ez,v 1.2 2010/11/17 00:59:06 taca Exp $
+$NetBSD: patch-ez,v 1.3 2011/05/27 10:55:26 adam Exp $
---- agent/mibgroup/mibII/udp.c.orig 2010-10-19 03:54:57.000000000 +0000
+--- agent/mibgroup/mibII/udp.c.orig 2011-02-01 14:16:09.000000000 +0000
+++ agent/mibgroup/mibII/udp.c
-@@ -29,6 +29,10 @@
+@@ -30,6 +30,10 @@
#include "kernel_linux.h"
#endif
@@ -13,9 +13,9 @@ $NetBSD: patch-ez,v 1.2 2010/11/17 00:59:06 taca Exp $
#ifdef cygwin
#define WIN32
#include <windows.h>
-@@ -149,6 +153,12 @@ init_udp(void)
- #define USES_SNMP_DESIGNED_UDPSTAT
- #endif
+@@ -137,6 +141,12 @@ init_udp(void)
+ *
+ *********************/
+#ifdef NETBSD_STATS_VIA_SYSCTL
+#define UDP_STAT_STRUCTURE struct udp_mib
@@ -23,10 +23,10 @@ $NetBSD: patch-ez,v 1.2 2010/11/17 00:59:06 taca Exp $
+#undef UDP_NSTATS
+#endif
+
- #ifdef WIN32
- #include <iphlpapi.h>
- #define UDP_STAT_STRUCTURE MIB_UDPSTATS
-@@ -469,6 +479,21 @@ udp_load(netsnmp_cache *cache, void *vma
+ #ifdef hpux11
+ #define UDP_STAT_STRUCTURE int
+ #endif
+@@ -467,6 +477,21 @@ udp_load(netsnmp_cache *cache, void *vma
}
return ret_value;
}
diff --git a/net/net-snmp/patches/patch-fa b/net/net-snmp/patches/patch-fa
index cc7aea932c4..86268ce5aeb 100644
--- a/net/net-snmp/patches/patch-fa
+++ b/net/net-snmp/patches/patch-fa
@@ -1,8 +1,8 @@
-$NetBSD: patch-fa,v 1.2 2010/11/17 00:59:06 taca Exp $
+$NetBSD: patch-fa,v 1.3 2011/05/27 10:55:26 adam Exp $
---- include/net-snmp/system/netbsd.h.orig 2007-03-08 15:52:34.000000000 +0000
+--- include/net-snmp/system/netbsd.h.orig 2009-04-09 08:48:32.000000000 +0000
+++ include/net-snmp/system/netbsd.h
-@@ -38,5 +38,9 @@
+@@ -38,6 +38,10 @@
# define netbsd1 netbsd1
#endif
@@ -12,3 +12,4 @@ $NetBSD: patch-fa,v 1.2 2010/11/17 00:59:06 taca Exp $
+
/* define the extra mib modules that are supported */
#define NETSNMP_INCLUDE_HOST_RESOURCES
+ #define NETSNMP_INCLUDE_IFTABLE_REWRITES