aea5a2643a
* 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
50 lines
1.2 KiB
Text
50 lines
1.2 KiB
Text
$NetBSD: patch-ez,v 1.3 2011/05/27 10:55:26 adam Exp $
|
|
|
|
--- agent/mibgroup/mibII/udp.c.orig 2011-02-01 14:16:09.000000000 +0000
|
|
+++ agent/mibgroup/mibII/udp.c
|
|
@@ -30,6 +30,10 @@
|
|
#include "kernel_linux.h"
|
|
#endif
|
|
|
|
+#ifdef NETBSD_STATS_VIA_SYSCTL
|
|
+#include "kernel_netbsd.h"
|
|
+#endif
|
|
+
|
|
#ifdef cygwin
|
|
#define WIN32
|
|
#include <windows.h>
|
|
@@ -137,6 +141,12 @@ init_udp(void)
|
|
*
|
|
*********************/
|
|
|
|
+#ifdef NETBSD_STATS_VIA_SYSCTL
|
|
+#define UDP_STAT_STRUCTURE struct udp_mib
|
|
+#define USES_SNMP_DESIGNED_UDPSTAT
|
|
+#undef UDP_NSTATS
|
|
+#endif
|
|
+
|
|
#ifdef hpux11
|
|
#define UDP_STAT_STRUCTURE int
|
|
#endif
|
|
@@ -467,6 +477,21 @@ udp_load(netsnmp_cache *cache, void *vma
|
|
}
|
|
return ret_value;
|
|
}
|
|
+#elif defined(NETBSD_STATS_VIA_SYSCTL)
|
|
+int
|
|
+udp_load(netsnmp_cache *cache, void *vmagic)
|
|
+{
|
|
+ long ret_value = -1;
|
|
+
|
|
+ ret_value = netbsd_read_udp_stat(&udpstat);
|
|
+
|
|
+ if ( ret_value < 0 ) {
|
|
+ DEBUGMSGTL(("mibII/udpScalar", "Failed to load UDP scalar Group (netbsd)\n"));
|
|
+ } else {
|
|
+ DEBUGMSGTL(("mibII/udpScalar", "Loaded UDP scalar Group (netbsd)\n"));
|
|
+ }
|
|
+ return ret_value;
|
|
+}
|
|
#elif defined(WIN32)
|
|
int
|
|
udp_load(netsnmp_cache *cache, void *vmagic)
|