update to net-snmp 5.8rc3 to get some wider testing (hoping the release isn't

too far off, and I'm fed up with this mega-diff sitting in my tree gathering
C's :)

add a flavour "readonly" which uses --enable-read-only, this disables all code
handling SETs.
This commit is contained in:
sthen 2018-06-02 20:53:37 +00:00
parent af08786444
commit 1eff4ce515
50 changed files with 138 additions and 3671 deletions

View File

@ -1,17 +1,20 @@
# $OpenBSD: Makefile,v 1.99 2018/06/01 15:35:50 sthen Exp $
# $OpenBSD: Makefile,v 1.100 2018/06/02 20:53:37 sthen Exp $
COMMENT-main= extendable SNMP implementation
COMMENT-tkmib= graphical SNMP MIB browser
V= 5.7.3
REVISION-main= 16
V= 5.8.rc3
DISTNAME= net-snmp-$V
MULTI_PACKAGES= -main -tkmib
PKGNAME-main= net-snmp-$V
PKGNAME-tkmib= net-snmp-tkmib-$V
PKGNAME-main= net-snmp-${V:S/.rc/rc/}
PKGNAME-tkmib= net-snmp-tkmib-${V:S/.rc/rc/}
LIBV= 14.0
# tkmib isn't flavoured
FULLPKGPATH-tkmib= net/net-snmp,-tkmib
FULLPKGNAME-tkmib= net-snmp-tkmib-${V:S/.rc/rc/}
LIBV= 15.0
.for i in netsnmp netsnmpagent netsnmphelpers netsnmpmibs netsnmptrapd
SHARED_LIBS += $i ${LIBV}
.endfor
@ -26,12 +29,15 @@ MAINTAINER= Stuart Henderson <sthen@openbsd.org>
# BSD
PERMIT_PACKAGE_CDROM= Yes
WANTLIB-main= c crypto kvm m perl pthread
WANTLIB-main= c crypto kvm m perl
FLAVORS= readonly
FLAVOR?=
RUN_DEPENDS-tkmib= net/net-snmp \
x11/p5-Tk
NET_SNMP_MIB_LIST= smux mibII/mta_sendmail
NET_SNMP_MIB_LIST= mibII/mta_sendmail
# set the default mib search list:
# - net-snmp default mibs (include/net-snmp/net-snmp-config.h.in)
@ -41,8 +47,7 @@ DEFAULT_MIBS= IP-MIB:IF-MIB:TCP-MIB:UDP-MIB:SNMPv2-MIB:RFC1213-MIB
OPENBSD_MIBS= OPENBSD-SNMPD-CONF
CONFIGURE_STYLE= autoconf
AUTOCONF_VERSION= 2.68
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS= --enable-ipv6 \
--enable-mfd-rewrites \
--with-copy-persistent-files="no" \
@ -58,12 +63,17 @@ CONFIGURE_ARGS= --enable-ipv6 \
CONFIGURE_ENV= ac_cv_IFNET_NEEDS_KERNEL=no
TEST_TARGET= test
.if ${FLAVOR:Mreadonly}
CONFIGURE_ARGS+= --enable-read-only
.else
NET_SNMP_MIB_LIST+= smux
.endif
pre-configure:
@if ! grep '^#define NETSNMP_DEFAULT_MIBS "${DEFAULT_MIBS}"$$' \
${WRKSRC}/include/net-snmp/net-snmp-config.h.in > /dev/null; then \
echo 'DEFAULT_MIBS in the port Makefile is out of sync'; exit 1; fi
@perl -pi -e 's,(snmpd\(8\)|snmpd\.conf\(5\)),netsnmp-\1,' ${WRKSRC}/man/*
rm ${WRKSRC}/include/net-snmp/system/openbsd[0-9].h
post-install:
@perl -pi -e 's,^(#define[ ]PACKAGE_.*)$$,/* $$1 */,' \

View File

@ -1,2 +1,2 @@
SHA256 (net-snmp-5.7.3.tar.gz) = Eu+JYTx3B9yW0TM18VPBkh78nWHTcI7wnz/EpwFPtPA=
SIZE (net-snmp-5.7.3.tar.gz) = 6382428
SHA256 (net-snmp-5.8.rc3.tar.gz) = aBjVmiSgEijHgMgZ1sp7m9rE2mgReRfev8uQb28k2ko=
SIZE (net-snmp-5.8.rc3.tar.gz) = 6587490

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-Makefile_in,v 1.3 2016/05/12 22:00:14 sthen Exp $
--- Makefile.in.orig Thu May 12 22:55:09 2016
+++ Makefile.in Thu May 12 22:55:14 2016
@@ -24,7 +24,7 @@ INCLUDESUBDIRHEADERS= aix.h bsd.h bsdi3.h bsdi4.h bsdi
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 \
+ openbsd.h \
solaris2.3.h solaris2.4.h solaris2.5.h solaris2.6.h \
solaris.h sunos.h svr5.h sysv.h ultrix4.h
INCLUDESUBDIR2=machine

View File

@ -1,7 +1,8 @@
$OpenBSD: patch-Makefile_top,v 1.16 2014/12/09 15:20:06 sthen Exp $
--- Makefile.top.orig Sat Aug 9 03:49:58 2014
+++ Makefile.top Mon Aug 11 23:29:23 2014
@@ -39,6 +39,8 @@ LIBTOOLCLEAN = $(LIBTOOL) --mode=clean rm -f
$OpenBSD: patch-Makefile_top,v 1.17 2018/06/02 20:53:37 sthen Exp $
Index: Makefile.top
--- Makefile.top.orig
+++ Makefile.top
@@ -40,6 +40,8 @@ LIBTOOLCLEAN = $(LIBTOOL) --mode=clean rm -f
FEATURECHECK = $(top_srcdir)/local/minimalist/feature-check
FEATUREPROCESS = $(top_srcdir)/local/minimalist/feature-remove
INSTALL_DATA = @INSTALL_DATA@
@ -10,9 +11,9 @@ $OpenBSD: patch-Makefile_top,v 1.16 2014/12/09 15:20:06 sthen Exp $
SED = @SED@
LN_S = @LN_S@
AUTOCONF = @AUTOCONF@
@@ -84,7 +86,7 @@ LIBCURRENT = 30
@@ -86,7 +88,7 @@ LIBCURRENT = 35
LIBAGE = 0
LIBREVISION = 3
LIBREVISION = 0
-LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o
+LIB_LD_CMD = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -rpath $(libdir) -o

View File

@ -1,17 +0,0 @@
$OpenBSD: patch-agent_mibgroup_default_modules_h,v 1.1 2012/12/11 15:30:56 sthen Exp $
XXX memory leak in snmptrapd (8K/trap!) if this is enabled
"NET-SNMP v5.7.2 Memory Leaks issues running snmptrapd" on net-snmp-coders
--- agent/mibgroup/default_modules.h.orig Tue Dec 11 15:19:13 2012
+++ agent/mibgroup/default_modules.h Tue Dec 11 15:19:05 2012
@@ -26,7 +26,7 @@ config_require(mibII/vacm_conf)
config_require(mibII)
config_require(ucd_snmp)
config_require(notification)
-config_require(notification-log-mib)
+/* config_require(notification-log-mib) */
config_require(target)
config_require(agent_mibs)
config_require(agentx)

View File

@ -1,43 +0,0 @@
$OpenBSD: patch-agent_mibgroup_hardware_cpu_cpu_sysctl_c,v 1.6 2014/12/09 15:20:06 sthen Exp $
swapins/swapouts were removed from struct uvmexp in uvm_extern.h 1.105
--- agent/mibgroup/hardware/cpu/cpu_sysctl.c.orig Tue Feb 25 20:50:16 2014
+++ agent/mibgroup/hardware/cpu/cpu_sysctl.c Thu Mar 20 12:52:45 2014
@@ -127,6 +127,10 @@ void init_cpu_sysctl( void ) {
#else /* VM_UVMEXP */ /* OpenBSD 3+, NetBSD 1.6+ */
#define NETSNMP_VM_STATS VM_UVMEXP
#define NETSNMP_VM_STATS_TYPE struct uvmexp
+#if defined(openbsd5)
+ #undef NS_VM_SWAPIN
+ #undef NS_VM_SWAPOUT
+#endif /* openbsd5 */
#endif /* VM_UVMEXP2 || VM_UVMEXP */
#elif defined(__FreeBSD__) /* FreeBSD */
@@ -209,8 +213,12 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void
sysctl(mem_mib, 2, &mem_stats, &mem_size, NULL, 0);
cpu->nInterrupts = mem_stats.NS_VM_INTR;
cpu->nCtxSwitches = mem_stats.NS_VM_SWTCH;
+#ifdef NS_VM_SWAPIN
cpu->swapIn = mem_stats.NS_VM_SWAPIN;
+#endif
+#ifdef NS_VM_SWAPOUT
cpu->swapOut = mem_stats.NS_VM_SWAPOUT;
+#endif
#ifdef NS_VM_PAGEIN
cpu->pageIn = mem_stats.NS_VM_PAGEIN;
#endif
@@ -270,8 +278,12 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void
*/
cpu->nInterrupts = mem_stats.NS_VM_INTR;
cpu->nCtxSwitches = mem_stats.NS_VM_SWTCH;
+#ifdef NS_VM_SWAPIN
cpu->swapIn = mem_stats.NS_VM_SWAPIN;
+#endif
+#ifdef NS_VM_SWAPOUT
cpu->swapOut = mem_stats.NS_VM_SWAPOUT;
+#endif
#ifdef NS_VM_PAGEIN
cpu->pageIn = mem_stats.NS_VM_PAGEIN;
#endif

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-agent_mibgroup_host_hr_storage_c,v 1.7 2011/11/18 12:39:06 sthen Exp $
--- agent/mibgroup/host/hr_storage.c.orig Wed Aug 31 03:21:51 2011
+++ agent/mibgroup/host/hr_storage.c Thu Sep 1 23:24:49 2011
@@ -175,6 +175,7 @@
#include <net-snmp/library/read_config.h>
#define HRSTORE_MONOTONICALLY_INCREASING
+#undef MBSTAT_SYMBOL
/*********************
*

View File

@ -1,7 +1,11 @@
$OpenBSD: patch-agent_mibgroup_if-mib_data_access_interface_openbsd_c,v 1.1 2015/09/11 16:33:05 sthen Exp $
--- agent/mibgroup/if-mib/data_access/interface_openbsd.c.orig Fri Sep 11 10:30:14 2015
+++ agent/mibgroup/if-mib/data_access/interface_openbsd.c Fri Sep 11 10:31:45 2015
@@ -333,7 +333,8 @@ netsnmp_openbsd_interface_get_if_speed(char *name, u_i
$OpenBSD: patch-agent_mibgroup_if-mib_data_access_interface_openbsd_c,v 1.2 2018/06/02 20:53:37 sthen Exp $
ifm_media changed from u_int to uint64_t in OpenBSD 5.9
Index: agent/mibgroup/if-mib/data_access/interface_openbsd.c
--- agent/mibgroup/if-mib/data_access/interface_openbsd.c.orig
+++ agent/mibgroup/if-mib/data_access/interface_openbsd.c
@@ -334,7 +334,8 @@ netsnmp_openbsd_interface_get_if_speed(char *name, u_i
{
int s;
struct ifmediareq ifmr;
@ -11,7 +15,7 @@ $OpenBSD: patch-agent_mibgroup_if-mib_data_access_interface_openbsd_c,v 1.1 2015
u_int t_speed, t_speed_high;
u_int m_speed, m_speed_high;
@@ -360,7 +361,7 @@ netsnmp_openbsd_interface_get_if_speed(char *name, u_i
@@ -361,7 +362,7 @@ netsnmp_openbsd_interface_get_if_speed(char *name, u_i
_openbsd_interface_ifmedia_to_speed(ifmr.ifm_current, speed, speed_high);
if (*speed == 0 &&

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-agent_mibgroup_if-mib_data_access_interface_sysctl_c,v 1.5 2015/09/11 16:33:05 sthen Exp $
--- agent/mibgroup/if-mib/data_access/interface_sysctl.c.orig Fri Sep 11 10:30:28 2015
+++ agent/mibgroup/if-mib/data_access/interface_sysctl.c Fri Sep 11 10:30:46 2015
@@ -241,7 +241,7 @@ netsnmp_sysctl_get_if_speed(char *name, u_int *speed,
{
int s;
struct ifmediareq ifmr;
- int *media_list, i;
+ uint64_t *media_list, i;
u_int t_speed, t_speed_high;
u_int m_speed, m_speed_high;
@@ -272,7 +272,7 @@ netsnmp_sysctl_get_if_speed(char *name, u_int *speed,
netsnmp_sysctl_ifmedia_to_speed(ifmr.ifm_current, speed, speed_high);
if (*speed == 0 &&
- (media_list = (int *) malloc(ifmr.ifm_count * sizeof(int))) != NULL ) {
+ (media_list = (uint64_t *) malloc(ifmr.ifm_count * sizeof(uint64_t))) != NULL ) {
ifmr.ifm_ulist = media_list;

View File

@ -1,86 +0,0 @@
$OpenBSD: patch-agent_mibgroup_if-mib_ifXTable_ifXTable_c,v 1.1 2016/10/12 10:50:33 sthen Exp $
commit 477b4307ef12ddce3b6a9205e0bdddbfb2e0e9b6
Author: Bart Van Assche <bvanassche@acm.org>
Date: Sat Feb 20 18:58:18 2016 -0800
Remove U64 typedef
The U64 typedef conflicts with a typedef in a Perl header file. Hence
remove the U64 typedef from the Net-SNMP header files. This patch does
not modify the Net-SNMP ABI.
--- agent/mibgroup/if-mib/ifXTable/ifXTable.c.orig Mon Dec 8 20:23:22 2014
+++ agent/mibgroup/if-mib/ifXTable/ifXTable.c Wed Oct 12 10:50:36 2016
@@ -722,7 +722,7 @@ The total number of octets received on the interface,
*/
int
ifHCInOctets_get(ifXTable_rowreq_ctx * rowreq_ctx,
- U64 * ifHCInOctets_val_ptr)
+ struct counter64 *ifHCInOctets_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ifHCInOctets_val_ptr);
@@ -779,7 +779,7 @@ The number of packets, delivered by this sub-layer to
*/
int
ifHCInUcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx,
- U64 * ifHCInUcastPkts_val_ptr)
+ struct counter64 *ifHCInUcastPkts_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ifHCInUcastPkts_val_ptr);
@@ -838,7 +838,7 @@ The number of packets, delivered by this sub-layer to
*/
int
ifHCInMulticastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx,
- U64 * ifHCInMulticastPkts_val_ptr)
+ struct counter64 *ifHCInMulticastPkts_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ifHCInMulticastPkts_val_ptr);
@@ -897,7 +897,7 @@ The number of packets, delivered by this sub-layer to
*/
int
ifHCInBroadcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx,
- U64 * ifHCInBroadcastPkts_val_ptr)
+ struct counter64 *ifHCInBroadcastPkts_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ifHCInBroadcastPkts_val_ptr);
@@ -955,7 +955,7 @@ The total number of octets transmitted out of the
*/
int
ifHCOutOctets_get(ifXTable_rowreq_ctx * rowreq_ctx,
- U64 * ifHCOutOctets_val_ptr)
+ struct counter64 *ifHCOutOctets_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ifHCOutOctets_val_ptr);
@@ -1013,7 +1013,7 @@ The total number of packets that higher-level protocol
*/
int
ifHCOutUcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx,
- U64 * ifHCOutUcastPkts_val_ptr)
+ struct counter64 *ifHCOutUcastPkts_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ifHCOutUcastPkts_val_ptr);
@@ -1074,7 +1074,7 @@ The total number of packets that higher-level protocol
*/
int
ifHCOutMulticastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx,
- U64 * ifHCOutMulticastPkts_val_ptr)
+ struct counter64 *ifHCOutMulticastPkts_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ifHCOutMulticastPkts_val_ptr);
@@ -1134,7 +1134,7 @@ The total number of packets that higher-level protocol
*/
int
ifHCOutBroadcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx,
- U64 * ifHCOutBroadcastPkts_val_ptr)
+ struct counter64 *ifHCOutBroadcastPkts_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ifHCOutBroadcastPkts_val_ptr);

