aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/net-snmp
diff options
context:
space:
mode:
authorRyan Steinmetz <zi@FreeBSD.org>2012-10-13 01:07:32 +0000
committerRyan Steinmetz <zi@FreeBSD.org>2012-10-13 01:07:32 +0000
commit5437390ccc10c1594062ef7985cb3d2df34b9603 (patch)
tree9c6fee9a76c0f4e2cd213c161128ed7aa63a2882 /net-mgmt/net-snmp
parentd33306f1f657e178b5cf3c361a445b77b1ea8714 (diff)
downloadports-5437390ccc10c1594062ef7985cb3d2df34b9603.tar.gz
ports-5437390ccc10c1594062ef7985cb3d2df34b9603.zip
Notes
Diffstat (limited to 'net-mgmt/net-snmp')
-rw-r--r--net-mgmt/net-snmp/Makefile92
-rw-r--r--net-mgmt/net-snmp/distinfo4
-rw-r--r--net-mgmt/net-snmp/files/extra-patch-local:Makefile.in4
-rw-r--r--net-mgmt/net-snmp/files/patch-Makefile.in11
-rw-r--r--net-mgmt/net-snmp/files/patch-agent-mibgroup-hardware-fsys-fsys_getfsstats.c32
-rw-r--r--net-mgmt/net-snmp/files/patch-agent__Makefile.in11
-rw-r--r--net-mgmt/net-snmp/files/patch-agent__helpers__old_api.c11
-rw-r--r--net-mgmt/net-snmp/files/patch-agent__mibgroup__agent__extend.c13
-rw-r--r--net-mgmt/net-snmp/files/patch-agent__mibgroup__hardware__fsys__hw_fsys.c11
-rw-r--r--net-mgmt/net-snmp/files/patch-agent__mibgroup__host__data_access__swinst_apt.c11
-rw-r--r--net-mgmt/net-snmp/files/patch-agent__mibgroup__host__data_access__swrun_kinfo.c11
-rw-r--r--net-mgmt/net-snmp/files/patch-agent__mibgroup__sctp-mib__sctpTables_freebsd.c10
-rw-r--r--net-mgmt/net-snmp/files/patch-agent__mibgroup__ucd-snmp__disk_hw.c55
-rw-r--r--net-mgmt/net-snmp/files/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c36
-rw-r--r--net-mgmt/net-snmp/files/patch-auto_nlist.c32
-rw-r--r--net-mgmt/net-snmp/files/patch-configure11
-rw-r--r--net-mgmt/net-snmp/files/patch-freebsd10.h5
-rw-r--r--net-mgmt/net-snmp/files/patch-freebsd8.h5
-rw-r--r--net-mgmt/net-snmp/files/patch-freebsd9.h5
-rw-r--r--net-mgmt/net-snmp/files/patch-generic.h14
-rw-r--r--net-mgmt/net-snmp/files/patch-hr_storage.h11
-rw-r--r--net-mgmt/net-snmp/files/patch-hr_system.c11
-rw-r--r--net-mgmt/net-snmp/files/patch-include-net-snmp_net-snmp-config.h.in11
-rw-r--r--net-mgmt/net-snmp/files/patch-local:fixproc90
-rw-r--r--net-mgmt/net-snmp/files/patch-local:ipf-mod.pl21
-rw-r--r--net-mgmt/net-snmp/files/patch-local:mib2c21
-rw-r--r--net-mgmt/net-snmp/files/patch-local:snmpcheck.def8
-rw-r--r--net-mgmt/net-snmp/files/patch-local:snmpconf35
-rw-r--r--net-mgmt/net-snmp/files/patch-local:tkmib9
-rw-r--r--net-mgmt/net-snmp/files/patch-local:traptoemail16
-rw-r--r--net-mgmt/net-snmp/files/patch-ltmain.sh11
-rw-r--r--net-mgmt/net-snmp/files/patch-net-snmp-includes.h13
-rw-r--r--net-mgmt/net-snmp/files/patch-sctpScalars.h11
-rw-r--r--net-mgmt/net-snmp/files/patch-sctpTables.h11
-rw-r--r--net-mgmt/net-snmp/files/patch-sctpTables_common.h11
-rw-r--r--net-mgmt/net-snmp/files/patch-snmplib__snmp_api.c23
-rw-r--r--net-mgmt/net-snmp/files/patch-snmplib__system.c35
-rw-r--r--net-mgmt/net-snmp/files/pkg-message.in (renamed from net-mgmt/net-snmp/pkg-message)6
-rw-r--r--net-mgmt/net-snmp/pkg-descr12
-rw-r--r--net-mgmt/net-snmp/pkg-plist5
40 files changed, 65 insertions, 690 deletions
diff --git a/net-mgmt/net-snmp/Makefile b/net-mgmt/net-snmp/Makefile
index 4e76bd296cef..cbd5b07fbb88 100644
--- a/net-mgmt/net-snmp/Makefile
+++ b/net-mgmt/net-snmp/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= snmp
-PORTVERSION= 5.7.1
-PORTREVISION= 7
+PORTVERSION= 5.7.2
CATEGORIES= net-mgmt ipv6
MASTER_SITES= SF/net-${PORTNAME}/net-${PORTNAME}/${PORTVERSION}
PKGNAMEPREFIX= net-
@@ -17,18 +16,19 @@ MAINTAINER= zi@FreeBSD.org
COMMENT= An extendable SNMP implementation
LICENSE= BSD
+LICENSE_FILE= ${WRKSRC}/COPYING
-OPTIONS= IPV6 "Build with IPv6 support" on \
- MFD_REWRITES "Build with 64-bit Interface Counters" off \
- PERL "Install additional perl modules" on \
- PERL_EMBEDDED "Build embedded perl" on \
- PYTHON "Install additional python modules" off \
- DUMMY "Enable dummy values as placeholders" on \
- TKMIB "Install graphical MIB browser" off \
- DMALLOC "Enable dmalloc debug memory allocator" off \
- MYSQL "Enable logging of traps to MySQL" off \
- AX_SOCKONLY "Disable UDP/TCP transports for agentx" off \
- UNPRIVILEGED "Allow unprivileged users to execute net-snmp" off
+OPTIONS_DEFINE= IPV6 MFD_REWRITES PERL PERL_EMBEDDED PYTHON DUMMY TKMIB \
+ DMALLOC MYSQL AX_SOCKONLY UNPRIVILEGED
+OPTIONS_DEFAULT=IPV6 PERL PERL_EMBEDDED DUMMY
+
+MFD_REWRITES_DESC= Build with 64-bit Interface Counters
+PERL_EMBEDDED_DESC= Build embedded perl
+DUMMY_DESC= Enable dummy values as placeholders
+TKMIB_DESC= Install graphical MIB browser
+DMALLOC_DESC= Enable dmalloc debug memory allocator
+AX_SOCKONLY_DESC= Disable UDP/TCP transports for agentx
+UNPRIVILEGED_DESC= Allow unprivileged users to execute net-snmp
.include <bsd.port.options.mk>
@@ -48,12 +48,13 @@ CONFIGURE_ARGS+=--enable-shared --enable-internal-md5 \
--with-logfile="${NET_SNMP_LOGFILE}" \
--with-persistent-directory="${NET_SNMP_PERSISTENTDIR}" \
--with-gnu-ld --with-libwrap --with-ldflags="-lm -lkvm -ldevstat"
+SUB_FILES= pkg-message
.if defined(BATCH)
CONFIGURE_ARGS+=--with-defaults
.endif
-.if defined(WITH_PYTHON)
+.if ${PORT_OPTIONS:MPYTHON}
# borrowed from bsd.python.mk and adapted for our needs
PYEASYINSTALL_CMD?= ${LOCALBASE}/bin/easy_install-${PYTHON_VER}
PYEASYINSTALL_BINDIR?= ${PREFIX}/bin
@@ -83,11 +84,11 @@ PLIST_SUB+= WITH_PYTHON="@comment "
.include <bsd.port.pre.mk>
CONFIGURE_ARGS+= --with-openssl="${OPENSSLBASE}"
-.if defined(WITH_DUMMY)
+.if ${PORT_OPTIONS:MDUMMY}
CONFIGURE_ARGS+=--with-dummy-values
.endif
-.if !defined(WITH_TKMIB)
+.if empty(${PORT_OPTIONS:MTKMIB})
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-local:Makefile.in
PLIST_SUB+= WITH_TKMIB="@comment "
.else
@@ -95,10 +96,10 @@ RUN_DEPENDS+= p5-Tk>=0:${PORTSDIR}/x11-toolkits/p5-Tk
PLIST_SUB+= WITH_TKMIB=""
.endif
-.if defined(WITH_PERL)
+.if ${PORT_OPTIONS:MPERL}
USE_PERL5= yes
CONFIGURE_ARGS+=--with-perl-modules
-.if defined(WITHOUT_PERL_EMBEDDED)
+.if empty(${PORT_OPTIONS:MPERL_EMBEDDED})
CONFIGURE_ARGS+=--disable-embedded-perl
PLIST_SUB+= WITH_PERL_EMBEDDED="@comment "
.else
@@ -113,23 +114,23 @@ PLIST_SUB+= WITH_PERL_EMBEDDED="@comment "
PLIST_SUB+= WITH_PERL="@comment "
.endif
-.if defined(WITH_DMALLOC)
+.if ${PORT_OPTIONS:MDMALLOC}
LIB_DEPENDS+= dmalloc:${PORTSDIR}/devel/dmalloc
CONFIGURE_ARGS+=--with-dmalloc=${LOCALBASE}
.endif
-.if defined(WITH_MYSQL)
+.if ${PORT_OPTIONS:MMYSQL}
USE_MYSQL= yes
CFLAGS+= -I${LOCALBASE}/include
CONFIGURE_ARGS+=--with-mysql
CONFIGURE_ENV+= MYSQLCONFIG=${LOCALBASE}/bin/mysql_config
.endif
-.if defined(WITH_AX_SOCKONLY)
+.if ${PORT_OPTIONS:MAX_SOCKONLY}
CONFIGURE_ARGS+=--enable-agentx-dom-sock-only
.endif
-.if defined(WITH_IPV6)
+.if ${PORT_OPTIONS:MIPV6}
CONFIGURE_ARGS+=--enable-ipv6
# --with-transport="UDPIPv6 TCPIPv6" --with-modules=mibII/ipv6"
PLIST_SUB+= WITH_IPV6=""
@@ -137,7 +138,7 @@ PLIST_SUB+= WITH_IPV6=""
PLIST_SUB+= WITH_IPV6="@comment "
.endif
-.if defined(WITH_UNPRIVILEGED)
+.if ${PORT_OPTIONS:MUNPRIVILEGED}
CONFIGURE_ARGS+=--without-root-access
.endif
@@ -160,7 +161,7 @@ NET_SNMP_WITH_MIB_MODULE_LIST+= sctp-mib
CONFIGURE_ARGS+= --with-libs="-lssp_nonshared"
.endif
-.if defined(WITH_MFD_REWRITES)
+.if ${PORT_OPTIONS:MMFD_REWRITES}
CONFIGURE_ARGS+=--enable-mfd-rewrites
NET_SNMP_WITH_MIB_MODULE_LIST+= if-mib
.endif
@@ -189,17 +190,15 @@ MAN3= add_mibdir.3 add_module_replacement.3 \
get_module_node.3 \
netsnmp_agent_api.3 netsnmp_config_api.3 netsnmp_init_mib.3 \
netsnmp_mib_api.3 netsnmp_pdu_api.3 netsnmp_read_module.3 \
- netsnmp_sess_api.3 netsnmp_session_api.3 netsnmp_trap_api.3 netsnmp_varbind_api.3 \
- print_description.3 print_mib.3 print_objid.3 print_value.3 \
- print_variable.3 read_all_mibs.3 \
+ netsnmp_sess_api.3 netsnmp_session_api.3 netsnmp_trap_api.3 \
+ netsnmp_varbind_api.3 print_description.3 print_mib.3 \
+ print_objid.3 print_value.3 print_variable.3 read_all_mibs.3 \
read_configs.3 read_config_print_usage.3 \
- read_mib.3 read_objid.3 \
- read_premib_configs.3 \
+ read_mib.3 read_objid.3 read_premib_configs.3 \
register_app_config_handler.3 \
register_config_handler.3 register_mib_handlers.3 \
send_easy_trap.3 send_trap_vars.3 send_v2trap.3 \
- shutdown_mib.3 \
- snmp_alarm.3 snmp_alarm_register.3 \
+ shutdown_mib.3 snmp_alarm.3 snmp_alarm_register.3 \
snmp_alarm_register_hr.3 snmp_alarm_unregister.3 \
snmp_api_errstring.3 snmp_close.3 \
snmp_error.3 snmp_free_pdu.3 snmp_open.3 snmp_perror.3 \
@@ -210,22 +209,25 @@ MAN3= add_mibdir.3 add_module_replacement.3 \
snmp_sess_read.3 snmp_sess_select_info.3 \
snmp_sess_send.3 snmp_sess_session.3 snmp_sess_timeout.3 \
snmp_set_mib_warnings.3 snmp_set_save_descriptions.3 \
- snmp_timeout.3 \
- snprint_objid.3 snprint_value.3 snprint_variable.3 \
- unregister_app_config_handler.3 \
+ snmp_timeout.3 snprint_objid.3 snprint_value.3 \
+ snprint_variable.3 unregister_app_config_handler.3 \
unregister_config_handler.3 \
unregister_all_config_handlers.3 \
- register_prenetsnmp_mib_handler.3 register_const_config_handler.3 register_app_prenetsnmp_mib_handler.3 \
+ register_prenetsnmp_mib_handler.3 \
+ register_const_config_handler.3 \
+ register_app_prenetsnmp_mib_handler.3 \
snprint_description.3 \
snmp_varlist_add_variable.3 \
snmp_set_var_value.3 \
snmp_set_var_typed_value.3 \
snmp_set_var_typed_integer.3 \
snmp_set_var_objid.3 \
- snmp_set_mib_errors.3 snmp_pdu_create.3 snmp_pdu_add_variable.3 snmp_parse_oid.3 snmp_free_varbind.3 \
- snmp_free_var.3 snmp_fix_pdu.3 snmp_clone_varbind.3 snmp_clone_pdu.3 snmp_add_null_var.3
+ snmp_set_mib_errors.3 snmp_pdu_create.3 \
+ snmp_pdu_add_variable.3 snmp_parse_oid.3 snmp_free_varbind.3 \
+ snmp_free_var.3 snmp_fix_pdu.3 snmp_clone_varbind.3 \
+ snmp_clone_pdu.3 snmp_add_null_var.3
-.if defined(WITH_PERL)
+.if ${PORT_OPTIONS:MPERL}
MAN3PERL= NetSNMP::ASN.3 NetSNMP::OID.3 NetSNMP::agent.3 \
NetSNMP::TrapReceiver.3 \
NetSNMP::agent::default_store.3 \
@@ -246,7 +248,7 @@ SBIN_FILES= snmpd snmptrapd
STARTUP_DIR= ${PREFIX}/etc/rc.d
SCRIPT_FILES= snmpcheck.def mib2c fixproc ipf-mod.pl snmpconf \
traptoemail
-.if defined(WITH_TKMIB)
+.if ${PORT_OPTIONS:MTKMIB}
SCRIPT_FILES+= tkmib
.endif
DOC_FILES= AGENT.txt COPYING FAQ NEWS README \
@@ -277,11 +279,11 @@ pre-everything::
post-patch:
.for filename in ${SCRIPT_FILES}
- ${REINPLACE_CMD} ${SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
- ${WRKSRC}/local/${filename}
+ ${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|' ${WRKSRC}/local/${filename}
.endfor
.if ${OSVERSION} >= 900007
- @${REINPLACE_CMD} -e 's!utmp_p->ut_name!utmp_p->ut_user!' ${WRKSRC}/agent/mibgroup/host/hr_system.c
+ @${REINPLACE_CMD} -e 's!utmp_p->ut_name!utmp_p->ut_user!' \
+ ${WRKSRC}/agent/mibgroup/host/hr_system.c
.endif
post-configure:
@@ -292,7 +294,7 @@ post-configure:
s!^.*#undef.*(HAVE_${hdr:U:S/./_/g:S/\//_/g}).*$$!#define \1 1!g' \
${WRKSRC}/include/net-snmp/net-snmp-config.h
.endfor
-.if defined(WITH_PYTHON)
+.if ${PORT_OPTIONS:MPYTHON}
@(cd ${WRKSRC}/python; \
${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} setopt -c bdist_egg \
-o plat-name -s "" --basedir=${WRKSRC}; \
@@ -301,7 +303,7 @@ post-configure:
.endif
post-build:
-.if defined(WITH_PERL)
+.if ${PORT_OPTIONS:MPERL}
${FIND} ${WRKSRC}/perl -name Makefile | \
${XARGS} ${REINPLACE_CMD} -E -e '\
s!^(PREFIX) = .*!\1 = ${PREFIX}!; \
@@ -314,7 +316,7 @@ post-build:
.endif
post-install: strip-files install-config-files install-doc-files display-message
- ${MKDIR} /var/agentx ${PREFIX}/etc/snmp
+ ${MKDIR} /var/agentx
strip-files:
cd ${PREFIX}/bin; ${STRIP_CMD} ${BIN_FILES}
diff --git a/net-mgmt/net-snmp/distinfo b/net-mgmt/net-snmp/distinfo
index 39aa1860c6e3..50963128ddb6 100644
--- a/net-mgmt/net-snmp/distinfo
+++ b/net-mgmt/net-snmp/distinfo
@@ -1,2 +1,2 @@
-SHA256 (net-snmp-5.7.1.tar.gz) = 7c71c9650c65b715356547e20ca2dbe6313944278af8cc19c32a5337f46b181f
-SIZE (net-snmp-5.7.1.tar.gz) = 6110619
+SHA256 (net-snmp-5.7.2.tar.gz) = 09ed31b4cc1f3c0411ef9a16eff79ef3b30d89c32ca46d5a01a41826c4ceb816
+SIZE (net-snmp-5.7.2.tar.gz) = 6281352
diff --git a/net-mgmt/net-snmp/files/extra-patch-local:Makefile.in b/net-mgmt/net-snmp/files/extra-patch-local:Makefile.in
index 75741c7aa1fe..db67c9f777ef 100644
--- a/net-mgmt/net-snmp/files/extra-patch-local:Makefile.in
+++ b/net-mgmt/net-snmp/files/extra-patch-local:Makefile.in
@@ -1,5 +1,5 @@
---- ./local/Makefile.in.orig 2011-11-24 11:55:41.000000000 -0500
-+++ ./local/Makefile.in 2011-11-24 11:55:48.000000000 -0500
+--- ./local/Makefile.in.orig 2012-06-12 10:48:43.000000000 -0400
++++ ./local/Makefile.in 2012-06-12 10:48:50.000000000 -0400
@@ -16,7 +16,7 @@
#
SNMPCONFPATH=@SNMPCONFPATH@
diff --git a/net-mgmt/net-snmp/files/patch-Makefile.in b/net-mgmt/net-snmp/files/patch-Makefile.in
deleted file mode 100644
index 6dc03d0b5201..000000000000
--- a/net-mgmt/net-snmp/files/patch-Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- Makefile.in.orig 2012-02-16 14:48:37.000000000 +0400
-+++ Makefile.in 2012-02-16 14:48:55.000000000 +0400
-@@ -19,7 +19,7 @@
- INCLUDESUBDIR=system
- INCLUDESUBDIRHEADERS= aix.h bsd.h bsdi3.h bsdi4.h bsdi.h cygwin.h \
- darwin.h darwin7.h darwin8.h darwin9.h darwin10.h dragonfly.h dynix.h \
-- freebsd2.h freebsd3.h freebsd4.h freebsd5.h freebsd6.h freebsd7.h freebsd8.h freebsd9.h freebsd.h \
-+ freebsd2.h freebsd3.h freebsd4.h freebsd5.h freebsd6.h freebsd7.h freebsd8.h freebsd9.h freebsd10.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 \
diff --git a/net-mgmt/net-snmp/files/patch-agent-mibgroup-hardware-fsys-fsys_getfsstats.c b/net-mgmt/net-snmp/files/patch-agent-mibgroup-hardware-fsys-fsys_getfsstats.c
deleted file mode 100644
index 604c9d2a6039..000000000000
--- a/net-mgmt/net-snmp/files/patch-agent-mibgroup-hardware-fsys-fsys_getfsstats.c
+++ /dev/null
@@ -1,32 +0,0 @@
---- agent/mibgroup/hardware/fsys/fsys_getfsstats.c.orig 2011-09-27 20:53:47.000000000 -0800
-+++ agent/mibgroup/hardware/fsys/fsys_getfsstats.c 2012-02-20 01:39:38.000000000 -0900
-@@ -150,9 +150,9 @@
- if (!entry)
- continue;
-
-- memcpy( entry->path, stats[i].f_mntonname, sizeof(entry->path) );
-+ strncpy( entry->path, stats[i].f_mntonname, sizeof(entry->path) );
- entry->path[sizeof(entry->path)-1] = '\0';
-- memcpy( entry->device, stats[i].f_mntfromname, sizeof(entry->device));
-+ strncpy( entry->device, stats[i].f_mntfromname, sizeof(entry->device));
- entry->device[sizeof(entry->device)-1] = '\0';
- entry->units = stats[i].f_bsize; /* or f_frsize */
- entry->size = stats[i].f_blocks;
-@@ -164,7 +164,7 @@
- entry->type = _fs_type( stats[i].f_fstypename );
- entry->flags |= NETSNMP_FS_FLAG_ACTIVE;
-
-- if (! stats[i].NSFS_FLAGS & MNT_LOCAL ) {
-+ if (! (stats[i].NSFS_FLAGS & MNT_LOCAL) ) {
- entry->flags |= NETSNMP_FS_FLAG_REMOTE;
- }
- if ( stats[i].NSFS_FLAGS & MNT_RDONLY ) {
-@@ -174,5 +174,8 @@
- entry->flags |= NETSNMP_FS_FLAG_BOOTABLE;
- }
- netsnmp_fsys_calculate32(entry);
-+ DEBUGMSGTL(("fsys:path", "flags on entry %s: 0x%08x\n", entry->path,
-+ entry->flags));
- }
-+ free(stats);
- }
diff --git a/net-mgmt/net-snmp/files/patch-agent__Makefile.in b/net-mgmt/net-snmp/files/patch-agent__Makefile.in
deleted file mode 100644
index ea77d690e368..000000000000
--- a/net-mgmt/net-snmp/files/patch-agent__Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./agent/Makefile.in.orig 2011-12-02 07:44:29.000000000 -0500
-+++ ./agent/Makefile.in 2011-12-02 07:45:06.000000000 -0500
-@@ -302,7 +302,7 @@
- $(RANLIB) $(AGENTLIB)
-
- libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION): ${LMIBOBJS} $(AGENTLIB) $(USELIBS)
-- $(LIB_LD_CMD) $(MIBLIB) ${LMIBOBJS} $(AGENTLIB) $(USELIBS) @LD_NO_UNDEFINED@ $(LDFLAGS) ${LMIBLIBS} $(LIB_LD_LIBS) @AGENTLIBS@
-+ $(LIB_LD_CMD) $(MIBLIB) ${LMIBOBJS} $(AGENTLIB) $(USELIBS) @LD_NO_UNDEFINED@ $(LDFLAGS) $(PERLLDOPTS_FOR_LIBS) ${LMIBLIBS} $(LIB_LD_LIBS) @AGENTLIBS@
- $(RANLIB) $(MIBLIB)
-
- agentlib: $(AGENTLIB)
diff --git a/net-mgmt/net-snmp/files/patch-agent__helpers__old_api.c b/net-mgmt/net-snmp/files/patch-agent__helpers__old_api.c
deleted file mode 100644
index b41f1804bb1f..000000000000
--- a/net-mgmt/net-snmp/files/patch-agent__helpers__old_api.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./agent/helpers/old_api.c.orig 2011-12-07 17:43:45.000000000 -0500
-+++ ./agent/helpers/old_api.c 2011-12-07 17:44:06.000000000 -0500
-@@ -127,7 +127,7 @@
- */
- if (netsnmp_register_handler(reginfo) != MIB_REGISTERED_OK) {
- /** netsnmp_handler_registration_free(reginfo); already freed */
-- SNMP_FREE(vp);
-+ /* SNMP_FREE(vp); already freed */
- }
- }
- return SNMPERR_SUCCESS;
diff --git a/net-mgmt/net-snmp/files/patch-agent__mibgroup__agent__extend.c b/net-mgmt/net-snmp/files/patch-agent__mibgroup__agent__extend.c
deleted file mode 100644
index b3aecfacb6bb..000000000000
--- a/net-mgmt/net-snmp/files/patch-agent__mibgroup__agent__extend.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- ./agent/mibgroup/agent/extend.c.orig 2011-09-28 00:53:47.000000000 -0400
-+++ ./agent/mibgroup/agent/extend.c 2012-04-26 22:32:10.000000000 -0400
-@@ -1380,6 +1380,10 @@
- * Determine which line we've been asked for....
- */
- line_idx = *table_info->indexes->next_variable->val.integer;
-+ if (line_idx < 1 || line_idx > extension->numlines) {
-+ netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE);
-+ continue;
-+ }
- cp = extension->lines[line_idx-1];
-
- /*
diff --git a/net-mgmt/net-snmp/files/patch-agent__mibgroup__hardware__fsys__hw_fsys.c b/net-mgmt/net-snmp/files/patch-agent__mibgroup__hardware__fsys__hw_fsys.c
deleted file mode 100644
index 8c9d7b2d708b..000000000000
--- a/net-mgmt/net-snmp/files/patch-agent__mibgroup__hardware__fsys__hw_fsys.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./agent/mibgroup/hardware/fsys/hw_fsys.c.orig 2012-01-27 09:59:29.000000000 -0500
-+++ ./agent/mibgroup/hardware/fsys/hw_fsys.c 2012-01-27 09:59:38.000000000 -0500
-@@ -334,6 +334,6 @@
-
- f->size_32 = s;
- f->units_32 = u;
-- f->avail_32 = f->avail << factor;
-- f->used_32 = f->used << factor;
-+ f->avail_32 = f->avail >> factor;
-+ f->used_32 = f->used >> factor;
- }
diff --git a/net-mgmt/net-snmp/files/patch-agent__mibgroup__host__data_access__swinst_apt.c b/net-mgmt/net-snmp/files/patch-agent__mibgroup__host__data_access__swinst_apt.c
deleted file mode 100644
index 7ae8ced0a844..000000000000
--- a/net-mgmt/net-snmp/files/patch-agent__mibgroup__host__data_access__swinst_apt.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./agent/mibgroup/host/data_access/swinst_apt.c.orig 2011-12-07 17:42:08.000000000 -0500
-+++ ./agent/mibgroup/host/data_access/swinst_apt.c 2011-12-07 17:42:15.000000000 -0500
-@@ -95,7 +95,7 @@
- entry->swDate_len = 8;
- memcpy(entry->swDate, "\0\0\1\1\0\0\0\0", 8);
- }
-- fclose(p);
-+ pclose(p);
- DEBUGMSGTL(("swinst:load:arch"," loaded %d entries\n",
- CONTAINER_SIZE(container)));
-
diff --git a/net-mgmt/net-snmp/files/patch-agent__mibgroup__host__data_access__swrun_kinfo.c b/net-mgmt/net-snmp/files/patch-agent__mibgroup__host__data_access__swrun_kinfo.c
deleted file mode 100644
index a2ebd9efe63d..000000000000
--- a/net-mgmt/net-snmp/files/patch-agent__mibgroup__host__data_access__swrun_kinfo.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./agent/mibgroup/host/data_access/swrun_kinfo.c.orig 2011-12-16 07:32:47.000000000 -0500
-+++ ./agent/mibgroup/host/data_access/swrun_kinfo.c 2011-12-16 07:32:40.000000000 -0500
-@@ -183,7 +183,7 @@
- #if HAVE_KVM_GETPROC2
- argv = kvm_getargv2( kd, &(proc_table[i]), 0);
- #else
-- argv = kvm_getargv( kd, &(proc_table[i]), 0);
-+ argv = kvm_getargv( kd, &(proc_table[i]), BUFSIZ);
- #endif
-
- entry->hrSWRunName_len = snprintf(entry->hrSWRunName,
diff --git a/net-mgmt/net-snmp/files/patch-agent__mibgroup__sctp-mib__sctpTables_freebsd.c b/net-mgmt/net-snmp/files/patch-agent__mibgroup__sctp-mib__sctpTables_freebsd.c
deleted file mode 100644
index 58e44f82dd89..000000000000
--- a/net-mgmt/net-snmp/files/patch-agent__mibgroup__sctp-mib__sctpTables_freebsd.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- ./agent/mibgroup/sctp-mib/sctpTables_freebsd.c.orig 2011-11-30 18:30:17.000000000 -0500
-+++ ./agent/mibgroup/sctp-mib/sctpTables_freebsd.c 2011-11-30 18:30:48.000000000 -0500
-@@ -192,7 +192,6 @@
- *flags |= SCTP_TABLES_LOAD_FLAG_AUTO_LOOKUP;
- len = 0;
- if (sysctlbyname("net.inet.sctp.assoclist", 0, &len, 0, 0) < 0) {
-- printf("Error %d (%s) could not get the assoclist\n", errno, strerror(errno));
- return(-1);
- }
- if ((buf = (caddr_t)malloc(len)) == 0) {
diff --git a/net-mgmt/net-snmp/files/patch-agent__mibgroup__ucd-snmp__disk_hw.c b/net-mgmt/net-snmp/files/patch-agent__mibgroup__ucd-snmp__disk_hw.c
deleted file mode 100644
index 1859fab33fc2..000000000000
--- a/net-mgmt/net-snmp/files/patch-agent__mibgroup__ucd-snmp__disk_hw.c
+++ /dev/null
@@ -1,55 +0,0 @@
---- ./agent/mibgroup/ucd-snmp/disk_hw.c.orig 2011-09-28 00:53:47.000000000 -0400
-+++ ./agent/mibgroup/ucd-snmp/disk_hw.c 2012-04-04 06:33:38.000000000 -0400
-@@ -137,6 +137,7 @@
- if (disks) {
- free( disks );
- disks = NULL;
-+ maxdisks = numdisks = 0;
- }
- allDisksIncluded = 0;
- }
-@@ -189,7 +190,7 @@
- if ( entry ) {
- entry->minspace = minspace;
- entry->minpercent = minpercent;
-- entry->flags |= ~NETSNMP_FS_FLAG_UCD;
-+ entry->flags |= NETSNMP_FS_FLAG_UCD;
- disks[numdisks++] = entry;
- }
- }
-@@ -321,7 +322,7 @@
-
- switch (vp->magic) {
- case MIBINDEX:
-- long_ret = disknum;
-+ long_ret = disknum + 1;
- return ((u_char *) (&long_ret));
- case ERRORNAME: /* DISKPATH */
- *var_len = strlen(entry->path);
-@@ -388,8 +389,9 @@
-
- case ERRORFLAG:
- long_ret = 0;
-+ val = netsnmp_fsys_avail_ull(entry);
- if (( entry->minspace >= 0 ) &&
-- ( entry->avail < entry->minspace ))
-+ ( val < entry->minspace ))
- long_ret = 1;
- else if (( entry->minpercent >= 0 ) &&
- (_percent( entry->avail, entry->size ) < entry->minpercent ))
-@@ -398,12 +400,13 @@
-
- case ERRORMSG:
- errmsg[0] = 0;
-+ val = netsnmp_fsys_avail_ull(entry);
- if (( entry->minspace >= 0 ) &&
-- ( entry->avail < entry->minspace ))
-+ ( val < entry->minspace ))
- snprintf(errmsg, sizeof(errmsg),
- "%s: less than %d free (= %d)",
- entry->path, entry->minspace,
-- (int) entry->avail);
-+ (int) val);
- else if (( entry->minpercent >= 0 ) &&
- (_percent( entry->avail, entry->size ) < entry->minpercent ))
- snprintf(errmsg, sizeof(errmsg),
diff --git a/net-mgmt/net-snmp/files/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c b/net-mgmt/net-snmp/files/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c
deleted file mode 100644
index d35125033448..000000000000
--- a/net-mgmt/net-snmp/files/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c
+++ /dev/null
@@ -1,36 +0,0 @@
---- agent/mibgroup/hardware/cpu/cpu_sysctl.c.orig 2008-05-27 21:47:30.000000000 +0900
-+++ agent/mibgroup/hardware/cpu/cpu_sysctl.c 2008-11-14 16:41:12.000000000 +0900
-@@ -16,6 +16,8 @@
- #if !defined(CPUSTATES)
- #include <sys/dkstat.h>
- #endif
-+#elif defined(__FreeBSD__)
-+#define NETSNMP_KERN_CPU 0 /* FreeBSD - dummy value, sysctlnametomib(2) should be used */
- #else
- #include <sys/sched.h>
- #endif
-@@ -117,7 +119,7 @@
- #define NS_VM_SWAPIN v_swapin
- #define NS_VM_SWAPOUT v_swapout
-
--#elif defined(VM_METER) /* OpenBSD, NetBSD */
-+#elif defined(VM_METER) && !defined(__FreeBSD__) /* OpenBSD, NetBSD */
- #define NETSNMP_VM_STATS VM_METER
- #define NETSNMP_VM_STATS_TYPE struct vmtotal
-
-@@ -130,6 +132,15 @@
- #undef NS_VM_PAGEOUT
- #define NS_VM_SWAPIN v_swpin
- #define NS_VM_SWAPOUT v_swpout
-+#elif defined(__FreeBSD__) /* FreeBSD */
-+#define NETSNMP_VM_STATS VM_METER
-+#define NETSNMP_VM_STATS_TYPE struct vmmeter
-+ #define NS_VM_INTR v_intr
-+ #define NS_VM_SWTCH v_swtch
-+ #define NS_VM_PAGEIN v_swappgsin
-+ #define NS_VM_PAGEOUT v_swappgsout
-+ #define NS_VM_SWAPIN v_swapin
-+ #define NS_VM_SWAPOUT v_swapout
- #endif
-
-
diff --git a/net-mgmt/net-snmp/files/patch-auto_nlist.c b/net-mgmt/net-snmp/files/patch-auto_nlist.c
deleted file mode 100644
index d9795adff8b6..000000000000
--- a/net-mgmt/net-snmp/files/patch-auto_nlist.c
+++ /dev/null
@@ -1,32 +0,0 @@
---- ./agent/auto_nlist.c.orig 2011-07-07 15:38:44.000000000 -0700
-+++ agent/auto_nlist.c 2011-07-07 15:39:37.000000000 -0700
-@@ -66,15 +66,26 @@
- strcpy(it->nl[0].n_name, string);
- it->nl[0].n_name[strlen(string)+1] = '\0';
- #else
-- sprintf(it->nl[0].n_name, "_%s", string);
-+ char *n_name;
-+
-+ n_name = malloc(strlen(string) + 2);
-+ if (n_name == NULL) {
-+ snmp_log(LOG_ERR, "nlist err: failed to allocate memory");
-+ return (-1);
-+ }
-+ snprintf(n_name, strlen(string) + 2, "_%s", string);
-+ it->nl[0].n_name = (const char*)n_name;
- #endif
- it->nl[1].n_name = 0;
- init_nlist(it->nl);
- #if !(defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7) || \
- defined(netbsd1) || defined(dragonfly))
- if (it->nl[0].n_type == 0) {
-- strcpy(it->nl[0].n_name, string);
-- it->nl[0].n_name[strlen(string)+1] = '\0';
-+ it->nl[0].n_name = (const char*)strdup(string);
-+ if (it->nl[0].n_name == (const char*)NULL) {
-+ snmp_log(LOG_ERR, "nlist err: failed to allocate memory");
-+ return (-1);
-+ }
- init_nlist(it->nl);
- }
- #endif
diff --git a/net-mgmt/net-snmp/files/patch-configure b/net-mgmt/net-snmp/files/patch-configure
deleted file mode 100644
index 0068eb89f64e..000000000000
--- a/net-mgmt/net-snmp/files/patch-configure
+++ /dev/null
@@ -1,11 +0,0 @@
---- configure.orig 2011-07-01 19:36:41.000000000 -0300
-+++ configure 2011-07-27 09:10:11.000000000 -0300
-@@ -7544,7 +7544,7 @@
-
- # On IRIX 5.3, sys/types and inttypes.h are conflicting.
- for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-- inttypes.h stdint.h unistd.h
-+ inttypes.h stdint.h unistd.h stdarg.h
- do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
- ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
diff --git a/net-mgmt/net-snmp/files/patch-freebsd10.h b/net-mgmt/net-snmp/files/patch-freebsd10.h
deleted file mode 100644
index 9f81c6af7c42..000000000000
--- a/net-mgmt/net-snmp/files/patch-freebsd10.h
+++ /dev/null
@@ -1,5 +0,0 @@
---- include/net-snmp/system/freebsd10.h.orig 2009-09-11 10:02:17.000000000 -0400
-+++ include/net-snmp/system/freebsd10.h 2009-09-11 10:02:17.000000000 -0400
-@@ -0,0 +1,2 @@
-+#include "freebsd9.h"
-+#define freebsd10 freebsd10
diff --git a/net-mgmt/net-snmp/files/patch-freebsd8.h b/net-mgmt/net-snmp/files/patch-freebsd8.h
deleted file mode 100644
index c8ca163d5223..000000000000
--- a/net-mgmt/net-snmp/files/patch-freebsd8.h
+++ /dev/null
@@ -1,5 +0,0 @@
---- include/net-snmp/system/freebsd8.h.orig 2009-01-24 13:29:00.000000000 +0900
-+++ include/net-snmp/system/freebsd8.h 2009-01-24 23:23:25.000000000 +0900
-@@ -0,0 +1,2 @@
-+#include "freebsd7.h"
-+#define freebsd7 freebsd7
diff --git a/net-mgmt/net-snmp/files/patch-freebsd9.h b/net-mgmt/net-snmp/files/patch-freebsd9.h
deleted file mode 100644
index e55f2aa8d638..000000000000
--- a/net-mgmt/net-snmp/files/patch-freebsd9.h
+++ /dev/null
@@ -1,5 +0,0 @@
---- include/net-snmp/system/freebsd9.h.orig 2009-09-11 10:02:17.000000000 -0400
-+++ include/net-snmp/system/freebsd9.h 2009-09-11 10:02:17.000000000 -0400
-@@ -0,0 +1,2 @@
-+#include "freebsd8.h"
-+#define freebsd8 freebsd8
diff --git a/net-mgmt/net-snmp/files/patch-generic.h b/net-mgmt/net-snmp/files/patch-generic.h
deleted file mode 100644
index 9eddc80e0d1a..000000000000
--- a/net-mgmt/net-snmp/files/patch-generic.h
+++ /dev/null
@@ -1,14 +0,0 @@
---- include/net-snmp/system/generic.h.orig 2008-03-26 10:28:25.802233395 +0900
-+++ include/net-snmp/system/generic.h 2008-03-26 10:29:40.629721291 +0900
-@@ -1,3 +1,5 @@
-+#ifndef __NET_SNMP_SYSTEM_GENERIC_H__
-+#define __NET_SNMP_SYSTEM_GENERIC_H__
-
- #define bsdlike bsdlike
-
-@@ -72,3 +74,5 @@
- */
- #define INP_NEXT_SYMBOL inp_next
- #define INP_PREV_SYMBOL inp_prev
-+
-+#endif /* !__NET_SNMP_SYSTEM_GENERIC_H__ */
diff --git a/net-mgmt/net-snmp/files/patch-hr_storage.h b/net-mgmt/net-snmp/files/patch-hr_storage.h
deleted file mode 100644
index a14eb9f1043c..000000000000
--- a/net-mgmt/net-snmp/files/patch-hr_storage.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- agent/mibgroup/host/hr_storage.h.orig Tue Feb 25 22:17:48 2003
-+++ agent/mibgroup/host/hr_storage.h Wed May 5 15:27:40 2004
-@@ -12,6 +12,7 @@
- #define HRS_TYPE_MBUF 1
- #define HRS_TYPE_MEM 2
- #define HRS_TYPE_SWAP 3
--#define HRS_TYPE_FIXED_MAX 3 /* the largest fixed type */
-+#define HRS_TYPE_MBUFCLUSTER 4
-+#define HRS_TYPE_FIXED_MAX 4 /* the largest fixed type */
-
- #endif /* _MIBGROUP_HRSTORAGE_H */
diff --git a/net-mgmt/net-snmp/files/patch-hr_system.c b/net-mgmt/net-snmp/files/patch-hr_system.c
deleted file mode 100644
index f2d810ac0771..000000000000
--- a/net-mgmt/net-snmp/files/patch-hr_system.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- agent/mibgroup/host/hr_system.c.orig Mon Feb 23 02:29:34 2004
-+++ agent/mibgroup/host/hr_system.c Sat Apr 3 00:00:24 2004
-@@ -596,6 +596,8 @@
- #ifndef UTMP_HAS_NO_TYPE
- if (utmp_p->ut_type != USER_PROCESS)
- continue;
-+#else
-+ if (*utmp_p->ut_name != '~')
- #endif
- #ifndef UTMP_HAS_NO_PID
- /* This block of code fixes zombie user PIDs in the
diff --git a/net-mgmt/net-snmp/files/patch-include-net-snmp_net-snmp-config.h.in b/net-mgmt/net-snmp/files/patch-include-net-snmp_net-snmp-config.h.in
deleted file mode 100644
index e90cc37cf8bb..000000000000
--- a/net-mgmt/net-snmp/files/patch-include-net-snmp_net-snmp-config.h.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- include/net-snmp/net-snmp-config.h.in.orig 2011-08-12 21:05:41.000000000 -0300
-+++ include/net-snmp/net-snmp-config.h.in 2011-08-12 21:07:03.000000000 -0300
-@@ -2061,7 +2061,7 @@
- #define UCD_SNMP_LIBRARY 1
-
- /* final conclusion on nlist usage */
--#if defined(HAVE_NLIST) && defined(HAVE_STRUCT_NLIST_N_VALUE) && !defined(NETSNMP_DONT_USE_NLIST) && defined(HAVE_KMEM) && !defined(NETSNMP_NO_KMEM_USAGE)
-+#if defined(HAVE_NLIST) && defined(HAVE_STRUCT_NLIST_N_VALUE) && !defined(NETSNMP_DONT_USE_NLIST) && !defined(NETSNMP_NO_KMEM_USAGE)
- #define NETSNMP_CAN_USE_NLIST
- #endif
-
diff --git a/net-mgmt/net-snmp/files/patch-local:fixproc b/net-mgmt/net-snmp/files/patch-local:fixproc
deleted file mode 100644
index fa0f3fb65767..000000000000
--- a/net-mgmt/net-snmp/files/patch-local:fixproc
+++ /dev/null
@@ -1,90 +0,0 @@
---- local/fixproc.orig Wed May 25 01:23:54 2005
-+++ local/fixproc Wed Nov 30 12:16:05 2005
-@@ -1,4 +1,4 @@
--#!/usr/bin/perl
-+#!%%PERL%%
- #
- # fixproc [-min n] [-max n] [-check | -kill | -restart | -exist | -fix] proc ...
- #
-@@ -131,7 +131,7 @@
-
- use File::Temp qw(tempfile);
-
--$database_file = '/local/etc/fixproc.conf';
-+$database_file = '%%PREFIX%%/etc/fixproc.conf';
-
- $debug = 0; # specify debug level using -dN
- # currently defined: -d1
-@@ -157,6 +157,14 @@
- $shell_header = "#!/bin/sh\n";
- $shell_end_marker = 'shell_end_marker';
-
-+open(command, "/bin/ps -p $$ |") || die "$0: can't run ps command\n";
-+if (split(' ', <command>) > 4) {
-+ $ps_opts = 'ax';
-+} else {
-+ $ps_opts = '-e';
-+}
-+close command;
-+
- &read_args();
- &read_database();
- # &dump_database(); # debug only
-@@ -305,41 +313,47 @@
-
- # first try kill
- $! = $fixproc_error;
-- open (COMMAND, "/bin/ps -e | /bin/grep $proc |")
-+ open (COMMAND, "/bin/ps $ps_opts |")
- || die "$0: can't run ps-grep-awk command\n";
- while (<COMMAND>)
- {
-- # match the first field of ps -e
-+ if /$proc/ {
-+ # match the first field of ps $ps_opts
- $! = $fixproc_error;
-- /^\s*(\d+)\s/ || die "$0: can't match ps -e output\n";
-- system "kill $1";
-+ /^\s*(\d+)\s/ || die "$0: can't match ps $ps_opts output\n";
-+ kill 15, $1;
-+ }
- }
-+ close COMMAND;
-
- # if process still exist, try kill -9
- sleep 2;
- $! = $fixproc_error;
-- open (COMMAND, "/bin/ps -e | /bin/grep $proc |")
-+ open (COMMAND, "/bin/ps $ps_opts |")
- || die "$0: can't run ps-grep-awk command\n";
- $second_kill_needed = 0;
- while (<COMMAND>)
- {
-- # match the first field of ps -e
-+ if /$proc/ {
-+ # match the first field of ps $ps_opts
- $! = $fixproc_error;
-- /^\s*(\d+)\s/ || die "$0: can't match ps -e output\n";
-- system "kill -9 $1";
-+ /^\s*(\d+)\s/ || die "$0: can't match ps $ps_opts output\n";
-+ kill 9, $1;
- $second_kill_needed = 1;
- }
-+ close COMMAND;
- return ($no_error) if ($second_kill_needed == 0);
-
- # see if kill -9 worked
- sleep 2;
- $! = $fixproc_error;
-- open (COMMAND, "/bin/ps -e | /bin/grep $proc |")
-+ open (COMMAND, "/bin/ps $ps_opts |")
- || die "$0: can't run ps-grep-awk command\n";
- while (<COMMAND>)
- { # a process still exist, return error
-- return $cannot_kill_error;
-+ return $cannot_kill_error if /$proc/;
- }
-+ close COMMAND;
- return $no_error; # good, all dead
- }
-
diff --git a/net-mgmt/net-snmp/files/patch-local:ipf-mod.pl b/net-mgmt/net-snmp/files/patch-local:ipf-mod.pl
deleted file mode 100644
index 8bf98d4f1d52..000000000000
--- a/net-mgmt/net-snmp/files/patch-local:ipf-mod.pl
+++ /dev/null
@@ -1,21 +0,0 @@
---- local/ipf-mod.pl.orig Thu May 29 05:30:19 2003
-+++ local/ipf-mod.pl Thu May 29 05:40:13 2003
-@@ -1,4 +1,4 @@
--#!/usr/bin/perl -s
-+#!%%PERL%% -s
- ##
- ## IP Filter UCD-SNMP pass module
- ##
-@@ -9,10 +9,10 @@
- ## Date: $ Tue Dec 1 10:24:08 EET 1998 $
- ## Version: 1.1a
-
--# Put this file in /usr/local/bin/ipf-mod.pl and then add the following
-+# Put this file in %%PREFIX%%/bin/ipf-mod.pl and then add the following
- # line to your snmpd.conf file (without the # at the front):
- #
--# pass .1.3.6.1.4.1.2021.13.2 /usr/local/bin/ipf-mod.pl
-+# pass .1.3.6.1.4.1.2021.13.2 %%PREFIX%%/bin/ipf-mod.pl
-
- # enterprises.ucdavis.ucdExperimental.ipFilter = .1.3.6.1.4.1.2021.13.2
- # ipfInTable.ipfInEntry.ipfInIndex integer = 1.1.1
diff --git a/net-mgmt/net-snmp/files/patch-local:mib2c b/net-mgmt/net-snmp/files/patch-local:mib2c
deleted file mode 100644
index a0a2ce336f86..000000000000
--- a/net-mgmt/net-snmp/files/patch-local:mib2c
+++ /dev/null
@@ -1,21 +0,0 @@
---- local/mib2c.orig Fri Sep 10 21:30:15 2004
-+++ local/mib2c Mon Oct 25 08:38:30 2004
-@@ -1,5 +1,4 @@
--#!/usr/bin/perl
--#!/usr/bin/perl -w
-+#!%%PERL%%
-
- #
- # $Id: mib2c,v 5.57 2004/09/10 12:30:15 dts12 Exp $
-@@ -60,8 +59,9 @@
- if($ENV{MIB2C_DIR}) {
- push @def_search_dirs, split(/:/, $ENV{MIB2C_DIR});
- }
--push @def_search_dirs, "/usr/local/share/snmp/";
--push @def_search_dirs, "/usr/local/share/snmp/mib2c-data";
-+push @def_search_dirs, "%%PREFIX%%/share/snmp/";
-+push @def_search_dirs, "%%PREFIX%%/etc/snmp/";
-+push @def_search_dirs, "%%PREFIX%%/share/snmp/mib2c-data";
- push @def_search_dirs, "./mib2c-conf.d";
-
- sub usage {
diff --git a/net-mgmt/net-snmp/files/patch-local:snmpcheck.def b/net-mgmt/net-snmp/files/patch-local:snmpcheck.def
deleted file mode 100644
index 4f3b4a2491da..000000000000
--- a/net-mgmt/net-snmp/files/patch-local:snmpcheck.def
+++ /dev/null
@@ -1,8 +0,0 @@
---- local/snmpcheck.def.orig Thu May 29 05:28:22 2003
-+++ local/snmpcheck.def Thu May 29 05:29:49 2003
-@@ -1,4 +1,4 @@
--#!/usr/local/bin/perl -w
-+#!%%PERL%% -w
-
- use strict 'refs';
- require Net::Ping;
diff --git a/net-mgmt/net-snmp/files/patch-local:snmpconf b/net-mgmt/net-snmp/files/patch-local:snmpconf
deleted file mode 100644
index f2a0b11cf75e..000000000000
--- a/net-mgmt/net-snmp/files/patch-local:snmpconf
+++ /dev/null
@@ -1,35 +0,0 @@
---- local/snmpconf.orig Sun Aug 21 10:23:23 2005
-+++ local/snmpconf Wed Nov 30 12:19:42 2005
-@@ -1,4 +1,4 @@
--#!/usr/bin/perl -w
-+#!%%PERL%% -w
-
- #
- # A simple configuration file builder based on questions listed in
-@@ -31,7 +31,7 @@
- $opts{'c'} = &my_getenv("SNMPSHAREPATH") . "/snmpconf-data";
- }
- else {
-- $opts{'c'} = "/usr/local/share/snmp/snmpconf-data";
-+ $opts{'c'} = "%%PREFIX%%/share/snmp/snmpconf-data";
- }
-
- # default config file path
-@@ -39,7 +39,7 @@
- $confpath = &my_getenv("SNMPCONFPATH");
- }
- else {
-- $confpath = "/usr/local/share/snmp";
-+ $confpath = "%%PREFIX%%/share/snmp";
- }
-
- # home environment variable
-@@ -100,7 +100,7 @@
- $ENV_SEPARATOR = ';';
- }
- my @searchpath = split(/$ENV_SEPARATOR/, $confpath);
--push @searchpath, "/usr/local/etc/snmp";
-+push @searchpath, "%%PREFIX%%/etc/snmp";
- push @searchpath, ".";
- push @searchpath, "$home";
-
diff --git a/net-mgmt/net-snmp/files/patch-local:tkmib b/net-mgmt/net-snmp/files/patch-local:tkmib
deleted file mode 100644
index 3278d27c3809..000000000000
--- a/net-mgmt/net-snmp/files/patch-local:tkmib
+++ /dev/null
@@ -1,9 +0,0 @@
---- local/tkmib.orig Thu May 29 05:30:19 2003
-+++ local/tkmib Thu May 29 05:31:46 2003
-@@ -1,5 +1,4 @@
--#!/usr/bin/perl
--#!/usr/bin/perl -w
-+#!%%PERL%% -w
-
- require 5;
-
diff --git a/net-mgmt/net-snmp/files/patch-local:traptoemail b/net-mgmt/net-snmp/files/patch-local:traptoemail
deleted file mode 100644
index 402506b540c6..000000000000
--- a/net-mgmt/net-snmp/files/patch-local:traptoemail
+++ /dev/null
@@ -1,16 +0,0 @@
---- local/traptoemail.orig Thu May 29 05:30:19 2003
-+++ local/traptoemail Thu May 29 05:35:13 2003
-@@ -1,11 +1,11 @@
--#!/usr/bin/perl
-+#!%%PERL%%
-
- # This is a snmptrapd handler script to convert snmp traps into email
- # messages.
-
- # Usage:
- # Put a line like the following in your snmptrapd.conf file:
--# traphandle TRAPOID|default /usr/local/bin/traptoemail [-f FROM] [-s SMTPSERVER]b ADDRESSES
-+# traphandle TRAPOID|default %%PREFIX%%/bin/traptoemail [-f FROM] [-s SMTPSERVER]b ADDRESSES
- # FROM defaults to "root"
- # SMTPSERVER defaults to "localhost"
-
diff --git a/net-mgmt/net-snmp/files/patch-ltmain.sh b/net-mgmt/net-snmp/files/patch-ltmain.sh
deleted file mode 100644
index 99dc29dc4729..000000000000
--- a/net-mgmt/net-snmp/files/patch-ltmain.sh
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./ltmain.sh.orig 2011-12-02 07:35:01.000000000 -0500
-+++ ./ltmain.sh 2011-12-02 07:35:23.000000000 -0500
-@@ -8051,7 +8051,7 @@
- elif test -n "$runpath_var"; then
- case "$perm_rpath " in
- *" $libdir "*) ;;
-- *) func_apped perm_rpath " $libdir" ;;
-+ *) func_append perm_rpath " $libdir" ;;
- esac
- fi
- done
diff --git a/net-mgmt/net-snmp/files/patch-net-snmp-includes.h b/net-mgmt/net-snmp/files/patch-net-snmp-includes.h
deleted file mode 100644
index cfb1dd29e981..000000000000
--- a/net-mgmt/net-snmp/files/patch-net-snmp-includes.h
+++ /dev/null
@@ -1,13 +0,0 @@
---- include/net-snmp/net-snmp-includes.h.orig Mon Jan 24 08:24:47 2005
-+++ include/net-snmp/net-snmp-includes.h Mon Jan 24 08:25:11 2005
-@@ -49,6 +49,10 @@
- # endif
- #endif
-
-+#if HAVE_UNISTD_H
-+#include <unistd.h>
-+#endif
-+
- /*
- * Must be right after system headers, but before library code for best usage
- */
diff --git a/net-mgmt/net-snmp/files/patch-sctpScalars.h b/net-mgmt/net-snmp/files/patch-sctpScalars.h
deleted file mode 100644
index 50f3b80ff7e7..000000000000
--- a/net-mgmt/net-snmp/files/patch-sctpScalars.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- agent/mibgroup/sctp-mib/sctpScalars.h.orig 2009-04-08 12:29:04.000000000 -0300
-+++ agent/mibgroup/sctp-mib/sctpScalars.h 2010-06-01 11:02:56.000000000 -0300
-@@ -7,7 +7,7 @@
- config_require(sctp-mib/sctpScalars_common)
- #if defined( linux )
- config_require(sctp-mib/sctpScalars_linux)
--#elif defined( freebsd8 ) || defined ( freebsd7 )
-+#elif defined( freebsd10 ) || defined( freebsd9 ) || defined( freebsd8 ) || defined ( freebsd7 )
- config_require(sctp-mib/sctpScalars_freebsd)
- #else
- /*
diff --git a/net-mgmt/net-snmp/files/patch-sctpTables.h b/net-mgmt/net-snmp/files/patch-sctpTables.h
deleted file mode 100644
index 50b055b71ea4..000000000000
--- a/net-mgmt/net-snmp/files/patch-sctpTables.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- agent/mibgroup/sctp-mib/sctpTables.h.orig 2010-06-01 10:57:14.000000000 -0300
-+++ agent/mibgroup/sctp-mib/sctpTables.h 2010-06-01 10:17:28.000000000 -0300
-@@ -15,7 +15,7 @@
- #if defined( linux )
- config_require(sctp-mib/sctpTables_linux)
- config_require(util_funcs/get_pid_from_inode)
--#elif defined( freebsd7 ) || defined( freebsd8 )
-+#elif defined( freebsd7 ) || defined( freebsd8 ) || defined( freebsd9 ) || defined( freebsd10 )
- config_require(sctp-mib/sctpTables_freebsd)
- #else
- config_error(SCTP-MIB is not available in tihs environment)
diff --git a/net-mgmt/net-snmp/files/patch-sctpTables_common.h b/net-mgmt/net-snmp/files/patch-sctpTables_common.h
deleted file mode 100644
index 82c45c0c35dc..000000000000
--- a/net-mgmt/net-snmp/files/patch-sctpTables_common.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- agent/mibgroup/sctp-mib/sctpTables_common.h.orig 2010-06-01 10:58:20.000000000 -0300
-+++ agent/mibgroup/sctp-mib/sctpTables_common.h 2010-06-01 10:18:02.000000000 -0300
-@@ -1,7 +1,7 @@
- #ifndef SCTP_TABLES_COMMON_H
- #define SCTP_TABLES_COMMON_H
-
--#if defined(freebsd8) || defined(freebsd7)
-+#if defined(freebsd10) || defined(freebsd9) || defined(freebsd8) || defined(freebsd7)
- #define netsnmp_table_registration_info_free SNMP_FREE
- #endif
-
diff --git a/net-mgmt/net-snmp/files/patch-snmplib__snmp_api.c b/net-mgmt/net-snmp/files/patch-snmplib__snmp_api.c
deleted file mode 100644
index e3ee857dc206..000000000000
--- a/net-mgmt/net-snmp/files/patch-snmplib__snmp_api.c
+++ /dev/null
@@ -1,23 +0,0 @@
---- ./snmplib/snmp_api.c.orig 2011-12-07 17:39:10.000000000 -0500
-+++ ./snmplib/snmp_api.c 2011-12-07 17:46:39.000000000 -0500
-@@ -704,6 +704,8 @@
-
- netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID,
- NETSNMP_DS_LIB_HEX_OUTPUT_LENGTH, 16);
-+ netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_RETRIES,
-+ DEFAULT_RETRIES);
-
- #ifdef NETSNMP_USE_REVERSE_ASNENCODING
- netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
-@@ -6032,8 +6034,9 @@
- */
- requests++;
- for (rp = slp->internal->requests; rp; rp = rp->next_request) {
-- if ((!timerisset(&earliest)
-- || (timercmp(&rp->expire, &earliest, <)))) {
-+ if (!timerisset(&earliest)
-+ || (timerisset(&rp->expire)
-+ && timercmp(&rp->expire, &earliest, <))) {
- earliest = rp->expire;
- DEBUGMSG(("verbose:sess_select","(to in %d.%06d sec) ",
- (int)earliest.tv_sec, (int)earliest.tv_usec));
diff --git a/net-mgmt/net-snmp/files/patch-snmplib__system.c b/net-mgmt/net-snmp/files/patch-snmplib__system.c
deleted file mode 100644
index 015f0a18e1e0..000000000000
--- a/net-mgmt/net-snmp/files/patch-snmplib__system.c
+++ /dev/null
@@ -1,35 +0,0 @@
---- ./snmplib/system.c.orig 2012-01-27 10:01:51.000000000 -0500
-+++ ./snmplib/system.c 2012-01-27 10:04:22.000000000 -0500
-@@ -933,17 +933,15 @@
- {
- #if HAVE_GETHOSTBYADDR
- struct hostent *hp = NULL;
-- struct sockaddr_in *saddr_in =
-- NETSNMP_REMOVE_CONST(struct sockaddr_in *,addr);
-+ char buf[64];
-
-- DEBUGMSGTL(("dns:gethostbyaddr", "resolving { AF_INET, %s:%hu }\n",
-- inet_ntoa(saddr_in->sin_addr), ntohs(saddr_in->sin_port)));
-+ DEBUGMSGTL(("dns:gethostbyaddr", "resolving %s\n",
-+ inet_ntop(type, addr, buf, sizeof(buf))));
-
- #ifdef DNSSEC_LOCAL_VALIDATION
- val_status_t val_status;
-- hp = val_gethostbyaddr(netsnmp_validator_context(),
-- (const void*)&saddr_in->sin_addr,
-- sizeof(struct in_addr), AF_INET, &val_status);
-+ hp = val_gethostbyaddr(netsnmp_validator_context(), addr, len, type,
-+ &val_status);
- DEBUGMSGTL(("dns:sec:val", "val_status %d / %s; trusted: %d\n",
- val_status, p_val_status(val_status),
- val_istrusted(val_status)));
-@@ -959,8 +957,7 @@
- else if (val_does_not_exist(val_status) && hp)
- hp = NULL;
- #else
-- hp = gethostbyaddr((const void*) &saddr_in->sin_addr,
-- sizeof(struct in_addr), AF_INET);
-+ hp = gethostbyaddr(addr, len, type);
- #endif
- if (hp == NULL) {
- DEBUGMSGTL(("dns:gethostbyaddr", "couldn't resolve addr\n"));
diff --git a/net-mgmt/net-snmp/pkg-message b/net-mgmt/net-snmp/files/pkg-message.in
index fe1f1ae35724..9fc7af6801dc 100644
--- a/net-mgmt/net-snmp/pkg-message
+++ b/net-mgmt/net-snmp/files/pkg-message.in
@@ -5,14 +5,14 @@
snmpd_enable="YES"
snmpd_flags="-a"
- snmpd_conffile="/usr/local/share/snmp/snmpd.conf /etc/snmpd.conf"
+ snmpd_conffile="%%PREFIX%%/share/snmp/snmpd.conf /etc/snmpd.conf"
snmptrapd_enable="YES"
snmptrapd_flags="-a -p /var/run/snmptrapd.pid"
**** You may specify the following make variables:
- NET_SNMP_SYS_CONTACT="sylvio@FreeBSD.org"
- NET_SNMP_SYS_LOCATION="Brasilia, BRA"
+ NET_SNMP_SYS_CONTACT="zi@FreeBSD.org"
+ NET_SNMP_SYS_LOCATION="USA"
DEFAULT_SNMP_VERSION=3
NET_SNMP_MIB_MODULES="host smux mibII/mta_sendmail ucd-snmp/diskio"
NET_SNMP_LOGFILE=/var/log/snmpd.log
diff --git a/net-mgmt/net-snmp/pkg-descr b/net-mgmt/net-snmp/pkg-descr
index d1fc04717b8e..efdbe8e99c81 100644
--- a/net-mgmt/net-snmp/pkg-descr
+++ b/net-mgmt/net-snmp/pkg-descr
@@ -1,12 +1,12 @@
This is Net-SNMP (previously known as "ucd-snmp").
-Various tools relating to the Simple Network Management Protocol including:
+Various tools relating to the Simple Network Management Protocol including:
- An extensible agent
- An SNMP library
- tools to request or set information from SNMP agents
- tools to generate and handle SNMP traps
- a version of the unix 'netstat' command using SNMP
+ An extensible agent
+ An SNMP library
+ tools to request or set information from SNMP agents
+ tools to generate and handle SNMP traps
+ a version of the unix 'netstat' command using SNMP
a graphical Perl/Tk/SNMP based mib browser
WWW: http://net-snmp.sourceforge.net/
diff --git a/net-mgmt/net-snmp/pkg-plist b/net-mgmt/net-snmp/pkg-plist
index 6b46cd56154d..c54ec0d9c4fb 100644
--- a/net-mgmt/net-snmp/pkg-plist
+++ b/net-mgmt/net-snmp/pkg-plist
@@ -66,6 +66,7 @@ include/net-snmp/agent/snmp_get_statistic.h
include/net-snmp/agent/snmp_vars.h
include/net-snmp/agent/stash_cache.h
include/net-snmp/agent/stash_to_next.h
+include/net-snmp/agent/struct.h
include/net-snmp/agent/sysORTable.h
include/net-snmp/agent/table.h
include/net-snmp/agent/table_array.h
@@ -75,6 +76,10 @@ include/net-snmp/agent/table_dataset.h
include/net-snmp/agent/table_iterator.h
include/net-snmp/agent/table_tdata.h
include/net-snmp/agent/util_funcs.h
+include/net-snmp/agent/util_funcs/header_generic.h
+include/net-snmp/agent/util_funcs/header_simple_table.h
+include/net-snmp/agent/util_funcs/MIB_STATS_CACHE_TIMEOUT.h
+@dirrmtry include/net-snmp/agent/util_funcs
include/net-snmp/agent/var_struct.h
include/net-snmp/agent/watcher.h
include/net-snmp/config_api.h