View File

@ -1,154 +0,0 @@
$OpenBSD: patch-agent_mibgroup_if-mib_ifXTable_ifXTable_h,v 1.1 2016/10/12 10:50:33 sthen Exp $
commit 477b4307ef12ddce3b6a9205e0bdddbfb2e0e9b6
Author: Bart Van Assche <bvanassche@acm.org>
Date: Sat Feb 20 18:58:18 2016 -0800
Remove U64 typedef
The U64 typedef conflicts with a typedef in a Perl header file. Hence
remove the U64 typedef from the Net-SNMP header files. This patch does
not modify the Net-SNMP ABI.
--- agent/mibgroup/if-mib/ifXTable/ifXTable.h.orig Mon Dec 8 20:23:22 2014
+++ agent/mibgroup/if-mib/ifXTable/ifXTable.h Wed Oct 12 10:50:36 2016
@@ -143,28 +143,28 @@ config_require(if-mib/ifXTable/ifXTable_data_access)
u_long *
ifOutBroadcastPkts_val_ptr);
int ifHCInOctets_get(ifXTable_rowreq_ctx * rowreq_ctx,
- U64 * ifHCInOctets_val_ptr);
+ struct counter64 *ifHCInOctets_val_ptr);
int ifHCInUcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx,
- U64 * ifHCInUcastPkts_val_ptr);
+ struct counter64 *ifHCInUcastPkts_val_ptr);
int ifHCInMulticastPkts_get(ifXTable_rowreq_ctx *
rowreq_ctx,
- U64 *
+ struct counter64 *
ifHCInMulticastPkts_val_ptr);
int ifHCInBroadcastPkts_get(ifXTable_rowreq_ctx *
rowreq_ctx,
- U64 *
+ struct counter64 *
ifHCInBroadcastPkts_val_ptr);
int ifHCOutOctets_get(ifXTable_rowreq_ctx * rowreq_ctx,
- U64 * ifHCOutOctets_val_ptr);
+ struct counter64 *ifHCOutOctets_val_ptr);
int ifHCOutUcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx,
- U64 * ifHCOutUcastPkts_val_ptr);
+ struct counter64 *ifHCOutUcastPkts_val_ptr);
int ifHCOutMulticastPkts_get(ifXTable_rowreq_ctx *
rowreq_ctx,
- U64 *
+ struct counter64 *
ifHCOutMulticastPkts_val_ptr);
int ifHCOutBroadcastPkts_get(ifXTable_rowreq_ctx *
rowreq_ctx,
- U64 *
+ struct counter64 *
ifHCOutBroadcastPkts_val_ptr);
int ifLinkUpDownTrapEnable_get(ifXTable_rowreq_ctx *
rowreq_ctx,
@@ -284,86 +284,86 @@ config_require(if-mib/ifXTable/ifXTable_data_access)
int ifHCInOctets_check_value(ifXTable_rowreq_ctx *
rowreq_ctx,
- U64 ifHCInOctets_val);
+ struct counter64 ifHCInOctets_val);
int ifHCInOctets_undo_setup(ifXTable_rowreq_ctx *
rowreq_ctx);
int ifHCInOctets_set(ifXTable_rowreq_ctx * rowreq_ctx,
- U64 ifHCInOctets_val);
+ struct counter64 ifHCInOctets_val);
int ifHCInOctets_undo(ifXTable_rowreq_ctx * rowreq_ctx);
int ifHCInUcastPkts_check_value(ifXTable_rowreq_ctx *
rowreq_ctx,
- U64 ifHCInUcastPkts_val);
+ struct counter64 ifHCInUcastPkts_val);
int ifHCInUcastPkts_undo_setup(ifXTable_rowreq_ctx *
rowreq_ctx);
int ifHCInUcastPkts_set(ifXTable_rowreq_ctx * rowreq_ctx,
- U64 ifHCInUcastPkts_val);
+ struct counter64 ifHCInUcastPkts_val);
int ifHCInUcastPkts_undo(ifXTable_rowreq_ctx * rowreq_ctx);
int ifHCInMulticastPkts_check_value(ifXTable_rowreq_ctx *
rowreq_ctx,
- U64
+ struct counter64
ifHCInMulticastPkts_val);
int ifHCInMulticastPkts_undo_setup(ifXTable_rowreq_ctx *
rowreq_ctx);
int ifHCInMulticastPkts_set(ifXTable_rowreq_ctx *
rowreq_ctx,
- U64 ifHCInMulticastPkts_val);
+ struct counter64 ifHCInMulticastPkts_val);
int ifHCInMulticastPkts_undo(ifXTable_rowreq_ctx *
rowreq_ctx);
int ifHCInBroadcastPkts_check_value(ifXTable_rowreq_ctx *
rowreq_ctx,
- U64
+ struct counter64
ifHCInBroadcastPkts_val);
int ifHCInBroadcastPkts_undo_setup(ifXTable_rowreq_ctx *
rowreq_ctx);
int ifHCInBroadcastPkts_set(ifXTable_rowreq_ctx *
rowreq_ctx,
- U64 ifHCInBroadcastPkts_val);
+ struct counter64 ifHCInBroadcastPkts_val);
int ifHCInBroadcastPkts_undo(ifXTable_rowreq_ctx *
rowreq_ctx);
int ifHCOutOctets_check_value(ifXTable_rowreq_ctx *
rowreq_ctx,
- U64 ifHCOutOctets_val);
+ struct counter64 ifHCOutOctets_val);
int ifHCOutOctets_undo_setup(ifXTable_rowreq_ctx *
rowreq_ctx);
int ifHCOutOctets_set(ifXTable_rowreq_ctx * rowreq_ctx,
- U64 ifHCOutOctets_val);
+ struct counter64 ifHCOutOctets_val);
int ifHCOutOctets_undo(ifXTable_rowreq_ctx * rowreq_ctx);
int ifHCOutUcastPkts_check_value(ifXTable_rowreq_ctx *
rowreq_ctx,
- U64 ifHCOutUcastPkts_val);
+ struct counter64 ifHCOutUcastPkts_val);
int ifHCOutUcastPkts_undo_setup(ifXTable_rowreq_ctx *
rowreq_ctx);
int ifHCOutUcastPkts_set(ifXTable_rowreq_ctx * rowreq_ctx,
- U64 ifHCOutUcastPkts_val);
+ struct counter64 ifHCOutUcastPkts_val);
int ifHCOutUcastPkts_undo(ifXTable_rowreq_ctx *
rowreq_ctx);
int ifHCOutMulticastPkts_check_value(ifXTable_rowreq_ctx *
rowreq_ctx,
- U64
+ struct counter64
ifHCOutMulticastPkts_val);
int ifHCOutMulticastPkts_undo_setup(ifXTable_rowreq_ctx *
rowreq_ctx);
int ifHCOutMulticastPkts_set(ifXTable_rowreq_ctx *
rowreq_ctx,
- U64 ifHCOutMulticastPkts_val);
+ struct counter64 ifHCOutMulticastPkts_val);
int ifHCOutMulticastPkts_undo(ifXTable_rowreq_ctx *
rowreq_ctx);
int ifHCOutBroadcastPkts_check_value(ifXTable_rowreq_ctx *
rowreq_ctx,
- U64
+ struct counter64
ifHCOutBroadcastPkts_val);
int ifHCOutBroadcastPkts_undo_setup(ifXTable_rowreq_ctx *
rowreq_ctx);
int ifHCOutBroadcastPkts_set(ifXTable_rowreq_ctx *
rowreq_ctx,
- U64 ifHCOutBroadcastPkts_val);
+ struct counter64 ifHCOutBroadcastPkts_val);
int ifHCOutBroadcastPkts_undo(ifXTable_rowreq_ctx *
rowreq_ctx);

View File

@ -1,103 +0,0 @@
$OpenBSD: patch-agent_mibgroup_if-mib_ifXTable_ifXTable_interface_c,v 1.1 2016/10/12 10:50:33 sthen Exp $
commit 477b4307ef12ddce3b6a9205e0bdddbfb2e0e9b6
Author: Bart Van Assche <bvanassche@acm.org>
Date: Sat Feb 20 18:58:18 2016 -0800
Remove U64 typedef
The U64 typedef conflicts with a typedef in a Perl header file. Hence
remove the U64 typedef from the Net-SNMP header files. This patch does
not modify the Net-SNMP ABI.
--- agent/mibgroup/if-mib/ifXTable/ifXTable_interface.c.orig Mon Dec 8 20:23:22 2014
+++ agent/mibgroup/if-mib/ifXTable/ifXTable_interface.c Wed Oct 12 10:50:36 2016
@@ -729,72 +729,72 @@ _ifXTable_get_column(ifXTable_rowreq_ctx * rowreq_ctx,
* ifHCInOctets(6)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IFHCINOCTETS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
- rc = ifHCInOctets_get(rowreq_ctx, (U64 *) var->val.string);
+ rc = ifHCInOctets_get(rowreq_ctx, (struct counter64 *) var->val.string);
break;
/*
* ifHCInUcastPkts(7)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IFHCINUCASTPKTS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
- rc = ifHCInUcastPkts_get(rowreq_ctx, (U64 *) var->val.string);
+ rc = ifHCInUcastPkts_get(rowreq_ctx, (struct counter64 *) var->val.string);
break;
/*
* ifHCInMulticastPkts(8)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IFHCINMULTICASTPKTS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
- rc = ifHCInMulticastPkts_get(rowreq_ctx, (U64 *) var->val.string);
+ rc = ifHCInMulticastPkts_get(rowreq_ctx, (struct counter64 *) var->val.string);
break;
/*
* ifHCInBroadcastPkts(9)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IFHCINBROADCASTPKTS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
- rc = ifHCInBroadcastPkts_get(rowreq_ctx, (U64 *) var->val.string);
+ rc = ifHCInBroadcastPkts_get(rowreq_ctx, (struct counter64 *) var->val.string);
break;
/*
* ifHCOutOctets(10)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IFHCOUTOCTETS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
- rc = ifHCOutOctets_get(rowreq_ctx, (U64 *) var->val.string);
+ rc = ifHCOutOctets_get(rowreq_ctx, (struct counter64 *) var->val.string);
break;
/*
* ifHCOutUcastPkts(11)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IFHCOUTUCASTPKTS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
- rc = ifHCOutUcastPkts_get(rowreq_ctx, (U64 *) var->val.string);
+ rc = ifHCOutUcastPkts_get(rowreq_ctx, (struct counter64 *) var->val.string);
break;
/*
* ifHCOutMulticastPkts(12)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IFHCOUTMULTICASTPKTS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
- rc = ifHCOutMulticastPkts_get(rowreq_ctx, (U64 *) var->val.string);
+ rc = ifHCOutMulticastPkts_get(rowreq_ctx, (struct counter64 *) var->val.string);
break;
/*
* ifHCOutBroadcastPkts(13)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IFHCOUTBROADCASTPKTS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
- rc = ifHCOutBroadcastPkts_get(rowreq_ctx, (U64 *) var->val.string);
+ rc = ifHCOutBroadcastPkts_get(rowreq_ctx, (struct counter64 *) var->val.string);
break;
/*

View File

@ -1,23 +0,0 @@
$OpenBSD: patch-agent_mibgroup_ip-mib_data_access_systemstats_common_c,v 1.1 2016/10/12 10:50:33 sthen Exp $
commit 477b4307ef12ddce3b6a9205e0bdddbfb2e0e9b6
Author: Bart Van Assche <bvanassche@acm.org>
Date: Sat Feb 20 18:58:18 2016 -0800
Remove U64 typedef
The U64 typedef conflicts with a typedef in a Perl header file. Hence
remove the U64 typedef from the Net-SNMP header files. This patch does
not modify the Net-SNMP ABI.
--- agent/mibgroup/ip-mib/data_access/systemstats_common.c.orig Mon Dec 8 20:23:22 2014
+++ agent/mibgroup/ip-mib/data_access/systemstats_common.c Wed Oct 12 10:50:36 2016
@@ -264,7 +264,7 @@ _calculate_entries(netsnmp_systemstats_entry * entry)
&& entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGCREATES]
&& entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTDISCARDS]) {
- U64 tmp, tmp2, tmp3;
+ struct counter64 tmp, tmp2, tmp3;
tmp = entry->stats.HCOutRequests;
u64Incr(&tmp, &entry->stats.HCOutForwDatagrams);
u64Incr(&tmp, &entry->stats.HCOutFragCreates);

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-agent_mibgroup_ip-mib_data_access_systemstats_sysctl_c,v 1.1 2014/12/09 15:20:06 sthen Exp $
--- agent/mibgroup/ip-mib/data_access/systemstats_sysctl.c.orig Thu Nov 13 01:08:13 2014
+++ agent/mibgroup/ip-mib/data_access/systemstats_sysctl.c Thu Nov 13 01:08:48 2014
@@ -25,6 +25,7 @@
#include <ctype.h>
#include <sys/param.h>
+#include <sys/queue.h>
#include <sys/sysctl.h>
#include <sys/protosw.h>

View File

@ -1,140 +0,0 @@
$OpenBSD: patch-agent_mibgroup_ip-mib_ipIfStatsTable_ipIfStatsTable_data_get_c,v 1.1 2016/10/12 10:50:33 sthen Exp $
commit 477b4307ef12ddce3b6a9205e0bdddbfb2e0e9b6
Author: Bart Van Assche <bvanassche@acm.org>
Date: Sat Feb 20 18:58:18 2016 -0800
Remove U64 typedef
The U64 typedef conflicts with a typedef in a Perl header file. Hence
remove the U64 typedef from the Net-SNMP header files. This patch does
not modify the Net-SNMP ABI.
--- agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.c.orig Mon Dec 8 20:23:22 2014
+++ agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.c Wed Oct 12 10:50:36 2016
@@ -270,7 +270,7 @@ The total number of input IP datagrams received, inclu
*/
int
ipIfStatsHCInReceives_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
- U64 * ipIfStatsHCInReceives_val_ptr)
+ struct counter64 *ipIfStatsHCInReceives_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipIfStatsHCInReceives_val_ptr);
@@ -395,7 +395,7 @@ The total number of octets received in input IP datagr
*/
int
ipIfStatsHCInOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
- U64 * ipIfStatsHCInOctets_val_ptr)
+ struct counter64 *ipIfStatsHCInOctets_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipIfStatsHCInOctets_val_ptr);
@@ -862,7 +862,7 @@ The number of input datagrams for which this entity wa
*/
int
ipIfStatsHCInForwDatagrams_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
- U64 * ipIfStatsHCInForwDatagrams_val_ptr)
+ struct counter64 *ipIfStatsHCInForwDatagrams_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipIfStatsHCInForwDatagrams_val_ptr);
@@ -1267,7 +1267,7 @@ The total number of datagrams successfully delivered t
*/
int
ipIfStatsHCInDelivers_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
- U64 * ipIfStatsHCInDelivers_val_ptr)
+ struct counter64 *ipIfStatsHCInDelivers_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipIfStatsHCInDelivers_val_ptr);
@@ -1396,7 +1396,7 @@ The total number of IP datagrams that local IP user-
*/
int
ipIfStatsHCOutRequests_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
- U64 * ipIfStatsHCOutRequests_val_ptr)
+ struct counter64 *ipIfStatsHCOutRequests_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipIfStatsHCOutRequests_val_ptr);
@@ -1532,7 +1532,7 @@ The number of datagrams for which this entity was not
*/
int
ipIfStatsHCOutForwDatagrams_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
- U64 * ipIfStatsHCOutForwDatagrams_val_ptr)
+ struct counter64 *ipIfStatsHCOutForwDatagrams_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipIfStatsHCOutForwDatagrams_val_ptr);
@@ -1999,7 +1999,7 @@ The total number of IP datagrams that this entity supp
*/
int
ipIfStatsHCOutTransmits_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
- U64 * ipIfStatsHCOutTransmits_val_ptr)
+ struct counter64 *ipIfStatsHCOutTransmits_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipIfStatsHCOutTransmits_val_ptr);
@@ -2123,7 +2123,7 @@ The total number of octets in IP datagrams delivered t
*/
int
ipIfStatsHCOutOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
- U64 * ipIfStatsHCOutOctets_val_ptr)
+ struct counter64 *ipIfStatsHCOutOctets_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipIfStatsHCOutOctets_val_ptr);
@@ -2245,7 +2245,7 @@ The number of IP multicast datagrams received. This o
*/
int
ipIfStatsHCInMcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
- U64 * ipIfStatsHCInMcastPkts_val_ptr)
+ struct counter64 *ipIfStatsHCInMcastPkts_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipIfStatsHCInMcastPkts_val_ptr);
@@ -2372,7 +2372,7 @@ The total number of octets received in IP multicast
*/
int
ipIfStatsHCInMcastOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
- U64 * ipIfStatsHCInMcastOctets_val_ptr)
+ struct counter64 *ipIfStatsHCInMcastOctets_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipIfStatsHCInMcastOctets_val_ptr);
@@ -2497,7 +2497,7 @@ The number of IP multicast datagrams transmitted. Thi
*/
int
ipIfStatsHCOutMcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
- U64 * ipIfStatsHCOutMcastPkts_val_ptr)
+ struct counter64 *ipIfStatsHCOutMcastPkts_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipIfStatsHCOutMcastPkts_val_ptr);
@@ -2621,7 +2621,7 @@ The total number of octets transmitted in IP multicast
*/
int
ipIfStatsHCOutMcastOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
- U64 * ipIfStatsHCOutMcastOctets_val_ptr)
+ struct counter64 *ipIfStatsHCOutMcastOctets_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipIfStatsHCOutMcastOctets_val_ptr);
@@ -2743,7 +2743,7 @@ The number of IP broadcast datagrams received. This o
*/
int
ipIfStatsHCInBcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
- U64 * ipIfStatsHCInBcastPkts_val_ptr)
+ struct counter64 *ipIfStatsHCInBcastPkts_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipIfStatsHCInBcastPkts_val_ptr);
@@ -2865,7 +2865,7 @@ The number of IP broadcast datagrams transmitted. Thi
*/
int
ipIfStatsHCOutBcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
- U64 * ipIfStatsHCOutBcastPkts_val_ptr)
+ struct counter64 *ipIfStatsHCOutBcastPkts_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipIfStatsHCOutBcastPkts_val_ptr);

View File

@ -1,140 +0,0 @@
$OpenBSD: patch-agent_mibgroup_ip-mib_ipIfStatsTable_ipIfStatsTable_data_get_h,v 1.1 2016/10/12 10:50:33 sthen Exp $
commit 477b4307ef12ddce3b6a9205e0bdddbfb2e0e9b6
Author: Bart Van Assche <bvanassche@acm.org>
Date: Sat Feb 20 18:58:18 2016 -0800
Remove U64 typedef
The U64 typedef conflicts with a typedef in a Perl header file. Hence
remove the U64 typedef from the Net-SNMP header files. This patch does
not modify the Net-SNMP ABI.
--- agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.h.orig Mon Dec 8 20:23:22 2014
+++ agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.h Wed Oct 12 10:50:36 2016
@@ -50,7 +50,7 @@ extern "C" {
ipIfStatsInReceives_val_ptr);
int ipIfStatsHCInReceives_get(ipIfStatsTable_rowreq_ctx *
rowreq_ctx,
- U64 *
+ struct counter64 *
ipIfStatsHCInReceives_val_ptr);
int ipIfStatsInOctets_get(ipIfStatsTable_rowreq_ctx *
rowreq_ctx,
@@ -58,7 +58,7 @@ extern "C" {
ipIfStatsInOctets_val_ptr);
int ipIfStatsHCInOctets_get(ipIfStatsTable_rowreq_ctx *
rowreq_ctx,
- U64 *
+ struct counter64 *
ipIfStatsHCInOctets_val_ptr);
int ipIfStatsInHdrErrors_get(ipIfStatsTable_rowreq_ctx *
rowreq_ctx,
@@ -87,7 +87,7 @@ extern "C" {
int
ipIfStatsHCInForwDatagrams_get(ipIfStatsTable_rowreq_ctx *
rowreq_ctx,
- U64 *
+ struct counter64 *
ipIfStatsHCInForwDatagrams_val_ptr);
int ipIfStatsReasmReqds_get(ipIfStatsTable_rowreq_ctx *
rowreq_ctx,
@@ -111,7 +111,7 @@ extern "C" {
ipIfStatsInDelivers_val_ptr);
int ipIfStatsHCInDelivers_get(ipIfStatsTable_rowreq_ctx *
rowreq_ctx,
- U64 *
+ struct counter64 *
ipIfStatsHCInDelivers_val_ptr);
int ipIfStatsOutRequests_get(ipIfStatsTable_rowreq_ctx *
rowreq_ctx,
@@ -119,7 +119,7 @@ extern "C" {
ipIfStatsOutRequests_val_ptr);
int ipIfStatsHCOutRequests_get(ipIfStatsTable_rowreq_ctx *
rowreq_ctx,
- U64 *
+ struct counter64 *
ipIfStatsHCOutRequests_val_ptr);
int ipIfStatsOutForwDatagrams_get(ipIfStatsTable_rowreq_ctx
* rowreq_ctx,
@@ -128,7 +128,7 @@ extern "C" {
int
ipIfStatsHCOutForwDatagrams_get(ipIfStatsTable_rowreq_ctx *
rowreq_ctx,
- U64 *
+ struct counter64 *
ipIfStatsHCOutForwDatagrams_val_ptr);
int ipIfStatsOutDiscards_get(ipIfStatsTable_rowreq_ctx *
rowreq_ctx,
@@ -156,7 +156,7 @@ extern "C" {
ipIfStatsOutTransmits_val_ptr);
int ipIfStatsHCOutTransmits_get(ipIfStatsTable_rowreq_ctx *
rowreq_ctx,
- U64 *
+ struct counter64 *
ipIfStatsHCOutTransmits_val_ptr);
int ipIfStatsOutOctets_get(ipIfStatsTable_rowreq_ctx *
rowreq_ctx,
@@ -164,7 +164,7 @@ extern "C" {
ipIfStatsOutOctets_val_ptr);
int ipIfStatsHCOutOctets_get(ipIfStatsTable_rowreq_ctx *
rowreq_ctx,
- U64 *
+ struct counter64 *
ipIfStatsHCOutOctets_val_ptr);
int ipIfStatsInMcastPkts_get(ipIfStatsTable_rowreq_ctx *
rowreq_ctx,
@@ -172,7 +172,7 @@ extern "C" {
ipIfStatsInMcastPkts_val_ptr);
int ipIfStatsHCInMcastPkts_get(ipIfStatsTable_rowreq_ctx *
rowreq_ctx,
- U64 *
+ struct counter64 *
ipIfStatsHCInMcastPkts_val_ptr);
int ipIfStatsInMcastOctets_get(ipIfStatsTable_rowreq_ctx *
rowreq_ctx,
@@ -180,7 +180,7 @@ extern "C" {
ipIfStatsInMcastOctets_val_ptr);
int ipIfStatsHCInMcastOctets_get(ipIfStatsTable_rowreq_ctx
* rowreq_ctx,
- U64 *
+ struct counter64 *
ipIfStatsHCInMcastOctets_val_ptr);
int ipIfStatsOutMcastPkts_get(ipIfStatsTable_rowreq_ctx *
rowreq_ctx,
@@ -188,7 +188,7 @@ extern "C" {
ipIfStatsOutMcastPkts_val_ptr);
int ipIfStatsHCOutMcastPkts_get(ipIfStatsTable_rowreq_ctx *
rowreq_ctx,
- U64 *
+ struct counter64 *
ipIfStatsHCOutMcastPkts_val_ptr);
int ipIfStatsOutMcastOctets_get(ipIfStatsTable_rowreq_ctx *
rowreq_ctx,
@@ -196,7 +196,7 @@ extern "C" {
ipIfStatsOutMcastOctets_val_ptr);
int ipIfStatsHCOutMcastOctets_get(ipIfStatsTable_rowreq_ctx
* rowreq_ctx,
- U64 *
+ struct counter64 *
ipIfStatsHCOutMcastOctets_val_ptr);
int ipIfStatsInBcastPkts_get(ipIfStatsTable_rowreq_ctx *
rowreq_ctx,
@@ -204,7 +204,7 @@ extern "C" {
ipIfStatsInBcastPkts_val_ptr);
int ipIfStatsHCInBcastPkts_get(ipIfStatsTable_rowreq_ctx *
rowreq_ctx,
- U64 *
+ struct counter64 *
ipIfStatsHCInBcastPkts_val_ptr);
int ipIfStatsOutBcastPkts_get(ipIfStatsTable_rowreq_ctx *
rowreq_ctx,
@@ -212,7 +212,7 @@ extern "C" {
ipIfStatsOutBcastPkts_val_ptr);
int ipIfStatsHCOutBcastPkts_get(ipIfStatsTable_rowreq_ctx *
rowreq_ctx,
- U64 *
+ struct counter64 *
ipIfStatsHCOutBcastPkts_val_ptr);
int
ipIfStatsDiscontinuityTime_get(ipIfStatsTable_rowreq_ctx *

View File

@ -1,194 +0,0 @@
$OpenBSD: patch-agent_mibgroup_ip-mib_ipIfStatsTable_ipIfStatsTable_interface_c,v 1.1 2016/10/12 10:50:33 sthen Exp $
commit 477b4307ef12ddce3b6a9205e0bdddbfb2e0e9b6
Author: Bart Van Assche <bvanassche@acm.org>
Date: Sat Feb 20 18:58:18 2016 -0800
Remove U64 typedef
The U64 typedef conflicts with a typedef in a Perl header file. Hence
remove the U64 typedef from the Net-SNMP header files. This patch does
not modify the Net-SNMP ABI.
--- agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.c.orig Mon Dec 8 20:23:22 2014
+++ agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.c Wed Oct 12 10:50:36 2016
@@ -722,10 +722,10 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx *
* ipIfStatsHCInReceives(4)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPIFSTATSHCINRECEIVES:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipIfStatsHCInReceives_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*
@@ -741,9 +741,9 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx *
* ipIfStatsHCInOctets(6)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPIFSTATSHCINOCTETS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
- rc = ipIfStatsHCInOctets_get(rowreq_ctx, (U64 *) var->val.string);
+ rc = ipIfStatsHCInOctets_get(rowreq_ctx, (struct counter64 *) var->val.string);
break;
/*
@@ -810,10 +810,10 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx *
* ipIfStatsHCInForwDatagrams(13)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPIFSTATSHCINFORWDATAGRAMS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipIfStatsHCInForwDatagrams_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*
@@ -869,10 +869,10 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx *
* ipIfStatsHCInDelivers(19)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPIFSTATSHCINDELIVERS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipIfStatsHCInDelivers_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*
@@ -889,10 +889,10 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx *
* ipIfStatsHCOutRequests(21)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPIFSTATSHCOUTREQUESTS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipIfStatsHCOutRequests_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*
@@ -909,10 +909,10 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx *
* ipIfStatsHCOutForwDatagrams(24)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPIFSTATSHCOUTFORWDATAGRAMS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipIfStatsHCOutForwDatagrams_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*
@@ -979,10 +979,10 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx *
* ipIfStatsHCOutTransmits(31)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPIFSTATSHCOUTTRANSMITS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipIfStatsHCOutTransmits_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*
@@ -999,9 +999,9 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx *
* ipIfStatsHCOutOctets(33)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPIFSTATSHCOUTOCTETS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
- rc = ipIfStatsHCOutOctets_get(rowreq_ctx, (U64 *) var->val.string);
+ rc = ipIfStatsHCOutOctets_get(rowreq_ctx, (struct counter64 *) var->val.string);
break;
/*
@@ -1018,10 +1018,10 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx *
* ipIfStatsHCInMcastPkts(35)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPIFSTATSHCINMCASTPKTS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipIfStatsHCInMcastPkts_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*
@@ -1038,10 +1038,10 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx *
* ipIfStatsHCInMcastOctets(37)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPIFSTATSHCINMCASTOCTETS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipIfStatsHCInMcastOctets_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*
@@ -1058,10 +1058,10 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx *
* ipIfStatsHCOutMcastPkts(39)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPIFSTATSHCOUTMCASTPKTS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipIfStatsHCOutMcastPkts_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*
@@ -1078,10 +1078,10 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx *
* ipIfStatsHCOutMcastOctets(41)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPIFSTATSHCOUTMCASTOCTETS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipIfStatsHCOutMcastOctets_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*
@@ -1098,10 +1098,10 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx *
* ipIfStatsHCInBcastPkts(43)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPIFSTATSHCINBCASTPKTS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipIfStatsHCInBcastPkts_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*
@@ -1118,10 +1118,10 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx *
* ipIfStatsHCOutBcastPkts(45)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPIFSTATSHCOUTBCASTPKTS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipIfStatsHCOutBcastPkts_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*

View File

@ -1,140 +0,0 @@
$OpenBSD: patch-agent_mibgroup_ip-mib_ipSystemStatsTable_ipSystemStatsTable_c,v 1.1 2016/10/12 10:50:33 sthen Exp $
commit 477b4307ef12ddce3b6a9205e0bdddbfb2e0e9b6
Author: Bart Van Assche <bvanassche@acm.org>
Date: Sat Feb 20 18:58:18 2016 -0800
Remove U64 typedef
The U64 typedef conflicts with a typedef in a Perl header file. Hence
remove the U64 typedef from the Net-SNMP header files. This patch does
not modify the Net-SNMP ABI.
--- agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.c.orig Mon Dec 8 20:23:22 2014
+++ agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.c Wed Oct 12 10:50:36 2016
@@ -452,7 +452,7 @@ The total number of input IP datagrams received, inclu
*/
int
ipSystemStatsHCInReceives_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
- U64 * ipSystemStatsHCInReceives_val_ptr)
+ struct counter64 *ipSystemStatsHCInReceives_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipSystemStatsHCInReceives_val_ptr);
@@ -579,7 +579,7 @@ The total number of octets received in input IP datagr
*/
int
ipSystemStatsHCInOctets_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
- U64 * ipSystemStatsHCInOctets_val_ptr)
+ struct counter64 *ipSystemStatsHCInOctets_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipSystemStatsHCInOctets_val_ptr);
@@ -1058,7 +1058,7 @@ The number of input datagrams for which this entity wa
int
ipSystemStatsHCInForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
rowreq_ctx,
- U64 *
+ struct counter64 *
ipSystemStatsHCInForwDatagrams_val_ptr)
{
/** we should have a non-NULL pointer */
@@ -1474,7 +1474,7 @@ The total number of datagrams successfully delivered t
*/
int
ipSystemStatsHCInDelivers_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
- U64 * ipSystemStatsHCInDelivers_val_ptr)
+ struct counter64 *ipSystemStatsHCInDelivers_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipSystemStatsHCInDelivers_val_ptr);
@@ -1602,7 +1602,7 @@ The total number of IP datagrams which local IP user-
*/
int
ipSystemStatsHCOutRequests_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
- U64 * ipSystemStatsHCOutRequests_val_ptr)
+ struct counter64 *ipSystemStatsHCOutRequests_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipSystemStatsHCOutRequests_val_ptr);
@@ -1809,7 +1809,7 @@ The number of datagrams for which this entity was not
int
ipSystemStatsHCOutForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
rowreq_ctx,
- U64 *
+ struct counter64 *
ipSystemStatsHCOutForwDatagrams_val_ptr)
{
/** we should have a non-NULL pointer */
@@ -2288,7 +2288,7 @@ The total number of IP datagrams that this entity supp
*/
int
ipSystemStatsHCOutTransmits_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
- U64 * ipSystemStatsHCOutTransmits_val_ptr)
+ struct counter64 *ipSystemStatsHCOutTransmits_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipSystemStatsHCOutTransmits_val_ptr);
@@ -2415,7 +2415,7 @@ The total number of octets in IP datagrams delivered t
*/
int
ipSystemStatsHCOutOctets_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
- U64 * ipSystemStatsHCOutOctets_val_ptr)
+ struct counter64 *ipSystemStatsHCOutOctets_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipSystemStatsHCOutOctets_val_ptr);
@@ -2539,7 +2539,7 @@ The number of IP multicast datagrams received. This o
*/
int
ipSystemStatsHCInMcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
- U64 * ipSystemStatsHCInMcastPkts_val_ptr)
+ struct counter64 *ipSystemStatsHCInMcastPkts_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipSystemStatsHCInMcastPkts_val_ptr);
@@ -2665,7 +2665,7 @@ The total number of octets received in IP multicast
int
ipSystemStatsHCInMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
rowreq_ctx,
- U64 *
+ struct counter64 *
ipSystemStatsHCInMcastOctets_val_ptr)
{
/** we should have a non-NULL pointer */
@@ -2790,7 +2790,7 @@ The number of IP multicast datagrams transmitted. Thi
*/
int
ipSystemStatsHCOutMcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
- U64 * ipSystemStatsHCOutMcastPkts_val_ptr)
+ struct counter64 *ipSystemStatsHCOutMcastPkts_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipSystemStatsHCOutMcastPkts_val_ptr);
@@ -2921,7 +2921,7 @@ The total number of octets transmitted in IP multicast
int
ipSystemStatsHCOutMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
rowreq_ctx,
- U64 *
+ struct counter64 *
ipSystemStatsHCOutMcastOctets_val_ptr)
{
/** we should have a non-NULL pointer */
@@ -3046,7 +3046,7 @@ The number of IP broadcast datagrams received. This o
*/
int
ipSystemStatsHCInBcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
- U64 * ipSystemStatsHCInBcastPkts_val_ptr)
+ struct counter64 *ipSystemStatsHCInBcastPkts_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipSystemStatsHCInBcastPkts_val_ptr);
@@ -3170,7 +3170,7 @@ The number of IP broadcast datagrams transmitted. Thi
*/
int
ipSystemStatsHCOutBcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
- U64 * ipSystemStatsHCOutBcastPkts_val_ptr)
+ struct counter64 *ipSystemStatsHCOutBcastPkts_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipSystemStatsHCOutBcastPkts_val_ptr);

View File

@ -1,196 +0,0 @@
$OpenBSD: patch-agent_mibgroup_ip-mib_ipSystemStatsTable_ipSystemStatsTable_interface_c,v 1.1 2016/10/12 10:50:33 sthen Exp $
commit 477b4307ef12ddce3b6a9205e0bdddbfb2e0e9b6
Author: Bart Van Assche <bvanassche@acm.org>
Date: Sat Feb 20 18:58:18 2016 -0800
Remove U64 typedef
The U64 typedef conflicts with a typedef in a Perl header file. Hence
remove the U64 typedef from the Net-SNMP header files. This patch does
not modify the Net-SNMP ABI.
--- agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_interface.c.orig Mon Dec 8 20:23:22 2014
+++ agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_interface.c Wed Oct 12 10:50:36 2016
@@ -674,10 +674,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowr
* ipSystemStatsHCInReceives(4)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPSYSTEMSTATSHCINRECEIVES:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipSystemStatsHCInReceives_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*
@@ -694,10 +694,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowr
* ipSystemStatsHCInOctets(6)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPSYSTEMSTATSHCINOCTETS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipSystemStatsHCInOctets_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*
@@ -764,10 +764,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowr
* ipSystemStatsHCInForwDatagrams(13)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPSYSTEMSTATSHCINFORWDATAGRAMS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipSystemStatsHCInForwDatagrams_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*
@@ -824,10 +824,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowr
* ipSystemStatsHCInDelivers(19)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPSYSTEMSTATSHCINDELIVERS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipSystemStatsHCInDelivers_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*
@@ -844,10 +844,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowr
* ipSystemStatsHCOutRequests(21)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPSYSTEMSTATSHCOUTREQUESTS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipSystemStatsHCOutRequests_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*
@@ -874,10 +874,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowr
* ipSystemStatsHCOutForwDatagrams(24)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPSYSTEMSTATSHCOUTFORWDATAGRAMS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipSystemStatsHCOutForwDatagrams_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*
@@ -944,10 +944,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowr
* ipSystemStatsHCOutTransmits(31)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPSYSTEMSTATSHCOUTTRANSMITS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipSystemStatsHCOutTransmits_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*
@@ -964,10 +964,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowr
* ipSystemStatsHCOutOctets(33)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPSYSTEMSTATSHCOUTOCTETS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipSystemStatsHCOutOctets_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*
@@ -984,10 +984,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowr
* ipSystemStatsHCInMcastPkts(35)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPSYSTEMSTATSHCINMCASTPKTS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipSystemStatsHCInMcastPkts_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*
@@ -1004,10 +1004,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowr
* ipSystemStatsHCInMcastOctets(37)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPSYSTEMSTATSHCINMCASTOCTETS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipSystemStatsHCInMcastOctets_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*
@@ -1024,10 +1024,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowr
* ipSystemStatsHCOutMcastPkts(39)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPSYSTEMSTATSHCOUTMCASTPKTS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipSystemStatsHCOutMcastPkts_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*
@@ -1044,10 +1044,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowr
* ipSystemStatsHCOutMcastOctets(41)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPSYSTEMSTATSHCOUTMCASTOCTETS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipSystemStatsHCOutMcastOctets_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*
@@ -1064,10 +1064,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowr
* ipSystemStatsHCInBcastPkts(43)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPSYSTEMSTATSHCINBCASTPKTS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipSystemStatsHCInBcastPkts_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*
@@ -1084,10 +1084,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowr
* ipSystemStatsHCOutBcastPkts(45)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
*/
case COLUMN_IPSYSTEMSTATSHCOUTBCASTPKTS:
- var->val_len = sizeof(U64);
+ var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = ipSystemStatsHCOutBcastPkts_get(rowreq_ctx,
- (U64 *) var->val.string);
+ (struct counter64 *) var->val.string);
break;
/*

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-agent_mibgroup_mibII_icmp_h,v 1.1 2016/05/12 22:00:14 sthen Exp $
--- agent/mibgroup/mibII/icmp.h.orig Thu May 12 22:22:06 2016
+++ agent/mibgroup/mibII/icmp.h Thu May 12 22:22:13 2016
@@ -16,8 +16,7 @@ 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(openbsd, mibII/kernel_sysctl)
config_arch_require(dragonfly2, mibII/kernel_sysctl)
config_arch_require(dragonfly3, mibII/kernel_sysctl)
config_arch_require(darwin10, mibII/kernel_sysctl)

View File

@ -1,7 +1,8 @@
$OpenBSD: patch-agent_mibgroup_mibII_ipAddr_c,v 1.4 2014/12/09 15:20:06 sthen Exp $
--- agent/mibgroup/mibII/ipAddr.c.orig Wed Feb 27 14:42:24 2013
+++ agent/mibgroup/mibII/ipAddr.c Wed Feb 27 15:38:13 2013
@@ -757,10 +757,10 @@ static int nifs;
$OpenBSD: patch-agent_mibgroup_mibII_ipAddr_c,v 1.5 2018/06/02 20:53:37 sthen Exp $
Index: agent/mibgroup/mibII/ipAddr.c
--- agent/mibgroup/mibII/ipAddr.c.orig
+++ agent/mibgroup/mibII/ipAddr.c
@@ -758,10 +758,10 @@ static int nifs;
static void
get_iflist(void)
{
@ -14,7 +15,7 @@ $OpenBSD: patch-agent_mibgroup_mibII_ipAddr_c,v 1.4 2014/12/09 15:20:06 sthen Ex
size_t len;
struct rt_msghdr *rtm;
struct if_msghdr *ifm;
@@ -786,63 +786,57 @@ get_iflist(void)
@@ -787,63 +787,57 @@ get_iflist(void)
return;
}

View File

@ -1,263 +0,0 @@
$OpenBSD: patch-agent_mibgroup_mibII_ipv6_c,v 1.2 2015/12/08 16:50:41 jca Exp $
--- agent/mibgroup/mibII/ipv6.c.orig Mon Dec 8 21:23:22 2014
+++ agent/mibgroup/mibII/ipv6.c Mon Dec 7 09:11:14 2015
@@ -81,6 +81,7 @@
# include <netinet/ip_var.h>
#endif
#if HAVE_NETINET6_IP6_VAR_H
+# include <sys/queue.h>
# include <netinet6/ip6_var.h>
#endif
#include <net/route.h>
@@ -597,7 +598,44 @@ if_getindex(const char *name)
/*------------------------------------------------------------*/
#ifndef linux
+
+#ifdef __OpenBSD__
+
/*
+ * It is not possible to use struct ifnet anymore on OpenBSD, get
+ * interface flags and L2 address through getifaddrs(3).
+ */
+
+#include <ifaddrs.h>
+
+static int
+if_getifflags(int ifindex, int *ifflags)
+{
+ const char *ifname;
+ struct ifaddrs *ifa0, *ifa;
+ int ret = -1;
+
+ ifname = if_getname(ifindex);
+ if (ifname == NULL)
+ return ret;
+
+ if (getifaddrs(&ifa0) != -1) {
+ for (ifa = ifa0; ifa != NULL; ifa = ifa->ifa_next) {
+ if (strcmp(ifa->ifa_name, ifname) == 0) {
+ *ifflags = ifa->ifa_flags;
+ ret = 0;
+ break;
+ }
+ }
+ freeifaddrs(ifa0);
+ }
+
+ return ret;
+}
+
+#else
+
+/*
* KAME dependent part
*/
static int
@@ -630,6 +668,8 @@ if_getifnet(int idx, struct ifnet *result)
return -1;
}
+#endif /* !__OpenBSD__ */
+
#if TRUST_IFLASTCHANGE /*untrustable value returned... */
#ifdef HAVE_NET_IF_MIB_H
#if defined(HAVE_SYS_SYSCTL_H) && defined(CTL_NET)
@@ -844,86 +884,34 @@ var_ifv6Entry(register struct variable * vp,
#endif
case IPV6IFPHYSADDRESS:
{
- struct ifnet ifnet;
- struct ifaddr ifaddr;
-#if defined(__DragonFly__) && __DragonFly_version >= 197700
- struct ifaddr_container ifac;
- struct ifaddrhead head;
-#endif
static struct sockaddr_dl sdl;
- caddr_t ifa;
+ struct ifaddrs *ifa0, *ifa;
+ char ifnam[IF_NAMESIZE];
- if (if_getifnet(interface, &ifnet) < 0)
- break;
-#if defined(freebsd3) || defined(darwin)
-# if defined(__DragonFly__) && __DragonFly_version >= 197700
- /*
- * Locate ifaddr head on CPU0
- */
- if (!NETSNMP_KLOOKUP(ifnet.if_addrheads, (char *)&head, sizeof(head))) {
- DEBUGMSGTL(("mibII/ipv6:var_ipv6", "klookup head failed\n"));
- break;
+ if (if_indextoname(interface, ifnam) == NULL) {
+ *var_len = 0;
+ return NULL;
}
- if (TAILQ_FIRST(&head) != NULL) {
- if (!NETSNMP_KLOOKUP(TAILQ_FIRST(&head), (char *) &ifac, sizeof(ifac))) {
- DEBUGMSGTL(("mibII/ipv6:var_ipv6", "klookup ifac failed\n"));
- break;
- }
- ifa = (caddr_t)ifac.ifa;
- } else {
- ifa = NULL;
- }
-# else
- ifa = (caddr_t) TAILQ_FIRST(&ifnet.if_addrhead);
-# endif
-#else
-# if defined(__NetBSD__) || defined(__OpenBSD__)
- ifa = (caddr_t) TAILQ_FIRST(&ifnet.if_addrlist);
-# else
- ifa = (caddr_t) ifnet.if_addrlist;
-# endif
-#endif
- while (ifa) {
- if (!NETSNMP_KLOOKUP(ifa, (char *) &ifaddr, sizeof(ifaddr))) {
- DEBUGMSGTL(("mibII/ipv6:var_ipv6", "klookup failed\n"));
- break;
- }
- if (!NETSNMP_KLOOKUP(ifaddr.ifa_addr,
- (char *) &sdl, sizeof(sdl))) {
- DEBUGMSGTL(("mibII/ipv6:var_ipv6", "klookup failed\n"));
- break;
- }
- if (sdl.sdl_family == AF_LINK) {
- if (sizeof(sdl.sdl_data) < sdl.sdl_nlen + sdl.sdl_alen) {
- ERROR_MSG("sdl_alen too long for interface\n");
- break;
- }
+
+ if (getifaddrs(&ifa0) != -1) {
+ for (ifa = ifa0; ifa != NULL; ifa = ifa->ifa_next) {
+
+ if (strcmp(ifnam, ifa->ifa_name) != 0)
+ continue;
+
+ if (ifa->ifa_addr == NULL)
+ continue;
+
+ memcpy(&sdl, ifa->ifa_addr, sizeof(sdl));
+ if (sdl.sdl_family != AF_LINK)
+ continue;
+
+ freeifaddrs(ifa0);
*var_len = sdl.sdl_alen;
return (u_char *) (sdl.sdl_data + sdl.sdl_nlen);
- }
-#if defined(freebsd3) || defined(darwin)
-# if defined(__DragonFly__) && __DragonFly_version >= 197700
- if (TAILQ_NEXT(&ifac, ifa_link) == NULL) {
- ifa = NULL;
- } else {
- if (!NETSNMP_KLOOKUP(TAILQ_NEXT(&ifac, ifa_link), (char *)&ifac, sizeof(ifac))) {
- DEBUGMSGTL(("mibII/ipv6:var_ipv6", "klookup ifac next failed\n"));
- break;
- }
- ifa = (caddr_t)ifac.ifa;
- }
-# else
- ifa = (caddr_t) TAILQ_NEXT(&ifaddr, ifa_link);
-# endif
-#else
-# if defined(__NetBSD__) || defined(__OpenBSD__)
- ifa = (caddr_t) TAILQ_NEXT(&ifaddr, ifa_list);
-# else
- ifa = (caddr_t) ifaddr.ifa_next;
-# endif
-#endif
+ }
+ freeifaddrs(ifa0);
}
-
/*
* no physical address found
*/
@@ -932,20 +920,34 @@ var_ifv6Entry(register struct variable * vp,
}
case IPV6IFADMSTATUS:
{
+#ifdef __OpenBSD__
+ int if_flags;
+ if (if_getifflags(interface, &if_flags) < 0)
+ break;
+ long_return = (if_flags & IFF_RUNNING) ? 1 : 2;
+#else
struct ifnet ifnet;
if (if_getifnet(interface, &ifnet) < 0)
break;
long_return = (ifnet.if_flags & IFF_RUNNING) ? 1 : 2;
+#endif
return (u_char *) & long_return;
}
case IPV6IFOPERSTATUS:
{
+#ifdef __OpenBSD__
+ int if_flags;
+ if (if_getifflags(interface, &if_flags) < 0)
+ break;
+ long_return = (if_flags & IFF_UP) ? 1 : 2;
+#else
struct ifnet ifnet;
if (if_getifnet(interface, &ifnet) < 0)
break;
long_return = (ifnet.if_flags & IFF_UP) ? 1 : 2;
+#endif
return (u_char *) & long_return;
}
#if TRUST_IFLASTCHANGE /*untrustable value returned... */
@@ -1336,9 +1338,13 @@ var_udp6(register struct variable * vp,
DEBUGMSGOID(("mibII/ipv6", name, *length));
DEBUGMSG(("mibII/ipv6", " %d\n", exact));
-#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 || defined(openbsd4) /*1.6Y*/
+#if defined(openbsd5)
if (!auto_nlist("udbtable", (char *) &udbtable, sizeof(udbtable)))
return NULL;
+ first = p = (caddr_t)TAILQ_FIRST(&udbtable.inpt_queue);
+#elif defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
+ if (!auto_nlist("udbtable", (char *) &udbtable, sizeof(udbtable)))
+ return NULL;
first = p = (caddr_t)udbtable.inpt_queue.cqh_first;
#elif !defined(freebsd3) && !defined(darwin)
if (!auto_nlist("udb6", (char *) &udb6, sizeof(udb6)))
@@ -1471,8 +1477,8 @@ var_udp6(register struct variable * vp,
skip:
#if defined(openbsd4)
- p = (caddr_t)in6pcb.inp_queue.cqe_next;
- if (p == first) break;
+ p = (caddr_t)TAILQ_NEXT(&in6pcb, inp_queue);
+ if (p == NULL) break;
#elif defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
p = (caddr_t)in6pcb.in6p_queue.cqe_next;
if (p == first) break;
@@ -1780,9 +1786,13 @@ var_tcp6(register struct variable * vp,
DEBUGMSGOID(("mibII/ipv6", name, *length));
DEBUGMSG(("mibII/ipv6", " %d\n", exact));
-#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 || defined(openbsd4) /*1.6Y*/
+#if defined(openbsd4)
if (!auto_nlist("tcbtable", (char *) &tcbtable, sizeof(tcbtable)))
return NULL;
+ first = p = (caddr_t)TAILQ_FIRST(&tcbtable.inpt_queue);
+#elif defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
+ if (!auto_nlist("tcbtable", (char *) &tcbtable, sizeof(tcbtable)))
+ return NULL;
first = p = (caddr_t)tcbtable.inpt_queue.cqh_first;
#elif !defined(freebsd3) && !defined(darwin)
if (!auto_nlist("tcb6", (char *) &tcb6, sizeof(tcb6)))
@@ -1926,9 +1936,9 @@ var_tcp6(register struct variable * vp,
skip:
#if defined(openbsd4)
- p = (caddr_t)in6pcb.inp_queue.cqe_next;
- if (p == first) break;
-#elif defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 || defined(openbsd4) /*1.6Y*/
+ p = (caddr_t)TAILQ_NEXT(&in6pcb, inp_queue);
+ if (p == NULL) break;
+#elif defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
p = (caddr_t)in6pcb.in6p_queue.cqe_next;
if (p == first) break;
#elif !defined(freebsd3) && !defined(darwin)

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-agent_mibgroup_mibII_tcpTable_c,v 1.9 2014/12/09 15:20:06 sthen Exp $
--- agent/mibgroup/mibII/tcpTable.c.orig Tue Feb 25 20:50:16 2014
+++ agent/mibgroup/mibII/tcpTable.c Thu Mar 20 12:41:29 2014
@@ -974,7 +974,7 @@ tcpTable_load(netsnmp_cache *cache, void *vmagic)
/*
* Set up a linked list
*/
- entry = table.inpt_queue.cqh_first;
+ entry = TAILQ_FIRST(&table.inpt_queue);
while (entry) {
nnew = SNMP_MALLOC_TYPEDEF(netsnmp_inpcb);
@@ -998,7 +998,7 @@ tcpTable_load(netsnmp_cache *cache, void *vmagic)
nnew->inp_next = tcp_head;
tcp_head = nnew;
- if (entry == table.inpt_queue.cqh_first)
+ if (entry == TAILQ_FIRST(&table.inpt_queue))
break;
}

View File

@ -1,36 +0,0 @@
$OpenBSD: patch-agent_mibgroup_mibII_udpTable_c,v 1.5 2014/12/09 15:20:06 sthen Exp $
--- agent/mibgroup/mibII/udpTable.c.orig Tue Feb 25 20:50:16 2014
+++ agent/mibgroup/mibII/udpTable.c Thu Mar 20 12:41:29 2014
@@ -65,7 +65,7 @@ struct netsnmp_udpEntry_s {
#define INP_NEXT_SYMBOL inp_next
#endif
#ifdef openbsd4
-#define INP_NEXT_SYMBOL inp_queue.cqe_next /* or set via <net-snmp/system/openbsd.h> */
+#define INP_NEXT_SYMBOL inp_queue.tqe_next /* or set via <net-snmp/system/openbsd.h> */
#endif
#if defined(freebsd4) || defined(darwin) || defined(osf5)
@@ -706,7 +706,7 @@ udpTable_load(netsnmp_cache *cache, void *vmagic)
/*
* Set up a linked list
*/
- entry = table.inpt_queue.cqh_first;
+ entry = TAILQ_FIRST(&table.inpt_queue);
while (entry) {
nnew = SNMP_MALLOC_TYPEDEF(struct inpcb);
@@ -718,11 +718,11 @@ udpTable_load(netsnmp_cache *cache, void *vmagic)
break;
}
- entry = nnew->inp_queue.cqe_next; /* Next kernel entry */
- nnew->inp_queue.cqe_next = udp_head;
+ entry = TAILQ_NEXT(nnew, inp_queue); /* Next kernel entry */
+ nnew->inp_queue.tqe_next = udp_head;
udp_head = nnew;
- if (entry == table.inpt_queue.cqh_first)
+ if (entry == NULL)
break;
}

View File

@ -1,7 +1,11 @@
$OpenBSD: patch-agent_mibgroup_tcp-mib_data_access_tcpConn_openbsd_c,v 1.2 2013/12/27 23:08:02 krw Exp $
--- agent/mibgroup/tcp-mib/data_access/tcpConn_openbsd.c.orig Tue Oct 9 18:28:58 2012
+++ agent/mibgroup/tcp-mib/data_access/tcpConn_openbsd.c Thu Dec 26 20:03:16 2013
@@ -111,8 +111,8 @@ static int
$OpenBSD: patch-agent_mibgroup_tcp-mib_data_access_tcpConn_openbsd_c,v 1.3 2018/06/02 20:53:37 sthen Exp $
inpt_queue changed from CIRCLEQ to TAILQ in OpenBSD 5.6
Index: agent/mibgroup/tcp-mib/data_access/tcpConn_openbsd.c
--- agent/mibgroup/tcp-mib/data_access/tcpConn_openbsd.c.orig
+++ agent/mibgroup/tcp-mib/data_access/tcpConn_openbsd.c
@@ -218,8 +218,8 @@ static int
_load(netsnmp_container *container, u_int load_flags)
{
struct inpcbtable table;
@ -12,7 +16,7 @@ $OpenBSD: patch-agent_mibgroup_tcp-mib_data_access_tcpConn_openbsd_c,v 1.2 2013/
struct tcpcb tcpcb;
int StateMap[] = { 1, 2, 3, 4, 5, 8, 6, 10, 9, 7, 11 };
netsnmp_tcpconn_entry *entry;
@@ -127,21 +127,29 @@ _load(netsnmp_container *container, u_int load_flags)
@@ -234,21 +234,28 @@ _load(netsnmp_container *container, u_int load_flags)
return -1;
}
@ -20,13 +24,10 @@ $OpenBSD: patch-agent_mibgroup_tcp-mib_data_access_tcpConn_openbsd_c,v 1.2 2013/
+ next = (struct inpcb *)&TAILQ_FIRST(&table.inpt_queue);
prev = NULL;
- head = next = CIRCLEQ_FIRST(&table.inpt_queue);
-
+
while (next) {
if (!NETSNMP_KLOOKUP(next, (char *)&inpcb, sizeof(inpcb))) {
- DEBUGMSGTL(("tcp-mib/data_access/tcpConn", "klookup inpcb failed\n"));
+ DEBUGMSGTL(("tcp-mib/data_access/tcpConn",
+ "klookup inpcb failed\n"));
DEBUGMSGTL(("tcp-mib/data_access/tcpConn", "klookup inpcb failed\n"));
break;
}
- if (prev && CIRCLEQ_PREV(&inpcb, inp_queue) != prev) {
@ -35,7 +36,7 @@ $OpenBSD: patch-agent_mibgroup_tcp-mib_data_access_tcpConn_openbsd_c,v 1.2 2013/
+ if (prev != NULL) {
+ if (!NETSNMP_KLOOKUP(prev, (char *)&previnpcb,
+ sizeof(previnpcb))) {
+ DEBUGMSGTL(("tcp-mib/data_access/tcpConn",
+ DEBUGMSGTL(("tcp-mib/data_access/tcpConn",
+ "klookup previnpcb failed\n"));
+ break;
+ }
@ -50,7 +51,7 @@ $OpenBSD: patch-agent_mibgroup_tcp-mib_data_access_tcpConn_openbsd_c,v 1.2 2013/
if (!NETSNMP_KLOOKUP(inpcb.inp_ppcb, (char *)&tcpcb, sizeof(tcpcb))) {
DEBUGMSGTL(("tcp-mib/data_access/tcpConn", "klookup tcpcb failed\n"));
break;
@@ -153,19 +161,19 @@ _load(netsnmp_container *container, u_int load_flags)
@@ -260,19 +267,19 @@ _load(netsnmp_container *container, u_int load_flags)
if (load_flags & NETSNMP_ACCESS_TCPCONN_LOAD_NOLISTEN) {
DEBUGMSGT(("verbose:access:tcpconn:container",
" skipping listen\n"));
@ -73,7 +74,7 @@ $OpenBSD: patch-agent_mibgroup_tcp-mib_data_access_tcpConn_openbsd_c,v 1.2 2013/
#endif
entry = netsnmp_access_tcpconn_entry_create();
@@ -199,9 +207,6 @@ _load(netsnmp_container *container, u_int load_flags)
@@ -306,9 +313,6 @@ _load(netsnmp_container *container, u_int load_flags)
*/
entry->arbitrary_index = CONTAINER_SIZE(container) + 1;
CONTAINER_INSERT(container, entry);

View File

@ -1,18 +0,0 @@
$OpenBSD: patch-agent_mibgroup_ucd-snmp_versioninfo_c,v 1.5 2011/07/07 20:02:02 sthen Exp $
--- agent/mibgroup/ucd-snmp/versioninfo.c.orig Fri Jul 1 23:35:46 2011
+++ agent/mibgroup/ucd-snmp/versioninfo.c Wed Jul 6 23:15:53 2011
@@ -93,7 +93,13 @@ var_extensible_version(struct variable *vp,
char *cptr;
time_t curtime;
#ifdef NETSNMP_CONFIGURE_OPTIONS
- static char config_opts[] = NETSNMP_CONFIGURE_OPTIONS;
+#ifndef __STRING
+#define __STRING(x) #x
+#endif
+#ifndef __string
+#define __string(x) __STRING(x)
+#endif
+ static char config_opts[] = __string(NETSNMP_CONFIGURE_OPTIONS);
#endif
DEBUGMSGTL(("ucd-snmp/versioninfo", "var_extensible_version: "));

View File

@ -1,7 +1,11 @@
$OpenBSD: patch-agent_mibgroup_udp-mib_data_access_udp_endpoint_openbsd_c,v 1.2 2013/12/27 23:08:02 krw Exp $
--- agent/mibgroup/udp-mib/data_access/udp_endpoint_openbsd.c.orig Tue Oct 9 18:28:58 2012
+++ agent/mibgroup/udp-mib/data_access/udp_endpoint_openbsd.c Thu Dec 26 19:54:56 2013
@@ -105,8 +105,8 @@ static int
$OpenBSD: patch-agent_mibgroup_udp-mib_data_access_udp_endpoint_openbsd_c,v 1.3 2018/06/02 20:53:37 sthen Exp $
inpt_queue changed from CIRCLEQ to TAILQ in OpenBSD 5.6
Index: agent/mibgroup/udp-mib/data_access/udp_endpoint_openbsd.c
--- agent/mibgroup/udp-mib/data_access/udp_endpoint_openbsd.c.orig
+++ agent/mibgroup/udp-mib/data_access/udp_endpoint_openbsd.c
@@ -192,8 +192,8 @@ static int
_load(netsnmp_container *container, u_int load_flags)
{
struct inpcbtable table;
@ -12,7 +16,7 @@ $OpenBSD: patch-agent_mibgroup_udp-mib_data_access_udp_endpoint_openbsd_c,v 1.2
netsnmp_udp_endpoint_entry *entry;
int rc = 0;
@@ -118,22 +118,29 @@ _load(netsnmp_container *container, u_int load_flags)
@@ -205,22 +205,29 @@ _load(netsnmp_container *container, u_int load_flags)
return -1;
}
@ -29,7 +33,7 @@ $OpenBSD: patch-agent_mibgroup_udp-mib_data_access_udp_endpoint_openbsd_c,v 1.2
+ if (prev != NULL) {
+ if (!NETSNMP_KLOOKUP(prev, (char *)&previnpcb,
+ sizeof(previnpcb))) {
+ DEBUGMSGTL(("udp-mib/data_access/udpConn",
+ DEBUGMSGTL(("udp-mib/data_access/udpConn",
+ "klookup previnpcb failed\n"));
+ break;
+ }
@ -49,7 +53,7 @@ $OpenBSD: patch-agent_mibgroup_udp-mib_data_access_udp_endpoint_openbsd_c,v 1.2
#endif
entry = netsnmp_access_udp_endpoint_entry_create();
if (NULL == entry) {
@@ -163,11 +170,6 @@ _load(netsnmp_container *container, u_int load_flags)
@@ -250,11 +257,6 @@ _load(netsnmp_container *container, u_int load_flags)
*/
entry->index = CONTAINER_SIZE(container) + 1;
CONTAINER_INSERT(container, entry);

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-configure_d_config_os_progs,v 1.3 2016/05/12 22:00:14 sthen Exp $
target_os contains the first number of the OS version number,
which is a poor thing to use on OpenBSD.
--- configure.d/config_os_progs.orig Thu May 12 22:19:21 2016
+++ configure.d/config_os_progs Thu May 12 22:19:30 2016
@@ -184,7 +184,7 @@ AC_SUBST(NON_GNU_VPATH)
#
AC_CANONICAL_TARGET
changequote(, )
-PARTIALTARGETOS=`echo $target_os | sed 's/[-._].*//'`
+PARTIALTARGETOS=`echo $target_os | sed -e 's/[-._].*//' -e 's/openbsd[0-9]/openbsd/'`
changequote([, ])
AC_MSG_CACHE_ADD(Building for: $PARTIALTARGETOS)

View File

@ -1,81 +0,0 @@
$OpenBSD: patch-include_net-snmp_data_access_ipstats_h,v 1.1 2016/10/12 10:50:33 sthen Exp $
commit 477b4307ef12ddce3b6a9205e0bdddbfb2e0e9b6
Author: Bart Van Assche <bvanassche@acm.org>
Date: Sat Feb 20 18:58:18 2016 -0800
Remove U64 typedef
The U64 typedef conflicts with a typedef in a Perl header file. Hence
remove the U64 typedef from the Net-SNMP header files. This patch does
not modify the Net-SNMP ABI.
--- include/net-snmp/data_access/ipstats.h.orig Mon Dec 8 20:23:22 2014
+++ include/net-snmp/data_access/ipstats.h Wed Oct 12 10:50:36 2016
@@ -58,45 +58,45 @@ typedef struct netsnmp_ipstats_s {
* other columns, when underlying OS does not provide them.
* Always fill at least 32 bits, the table is periodically polled -> 32 bit
* overflow shall be detected and 64 bit value should be computed automatically. */
- U64 HCInReceives;
- U64 HCInOctets;
+ struct counter64 HCInReceives;
+ struct counter64 HCInOctets;
u_long InHdrErrors;
- U64 HCInNoRoutes;
+ struct counter64 HCInNoRoutes;
u_long InAddrErrors;
u_long InUnknownProtos;
u_long InTruncatedPkts;
/* optional, can be computed from HCInNoRoutes and HCOutForwDatagrams */
- U64 HCInForwDatagrams;
+ struct counter64 HCInForwDatagrams;
u_long ReasmReqds;
u_long ReasmOKs;
u_long ReasmFails;
u_long InDiscards;
- U64 HCInDelivers;
- U64 HCOutRequests;
- U64 HCOutNoRoutes;
- U64 HCOutForwDatagrams;
- U64 HCOutDiscards;
+ struct counter64 HCInDelivers;
+ struct counter64 HCOutRequests;
+ struct counter64 HCOutNoRoutes;
+ struct counter64 HCOutForwDatagrams;
+ struct counter64 HCOutDiscards;
/* optional, can be computed from HCOutFragOKs + HCOutFragFails*/
- U64 HCOutFragReqds;
- U64 HCOutFragOKs;
- U64 HCOutFragFails;
- U64 HCOutFragCreates;
+ struct counter64 HCOutFragReqds;
+ struct counter64 HCOutFragOKs;
+ struct counter64 HCOutFragFails;
+ struct counter64 HCOutFragCreates;
/* optional, can be computed from
* HCOutRequests +HCOutForwDatagrams + HCOutFragCreates
* - HCOutFragReqds - HCOutNoRoutes - HCOutDiscards */
- U64 HCOutTransmits;
+ struct counter64 HCOutTransmits;
- U64 HCOutOctets;
- U64 HCInMcastPkts;
- U64 HCInMcastOctets;
- U64 HCOutMcastPkts;
- U64 HCOutMcastOctets;
- U64 HCInBcastPkts;
- U64 HCOutBcastPkts;
+ struct counter64 HCOutOctets;
+ struct counter64 HCInMcastPkts;
+ struct counter64 HCInMcastOctets;
+ struct counter64 HCOutMcastPkts;
+ struct counter64 HCOutMcastOctets;
+ struct counter64 HCInBcastPkts;
+ struct counter64 HCOutBcastPkts;
/* Array of available columns.*/
int columnAvail[IPSYSTEMSTATSTABLE_LAST+1];

View File

@ -1,62 +0,0 @@
$OpenBSD: patch-include_net-snmp_library_int64_h,v 1.1 2016/10/12 10:50:33 sthen Exp $
commit 477b4307ef12ddce3b6a9205e0bdddbfb2e0e9b6
Author: Bart Van Assche <bvanassche@acm.org>
Date: Sat Feb 20 18:58:18 2016 -0800
Remove U64 typedef
The U64 typedef conflicts with a typedef in a Perl header file. Hence
remove the U64 typedef from the Net-SNMP header files. This patch does
not modify the Net-SNMP ABI.
--- include/net-snmp/library/int64.h.orig Mon Dec 8 20:23:22 2014
+++ include/net-snmp/library/int64.h Wed Oct 12 10:50:36 2016
@@ -5,31 +5,29 @@
extern "C" {
#endif
- typedef struct counter64 U64;
-
#define I64CHARSZ 21
- void divBy10(U64, U64 *, unsigned int *);
- void multBy10(U64, U64 *);
- void incrByU16(U64 *, unsigned int);
- void incrByU32(U64 *, unsigned int);
+ void divBy10(struct counter64, struct counter64 *, unsigned int *);
+ void multBy10(struct counter64, struct counter64 *);
+ void incrByU16(struct counter64 *, unsigned int);
+ void incrByU32(struct counter64 *, unsigned int);
NETSNMP_IMPORT
- void zeroU64(U64 *);
- int isZeroU64(const U64 *);
+ void zeroU64(struct counter64 *);
+ int isZeroU64(const struct counter64 *);
NETSNMP_IMPORT
- void printU64(char *, const U64 *);
+ void printU64(char *, const struct counter64 *);
NETSNMP_IMPORT
- void printI64(char *, const U64 *);
- int read64(U64 *, const char *);
+ void printI64(char *, const struct counter64 *);
+ int read64(struct counter64 *, const char *);
NETSNMP_IMPORT
- void u64Subtract(const U64 * pu64one, const U64 * pu64two,
- U64 * pu64out);
- void u64Incr(U64 * pu64out, const U64 * pu64one);
- void u64UpdateCounter(U64 * pu64out, const U64 * pu64one,
- const U64 * pu64two);
- void u64Copy(U64 * pu64one, const U64 * pu64two);
+ void u64Subtract(const struct counter64 *pu64one, const struct counter64 *pu64two,
+ struct counter64 *pu64out);
+ void u64Incr(struct counter64 *pu64out, const struct counter64 *pu64one);
+ void u64UpdateCounter(struct counter64 *pu64out, const struct counter64 *pu64one,
+ const struct counter64 *pu64two);
+ void u64Copy(struct counter64 *pu64one, const struct counter64 *pu64two);
- int netsnmp_c64_check_for_32bit_wrap(U64 *old_val, U64 *new_val,
+ int netsnmp_c64_check_for_32bit_wrap(struct counter64 *old_val, struct counter64 *new_val,
int adjust);
NETSNMP_IMPORT
int netsnmp_c64_check32_and_update(struct counter64 *prev_val,

View File

@ -1,17 +0,0 @@
$OpenBSD: patch-include_net-snmp_system_openbsd_h,v 1.8 2016/05/12 22:00:14 sthen Exp $
quick hack to define the old openbsd{3,4,5} from before stripping
the version number part when defining the OS macro (see config_os_progs)
--- include/net-snmp/system/openbsd.h.orig Thu May 12 22:17:49 2016
+++ include/net-snmp/system/openbsd.h Thu May 12 22:18:06 2016
@@ -2,6 +2,9 @@
#define netbsd1 netbsd1 /* we're really close to this */
#define openbsd openbsd
+#define openbsd3 openbsd3
+#define openbsd4 openbsd4
+#define openbsd5 openbsd5
#define UVM
#undef MBPOOL_SYMBOL

View File

@ -1,28 +0,0 @@
$OpenBSD: patch-perl_ASN_Makefile_PL,v 1.1 2016/10/12 10:50:33 sthen Exp $
commit 4e793461e96a2b4fd81142ab312d074d5c8841fa
Author: Bart Van Assche <bvanassche@acm.org>
Date: Sat Jul 23 18:41:10 2016 -0700
CHANGES: BUG: 2712: Fix Perl module compilation
Avoid that building the Net-SNMP Perl modules fails as follows:
ERROR from evaluation of /sources/net-snmp-5.7.3/perl/ASN/Makefile.PL: Bizarre \ copy of HASH in list assi
gnment at /usr/lib/perl5/site_perl/5.24.0/Carp.pm line\ 229.
See also https://sourceforge.net/p/net-snmp/bugs/2712/.
--- perl/ASN/Makefile.PL.orig Mon Dec 8 20:23:22 2014
+++ perl/ASN/Makefile.PL Wed Oct 12 10:49:44 2016
@@ -7,9 +7,7 @@ my $lib_version;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
-%MakeParams = InitMakeParams();
-
-WriteMakefile(%MakeParams);
+WriteMakefile(InitMakeParams());
Check_Version();

View File

@ -1,28 +0,0 @@
$OpenBSD: patch-perl_Makefile_PL,v 1.1 2016/10/12 10:50:33 sthen Exp $
commit 4e793461e96a2b4fd81142ab312d074d5c8841fa
Author: Bart Van Assche <bvanassche@acm.org>
Date: Sat Jul 23 18:41:10 2016 -0700
CHANGES: BUG: 2712: Fix Perl module compilation
Avoid that building the Net-SNMP Perl modules fails as follows:
ERROR from evaluation of /sources/net-snmp-5.7.3/perl/ASN/Makefile.PL: Bizarre \ copy of HASH in list assi
gnment at /usr/lib/perl5/site_perl/5.24.0/Carp.pm line\ 229.
See also https://sourceforge.net/p/net-snmp/bugs/2712/.
--- perl/Makefile.PL.orig Mon Dec 8 20:23:22 2014
+++ perl/Makefile.PL Wed Oct 12 10:49:44 2016
@@ -3,9 +3,7 @@ use Config;
use Getopt::Long;
require 5;
-%MakeParams = InitMakeParams();
-
-WriteMakefile(%MakeParams);
+WriteMakefile(InitMakeParams());
sub InitMakeParams {
$nsconfig="net-snmp-config"; # in path by default

View File

@ -1,30 +0,0 @@
$OpenBSD: patch-perl_OID_Makefile_PL,v 1.1 2016/10/12 10:50:33 sthen Exp $
commit 4e793461e96a2b4fd81142ab312d074d5c8841fa
Author: Bart Van Assche <bvanassche@acm.org>
Date: Sat Jul 23 18:41:10 2016 -0700
CHANGES: BUG: 2712: Fix Perl module compilation
Avoid that building the Net-SNMP Perl modules fails as follows:
ERROR from evaluation of /sources/net-snmp-5.7.3/perl/ASN/Makefile.PL: Bizarre \ copy of HASH in list assi
gnment at /usr/lib/perl5/site_perl/5.24.0/Carp.pm line\ 229.
See also https://sourceforge.net/p/net-snmp/bugs/2712/.
--- perl/OID/Makefile.PL.orig Mon Dec 8 20:23:22 2014
+++ perl/OID/Makefile.PL Wed Oct 12 10:49:44 2016
@@ -6,11 +6,8 @@ require 5;
use Config;
use Getopt::Long;
my $lib_version;
-my %MakeParams = ();
-%MakeParams = InitMakeParams();
-
-WriteMakefile(%MakeParams);
+WriteMakefile(InitMakeParams());
Check_Version();

View File

@ -1,45 +1,8 @@
$OpenBSD: patch-perl_SNMP_Makefile_PL,v 1.4 2016/10/12 10:50:33 sthen Exp $
*** Hunk 1:
commit 4e793461e96a2b4fd81142ab312d074d5c8841fa
Author: Bart Van Assche <bvanassche@acm.org>
Date: Sat Jul 23 18:41:10 2016 -0700
CHANGES: BUG: 2712: Fix Perl module compilation
Avoid that building the Net-SNMP Perl modules fails as follows:
ERROR from evaluation of /sources/net-snmp-5.7.3/perl/ASN/Makefile.PL: Bizarre \ copy of HASH in list assi
gnment at /usr/lib/perl5/site_perl/5.24.0/Carp.pm line\ 229.
See also https://sourceforge.net/p/net-snmp/bugs/2712/.
*** Hunk 2:
Adjust manpage path.
--- perl/SNMP/Makefile.PL.orig Wed Oct 12 10:52:01 2016
+++ perl/SNMP/Makefile.PL Wed Oct 12 10:49:44 2016
@@ -3,16 +3,13 @@ require 5;
use Config;
use Getopt::Long;
my $lib_version;
-my %MakeParams = ();
my $opts;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
-%MakeParams = InitMakeParams();
+WriteMakefile(InitMakeParams());
-WriteMakefile(%MakeParams);
-
Check_Version();
GetTestInfo();
@@ -21,7 +18,7 @@ sub InitMakeParams {
$OpenBSD: patch-perl_SNMP_Makefile_PL,v 1.5 2018/06/02 20:53:37 sthen Exp $
Index: perl/SNMP/Makefile.PL
--- perl/SNMP/Makefile.PL.orig
+++ perl/SNMP/Makefile.PL
@@ -22,7 +22,7 @@ sub SnmpInitMakeParams {
my %Params = (
NAME => 'SNMP',
dist => { SUFFIX => "gz", COMPRESS => "gzip -9f"},

View File

@ -1,19 +0,0 @@
$OpenBSD: patch-perl_SNMP_SNMP_pm,v 1.1 2014/03/20 12:46:15 sthen Exp $
--- perl/SNMP/SNMP.pm.orig Thu Mar 20 12:41:16 2014
+++ perl/SNMP/SNMP.pm Thu Mar 20 12:44:47 2014
@@ -1719,11 +1719,15 @@ the keys instead of deriving them from a password as a
=head2 SNMPv1 and SNMPv2c Options
+=over
+
=item Community
For SNMPv1 and SNMPv2c, the clear-text community name to use.
The default is 'public'.
+
+=back
=head2 Other Configuration Options

View File

@ -1,30 +0,0 @@
$OpenBSD: patch-perl_TrapReceiver_Makefile_PL,v 1.1 2016/10/12 10:50:33 sthen Exp $
commit 4e793461e96a2b4fd81142ab312d074d5c8841fa
Author: Bart Van Assche <bvanassche@acm.org>
Date: Sat Jul 23 18:41:10 2016 -0700
CHANGES: BUG: 2712: Fix Perl module compilation
Avoid that building the Net-SNMP Perl modules fails as follows:
ERROR from evaluation of /sources/net-snmp-5.7.3/perl/ASN/Makefile.PL: Bizarre \ copy of HASH in list assi
gnment at /usr/lib/perl5/site_perl/5.24.0/Carp.pm line\ 229.
See also https://sourceforge.net/p/net-snmp/bugs/2712/.
--- perl/TrapReceiver/Makefile.PL.orig Mon Dec 8 20:23:22 2014
+++ perl/TrapReceiver/Makefile.PL Wed Oct 12 10:49:44 2016
@@ -3,11 +3,8 @@ require 5;
use Config;
use Getopt::Long;
my $lib_version;
-my %MakeParams = ();
-%MakeParams = InitMakeParams();
-
-WriteMakefile(%MakeParams);
+WriteMakefile(InitMakeParams());
Check_Version();

View File

@ -1,30 +0,0 @@
$OpenBSD: patch-perl_agent_Makefile_PL,v 1.1 2016/10/12 10:50:33 sthen Exp $
commit 4e793461e96a2b4fd81142ab312d074d5c8841fa
Author: Bart Van Assche <bvanassche@acm.org>
Date: Sat Jul 23 18:41:10 2016 -0700
CHANGES: BUG: 2712: Fix Perl module compilation
Avoid that building the Net-SNMP Perl modules fails as follows:
ERROR from evaluation of /sources/net-snmp-5.7.3/perl/ASN/Makefile.PL: Bizarre \ copy of HASH in list assi
gnment at /usr/lib/perl5/site_perl/5.24.0/Carp.pm line\ 229.
See also https://sourceforge.net/p/net-snmp/bugs/2712/.
--- perl/agent/Makefile.PL.orig Mon Dec 8 20:23:22 2014
+++ perl/agent/Makefile.PL Wed Oct 12 10:49:44 2016
@@ -3,11 +3,8 @@ require 5;
use Config;
use Getopt::Long;
my $lib_version;
-my %MakeParams = ();
-%MakeParams = InitMakeParams();
-
-WriteMakefile(%MakeParams);
+WriteMakefile(InitMakeParams());
Check_Version();

View File

@ -1,33 +0,0 @@
$OpenBSD: patch-perl_agent_Support_Makefile_PL,v 1.1 2016/10/12 10:50:33 sthen Exp $
commit 4e793461e96a2b4fd81142ab312d074d5c8841fa
Author: Bart Van Assche <bvanassche@acm.org>
Date: Sat Jul 23 18:41:10 2016 -0700
CHANGES: BUG: 2712: Fix Perl module compilation
Avoid that building the Net-SNMP Perl modules fails as follows:
ERROR from evaluation of /sources/net-snmp-5.7.3/perl/ASN/Makefile.PL: Bizarre \ copy of HASH in list assi
gnment at /usr/lib/perl5/site_perl/5.24.0/Carp.pm line\ 229.
See also https://sourceforge.net/p/net-snmp/bugs/2712/.
--- perl/agent/Support/Makefile.PL.orig Mon Dec 8 20:23:22 2014
+++ perl/agent/Support/Makefile.PL Wed Oct 12 10:49:44 2016
@@ -3,14 +3,11 @@ require 5;
use Config;
use Getopt::Long;
my $lib_version;
-my %MakeParams = ();
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
-%MakeParams = InitMakeParams();
-
-WriteMakefile(%MakeParams);
+WriteMakefile(InitMakeParams());
Check_Version();

View File

@ -1,30 +0,0 @@
$OpenBSD: patch-perl_agent_default_store_Makefile_PL,v 1.1 2016/10/12 10:50:33 sthen Exp $
commit 4e793461e96a2b4fd81142ab312d074d5c8841fa
Author: Bart Van Assche <bvanassche@acm.org>
Date: Sat Jul 23 18:41:10 2016 -0700
CHANGES: BUG: 2712: Fix Perl module compilation
Avoid that building the Net-SNMP Perl modules fails as follows:
ERROR from evaluation of /sources/net-snmp-5.7.3/perl/ASN/Makefile.PL: Bizarre \ copy of HASH in list assi
gnment at /usr/lib/perl5/site_perl/5.24.0/Carp.pm line\ 229.
See also https://sourceforge.net/p/net-snmp/bugs/2712/.
--- perl/agent/default_store/Makefile.PL.orig Mon Dec 8 20:23:22 2014
+++ perl/agent/default_store/Makefile.PL Wed Oct 12 10:49:44 2016
@@ -3,11 +3,8 @@ require 5;
use Config;
use Getopt::Long;
my $lib_version;
-my %MakeParams = ();
-%MakeParams = InitMakeParams();
-
-WriteMakefile(%MakeParams);
+WriteMakefile(InitMakeParams());
Check_Version();

View File

@ -1,31 +0,0 @@
$OpenBSD: patch-perl_default_store_Makefile_PL,v 1.1 2016/10/12 10:50:33 sthen Exp $
commit 4e793461e96a2b4fd81142ab312d074d5c8841fa
Author: Bart Van Assche <bvanassche@acm.org>
Date: Sat Jul 23 18:41:10 2016 -0700
CHANGES: BUG: 2712: Fix Perl module compilation
Avoid that building the Net-SNMP Perl modules fails as follows:
ERROR from evaluation of /sources/net-snmp-5.7.3/perl/ASN/Makefile.PL: Bizarre \ copy of HASH in list assi
gnment at /usr/lib/perl5/site_perl/5.24.0/Carp.pm line\ 229.
See also https://sourceforge.net/p/net-snmp/bugs/2712/.
--- perl/default_store/Makefile.PL.orig Mon Dec 8 20:23:22 2014
+++ perl/default_store/Makefile.PL Wed Oct 12 10:49:44 2016
@@ -3,12 +3,8 @@ require 5;
use Config;
use Getopt::Long;
my $lib_version;
-my %MakeParams = ();
-%MakeParams = InitMakeParams();
-
-WriteMakefile(%MakeParams);
-
+WriteMakefile(InitMakeParams());
sub InitMakeParams {
my $opts;

View File

@ -1,148 +0,0 @@
$OpenBSD: patch-snmplib_int64_c,v 1.1 2016/10/12 10:50:33 sthen Exp $
commit 477b4307ef12ddce3b6a9205e0bdddbfb2e0e9b6
Author: Bart Van Assche <bvanassche@acm.org>
Date: Sat Feb 20 18:58:18 2016 -0800
Remove U64 typedef
The U64 typedef conflicts with a typedef in a Perl header file. Hence
remove the U64 typedef from the Net-SNMP header files. This patch does
not modify the Net-SNMP ABI.
--- snmplib/int64.c.orig Mon Dec 8 20:23:22 2014
+++ snmplib/int64.c Wed Oct 12 10:50:36 2016
@@ -33,7 +33,7 @@
* @param[out] puR Remainder.
*/
void
-divBy10(U64 u64, U64 * pu64Q, unsigned int *puR)
+divBy10(struct counter64 u64, struct counter64 *pu64Q, unsigned int *puR)
{
unsigned long ulT;
unsigned long ulQ;
@@ -83,7 +83,7 @@ divBy10(U64 u64, U64 * pu64Q, unsigned int *puR)
* @param[out] pu64P Product.
*/
void
-multBy10(U64 u64, U64 * pu64P)
+multBy10(struct counter64 u64, struct counter64 *pu64P)
{
unsigned long ulT;
unsigned long ulP;
@@ -130,7 +130,7 @@ multBy10(U64 u64, U64 * pu64P)
*
*/
void
-incrByU16(U64 * pu64, unsigned int u16)
+incrByU16(struct counter64 *pu64, unsigned int u16)
{
incrByU32(pu64, u16);
}
@@ -143,7 +143,7 @@ incrByU16(U64 * pu64, unsigned int u16)
*
*/
void
-incrByU32(U64 * pu64, unsigned int u32)
+incrByU32(struct counter64 *pu64, unsigned int u32)
{
uint32_t tmp;
@@ -161,7 +161,7 @@ incrByU32(U64 * pu64, unsigned int u32)
* @param[out] pu64out pu64one - pu64two.
*/
void
-u64Subtract(const U64 * pu64one, const U64 * pu64two, U64 * pu64out)
+u64Subtract(const struct counter64 *pu64one, const struct counter64 *pu64two, struct counter64 *pu64out)
{
int carry;
@@ -177,7 +177,7 @@ u64Subtract(const U64 * pu64one, const U64 * pu64two,
* @param[in,out] pu64out pu64out += pu64one.
*/
void
-u64Incr(U64 * pu64out, const U64 * pu64one)
+u64Incr(struct counter64 *pu64out, const struct counter64 *pu64one)
{
pu64out->high = (uint32_t)(pu64out->high + pu64one->high);
incrByU32(pu64out, pu64one->low);
@@ -191,9 +191,9 @@ u64Incr(U64 * pu64out, const U64 * pu64one)
* @param[out] pu64out pu64out += (pu64one - pu64two)
*/
void
-u64UpdateCounter(U64 * pu64out, const U64 * pu64one, const U64 * pu64two)
+u64UpdateCounter(struct counter64 *pu64out, const struct counter64 *pu64one, const struct counter64 *pu64two)
{
- U64 tmp;
+ struct counter64 tmp;
u64Subtract(pu64one, pu64two, &tmp);
u64Incr(pu64out, &tmp);
@@ -208,7 +208,7 @@ netsnmp_feature_child_of(u64copy, netsnmp_unused)
* @param[out] pu64one Where to store the copy - *pu64one = *pu64two.
*/
void
-u64Copy(U64 * pu64one, const U64 * pu64two)
+u64Copy(struct counter64 *pu64one, const struct counter64 *pu64two)
{
*pu64one = *pu64two;
}
@@ -220,7 +220,7 @@ u64Copy(U64 * pu64one, const U64 * pu64two)
* @param[in] pu64 Number to be zeroed.
*/
void
-zeroU64(U64 * pu64)
+zeroU64(struct counter64 *pu64)
{
pu64->low = 0;
pu64->high = 0;
@@ -232,7 +232,7 @@ zeroU64(U64 * pu64)
* @param[in] pu64 Number to be checked.
*/
int
-isZeroU64(const U64 * pu64)
+isZeroU64(const struct counter64 *pu64)
{
return pu64->low == 0 && pu64->high == 0;
}
@@ -390,10 +390,10 @@ netsnmp_c64_check32_and_update(struct counter64 *prev_
/** Convert an unsigned 64-bit number to ASCII. */
void
printU64(char *buf, /* char [I64CHARSZ+1]; */
- const U64 * pu64)
+ const struct counter64 *pu64)
{
- U64 u64a;
- U64 u64b;
+ struct counter64 u64a;
+ struct counter64 u64b;
char aRes[I64CHARSZ + 1];
unsigned int u;
@@ -414,9 +414,9 @@ printU64(char *buf, /* char [I64CHARSZ+1]; */
/** Convert a signed 64-bit number to ASCII. */
void
printI64(char *buf, /* char [I64CHARSZ+1]; */
- const U64 * pu64)
+ const struct counter64 *pu64)
{
- U64 u64a;
+ struct counter64 u64a;
if (pu64->high & 0x80000000) {
u64a.high = (uint32_t) ~pu64->high;
@@ -429,11 +429,11 @@ printI64(char *buf, /* char [I64CHARSZ+1]; */
}
}
-/** Convert a signed 64-bit integer from ASCII to U64. */
+/** Convert a signed 64-bit integer from ASCII to struct counter64. */
int
-read64(U64 * i64, const char *str)
+read64(struct counter64 *i64, const char *str)
{
- U64 i64p;
+ struct counter64 i64p;
unsigned int u;
int sign = 0;
int ok = 0;

View File

@ -1,28 +0,0 @@
$OpenBSD: patch-snmplib_read_config_c,v 1.3 2016/10/12 10:50:33 sthen Exp $
commit 477b4307ef12ddce3b6a9205e0bdddbfb2e0e9b6
Author: Bart Van Assche <bvanassche@acm.org>
Date: Sat Feb 20 18:58:18 2016 -0800
Remove U64 typedef
The U64 typedef conflicts with a typedef in a Perl header file. Hence
remove the U64 typedef from the Net-SNMP header files. This patch does
not modify the Net-SNMP ABI.
--- snmplib/read_config.c.orig Mon Dec 8 20:23:22 2014
+++ snmplib/read_config.c Wed Oct 12 10:50:36 2016
@@ -2270,10 +2270,10 @@ read_config_read_memory(int type, char *readfrom,
return readfrom;
case ASN_COUNTER64:
- if (*len < sizeof(U64))
+ if (*len < sizeof(struct counter64))
return NULL;
- *len = sizeof(U64);
- read64((U64 *) dataptr, readfrom);
+ *len = sizeof(struct counter64);
+ read64((struct counter64 *) dataptr, readfrom);
readfrom = skip_token(readfrom);
return readfrom;
}

View File

@ -1,149 +0,0 @@
$OpenBSD: patch-snmplib_snmp_api_c,v 1.7 2018/04/26 14:18:22 sthen Exp $
https://support.zabbix.com/browse/ZBX-12726
https://sourceforge.net/p/net-snmp/bugs/2803/
https://sourceforge.net/p/net-snmp/code/ci/f23bcd3ac6ddee5d0a48f9703007ccc738914791/
Index: snmplib/snmp_api.c
--- snmplib/snmp_api.c.orig
+++ snmplib/snmp_api.c
@@ -1548,6 +1548,9 @@ _sess_open(netsnmp_session * in_session)
clientaddr_save =
netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID,
NETSNMP_DS_LIB_CLIENT_ADDR);
+ if (NULL != clientaddr_save)
+ clientaddr_save = strdup(clientaddr_save);
+
netsnmp_ds_set_string(NETSNMP_DS_LIBRARY_ID,
NETSNMP_DS_LIB_CLIENT_ADDR,
in_session->localname);
@@ -1565,9 +1568,11 @@ _sess_open(netsnmp_session * in_session)
NULL);
}
- if (NULL != clientaddr_save)
+ if (NULL != clientaddr_save) {
netsnmp_ds_set_string(NETSNMP_DS_LIBRARY_ID,
NETSNMP_DS_LIB_CLIENT_ADDR, clientaddr_save);
+ free(clientaddr_save);
+ }
}
if (transport == NULL) {
@@ -4350,10 +4355,9 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t
u_char type;
u_char msg_type;
u_char *var_val;
- int badtype = 0;
size_t len;
size_t four;
- netsnmp_variable_list *vp = NULL;
+ netsnmp_variable_list *vp = NULL, *vplast = NULL;
oid objid[MAX_OID_LEN];
u_char *p;
@@ -4493,38 +4497,24 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t
(ASN_SEQUENCE | ASN_CONSTRUCTOR),
"varbinds");
if (data == NULL)
- return -1;
+ goto fail;
/*
* get each varBind sequence
*/
while ((int) *length > 0) {
- netsnmp_variable_list *vptemp;
- vptemp = (netsnmp_variable_list *) malloc(sizeof(*vptemp));
- if (NULL == vptemp) {
- return -1;
- }
- if (NULL == vp) {
- pdu->variables = vptemp;
- } else {
- vp->next_variable = vptemp;
- }
- vp = vptemp;
+ vp = SNMP_MALLOC_TYPEDEF(netsnmp_variable_list);
+ if (NULL == vp)
+ goto fail;
- vp->next_variable = NULL;
- vp->val.string = NULL;
vp->name_length = MAX_OID_LEN;
- vp->name = NULL;
- vp->index = 0;
- vp->data = NULL;
- vp->dataFreeHook = NULL;
DEBUGDUMPSECTION("recv", "VarBind");
data = snmp_parse_var_op(data, objid, &vp->name_length, &vp->type,
&vp->val_len, &var_val, length);
if (data == NULL)
- return -1;
+ goto fail;
if (snmp_set_var_objid(vp, objid, vp->name_length))
- return -1;
+ goto fail;
len = MAX_PACKET_LENGTH;
DEBUGDUMPHEADER("recv", "Value");
@@ -4604,7 +4594,7 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t
vp->val.string = (u_char *) malloc(vp->val_len);
}
if (vp->val.string == NULL) {
- return -1;
+ goto fail;
}
p = asn_parse_string(var_val, &len, &vp->type, vp->val.string,
&vp->val_len);
@@ -4619,7 +4609,7 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t
vp->val_len *= sizeof(oid);
vp->val.objid = (oid *) malloc(vp->val_len);
if (vp->val.objid == NULL) {
- return -1;
+ goto fail;
}
memmove(vp->val.objid, objid, vp->val_len);
break;
@@ -4631,21 +4621,37 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t
case ASN_BIT_STR:
vp->val.bitstring = (u_char *) malloc(vp->val_len);
if (vp->val.bitstring == NULL) {
- return -1;
+ goto fail;
}
p = asn_parse_bitstring(var_val, &len, &vp->type,
vp->val.bitstring, &vp->val_len);
if (!p)
- return -1;
+ goto fail;
break;
default:
snmp_log(LOG_ERR, "bad type returned (%x)\n", vp->type);
- badtype = -1;
+ goto fail;
break;
}
DEBUGINDENTADD(-4);
+
+ if (NULL == vplast) {
+ pdu->variables = vp;
+ } else {
+ vplast->next_variable = vp;
+ }
+ vplast = vp;
+ vp = NULL;
}
- return badtype;
+ return 0;
+
+ fail:
+ DEBUGMSGTL(("recv", "error while parsing VarBindList\n"));
+ /** if we were parsing a var, remove it from the pdu and free it */
+ if (vp)
+ snmp_free_var(vp);
+
+ return -1;
}
/*

View File

@ -1,56 +0,0 @@
$OpenBSD: patch-testing_fulltests_unit-tests_T015int64_clib_c,v 1.1 2016/10/12 10:50:33 sthen Exp $
commit 477b4307ef12ddce3b6a9205e0bdddbfb2e0e9b6
Author: Bart Van Assche <bvanassche@acm.org>
Date: Sat Feb 20 18:58:18 2016 -0800
Remove U64 typedef
The U64 typedef conflicts with a typedef in a Perl header file. Hence
remove the U64 typedef from the Net-SNMP header files. This patch does
not modify the Net-SNMP ABI.
--- testing/fulltests/unit-tests/T015int64_clib.c.orig Mon Dec 8 20:23:22 2014
+++ testing/fulltests/unit-tests/T015int64_clib.c Wed Oct 12 10:50:36 2016
@@ -1,4 +1,4 @@
-/* HEADER Testing 64-bit integer operations (U64). */
+/* HEADER Testing 64-bit integer operations (struct counter64). */
int i, j;
char buf[22];
@@ -15,7 +15,7 @@ static const int64_t intval[] = {
};
for (i = 0; i < sizeof(intval)/sizeof(intval[0]); ++i) {
- U64 a, b;
+ struct counter64 a, b;
a.low = (uint32_t)intval[i];
a.high = (uint32_t)(intval[i] >> 32);
printI64(buf, &a);
@@ -27,7 +27,7 @@ for (i = 0; i < sizeof(intval)/sizeof(intval[0]); ++i)
for (i = 0; i < sizeof(intval)/sizeof(intval[0]); ++i) {
for (j = i; j < sizeof(intval)/sizeof(intval[0]); ++j) {
- U64 a, b;
+ struct counter64 a, b;
uint64_t d;
a.low = (uint32_t)intval[i];
a.high = (uint32_t)(intval[i] >> 32);
@@ -43,7 +43,7 @@ for (i = 0; i < sizeof(intval)/sizeof(intval[0]); ++i)
for (i = 0; i < sizeof(intval)/sizeof(intval[0]); ++i) {
for (j = i; j < sizeof(intval)/sizeof(intval[0]); ++j) {
- U64 a, b, c;
+ struct counter64 a, b, c;
uint64_t d;
a.low = (uint32_t)intval[i];
a.high = (uint32_t)(intval[i] >> 32);
@@ -58,7 +58,7 @@ for (i = 0; i < sizeof(intval)/sizeof(intval[0]); ++i)
}
{
- U64 old_val, new_val;
+ struct counter64 old_val, new_val;
old_val.low = 7;
old_val.high = 0;
new_val = old_val;

View File

@ -1,22 +1,26 @@
Simple Network Management Protocol (SNMP) is a widely used protocol for
monitoring the health of network equipment (eg. routers), computer equipment
and even devices like UPSs. Net-SNMP is a suite of applications used to
implement SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6.
monitoring health and statistics of many types of equipment (e.g. routers,
computers, printers, power systems, environmental monitors, etc).
Net-SNMP provides a library, daemons and utilities:
This package includes the Net-SNMP library, snmpd (an extensible agent
for responding to SNMP queries for management information with built-in
support for a wide range of MIB information modules), snmptrapd (a daemon
to receive and log or forward SNMP notifications), and various command-
line applications to:
- snmpd responds to SNMP queries. It has built-in support for a wide
range of information, and can be extended. Not to be confused with the
SNMP daemon in the OpenBSD base OS which is recommended in most cases.
Manuals are netsnmp-snmpd(8) and netsnmp-snmpd.conf(5) to avoid conflict.
- retrieve information from an SNMP-capable device, either using single
requests (snmpget, snmpgetnext), or multiple requests (snmpwalk,
snmptable, snmpdelta).
- manipulate configuration information on an SNMP-capable device (snmpset).
- retrieve a fixed collection of information from an SNMP-capable device
(snmpdf, snmpnetstat, snmpstatus).
- convert between numerical and textual forms of MIB OIDs, and display
MIB content and structure (snmptranslate).
- snmptrapd receives notifications from devices (TRAP and INFORM).
It can log, run external handlers, or forward over the network.
Note that to avoid conflicts, the snmpd.conf(5) and snmpd(8) manpages
are installed with a "netsnmp-" prefix e.g. netsnmp-snmpd(8).
- tools for standard queries (snmpget*, snmpwalk, snmpbulk*), writes
(snmpset), and sending notifications (snmpinform, snmptrap).
- tools with special output types; snmpdelta displays differences over
time, snmptable collates information from SNMP tables (e.g. ifTable),
and there are single-purpose tools like snmpstatus, snmpdf, snmpps,
snmptop, snmpnetstat.
- snmptransate converts between numerical and textual forms of MIB OIDs,
and displays MIB content and structure>
Flavor:
readonly - removes all SET support from the code.

View File

@ -0,0 +1,6 @@
@comment $OpenBSD: PFRAG.no-readonly-main,v 1.1 2018/06/02 20:53:37 sthen Exp $
@bin bin/encode_keychange
@bin bin/snmpping
@bin bin/snmpset
@bin bin/snmpusm
@bin bin/snmpvacm

View File

@ -1,12 +1,18 @@
@comment $OpenBSD: PLIST-main,v 1.21 2016/05/12 22:00:14 sthen Exp $
@newgroup _netsnmp:760
@newuser _netsnmp:760:_netsnmp:daemon:Net-SNMP user:/nonexistent:/sbin/nologin
@comment $OpenBSD: PLIST-main,v 1.22 2018/06/02 20:53:37 sthen Exp $
@conflict p5-SNMP-*
@pkgpath net/net-snmp
@pkgpath net/net-snmp,-perl
@newgroup _netsnmp:760
@newuser _netsnmp:760:_netsnmp:daemon:Net-SNMP user:/nonexistent:/sbin/nologin
@extraunexec rm -rf /var/net-snmp/*
!%%readonly%%
@rcscript ${RCDIR}/netsnmpd
@rcscript ${RCDIR}/netsnmptrapd
@sample ${LOCALSTATEDIR}/net-snmp/
@extra ${SYSCONFDIR}/snmp/snmp.conf
@extra ${SYSCONFDIR}/snmp/snmptrapd.conf
@bin bin/agentxtrap
@bin bin/encode_keychange
bin/checkbandwidth
bin/fixproc
@comment bin/ipf-mod.pl
bin/mib2c
@ -17,7 +23,6 @@ bin/net-snmp-create-v3-user
bin/snmp-bridge-mib
@bin bin/snmpbulkget
@bin bin/snmpbulkwalk
bin/snmpcheck
bin/snmpconf
@bin bin/snmpdelta
@bin bin/snmpdf
@ -25,14 +30,13 @@ bin/snmpconf
@bin bin/snmpgetnext
bin/snmpinform
@bin bin/snmpnetstat
@bin bin/snmpset
@comment @bin bin/snmpps
@bin bin/snmpstatus
@bin bin/snmptable
@bin bin/snmptest
@comment bin/snmptop
@bin bin/snmptranslate
@bin bin/snmptrap
@bin bin/snmpusm
@bin bin/snmpvacm
@bin bin/snmpwalk
bin/traptoemail
include/net-snmp/
@ -60,6 +64,7 @@ include/net-snmp/agent/mib_modules.h
include/net-snmp/agent/mode_end_call.h
include/net-snmp/agent/multiplexer.h
include/net-snmp/agent/net-snmp-agent-includes.h
include/net-snmp/agent/netsnmp_close_fds.h
include/net-snmp/agent/null.h
include/net-snmp/agent/old_api.h
include/net-snmp/agent/read_only.h
@ -116,6 +121,7 @@ include/net-snmp/library/lcd_time.h
include/net-snmp/library/md5.h
include/net-snmp/library/mib.h
include/net-snmp/library/mt_support.h
include/net-snmp/library/netsnmp-attribute-format.h
include/net-snmp/library/oid.h
include/net-snmp/library/oid_stash.h
include/net-snmp/library/parse.h
@ -179,6 +185,13 @@ include/net-snmp/system/bsdi4.h
include/net-snmp/system/cygwin.h
include/net-snmp/system/darwin.h
include/net-snmp/system/darwin10.h
include/net-snmp/system/darwin11.h
include/net-snmp/system/darwin12.h
include/net-snmp/system/darwin13.h
include/net-snmp/system/darwin14.h
include/net-snmp/system/darwin15.h
include/net-snmp/system/darwin16.h
include/net-snmp/system/darwin17.h
include/net-snmp/system/darwin7.h
include/net-snmp/system/darwin8.h
include/net-snmp/system/darwin9.h
@ -199,11 +212,17 @@ include/net-snmp/system/freebsd9.h
include/net-snmp/system/generic.h
include/net-snmp/system/hpux.h
include/net-snmp/system/irix.h
include/net-snmp/system/kfreebsd.h
include/net-snmp/system/linux.h
include/net-snmp/system/mingw32.h
include/net-snmp/system/mingw32msvc.h
include/net-snmp/system/mips.h
include/net-snmp/system/netbsd.h
include/net-snmp/system/nto-qnx6.h
include/net-snmp/system/openbsd.h
include/net-snmp/system/openbsd4.h
include/net-snmp/system/openbsd5.h
include/net-snmp/system/openbsd6.h
include/net-snmp/system/osf5.h
include/net-snmp/system/solaris.h
include/net-snmp/system/solaris2.3.h
@ -235,7 +254,7 @@ lib/libnetsnmptrapd.la
@lib lib/libnetsnmptrapd.so.${LIBnetsnmptrapd_VERSION}
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/Bundle/
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/Bundle/Makefile.subs.pl
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/Bundle/MakefileSubs.pm
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/NetSNMP/
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/NetSNMP/ASN.pm
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/NetSNMP/OID.pm
@ -288,10 +307,12 @@ libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/auto/SNMP/autosplit.ix
@man man/man1/snmpgetnext.1
@man man/man1/snmpinform.1
@man man/man1/snmpnetstat.1
@man man/man1/snmpps.1
@man man/man1/snmpset.1
@man man/man1/snmpstatus.1
@man man/man1/snmptable.1
@man man/man1/snmptest.1
@man man/man1/snmptop.1
@man man/man1/snmptranslate.1
@man man/man1/snmptrap.1
@man man/man1/snmpusm.1
@ -508,6 +529,7 @@ share/snmp/mib2c.iterate_access.conf
share/snmp/mib2c.mfd.conf
share/snmp/mib2c.notify.conf
share/snmp/mib2c.old-api.conf
share/snmp/mib2c.org-mode.conf
share/snmp/mib2c.perl.conf
share/snmp/mib2c.raw-table.conf
share/snmp/mib2c.scalar.conf
@ -566,6 +588,7 @@ share/snmp/mibs/SNMP-TSM-MIB.txt
share/snmp/mibs/SNMP-USER-BASED-SM-MIB.txt
share/snmp/mibs/SNMP-USM-AES-MIB.txt
share/snmp/mibs/SNMP-USM-DH-OBJECTS-MIB.txt
share/snmp/mibs/SNMP-USM-HMAC-SHA2-MIB.txt
share/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.txt
share/snmp/mibs/SNMPv2-CONF.txt
share/snmp/mibs/SNMPv2-MIB.txt
@ -606,8 +629,3 @@ share/snmp/snmpconf-data/snmptrapd-data/logging
share/snmp/snmpconf-data/snmptrapd-data/runtime
share/snmp/snmpconf-data/snmptrapd-data/snmpconf-config
share/snmp/snmpconf-data/snmptrapd-data/traphandle
@sample /var/net-snmp/
@extra ${SYSCONFDIR}/snmp/snmp.conf
@extra ${SYSCONFDIR}/snmp/snmptrapd.conf
@rcscript ${RCDIR}/netsnmpd
@rcscript ${RCDIR}/netsnmptrapd

View File

@ -1,4 +1,5 @@
@comment $OpenBSD: PLIST-tkmib,v 1.1 2009/08/17 14:58:45 giovanni Exp $
@conflict net-snmp-<5.4.2.1p3
@comment $OpenBSD: PLIST-tkmib,v 1.2 2018/06/02 20:53:37 sthen Exp $
@conflict net-snmp-<5.8rc3
bin/snmpcheck
bin/tkmib
@man man/man1/tkmib.1