summaryrefslogtreecommitdiff
path: root/net-mgmt/net-snmp-devel/files
diff options
context:
space:
mode:
Diffstat (limited to 'net-mgmt/net-snmp-devel/files')
-rw-r--r--net-mgmt/net-snmp-devel/files/extra-patch-local:Makefile.in11
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-Makefile.in11
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c36
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-at.c14
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-cache_handler.c34
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-cache_handler.h11
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-callback.c12
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-configure11
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-default_store.c12
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-disk.c31
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-freebsd8.h5
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-generic.h14
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-hr_storage.c17
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-hr_storage.h11
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-hr_system.c11
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-interface.c11
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-interface_ioctl.c13
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-interface_sysctl.c41
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-interfaces.c157
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-ipv6.c598
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-iquery.c11
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-keytools.c12
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-lcd_time.c12
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-local:fixproc90
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-local:ipf-mod.pl21
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-local:mib2c21
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-local:snmpcheck.def8
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-local:snmpconf35
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-local:tkmib9
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-local:traptoemail16
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-memory_freebsd.c37
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-mib.c12
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-net-snmp-config.h.in20
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-net-snmp-includes.h13
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-parse.c12
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-scapi.c12
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-sctpAssocTable.c10
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-sctpLookupLocalPortTable.c10
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-sctpScalars.h11
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-sctpScalars_freebsd.c106
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-sctpTables.h11
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-sctpTables_common.c9
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-sctpTables_common.h15
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-sctpTables_freebsd.c252
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-snmpTCPIPv6Domain.c31
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-snmpUCDIPv6Domain.c31
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-snmp_agent.c13
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-snmp_auth.c12
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-snmp_debug.c12
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-snmp_logging.c12
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-snmp_transport.c12
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-snmpd.c32
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-snmpusm.c21
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-tcpTable.c12
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-tools.c12
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-transform_oids.h11
-rw-r--r--net-mgmt/net-snmp-devel/files/snmpd.sh.in80
-rw-r--r--net-mgmt/net-snmp-devel/files/snmptrapd.sh.in34
-rw-r--r--net-mgmt/net-snmp-devel/files/test.t12
59 files changed, 0 insertions, 2163 deletions
diff --git a/net-mgmt/net-snmp-devel/files/extra-patch-local:Makefile.in b/net-mgmt/net-snmp-devel/files/extra-patch-local:Makefile.in
deleted file mode 100644
index 50a941bffa3a..000000000000
--- a/net-mgmt/net-snmp-devel/files/extra-patch-local:Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- local/Makefile.in.orig Tue Oct 11 03:47:48 2005
-+++ local/Makefile.in Wed Nov 30 11:32:52 2005
-@@ -16,7 +16,7 @@
- #
- SNMPCONFPATH=@SNMPCONFPATH@
- PERSISTENT_DIRECTORY=@PERSISTENT_DIRECTORY@
--PERLSCRIPTS=snmpcheck tkmib mib2c fixproc ipf-mod.pl snmpconf traptoemail
-+PERLSCRIPTS=snmpcheck mib2c fixproc ipf-mod.pl snmpconf traptoemail
- SHELLSCRIPTS=mib2c-update
- SCRIPTSMADEFORPERL=snmpcheck.made tkmib.made mib2c.made fixproc.made \
- ipf-mod.pl.made snmpconf.made traptoemail.made
diff --git a/net-mgmt/net-snmp-devel/files/patch-Makefile.in b/net-mgmt/net-snmp-devel/files/patch-Makefile.in
deleted file mode 100644
index fece19085317..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- Makefile.in.orig 2007-06-09 05:32:56.000000000 +0900
-+++ Makefile.in 2008-03-25 21:10:08.842515763 +0900
-@@ -16,7 +16,7 @@
- INSTALLHEADERS=version.h
- INCLUDESUBDIR=system
- INCLUDESUBDIRHEADERS= aix.h bsd.h bsdi3.h bsdi4.h bsdi.h cygwin.h \
-- darwin.h darwin7.h darwin8.h darwin9.h freebsd5.h freebsd6.h \
-+ darwin.h darwin7.h darwin8.h darwin9.h freebsd5.h freebsd6.h freebsd7.h freebsd8.h \
- dynix.h freebsd2.h freebsd3.h freebsd4.h freebsd.h generic.h hpux.h \
- irix.h linux.h mingw32.h mips.h netbsd.h openbsd.h osf5.h \
- solaris2.3.h solaris2.4.h solaris2.5.h solaris2.6.h \
diff --git a/net-mgmt/net-snmp-devel/files/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c b/net-mgmt/net-snmp-devel/files/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c
deleted file mode 100644
index d35125033448..000000000000
--- a/net-mgmt/net-snmp-devel/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-devel/files/patch-at.c b/net-mgmt/net-snmp-devel/files/patch-at.c
deleted file mode 100644
index 12070f96cc23..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-at.c
+++ /dev/null
@@ -1,14 +0,0 @@
---- agent/mibgroup/mibII/at.c.orig 2008-12-25 10:40:04.000000000 +0900
-+++ agent/mibgroup/mibII/at.c 2008-12-25 10:40:59.000000000 +0900
-@@ -686,7 +686,11 @@
- mib[2] = 0;
- mib[3] = AF_INET;
- mib[4] = NET_RT_FLAGS;
-+#if defined(RTF_LLINFO)
- mib[5] = RTF_LLINFO;
-+#else
-+ mib[5] = 0;
-+#endif
-
- if (at)
- free(at);
diff --git a/net-mgmt/net-snmp-devel/files/patch-cache_handler.c b/net-mgmt/net-snmp-devel/files/patch-cache_handler.c
deleted file mode 100644
index 0bcb75fb057b..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-cache_handler.c
+++ /dev/null
@@ -1,34 +0,0 @@
---- agent/helpers/cache_handler.c.orig 2009-01-25 22:40:13.000000000 +0900
-+++ agent/helpers/cache_handler.c 2009-01-25 22:44:30.000000000 +0900
-@@ -173,6 +173,31 @@
- return cache;
- }
-
-+/** frees a cache
-+ */
-+int
-+netsnmp_cache_free(netsnmp_cache *cache)
-+{
-+ netsnmp_cache *pos;
-+
-+ if (NULL == cache)
-+ return SNMPERR_SUCCESS;
-+
-+ for (pos = cache_head; pos; pos = pos->next) {
-+ if (pos == cache) {
-+ snmp_log(LOG_WARNING, "not freeing cache (still in list)\n");
-+ return SNMP_ERR_GENERR;
-+ }
-+ }
-+
-+ if (cache->rootoid)
-+ free(cache->rootoid);
-+
-+ free(cache);
-+
-+ return SNMPERR_SUCCESS;
-+}
-+
- /** callback function to call cache load function */
- static void
- _timer_reload(unsigned int regNo, void *clientargs)
diff --git a/net-mgmt/net-snmp-devel/files/patch-cache_handler.h b/net-mgmt/net-snmp-devel/files/patch-cache_handler.h
deleted file mode 100644
index 04a597be080f..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-cache_handler.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- include/net-snmp/agent/cache_handler.h.orig 2009-01-25 22:37:09.000000000 +0900
-+++ include/net-snmp/agent/cache_handler.h 2009-01-25 22:38:07.000000000 +0900
-@@ -85,6 +85,8 @@
- netsnmp_cache_create(int timeout, NetsnmpCacheLoad * load_hook,
- NetsnmpCacheFree * free_hook,
- oid * rootoid, int rootoid_len);
-+ int netsnmp_cache_free(netsnmp_cache *cache);
-+
- netsnmp_mib_handler *
- netsnmp_cache_handler_get(netsnmp_cache* cache);
-
diff --git a/net-mgmt/net-snmp-devel/files/patch-callback.c b/net-mgmt/net-snmp-devel/files/patch-callback.c
deleted file mode 100644
index 840d12c0d881..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-callback.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- snmplib/callback.c.orig Tue Jan 25 10:19:39 2005
-+++ snmplib/callback.c Tue Jan 25 10:19:53 2005
-@@ -34,6 +34,9 @@
- #include <strings.h>
- #endif
-
-+#if HAVE_UNISTD_H
-+#include <unistd.h>
-+#endif
- #if HAVE_DMALLOC_H
- #include <dmalloc.h>
- #endif
diff --git a/net-mgmt/net-snmp-devel/files/patch-configure b/net-mgmt/net-snmp-devel/files/patch-configure
deleted file mode 100644
index 63b240ea8942..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-configure
+++ /dev/null
@@ -1,11 +0,0 @@
---- configure.orig 2009-01-25 21:34:07.000000000 +0900
-+++ configure 2009-01-25 21:34:30.000000000 +0900
-@@ -6074,7 +6074,7 @@
-
-
- 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=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
- echo "$as_me:$LINENO: checking for $ac_header" >&5
diff --git a/net-mgmt/net-snmp-devel/files/patch-default_store.c b/net-mgmt/net-snmp-devel/files/patch-default_store.c
deleted file mode 100644
index 076ecec1431e..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-default_store.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- snmplib/default_store.c.orig Tue Jan 25 10:20:31 2005
-+++ snmplib/default_store.c Tue Jan 25 10:20:47 2005
-@@ -145,6 +145,9 @@
- #include <winsock.h>
- #endif
-
-+#if HAVE_UNISTD_H
-+#include <unistd.h>
-+#endif
- #if HAVE_DMALLOC_H
- #include <dmalloc.h>
- #endif
diff --git a/net-mgmt/net-snmp-devel/files/patch-disk.c b/net-mgmt/net-snmp-devel/files/patch-disk.c
deleted file mode 100644
index d58269d1e08d..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-disk.c
+++ /dev/null
@@ -1,31 +0,0 @@
---- agent/mibgroup/ucd-snmp/disk.c.orig 2008-07-05 22:11:22.366362753 +0900
-+++ agent/mibgroup/ucd-snmp/disk.c 2008-07-06 00:32:19.611196878 +0900
-@@ -73,6 +73,9 @@
- #if HAVE_SYS_VFS_H
- #include <sys/vfs.h>
- #endif
-+#if defined(__FreeBSD__) && __FreeBSD_version >= 700055
-+#include <sys/ucred.h>
-+#endif
- #if defined(HAVE_STATFS)
- #if HAVE_SYS_MOUNT_H
- #include <sys/mount.h>
-@@ -491,6 +494,18 @@
- dummy = 1;
- }
- endfsent(); /* close /etc/fstab */
-+#if defined(__FreeBSD__) && __FreeBSD_version >= 700055
-+ {
-+ struct statfs *mntbuf;
-+ size_t i, mntsize;
-+ mntsize = getmntinfo(&mntbuf, MNT_NOWAIT);
-+ for (i = 0; i < mntsize; i++) {
-+ if (strncmp(mntbuf[i].f_fstypename, "zfs", 3) == 0) {
-+ add_device(mntbuf[i].f_mntonname, mntbuf[i].f_mntfromname, -1, minpercent, 0);
-+ }
-+ }
-+ }
-+#endif
- if(dummy != 0) {
- /*
- * dummy clause for else below
diff --git a/net-mgmt/net-snmp-devel/files/patch-freebsd8.h b/net-mgmt/net-snmp-devel/files/patch-freebsd8.h
deleted file mode 100644
index c8ca163d5223..000000000000
--- a/net-mgmt/net-snmp-devel/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-devel/files/patch-generic.h b/net-mgmt/net-snmp-devel/files/patch-generic.h
deleted file mode 100644
index 9eddc80e0d1a..000000000000
--- a/net-mgmt/net-snmp-devel/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-devel/files/patch-hr_storage.c b/net-mgmt/net-snmp-devel/files/patch-hr_storage.c
deleted file mode 100644
index 4fc2bd0d5544..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-hr_storage.c
+++ /dev/null
@@ -1,17 +0,0 @@
---- agent/mibgroup/host/hr_storage.c.orig 2007-06-08 19:33:58.000000000 +0900
-+++ agent/mibgroup/host/hr_storage.c 2008-03-25 21:26:23.470718989 +0900
-@@ -489,11 +489,13 @@
- *
- *********************/
-
-+/* kuriyama: should be removed? */
- static const char *hrs_descr[] = {
- NULL,
- "Memory Buffers", /* HRS_TYPE_MBUF */
- "Real Memory", /* HRS_TYPE_MEM */
-- "Swap Space" /* HRS_TYPE_SWAP */
-+ "Swap Space", /* HRS_TYPE_SWAP */
-+ "Memory Buffer Clusters" /* HRS_TYPE_MBUFCLUSTER */
- };
-
-
diff --git a/net-mgmt/net-snmp-devel/files/patch-hr_storage.h b/net-mgmt/net-snmp-devel/files/patch-hr_storage.h
deleted file mode 100644
index a14eb9f1043c..000000000000
--- a/net-mgmt/net-snmp-devel/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-devel/files/patch-hr_system.c b/net-mgmt/net-snmp-devel/files/patch-hr_system.c
deleted file mode 100644
index f2d810ac0771..000000000000
--- a/net-mgmt/net-snmp-devel/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-devel/files/patch-interface.c b/net-mgmt/net-snmp-devel/files/patch-interface.c
deleted file mode 100644
index 871f9e427e5c..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-interface.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- agent/mibgroup/if-mib/data_access/interface.c.orig 2009-01-25 17:49:04.000000000 +0900
-+++ agent/mibgroup/if-mib/data_access/interface.c 2009-01-25 17:49:57.000000000 +0900
-@@ -775,7 +775,7 @@
- netsnmp_conf_if_list *if_ptr = conf_list, *if_next;
- while (if_ptr) {
- if_next = if_ptr->next;
-- free(if_ptr->name);
-+ free((void*)if_ptr->name);
- free(if_ptr);
- if_ptr = if_next;
- }
diff --git a/net-mgmt/net-snmp-devel/files/patch-interface_ioctl.c b/net-mgmt/net-snmp-devel/files/patch-interface_ioctl.c
deleted file mode 100644
index 4939166949be..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-interface_ioctl.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- ./agent/mibgroup/if-mib/data_access/interface_ioctl.c.orig Mon Oct 25 12:57:23 2004
-+++ ./agent/mibgroup/if-mib/data_access/interface_ioctl.c Mon Oct 25 12:56:33 2004
-@@ -385,6 +385,10 @@
- if (rc < 0)
- return 0;
-
-+#if defined(__FreeBSD__)
-+ return ifrq.ifr_index;
-+#else
- return ifrq.ifr_ifindex;
-+#endif
- #endif /* SIOCGIFINDEX */
- }
diff --git a/net-mgmt/net-snmp-devel/files/patch-interface_sysctl.c b/net-mgmt/net-snmp-devel/files/patch-interface_sysctl.c
deleted file mode 100644
index 262e9c7c12ab..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-interface_sysctl.c
+++ /dev/null
@@ -1,41 +0,0 @@
-Index: agent/mibgroup/if-mib/data_access/interface_sysctl.c
-===================================================================
---- agent/mibgroup/if-mib/data_access/interface_sysctl.c (revision 17324)
-+++ agent/mibgroup/if-mib/data_access/interface_sysctl.c (working copy)
-@@ -451,22 +451,22 @@
- NETSNMP_INTERFACE_FLAGS_HAS_V6_REASMMAX;
-
- /* get counters */
-- entry->stats.ibytes.low = ifp->ifm_data.ifi_ibytes;
-- entry->stats.ibytes.high = 0;
-- entry->stats.iucast.low = ifp->ifm_data.ifi_ipackets;
-- entry->stats.iucast.high = 0;
-- entry->stats.imcast.low = ifp->ifm_data.ifi_imcasts;
-- entry->stats.imcast.high = 0;
-+ entry->stats.ibytes.low = ifp->ifm_data.ifi_ibytes & 0xffffffff;
-+ entry->stats.ibytes.high = ifp->ifm_data.ifi_ibytes >> 32;
-+ entry->stats.iucast.low = ifp->ifm_data.ifi_ipackets & 0xffffffff;
-+ entry->stats.iucast.high = ifp->ifm_data.ifi_ipackets >> 32;
-+ entry->stats.imcast.low = ifp->ifm_data.ifi_imcasts & 0xffffffff;
-+ entry->stats.imcast.high = ifp->ifm_data.ifi_imcasts >> 32;
- entry->stats.ierrors = ifp->ifm_data.ifi_ierrors;
- entry->stats.idiscards = ifp->ifm_data.ifi_iqdrops;
- entry->stats.iunknown_protos = ifp->ifm_data.ifi_noproto;
-
-- entry->stats.obytes.low = ifp->ifm_data.ifi_obytes;
-- entry->stats.obytes.high = 0;
-- entry->stats.oucast.low = ifp->ifm_data.ifi_opackets;
-- entry->stats.oucast.high = 0;
-- entry->stats.omcast.low = ifp->ifm_data.ifi_omcasts;
-- entry->stats.omcast.high = 0;
-+ entry->stats.obytes.low = ifp->ifm_data.ifi_obytes & 0xffffffff;
-+ entry->stats.obytes.high = ifp->ifm_data.ifi_obytes >> 32;
-+ entry->stats.oucast.low = ifp->ifm_data.ifi_opackets & 0xffffffff;
-+ entry->stats.oucast.high = ifp->ifm_data.ifi_opackets >> 32;
-+ entry->stats.omcast.low = ifp->ifm_data.ifi_omcasts & 0xffffffff;
-+ entry->stats.omcast.high = ifp->ifm_data.ifi_omcasts >> 32;
- entry->stats.oerrors = ifp->ifm_data.ifi_oerrors;
- entry->ns_flags |= NETSNMP_INTERFACE_FLAGS_HAS_BYTES |
- NETSNMP_INTERFACE_FLAGS_HAS_DROPS |
-
-
diff --git a/net-mgmt/net-snmp-devel/files/patch-interfaces.c b/net-mgmt/net-snmp-devel/files/patch-interfaces.c
deleted file mode 100644
index bc56d6ca3a3e..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-interfaces.c
+++ /dev/null
@@ -1,157 +0,0 @@
---- agent/mibgroup/mibII/interfaces.c.orig Wed Oct 26 00:52:19 2005
-+++ agent/mibgroup/mibII/interfaces.c Tue Feb 27 20:44:48 2007
-@@ -395,6 +395,133 @@
- return NULL;
- }
-
-+#if defined(freebsd2)
-+static char *physaddrbuf;
-+static int nphysaddrs;
-+struct sockaddr_dl **physaddrs;
-+
-+void
-+init_interfaces_setup(void)
-+{
-+ int naddrs, ilen, bit;
-+ static int mib[6]
-+ = { CTL_NET, PF_ROUTE, 0, AF_LINK, NET_RT_IFLIST, 0 };
-+ char *cp;
-+ size_t len;
-+ struct rt_msghdr *rtm;
-+ struct if_msghdr *ifm;
-+ struct ifa_msghdr *ifam;
-+ struct sockaddr *sa;
-+
-+ naddrs = 0;
-+ if (physaddrs)
-+ free(physaddrs);
-+ if (physaddrbuf)
-+ free(physaddrbuf);
-+ physaddrbuf = 0;
-+ physaddrs = 0;
-+ nphysaddrs = 0;
-+ len = 0;
-+ if (sysctl(mib, 6, 0, &len, 0, 0) < 0)
-+ return;
-+
-+ cp = physaddrbuf = malloc(len);
-+ if (physaddrbuf == 0)
-+ return;
-+ if (sysctl(mib, 6, physaddrbuf, &len, 0, 0) < 0) {
-+ free(physaddrbuf);
-+ physaddrbuf = 0;
-+ return;
-+ }
-+
-+ loop:
-+ ilen = len;
-+ cp = physaddrbuf;
-+ while (ilen > 0) {
-+ rtm = (struct rt_msghdr *) cp;
-+ if (rtm->rtm_version != RTM_VERSION || rtm->rtm_type != RTM_IFINFO) {
-+ free(physaddrs);
-+ physaddrs = 0;
-+ free(physaddrbuf);
-+ physaddrbuf = 0;
-+ }
-+ ifm = (struct if_msghdr *) rtm;
-+#if defined(freebsd3) || defined(freebsd4) || defined(freebsd5)
-+ if (physaddrs != 0)
-+ physaddrs[naddrs] = (void *) (ifm + 1);
-+ naddrs++;
-+#endif
-+ ilen -= ifm->ifm_msglen;
-+ cp += ifm->ifm_msglen;
-+ rtm = (struct rt_msghdr *) cp;
-+ while (ilen > 0 && rtm->rtm_type == RTM_NEWADDR) {
-+#if defined(freebsd3) || defined(freebsd4) || defined(freebsd5)
-+ ilen -= rtm->rtm_msglen;
-+ cp += rtm->rtm_msglen;
-+#else
-+ int is_alias = 0;
-+ ifam = (struct ifa_msghdr *) rtm;
-+ ilen -= sizeof(*ifam);
-+ cp += sizeof(*ifam);
-+ sa = (struct sockaddr *) cp;
-+#define ROUND(x) (((x) + sizeof(long) - 1) & ~sizeof(long))
-+ for (bit = 1; bit && ilen > 0; bit <<= 1) {
-+ if (!(ifam->ifam_addrs & bit))
-+ continue;
-+ ilen -= ROUND(sa->sa_len);
-+ cp += ROUND(sa->sa_len);
-+
-+ if (bit == RTA_IFA) {
-+ if (physaddrs)
-+#define satosdl(sa) ((struct sockaddr_dl *)(sa))
-+ physaddrs[naddrs++]
-+ = satosdl(sa);
-+ else
-+ naddrs++;
-+ }
-+ sa = (struct sockaddr *) cp;
-+ }
-+#endif
-+ rtm = (struct rt_msghdr *) cp;
-+ }
-+ }
-+ if (physaddrs) {
-+ nphysaddrs = naddrs;
-+ return;
-+ }
-+ physaddrs = malloc(naddrs * sizeof(*physaddrs));
-+ if (physaddrs == 0)
-+ return;
-+ naddrs = 0;
-+ goto loop;
-+
-+}
-+
-+static int
-+get_phys_address(int iindex, char **ap, int *len)
-+{
-+ int i;
-+ int once = 1;
-+
-+ do {
-+ for (i = 0; i < nphysaddrs; i++) {
-+ if (physaddrs[i]->sdl_index == iindex)
-+ break;
-+ }
-+ if (i < nphysaddrs)
-+ break;
-+ init_interfaces_setup();
-+ } while (once--);
-+
-+ if (i < nphysaddrs) {
-+ *ap = LLADDR(physaddrs[i]);
-+ *len = physaddrs[i]->sdl_alen;
-+ return 0;
-+ }
-+ return -1;
-+}
-+#endif
-+
- #ifdef USE_SYSCTL_IFLIST
-
- static u_char *if_list = 0;
-@@ -603,10 +730,20 @@
- }
- return (u_char *) & long_return;
- case IFPHYSADDRESS:
-+#if defined(freebsd2)
-+ {
-+ char *cp;
-+ if (get_phys_address(interface, &cp, var_len))
-+ return NULL;
-+ else
-+ return cp;
-+ }
-+#else
- /*
- * XXX
- */
- return NULL;
-+#endif
- case IFADMINSTATUS:
- long_return = if_msg.ifm_flags & IFF_UP ? 1 : 2;
- return (u_char *) & long_return;
diff --git a/net-mgmt/net-snmp-devel/files/patch-ipv6.c b/net-mgmt/net-snmp-devel/files/patch-ipv6.c
deleted file mode 100644
index 5d0356e60741..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-ipv6.c
+++ /dev/null
@@ -1,598 +0,0 @@
---- agent/mibgroup/mibII/ipv6.c.orig 2007-05-25 07:01:04.000000000 +0900
-+++ agent/mibgroup/mibII/ipv6.c 2008-03-26 07:29:07.122940424 +0900
-@@ -8,10 +8,25 @@
- #define _KERNEL 1
- #define _I_DEFINED_KERNEL
- #endif
-+
-+/* make this source a wee bit more readable */
-+#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
-+#define OS_NET_BSD_16_OR_LATER 1
-+#endif
-+#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin)
-+#define OS_NOT_FREEBSD_NOR_DARWIN 1
-+#endif
-+#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin)
-+#define OS_FREEBSD_OR_DARWIN 1
-+#if !defined(INP_IPV6PROTO)
-+#define INP_IPV6PROTO 0x04
-+#endif
-+#endif
-+
- #include <sys/types.h>
- #include <sys/param.h>
- #include <sys/socket.h>
--#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin)
-+#if OS_FREEBSD_OR_DARWIN
- # if HAVE_SYS_SOCKETVAR_H
- # include <sys/socketvar.h>
- # endif
-@@ -80,7 +95,7 @@
- # include <netinet6/ip6_var.h>
- #endif
- #include <net/route.h>
--#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin)
-+#if OS_FREEBSD_OR_DARWIN
- # if HAVE_NETINET_IN_PCB_H
- # include <netinet/in_pcb.h>
- # endif
-@@ -578,7 +593,7 @@
- memcpy(result, &tmp, sizeof(tmp));
- return 0;
- }
--#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin)
-+#if OS_FREEBSD_OR_DARWIN
- q = (caddr_t) TAILQ_NEXT(&tmp, if_link);
- #else
- # if defined(__NetBSD__) || defined(__OpenBSD__)
-@@ -809,7 +824,7 @@
-
- if (if_getifnet(interface, &ifnet) < 0)
- break;
--#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin)
-+#if OS_FREEBSD_OR_DARWIN
- ifa = (caddr_t) TAILQ_FIRST(&ifnet.if_addrhead);
- #else
- # if defined(__NetBSD__) || defined(__OpenBSD__)
-@@ -836,7 +851,7 @@
- *var_len = sdl.sdl_alen;
- return (u_char *) (sdl.sdl_data + sdl.sdl_nlen);
- }
--#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin)
-+#if OS_FREEBSD_OR_DARWIN
- ifa = (caddr_t) TAILQ_NEXT(&ifaddr, ifa_link);
- #else
- # if defined(__NetBSD__) || defined(__OpenBSD__)
-@@ -1229,32 +1244,33 @@
- size_t * length,
- int exact, size_t * var_len, WriteMethod ** write_method)
- {
-- oid newname[MAX_OID_LEN];
-- oid savname[MAX_OID_LEN];
-+ oid newname[MAX_OID_LEN], savname[MAX_OID_LEN];
- int result;
- int i, j;
- caddr_t p;
-- static struct in6pcb in6pcb, savpcb;
-+ static struct in6pcb tstpcb, savpcb;
- int found, savnameLen;
--#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
-+#if OS_NOT_FREEBSD_NOR_DARWIN
-+ static struct in6pcb udb6;
-+#endif
-+#if OS_NET_BSD_16_OR_LATER
- struct inpcbtable udbtable;
- caddr_t first;
--#elif (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin)
-+#endif
-+#if OS_FREEBSD_OR_DARWIN
- char *sysctl_buf;
- struct xinpgen *xig, *oxig;
--#else
-- static struct in6pcb udb6;
- #endif
-
- DEBUGMSGTL(("mibII/ipv6", "var_udp6: "));
- DEBUGMSGOID(("mibII/ipv6", name, *length));
- DEBUGMSG(("mibII/ipv6", " %d\n", exact));
-
--#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
-+#if OS_NET_BSD_16_OR_LATER
- if (!auto_nlist("udbtable", (char *) &udbtable, sizeof(udbtable)))
- return NULL;
- first = p = (caddr_t)udbtable.inpt_queue.cqh_first;
--#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin)
-+#elif OS_NOT_FREEBSD_NOR_DARWIN
- if (!auto_nlist("udb6", (char *) &udb6, sizeof(udb6)))
- return NULL;
- p = (caddr_t) udb6.in6p_next;
-@@ -1283,9 +1299,10 @@
- (int) vp->namelen * sizeof(oid));
- DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p));
- while (
--#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
-+#if OS_NET_BSD_16_OR_LATER
- p && p != first
--#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin)
-+#elif OS_NOT_FREEBSD_NOR_DARWIN
-+
- p && (u_long) p != auto_nlist_value("udb6")
- #else
- xig->xig_len > sizeof(struct xinpgen)
-@@ -1293,31 +1310,32 @@
- ) {
- DEBUGMSGTL(("mibII/ipv6", "looping: p=%x\n", p));
-
--#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin)
-- if (!NETSNMP_KLOOKUP(p, (char *) &in6pcb, sizeof(in6pcb))) {
-+#if OS_NOT_FREEBSD_NOR_DARWIN
-+ if (!NETSNMP_KLOOKUP(p, (char *) &tstpcb, sizeof(tstpcb))) {
- DEBUGMSGTL(("mibII/ipv6", "klookup fail for udb6 at %x\n",
- p));
- found = 0;
- break;
- }
- #else
-- in6pcb = ((struct xinpcb *) xig)->xi_inp;
-+ tstpcb = ((struct xinpcb *) xig)->xi_inp;
- #endif
--#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
-- if (in6pcb.in6p_af != AF_INET6)
-+#if OS_NET_BSD_16_OR_LATER
-+ if (tstpcb.in6p_af != AF_INET6) {
-+ p = (caddr_t)tstpcb.in6p_queue.cqe_next;
- goto skip;
--#elif (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin)
-- if (0 == (in6pcb.inp_vflag & INP_IPV6))
-+#elif OS_FREEBSD_OR_DARWIN
-+ if (0 == (tstpcb.inp_vflag & INP_IPV6PROTO))
- goto skip;
- #endif
-
- j = (int) vp->namelen;
- for (i = 0; i < sizeof(struct in6_addr); i++)
-- newname[j++] = in6pcb.in6p_laddr.s6_addr[i];
-- newname[j++] = ntohs(in6pcb.in6p_lport);
-- if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_laddr))
-+ newname[j++] = tstpcb.in6p_laddr.s6_addr[i];
-+ newname[j++] = ntohs(tstpcb.inp_lport);
-+ if (IN6_IS_ADDR_LINKLOCAL(&tstpcb.in6p_laddr))
- newname[j++] =
-- ntohs(*(uint16_t *) & in6pcb.in6p_laddr.s6_addr[2]);
-+ ntohs(*(uint16_t *) & tstpcb.in6p_laddr.s6_addr[2]);
- else
- newname[j++] = 0;
- /*XXX*/
-@@ -1328,7 +1346,7 @@
-
- result = snmp_oid_compare(name, *length, newname, j);
- if (exact && (result == 0)) {
-- memcpy(&savpcb, &in6pcb, sizeof(savpcb));
-+ memcpy(&savpcb, &tstpcb, sizeof(savpcb));
- savnameLen = j;
- memcpy(savname, newname, j * sizeof(oid));
- found++;
-@@ -1339,7 +1357,7 @@
- */
- if ((savnameLen == 0) ||
- (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) {
-- memcpy(&savpcb, &in6pcb, sizeof(savpcb));
-+ memcpy(&savpcb, &tstpcb, sizeof(savpcb));
- savnameLen = j;
- memcpy(savname, newname, j * sizeof(oid));
- found++;
-@@ -1347,15 +1365,15 @@
- }
-
- skip:
--#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
-- p = (caddr_t)in6pcb.in6p_queue.cqe_next;
--#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin)
-- p = (caddr_t) in6pcb.in6p_next;
-+#if OS_NET_BSD_16_OR_LATER
-+ p = (caddr_t)tstpcb.in6p_queue.cqe_next;
-+#elif OS_NOT_FREEBSD_NOR_DARWIN
-+ p = (caddr_t) tstpcb.in6p_next;
- #else
- xig = (struct xinpgen *) ((char *) xig + xig->xig_len);
- #endif
- }
--#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin)
-+#if OS_FREEBSD_OR_DARWIN
- free(sysctl_buf);
- #endif
- DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found));
-@@ -1363,7 +1381,7 @@
- return NULL;
- *length = savnameLen;
- memcpy((char *) name, (char *) savname, *length * sizeof(oid));
-- memcpy(&in6pcb, &savpcb, sizeof(savpcb));
-+ memcpy(&tstpcb, &savpcb, sizeof(savpcb));
- *write_method = 0;
- *var_len = sizeof(long); /* default to 'long' results */
-
-@@ -1376,14 +1394,14 @@
- switch (vp->magic) {
- case IPV6UDPLOCALADDRESS:
- *var_len = sizeof(struct in6_addr);
-- return in6pcb.in6p_laddr.s6_addr;
-+ return savpcb.in6p_laddr.s6_addr;
- case IPV6UDPLOCALPORT:
-- long_return = ntohs(in6pcb.in6p_lport);
-+ long_return = ntohs(savpcb.inp_lport);
- return (u_char *) & long_return;
- case IPV6UDPIFINDEX:
-- if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_laddr))
-+ if (IN6_IS_ADDR_LINKLOCAL(&savpcb.in6p_laddr))
- long_return =
-- ntohs(*(uint16_t *) & in6pcb.in6p_laddr.s6_addr[2]);
-+ ntohs(*(uint16_t *) & savpcb.in6p_laddr.s6_addr[2]);
- else
- long_return = 0;
- /*XXX*/ return (u_char *) & long_return;
-@@ -1401,24 +1419,24 @@
- size_t * length,
- int exact, size_t * var_len, WriteMethod ** write_method)
- {
-- oid newname[MAX_OID_LEN];
-- oid savname[MAX_OID_LEN];
-+ oid newname[MAX_OID_LEN], savname[MAX_OID_LEN];
- int result;
- int i, j;
- caddr_t p;
-- static struct in6pcb in6pcb, savpcb;
-+ static struct in6pcb tstpcb, savpcb;
- struct tcp6cb tcp6cb;
- int found, savnameLen;
- static int tcp6statemap[TCP6_NSTATES];
- static int initialized = 0;
--#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
-+#if OS_NOT_FREEBSD_NOR_DARWIN
-+ static struct in6pcb tcb6;
-+#endif
-+#if OS_NET_BSD_16_OR_LATER
- struct inpcbtable tcbtable;
- caddr_t first;
--#elif (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin)
-+#elif OS_FREEBSD_OR_DARWIN
- char *sysctl_buf;
- struct xinpgen *xig, *oxig;
--#else
-- static struct in6pcb tcb6;
- #endif
-
- if (!initialized) {
-@@ -1440,11 +1458,11 @@
- DEBUGMSGOID(("mibII/ipv6", name, *length));
- DEBUGMSG(("mibII/ipv6", " %d\n", exact));
-
--#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
-+#if OS_NET_BSD_16_OR_LATER
- if (!auto_nlist("tcbtable", (char *) &tcbtable, sizeof(tcbtable)))
- return NULL;
- first = p = (caddr_t)tcbtable.inpt_queue.cqh_first;
--#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin)
-+#elif OS_NOT_FREEBSD_NOR_DARWIN
- if (!auto_nlist("tcb6", (char *) &tcb6, sizeof(tcb6)))
- return NULL;
- p = (caddr_t) tcb6.in6p_next;
-@@ -1473,9 +1491,10 @@
- (int) vp->namelen * sizeof(oid));
- DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p));
- while (
--#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
-+#if OS_NET_BSD_16_OR_LATER
- p && p != first
--#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin)
-+#elif OS_NOT_FREEBSD_NOR_DARWIN
-+
- p && (u_long) p != auto_nlist_value("tcb6")
- #else
- xig->xig_len > sizeof(struct xinpgen)
-@@ -1483,39 +1502,39 @@
- ) {
- DEBUGMSGTL(("mibII/ipv6", "looping: p=%x\n", p));
-
--#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin)
-- if (!NETSNMP_KLOOKUP(p, (char *) &in6pcb, sizeof(in6pcb))) {
-+#if OS_NOT_FREEBSD_NOR_DARWIN
-+ if (!NETSNMP_KLOOKUP(p, (char *) &tstpcb, sizeof(tstpcb))) {
- DEBUGMSGTL(("mibII/ipv6", "klookup fail for tcb6 at %x\n",
- p));
- found = 0;
- break;
- }
- #else
-- in6pcb = ((struct xinpcb *) xig)->xi_inp;
-+ tstpcb = ((struct xinpcb *) xig)->xi_inp;
- #endif
--#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
-- if (in6pcb.in6p_af != AF_INET6)
-+#if OS_NET_BSD_16_OR_LATER
-+ if (tstpcb.in6p_af != AF_INET6)
- goto skip;
--#elif (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin)
-- if (0 == (in6pcb.inp_vflag & INP_IPV6))
-+#elif OS_FREEBSD_OR_DARWIN
-+ if (0 == (tstpcb.inp_vflag & INP_IPV6))
- goto skip;
- #endif
-- if (!NETSNMP_KLOOKUP(in6pcb.in6p_ppcb, (char *) &tcp6cb, sizeof(tcp6cb))) {
-+ if (!NETSNMP_KLOOKUP(tstpcb.inp_ppcb, (char *) &tcp6cb, sizeof(tcp6cb))) {
- DEBUGMSGTL(("mibII/ipv6", "klookup fail for tcb6.tcp6cb at %x\n",
-- in6pcb.in6p_ppcb));
-+ tstpcb.inp_ppcb));
- found = 0;
- break;
- }
- j = (int) vp->namelen;
- for (i = 0; i < sizeof(struct in6_addr); i++)
-- newname[j++] = in6pcb.in6p_laddr.s6_addr[i];
-- newname[j++] = ntohs(in6pcb.in6p_lport);
-+ newname[j++] = tstpcb.in6p_laddr.s6_addr[i];
-+ newname[j++] = ntohs(tstpcb.inp_lport);
- for (i = 0; i < sizeof(struct in6_addr); i++)
-- newname[j++] = in6pcb.in6p_faddr.s6_addr[i];
-- newname[j++] = ntohs(in6pcb.in6p_fport);
-- if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_laddr))
-+ newname[j++] = tstpcb.in6p_faddr.s6_addr[i];
-+ newname[j++] = ntohs(tstpcb.inp_fport);
-+ if (IN6_IS_ADDR_LINKLOCAL(&tstpcb.in6p_laddr))
- newname[j++] =
-- ntohs(*(uint16_t *) & in6pcb.in6p_laddr.s6_addr[2]);
-+ ntohs(*(uint16_t *) & tstpcb.in6p_laddr.s6_addr[2]);
- else
- newname[j++] = 0;
- /*XXX*/ newname[j++] = tcp6statemap[tcp6cb.t_state];
-@@ -1526,13 +1545,13 @@
- DEBUGMSG(("mibII/ipv6", " %d\n", exact));
-
- #if 1 /* this is very odd but sometimes happen, and cause infinite loop */
-- if (ntohs(in6pcb.in6p_lport) == 0)
-+ if (ntohs(tstpcb.inp_lport) == 0)
- goto skip;
- #endif
-
- result = snmp_oid_compare(name, *length, newname, j);
- if (exact && (result == 0)) {
-- memcpy(&savpcb, &in6pcb, sizeof(savpcb));
-+ memcpy(&savpcb, &tstpcb, sizeof(savpcb));
- savnameLen = j;
- memcpy(savname, newname, j * sizeof(oid));
- found++;
-@@ -1543,7 +1562,7 @@
- */
- if ((savnameLen == 0) ||
- (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) {
-- memcpy(&savpcb, &in6pcb, sizeof(savpcb));
-+ memcpy(&savpcb, &tstpcb, sizeof(savpcb));
- savnameLen = j;
- memcpy(savname, newname, j * sizeof(oid));
- found++;
-@@ -1551,15 +1570,15 @@
- }
-
- skip:
--#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
-- p = (caddr_t)in6pcb.in6p_queue.cqe_next;
--#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin)
-- p = (caddr_t) in6pcb.in6p_next;
-+#if OS_NET_BSD_16_OR_LATER
-+ p = (caddr_t)tstpcb.in6p_queue.cqe_next;
-+#elif OS_NOT_FREEBSD_NOR_DARWIN
-+ p = (caddr_t) tstpcb.in6p_next;
- #else
- xig = (struct xinpgen *) ((char *) xig + xig->xig_len);
- #endif
- }
--#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin)
-+#if OS_FREEBSD_OR_DARWIN
- free(sysctl_buf);
- #endif
- DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found));
-@@ -1580,20 +1599,20 @@
- switch (vp->magic) {
- case IPV6TCPLOCALADDR:
- *var_len = sizeof(struct in6_addr);
-- return (u_char *) & in6pcb.in6p_laddr.s6_addr[0];
-+ return (u_char *) & savpcb.in6p_laddr.s6_addr[0];
- case IPV6TCPLOCALPORT:
-- long_return = ntohs(in6pcb.in6p_lport);
-+ long_return = ntohs(savpcb.inp_lport);
- return (u_char *) & long_return;
- case IPV6TCPREMOTEADDR:
- *var_len = sizeof(struct in6_addr);
-- return (u_char *) & in6pcb.in6p_faddr.s6_addr[0];
-+ return (u_char *) & savpcb.in6p_faddr.s6_addr[0];
- case IPV6TCPREMOTEPORT:
-- long_return = ntohs(in6pcb.in6p_fport);
-+ long_return = ntohs(savpcb.inp_fport);
- return (u_char *) & long_return;
- case IPV6TCPIFINDEX:
-- if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_laddr))
-+ if (IN6_IS_ADDR_LINKLOCAL(&savpcb.in6p_laddr))
- long_return =
-- ntohs(*(uint16_t *) & in6pcb.in6p_laddr.s6_addr[2]);
-+ ntohs(*(uint16_t *) & savpcb.in6p_laddr.s6_addr[2]);
- else
- long_return = 0;
- /*XXX*/ return (u_char *) & long_return;
-@@ -1640,22 +1659,23 @@
- size_t * length,
- int exact, size_t * var_len, WriteMethod ** write_method)
- {
-- oid newname[MAX_OID_LEN];
-- oid savname[MAX_OID_LEN];
-+ oid newname[MAX_OID_LEN], savname[MAX_OID_LEN];
- int result;
- int i, j;
- caddr_t p;
-- static struct in6pcb in6pcb, savpcb;
-+ static struct in6pcb tstpcb, savpcb;
- struct tcpcb tcpcb;
- int found, savnameLen;
--#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
-+#if OS_NOT_FREEBSD_NOR_DARWIN
-+ static struct in6pcb tcb6;
-+#endif
-+#if OS_NET_BSD_16_OR_LATER
- struct inpcbtable tcbtable;
- caddr_t first;
--#elif (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin)
-+#endif
-+#if OS_FREEBSD_OR_DARWIN
- char *sysctl_buf;
- struct xinpgen *xig, *oxig;
--#else
-- static struct in6pcb tcb6;
- #endif
-
- DEBUGMSGTL(("mibII/ipv6", "var_tcp6: "));
-@@ -1695,9 +1715,9 @@
- (int) vp->namelen * sizeof(oid));
- DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p));
- while (
--#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
-+#if OS_NET_BSD_16_OR_LATER
- p && p != first
--#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin)
-+#elif OS_NOT_FREEBSD_NOR_DARWIN
- p && (u_long) p != auto_nlist_value("tcb6")
- #else
- xig->xig_len > sizeof(struct xinpgen)
-@@ -1705,39 +1725,39 @@
- ) {
- DEBUGMSGTL(("mibII/ipv6", "looping: p=%x\n", p));
-
--#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin)
-- if (!NETSNMP_KLOOKUP(p, (char *) &in6pcb, sizeof(in6pcb))) {
-+#if OS_NOT_FREEBSD_NOR_DARWIN
-+ if (!NETSNMP_KLOOKUP(p, (char *) &tstpcb, sizeof(tstpcb))) {
- DEBUGMSGTL(("mibII/ipv6", "klookup fail for tcb6 at %x\n",
- p));
- found = 0;
- break;
- }
- #else
-- in6pcb = ((struct xinpcb *) xig)->xi_inp;
-+ tstpcb = ((struct xinpcb *) xig)->xi_inp;
- #endif
--#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
-- if (in6pcb.in6p_af != AF_INET6)
-+#if OS_NET_BSD_16_OR_LATER
-+ if (tstpcb.in6p_af != AF_INET6)
- goto skip;
--#elif (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin)
-- if (0 == (in6pcb.inp_vflag & INP_IPV6))
-+#elif OS_FREEBSD_OR_DARWIN
-+ if (0 == (tstpcb.inp_vflag & INP_IPV6))
- goto skip;
- #endif
-- if (!NETSNMP_KLOOKUP(in6pcb.in6p_ppcb, (char *) &tcpcb, sizeof(tcpcb))) {
-+ if (!NETSNMP_KLOOKUP(tstpcb.inp_ppcb, (char *) &tcpcb, sizeof(tcpcb))) {
- DEBUGMSGTL(("mibII/ipv6", "klookup fail for tcb6.tcpcb at %x\n",
-- in6pcb.in6p_ppcb));
-+ tstpcb.inp_ppcb));
- found = 0;
- break;
- }
- j = (int) vp->namelen;
- for (i = 0; i < sizeof(struct in6_addr); i++)
-- newname[j++] = in6pcb.in6p_laddr.s6_addr[i];
-- newname[j++] = ntohs(in6pcb.in6p_lport);
-+ newname[j++] = tstpcb.in6p_laddr.s6_addr[i];
-+ newname[j++] = ntohs(tstpcb.inp_lport);
- for (i = 0; i < sizeof(struct in6_addr); i++)
-- newname[j++] = in6pcb.in6p_faddr.s6_addr[i];
-- newname[j++] = ntohs(in6pcb.in6p_fport);
-- if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_laddr))
-+ newname[j++] = tstpcb.in6p_faddr.s6_addr[i];
-+ newname[j++] = ntohs(tstpcb.inp_fport);
-+ if (IN6_IS_ADDR_LINKLOCAL(&tstpcb.in6p_laddr))
- newname[j++] =
-- ntohs(*(uint16_t *) & in6pcb.in6p_laddr.s6_addr[2]);
-+ ntohs(*(uint16_t *) & tstpcb.in6p_laddr.s6_addr[2]);
- else
- newname[j++] = 0;
- /*XXX*/ newname[j++] = mapTcpState((int)tcpcb.t_state);
-@@ -1748,12 +1768,12 @@
- DEBUGMSG(("mibII/ipv6", " %d\n", exact));
-
- #if 1 /* this is very odd but sometimes happen, and cause infinite loop */
-- if (ntohs(in6pcb.in6p_lport) == 0)
-+ if (ntohs(tstpcb.inp_lport) == 0)
- goto skip;
- #endif
- result = snmp_oid_compare(name, *length, newname, j);
- if (exact && (result == 0)) {
-- memcpy(&savpcb, &in6pcb, sizeof(savpcb));
-+ memcpy(&savpcb, &tstpcb, sizeof(savpcb));
- savnameLen = j;
- memcpy(savname, newname, j * sizeof(oid));
- found++;
-@@ -1764,7 +1784,7 @@
- */
- if ((savnameLen == 0) ||
- (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) {
-- memcpy(&savpcb, &in6pcb, sizeof(savpcb));
-+ memcpy(&savpcb, &tstpcb, sizeof(savpcb));
- savnameLen = j;
- memcpy(savname, newname, j * sizeof(oid));
- found++;
-@@ -1772,15 +1792,15 @@
- }
-
- skip:
--#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/
-- p = (caddr_t)in6pcb.in6p_queue.cqe_next;
--#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin)
-- p = (caddr_t) in6pcb.in6p_next;
-+#if OS_NET_BSD_16_OR_LATER
-+ p = (caddr_t)tstpcb.in6p_queue.cqe_next;
-+#elif OS_NOT_FREEBSD_NOR_DARWIN
-+ p = (caddr_t) tstpcb.in6p_next;
- #else
- xig = (struct xinpgen *) ((char *) xig + xig->xig_len);
- #endif
- }
--#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin)
-+#if OS_FREEBSD_OR_DARWIN
- free(sysctl_buf);
- #endif
- DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found));
-@@ -1788,7 +1808,7 @@
- return NULL;
- *length = savnameLen;
- memcpy((char *) name, (char *) savname, *length * sizeof(oid));
-- memcpy(&in6pcb, &savpcb, sizeof(savpcb));
-+ memcpy(&tstpcb, &savpcb, sizeof(savpcb));
- *write_method = 0;
- *var_len = sizeof(long); /* default to 'long' results */
-
-@@ -1801,20 +1821,20 @@
- switch (vp->magic) {
- case IPV6TCPLOCALADDR:
- *var_len = sizeof(struct in6_addr);
-- return (u_char *) & in6pcb.in6p_laddr.s6_addr[0];
-+ return (u_char *) & savpcb.in6p_laddr.s6_addr[0];
- case IPV6TCPLOCALPORT:
-- long_return = ntohs(in6pcb.in6p_lport);
-+ long_return = ntohs(savpcb.inp_lport);
- return (u_char *) & long_return;
- case IPV6TCPREMOTEADDR:
- *var_len = sizeof(struct in6_addr);
-- return (u_char *) & in6pcb.in6p_faddr.s6_addr[0];
-+ return (u_char *) & savpcb.in6p_faddr.s6_addr[0];
- case IPV6TCPREMOTEPORT:
-- long_return = ntohs(in6pcb.in6p_fport);
-+ long_return = ntohs(savpcb.inp_fport);
- return (u_char *) & long_return;
- case IPV6TCPIFINDEX:
-- if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_laddr))
-+ if (IN6_IS_ADDR_LINKLOCAL(&savpcb.in6p_laddr))
- long_return =
-- ntohs(*(uint16_t *) & in6pcb.in6p_laddr.s6_addr[2]);
-+ ntohs(*(uint16_t *) & savpcb.in6p_laddr.s6_addr[2]);
- else
- long_return = 0;
- /*XXX*/ return (u_char *) & long_return;
diff --git a/net-mgmt/net-snmp-devel/files/patch-iquery.c b/net-mgmt/net-snmp-devel/files/patch-iquery.c
deleted file mode 100644
index e6325ba4c2f9..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-iquery.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- agent/mibgroup/utilities/iquery.c.orig 2009-01-25 17:44:17.000000000 +0900
-+++ agent/mibgroup/utilities/iquery.c 2009-01-25 17:47:04.000000000 +0900
-@@ -186,7 +186,7 @@
- ss->securityEngineIDLen = engIDLen;
- if ( version == SNMP_VERSION_3 ) {
- ss->securityNameLen = strlen(secName);
-- memdup(&(ss->securityName), (u_char*)secName, ss->securityNameLen);
-+ memdup((u_char**)&(ss->securityName), (u_char*)secName, ss->securityNameLen);
- } else {
- memdup( &(ss->community), secName, strlen(secName));
- ss->community_len = strlen(secName);
diff --git a/net-mgmt/net-snmp-devel/files/patch-keytools.c b/net-mgmt/net-snmp-devel/files/patch-keytools.c
deleted file mode 100644
index b6bf51299bd9..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-keytools.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- snmplib/keytools.c.orig Tue Jan 25 10:17:48 2005
-+++ snmplib/keytools.c Tue Jan 25 10:18:07 2005
-@@ -32,6 +32,9 @@
- #include <strings.h>
- #endif
-
-+#if HAVE_UNISTD_H
-+#include <unistd.h>
-+#endif
- #if HAVE_DMALLOC_H
- #include <dmalloc.h>
- #endif
diff --git a/net-mgmt/net-snmp-devel/files/patch-lcd_time.c b/net-mgmt/net-snmp-devel/files/patch-lcd_time.c
deleted file mode 100644
index 60d00ac6a960..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-lcd_time.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- snmplib/lcd_time.c.orig Tue Jan 25 10:16:53 2005
-+++ snmplib/lcd_time.c Tue Jan 25 10:17:10 2005
-@@ -38,6 +38,9 @@
- #include <netinet/in.h>
- #endif
-
-+#if HAVE_UNISTD_H
-+#include <unistd.h>
-+#endif
- #if HAVE_DMALLOC_H
- #include <dmalloc.h>
- #endif
diff --git a/net-mgmt/net-snmp-devel/files/patch-local:fixproc b/net-mgmt/net-snmp-devel/files/patch-local:fixproc
deleted file mode 100644
index fa0f3fb65767..000000000000
--- a/net-mgmt/net-snmp-devel/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-devel/files/patch-local:ipf-mod.pl b/net-mgmt/net-snmp-devel/files/patch-local:ipf-mod.pl
deleted file mode 100644
index 8bf98d4f1d52..000000000000
--- a/net-mgmt/net-snmp-devel/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-devel/files/patch-local:mib2c b/net-mgmt/net-snmp-devel/files/patch-local:mib2c
deleted file mode 100644
index a0a2ce336f86..000000000000
--- a/net-mgmt/net-snmp-devel/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-devel/files/patch-local:snmpcheck.def b/net-mgmt/net-snmp-devel/files/patch-local:snmpcheck.def
deleted file mode 100644
index 4f3b4a2491da..000000000000
--- a/net-mgmt/net-snmp-devel/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-devel/files/patch-local:snmpconf b/net-mgmt/net-snmp-devel/files/patch-local:snmpconf
deleted file mode 100644
index f2a0b11cf75e..000000000000
--- a/net-mgmt/net-snmp-devel/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-devel/files/patch-local:tkmib b/net-mgmt/net-snmp-devel/files/patch-local:tkmib
deleted file mode 100644
index 3278d27c3809..000000000000
--- a/net-mgmt/net-snmp-devel/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-devel/files/patch-local:traptoemail b/net-mgmt/net-snmp-devel/files/patch-local:traptoemail
deleted file mode 100644
index 402506b540c6..000000000000
--- a/net-mgmt/net-snmp-devel/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-devel/files/patch-memory_freebsd.c b/net-mgmt/net-snmp-devel/files/patch-memory_freebsd.c
deleted file mode 100644
index ccdc537e629a..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-memory_freebsd.c
+++ /dev/null
@@ -1,37 +0,0 @@
---- agent/mibgroup/hardware/memory/memory_freebsd.c.orig 2008-05-28 20:48:46.000000000 +0900
-+++ agent/mibgroup/hardware/memory/memory_freebsd.c 2008-11-14 16:56:48.000000000 +0900
-@@ -59,6 +59,7 @@
- sysctlbyname("vfs.bufspace", &bufspace, &buf_size, NULL, 0);
- sysctlbyname("vfs.maxbufspace", &maxbufspace, &buf_size, NULL, 0);
- auto_nlist(SUM_SYMBOL, (char *) &vmem, sizeof(vmem));
-+ auto_nlist(BUFSPACE_SYMBOL, (char *) &bufspace, sizeof(bufspace));
- #ifndef freebsd4
- pagesize = 1024;
- #else
-@@ -75,7 +76,7 @@
- if (!mem->descr)
- mem->descr = strdup("Physical memory");
- mem->units = pagesize;
-- mem->size = user_mem/pagesize;
-+ mem->size = phys_mem/pagesize;
- mem->free = total.t_free;
- }
-
-@@ -134,6 +135,17 @@
- mem->free = vmem.v_cache_max - vmem.v_cache_count;
- }
-
-+ mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_MBUF, 1 );
-+ if (!mem) {
-+ snmp_log_perror("No Memory Buffer info entry");
-+ } else {
-+ if (!mem->descr)
-+ mem->descr = strdup("Memory Buffer");
-+ mem->units = pagesize;
-+ mem->size = bufspace/pagesize;
-+ mem->free = -1;
-+ }
-+
- nswap = swapmode(pagesize);
- mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_SWAP, 1 );
- if (!mem) {
diff --git a/net-mgmt/net-snmp-devel/files/patch-mib.c b/net-mgmt/net-snmp-devel/files/patch-mib.c
deleted file mode 100644
index af73abff4101..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-mib.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- snmplib/mib.c.orig Tue Jan 25 10:01:11 2005
-+++ snmplib/mib.c Tue Jan 25 10:02:02 2005
-@@ -75,6 +75,9 @@
- #include <winsock.h>
- #endif
-
-+#if HAVE_UNISTD_H
-+#include <unistd.h>
-+#endif
- #if HAVE_DMALLOC_H
- #include <dmalloc.h>
- #endif
diff --git a/net-mgmt/net-snmp-devel/files/patch-net-snmp-config.h.in b/net-mgmt/net-snmp-devel/files/patch-net-snmp-config.h.in
deleted file mode 100644
index 98de6015f10f..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-net-snmp-config.h.in
+++ /dev/null
@@ -1,20 +0,0 @@
---- include/net-snmp/net-snmp-config.h.in.orig 2008-07-28 20:41:40.000000000 +0900
-+++ include/net-snmp/net-snmp-config.h.in 2009-01-25 22:15:35.000000000 +0900
-@@ -126,7 +126,7 @@
- #undef STRUCT_SIGACTION_HAS_SA_SIGACTION
-
- /* Does struct tm have a tm_gmtoff field? */
--#undef STRUCT_TM_HAS_TM_GMTOFFF
-+#undef STRUCT_TM_HAS_TM_GMTOFF
-
- /* Does struct sockaddr have a sa_len field? */
- #undef STRUCT_SOCKADDR_HAS_SA_LEN
-@@ -1564,7 +1564,7 @@
-
- #define NETSNMP_EXCACHETIME 30
- #define NETSNMP_CACHEFILE ".snmp-exec-cache"
--#define NETSNMP_MAXCACHESIZE (200*80) /* roughly 200 lines max */
-+#define NETSNMP_MAXCACHESIZE (1500*80) /* roughly 1500 lines max */
-
- /* misc defaults */
-
diff --git a/net-mgmt/net-snmp-devel/files/patch-net-snmp-includes.h b/net-mgmt/net-snmp-devel/files/patch-net-snmp-includes.h
deleted file mode 100644
index cfb1dd29e981..000000000000
--- a/net-mgmt/net-snmp-devel/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-devel/files/patch-parse.c b/net-mgmt/net-snmp-devel/files/patch-parse.c
deleted file mode 100644
index 63eb1e023f19..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-parse.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- snmplib/parse.c.orig Tue Jan 25 10:04:35 2005
-+++ snmplib/parse.c Tue Jan 25 10:05:02 2005
-@@ -106,6 +106,9 @@
- #if defined(HAVE_REGEX_H) && defined(HAVE_REGCOMP)
- #include <regex.h>
- #endif
-+#if HAVE_UNISTD_H
-+#include <unistd.h>
-+#endif
- #if HAVE_DMALLOC_H
- #include <dmalloc.h>
- #endif
diff --git a/net-mgmt/net-snmp-devel/files/patch-scapi.c b/net-mgmt/net-snmp-devel/files/patch-scapi.c
deleted file mode 100644
index 2d6711989e35..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-scapi.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- snmplib/scapi.c.orig Tue Jan 25 10:18:44 2005
-+++ snmplib/scapi.c Tue Jan 25 10:19:01 2005
-@@ -46,6 +46,9 @@
- #include <netinet/in.h>
- #endif
-
-+#if HAVE_UNISTD_H
-+#include <unistd.h>
-+#endif
- #if HAVE_DMALLOC_H
- #include <dmalloc.h>
- #endif
diff --git a/net-mgmt/net-snmp-devel/files/patch-sctpAssocTable.c b/net-mgmt/net-snmp-devel/files/patch-sctpAssocTable.c
deleted file mode 100644
index cbcfaffba6c0..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-sctpAssocTable.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- agent/mibgroup/sctp-mib/sctpAssocTable.c.orig 2009-03-07 23:12:27.000000000 +0900
-+++ agent/mibgroup/sctp-mib/sctpAssocTable.c 2009-03-07 23:12:37.000000000 +0900
-@@ -6,7 +6,6 @@
- #include <net-snmp/net-snmp-config.h>
- #include <net-snmp/net-snmp-includes.h>
- #include <net-snmp/agent/net-snmp-agent-includes.h>
--#include <net-snmp/agent/net-snmp-agent-includes.h>
- #include <net-snmp/agent/table_container.h>
- #include "sctpAssocTable.h"
-
diff --git a/net-mgmt/net-snmp-devel/files/patch-sctpLookupLocalPortTable.c b/net-mgmt/net-snmp-devel/files/patch-sctpLookupLocalPortTable.c
deleted file mode 100644
index 9e192849fc54..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-sctpLookupLocalPortTable.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- agent/mibgroup/sctp-mib/sctpLookupLocalPortTable.c.orig 2009-03-07 23:14:02.000000000 +0900
-+++ agent/mibgroup/sctp-mib/sctpLookupLocalPortTable.c 2009-03-07 23:14:09.000000000 +0900
-@@ -6,7 +6,6 @@
- #include <net-snmp/net-snmp-config.h>
- #include <net-snmp/net-snmp-includes.h>
- #include <net-snmp/agent/net-snmp-agent-includes.h>
--#include <net-snmp/agent/net-snmp-agent-includes.h>
- #include <net-snmp/agent/table_container.h>
- #include "sctpLookupLocalPortTable.h"
-
diff --git a/net-mgmt/net-snmp-devel/files/patch-sctpScalars.h b/net-mgmt/net-snmp-devel/files/patch-sctpScalars.h
deleted file mode 100644
index 036dff4a28b8..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-sctpScalars.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- agent/mibgroup/sctp-mib/sctpScalars.h.orig 2009-01-23 23:43:37.000000000 +0900
-+++ agent/mibgroup/sctp-mib/sctpScalars.h 2009-01-23 23:44:12.000000000 +0900
-@@ -7,6 +7,8 @@
- config_require(sctp-mib/sctpScalars_common)
- #if defined( linux )
- config_require(sctp-mib/sctpScalars_linux)
-+#elif defined ( freebsd7 )
-+config_require(sctp-mib/sctpScalars_freebsd)
- #else
- /*
- * couldn't determine the correct file!
diff --git a/net-mgmt/net-snmp-devel/files/patch-sctpScalars_freebsd.c b/net-mgmt/net-snmp-devel/files/patch-sctpScalars_freebsd.c
deleted file mode 100644
index 2f187705d29b..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-sctpScalars_freebsd.c
+++ /dev/null
@@ -1,106 +0,0 @@
---- agent/mibgroup/sctp-mib/sctpScalars_freebsd.c.orig 1970-01-01 09:00:00.000000000 +0900
-+++ agent/mibgroup/sctp-mib/sctpScalars_freebsd.c 2009-01-23 23:49:22.000000000 +0900
-@@ -0,0 +1,103 @@
-+#include <net-snmp/net-snmp-config.h>
-+#include <net-snmp/net-snmp-includes.h>
-+#include <net-snmp/agent/net-snmp-agent-includes.h>
-+
-+#include "sctpScalars_common.h"
-+
-+#include <stdio.h>
-+#include <errno.h>
-+#include <stdlib.h>
-+#include <unistd.h>
-+#include <sys/types.h>
-+#include <sys/sysctl.h>
-+#include <stdint.h>
-+#include <sys/socket.h>
-+#include <netinet/in.h>
-+#include <netinet/sctp.h>
-+#include <netinet/sctp_constants.h>
-+
-+#define PROC_PREFIX "/proc"
-+#define PROC_RTO_MIN PROC_PREFIX "/sys/net/sctp/rto_min"
-+#define PROC_RTO_MAX PROC_PREFIX "/sys/net/sctp/rto_max"
-+#define PROC_RTO_INITIAL PROC_PREFIX "/sys/net/sctp/rto_initial"
-+#define PROC_VAL_COOKIE_LIFE PROC_PREFIX "/sys/net/sctp/valid_cookie_life"
-+#define PROC_MAX_INIT_RETR PROC_PREFIX "/sys/net/sctp/max_init_retransmits"
-+#define PROC_STATS PROC_PREFIX "/net/sctp/snmp"
-+
-+void
-+netsnmp_access_sctp_stats_arch_init()
-+{
-+}
-+
-+int
-+netsnmp_access_sctp_stats_arch_load(netsnmp_sctp_stats * sctp_stats)
-+{
-+ struct sctpstat stat;
-+ size_t len = sizeof(struct sctpstat);
-+
-+ if (sysctlbyname("net.inet.sctp.stats", &stat, &len, NULL, 0) < 0) {
-+ return(-1);
-+ }
-+ memset(sctp_stats, 0, sizeof(netsnmp_sctp_stats));
-+ sctp_stats->curr_estab = stat.sctps_currestab;
-+ sctp_stats->active_estabs = stat.sctps_activeestab;
-+ sctp_stats->passive_estabs = stat.sctps_passiveestab;
-+ sctp_stats->aborteds = stat.sctps_aborted;
-+ sctp_stats->shutdowns = stat.sctps_shutdown;
-+ sctp_stats->out_of_blues = stat.sctps_outoftheblue;
-+ sctp_stats->checksum_errors = stat.sctps_checksumerrors;
-+ sctp_stats->out_ctrl_chunks.low = stat.sctps_outcontrolchunks;
-+ sctp_stats->out_order_chunks.low = stat.sctps_outorderchunks;
-+ sctp_stats->out_unorder_chunks.low = stat.sctps_outunorderchunks;
-+ sctp_stats->in_ctrl_chunks.low = stat.sctps_incontrolchunks;
-+ sctp_stats->in_order_chunks.low = stat.sctps_inorderchunks;
-+ sctp_stats->in_unorder_chunks.low = stat.sctps_inunorderchunks;
-+ sctp_stats->frag_usr_msgs.low = stat.sctps_fragusrmsgs;
-+ sctp_stats->reasm_usr_msgs.low = stat.sctps_reasmusrmsgs;
-+ sctp_stats->out_sctp_packs.low = stat.sctps_outpackets;
-+ sctp_stats->in_sctp_packs.low = stat.sctps_inpackets;
-+ sctp_stats->discontinuity_time = 0;
-+ return 0;
-+}
-+
-+void
-+netsnmp_access_sctp_params_arch_init()
-+{
-+}
-+
-+int
-+netsnmp_access_sctp_params_arch_load(netsnmp_sctp_params * sctp_params)
-+{
-+ int ret;
-+ size_t len = sizeof(uint32_t);
-+ unsigned int cnt = 0;
-+
-+ sctp_params->rto_algorithm = NETSNMP_SCTP_ALGORITHM_VANJ;
-+ sctp_params->max_assocs = SCTP_MAX_NUM_OF_ASOC;
-+ if (sysctlbyname("net.inet.sctp.rto_max",
-+ &sctp_params->rto_max,
-+ &len, NULL, 0) < 0) {
-+ return(-1);
-+ }
-+ if (sysctlbyname("net.inet.sctp.rto_min",
-+ &sctp_params->rto_min,
-+ &len, NULL, 0) < 0) {
-+ return(-1);
-+ }
-+ if (sysctlbyname("net.inet.sctp.rto_initial",
-+ &sctp_params->rto_initial,
-+ &len, NULL, 0) < 0) {
-+ return(-1);
-+ }
-+ if (sysctlbyname("net.inet.sctp.valid_cookie_life",
-+ &sctp_params->val_cookie_life,
-+ &len, NULL, 0) < 0) {
-+ return(-1);
-+ }
-+ if (sysctlbyname("net.inet.sctp.init_rtx_max",
-+ &sctp_params->max_init_retr,
-+ &len, NULL, 0) < 0) {
-+ return(-1);
-+ }
-+ return 0;
-+}
diff --git a/net-mgmt/net-snmp-devel/files/patch-sctpTables.h b/net-mgmt/net-snmp-devel/files/patch-sctpTables.h
deleted file mode 100644
index 50d48e431b5d..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-sctpTables.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- agent/mibgroup/sctp-mib/sctpTables.h.orig 2009-01-23 23:46:39.000000000 +0900
-+++ agent/mibgroup/sctp-mib/sctpTables.h 2009-01-23 23:47:35.000000000 +0900
-@@ -14,6 +14,8 @@
- config_require(sctp-mib/sctpAssocTable)
- #if defined( linux )
- config_require(sctp-mib/sctpTables_linux)
-+#elif defined( freebsd7 )
-+config_require(sctp-mib/sctpTables_freebsd)
- #else
- /*
- * couldn't determine the correct file!
diff --git a/net-mgmt/net-snmp-devel/files/patch-sctpTables_common.c b/net-mgmt/net-snmp-devel/files/patch-sctpTables_common.c
deleted file mode 100644
index 9047ca289e2a..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-sctpTables_common.c
+++ /dev/null
@@ -1,9 +0,0 @@
---- agent/mibgroup/sctp-mib/sctpTables_common.c.orig 2009-03-07 23:32:28.000000000 +0900
-+++ agent/mibgroup/sctp-mib/sctpTables_common.c 2009-03-07 23:33:09.000000000 +0900
-@@ -1,3 +1,6 @@
-+#include <net-snmp/net-snmp-config.h>
-+#include <net-snmp/net-snmp-includes.h>
-+#include <net-snmp/agent/net-snmp-agent-includes.h>
- #include "sctpTables_common.h"
- #include "sctpAssocTable.h"
- #include "sctpAssocRemAddrTable.h"
diff --git a/net-mgmt/net-snmp-devel/files/patch-sctpTables_common.h b/net-mgmt/net-snmp-devel/files/patch-sctpTables_common.h
deleted file mode 100644
index b9152bea0544..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-sctpTables_common.h
+++ /dev/null
@@ -1,15 +0,0 @@
---- agent/mibgroup/sctp-mib/sctpTables_common.h.orig 2008-08-18 06:29:11.000000000 +0900
-+++ agent/mibgroup/sctp-mib/sctpTables_common.h 2009-02-28 14:06:27.000000000 +0900
-@@ -1,9 +1,9 @@
- #ifndef SCTP_TABLES_COMMON_H
- #define SCTP_TABLES_COMMON_H
-
--#include <net-snmp/net-snmp-config.h>
--#include <net-snmp/net-snmp-includes.h>
--#include <net-snmp/agent/net-snmp-agent-includes.h>
-+#if defined(freebsd7)
-+#define netsnmp_table_registration_info_free SNMP_FREE
-+#endif
-
- #define SCTP_IPADDRESS_SIZE 16
- #define SCTP_HOSTNAME_SIZE 255
diff --git a/net-mgmt/net-snmp-devel/files/patch-sctpTables_freebsd.c b/net-mgmt/net-snmp-devel/files/patch-sctpTables_freebsd.c
deleted file mode 100644
index 22d898f6b7d3..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-sctpTables_freebsd.c
+++ /dev/null
@@ -1,252 +0,0 @@
---- agent/mibgroup/sctp-mib/sctpTables_freebsd.c.orig 2009-03-07 23:31:54.000000000 +0900
-+++ agent/mibgroup/sctp-mib/sctpTables_freebsd.c 2009-03-07 23:55:04.000000000 +0900
-@@ -0,0 +1,249 @@
-+#include <net-snmp/net-snmp-config.h>
-+#include <net-snmp/net-snmp-includes.h>
-+#include <net-snmp/agent/net-snmp-agent-includes.h>
-+
-+#include "sctpAssocTable.h"
-+#include "sctpAssocLocalAddrTable.h"
-+#include "sctpAssocRemAddrTable.h"
-+#include "sctpTables_common.h"
-+
-+#include <util_funcs.h>
-+
-+#include <stdio.h>
-+#include <errno.h>
-+#include <stdlib.h>
-+#include <unistd.h>
-+#include <sys/types.h>
-+#include <sys/sysctl.h>
-+#include <stdint.h>
-+#include <sys/socket.h>
-+#include <netinet/in.h>
-+#include <netinet/sctp.h>
-+#include <netinet/sctp_constants.h>
-+
-+
-+static int
-+parse_assoc_local_addresses(sctpTables_containers * containers,
-+ struct xsctp_laddr *xladdr)
-+{
-+ int ret;
-+ sctpAssocLocalAddrTable_entry *entry;
-+ entry = sctpAssocLocalAddrTable_entry_create();
-+ if (entry == NULL)
-+ return SNMP_ERR_GENERR;
-+
-+ entry->sctpAssocId = 0;
-+ if (xladdr->address.sa.sa_family == AF_INET) {
-+ entry->sctpAssocLocalAddrType = INETADDRESSTYPE_IPV4;
-+ entry->sctpAssocLocalAddr_len = 4;
-+ memcpy(entry->sctpAssocLocalAddr,
-+ &xladdr->address.sin.sin_addr,
-+ entry->sctpAssocLocalAddr_len);
-+ } else if (xladdr->address.sa.sa_family == AF_INET6) {
-+ entry->sctpAssocLocalAddrType = INETADDRESSTYPE_IPV6;
-+ entry->sctpAssocLocalAddr_len = 16;
-+ memcpy(entry->sctpAssocLocalAddr,
-+ &xladdr->address.sin6.sin6_addr,
-+ entry->sctpAssocLocalAddr_len);
-+ }
-+ entry->sctpAssocLocalAddrStartTime = xladdr->start_time.tv_sec;
-+ ret = sctpAssocLocalAddrTable_add_or_update(containers->sctpAssocLocalAddrTable,
-+ entry);
-+ if (ret != SNMP_ERR_NOERROR)
-+ return SNMP_ERR_GENERR;
-+
-+ return SNMP_ERR_NOERROR;
-+}
-+
-+static int
-+parse_assoc_xstcb(sctpTables_containers * containers, struct xsctp_tcb *xstcb)
-+{
-+ long inode;
-+ char *token;
-+ int ret;
-+ sctpAssocTable_entry *entry;
-+
-+ entry = sctpAssocTable_entry_create();
-+ if (entry == NULL)
-+ return SNMP_ERR_GENERR;
-+
-+ switch (xstcb->state) {
-+ case SCTP_STATE_INUSE:
-+ entry->sctpAssocState = SCTPASSOCSTATE_DELETETCB;
-+ break;
-+ case SCTP_STATE_COOKIE_WAIT:
-+ entry->sctpAssocState = SCTPASSOCSTATE_COOKIEWAIT;
-+ break;
-+ case SCTP_STATE_COOKIE_ECHOED:
-+ entry->sctpAssocState = SCTPASSOCSTATE_COOKIEECHOED;
-+ break;
-+ case SCTP_STATE_OPEN:
-+ entry->sctpAssocState = SCTPASSOCSTATE_ESTABLISHED;
-+ break;
-+ case SCTP_STATE_SHUTDOWN_SENT:
-+ entry->sctpAssocState = SCTPASSOCSTATE_SHUTDOWNSENT;
-+ break;
-+ case SCTP_STATE_SHUTDOWN_RECEIVED:
-+ entry->sctpAssocState = SCTPASSOCSTATE_SHUTDOWNRECEIVED;
-+ break;
-+ case SCTP_STATE_SHUTDOWN_ACK_SENT:
-+ entry->sctpAssocState = SCTPASSOCSTATE_SHUTDOWNACKSENT;
-+ break;
-+ default:
-+ case SCTP_STATE_EMPTY:
-+ entry->sctpAssocState = SCTPASSOCSTATE_CLOSED;
-+ break;
-+ };
-+ entry->sctpAssocHeartBeatInterval = xstcb->heartbeat_interval;
-+ entry->sctpAssocId = 0;
-+ entry->sctpAssocPrimProcess = xstcb->primary_process;
-+ entry->sctpAssocLocalPort = xstcb->local_port;
-+ entry->sctpAssocRemPort = xstcb->remote_port;
-+ entry->sctpAssocHeartBeatInterval = xstcb->heartbeat_interval;
-+ entry->sctpAssocInStreams = xstcb->in_streams;
-+ entry->sctpAssocOutStreams = xstcb->out_streams;
-+ entry->sctpAssocMaxRetr = xstcb->max_nr_retrans;
-+ entry->sctpAssocT1expireds = xstcb->T1_expireries;
-+ entry->sctpAssocRtxChunks = xstcb->retransmitted_tsns;
-+ entry->sctpAssocT2expireds = xstcb->T2_expireries;
-+ entry->sctpAssocRemHostName[0] = 0;
-+ entry->sctpAssocRemHostName_len = 0;
-+ entry->sctpAssocDiscontinuityTime = xstcb->discontinuity_time.tv_sec;
-+ entry->sctpAssocStartTime = xstcb->start_time.tv_sec;
-+
-+ ret = sctpAssocTable_add_or_update(containers->sctpAssocTable, entry);
-+ if (ret != SNMP_ERR_NOERROR) {
-+ return ret;
-+ }
-+
-+ return SNMP_ERR_NOERROR;
-+}
-+
-+
-+static int
-+parse_remaddr_xraddr(sctpTables_containers * containers,
-+ struct xsctp_raddr *xraddr)
-+{
-+ char *token;
-+ int ret;
-+ sctpAssocRemAddrTable_entry *entry;
-+
-+ entry = sctpAssocRemAddrTable_entry_create();
-+ if (entry == NULL)
-+ return SNMP_ERR_GENERR;
-+
-+
-+ entry->sctpAssocId = 0;
-+
-+ if(xraddr->active)
-+ entry->sctpAssocRemAddrActive = TRUTHVALUE_TRUE;
-+ else
-+ entry->sctpAssocRemAddrActive = TRUTHVALUE_FALSE;
-+
-+ if (xraddr->heartbeat_enabled)
-+ entry->sctpAssocRemAddrHBActive = TRUTHVALUE_TRUE;
-+ else
-+ entry->sctpAssocRemAddrHBActive = TRUTHVALUE_FALSE;
-+
-+ entry->sctpAssocRemAddrRTO = xraddr->rto;
-+ entry->sctpAssocRemAddrMaxPathRtx = xraddr->max_path_rtx;
-+ entry->sctpAssocRemAddrRtx = xraddr->rtx;
-+ entry->sctpAssocRemAddrStartTime = xraddr->start_time.tv_sec;
-+
-+ if (xraddr->address.sa.sa_family == AF_INET) {
-+ entry->sctpAssocRemAddrType = INETADDRESSTYPE_IPV4;
-+ entry->sctpAssocRemAddr_len = 4;
-+ memcpy(entry->sctpAssocRemAddr,
-+ &xraddr->address.sin.sin_addr,
-+ entry->sctpAssocRemAddr_len);
-+ } else if (xraddr->address.sa.sa_family == AF_INET6) {
-+ entry->sctpAssocRemAddrType = INETADDRESSTYPE_IPV6;
-+ entry->sctpAssocRemAddr_len = 16;
-+ memcpy(entry->sctpAssocRemAddr,
-+ &xraddr->address.sin6.sin6_addr,
-+ entry->sctpAssocRemAddr_len);
-+ }
-+ ret =
-+ sctpAssocRemAddrTable_add_or_update(containers->
-+ sctpAssocRemAddrTable, entry);
-+ if (ret != SNMP_ERR_NOERROR) {
-+ return ret;
-+ }
-+ return SNMP_ERR_NOERROR;
-+}
-+
-+
-+int
-+sctpTables_arch_load(sctpTables_containers * containers, u_long * flags)
-+{
-+ int ret = SNMP_ERR_NOERROR;
-+ size_t len;
-+ caddr_t buf;
-+ unsigned int offset;
-+ struct xsctp_inpcb *xinp;
-+ struct xsctp_tcb *xstcb;
-+ struct xsctp_laddr *xladdr;
-+ struct xsctp_raddr *xraddr;
-+ sa_family_t family;
-+ void *addr;
-+
-+
-+ *flags |= SCTP_TABLES_LOAD_FLAG_DELETE_INVALID;
-+ *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) {
-+ printf("malloc %lu bytes failed.\n", (long unsigned)len);
-+ return(-1);
-+ }
-+ if (sysctlbyname("net.inet.sctp.assoclist", buf, &len, 0, 0) < 0) {
-+ printf("Error %d (%s) could not get the assoclist\n", errno, strerror(errno));
-+ free(buf);
-+ return(-1);
-+ }
-+ offset = 0;
-+ xinp = (struct xsctp_inpcb *)(buf + offset);
-+ while (xinp->last == 0) {
-+ /* for each INP */
-+ offset += sizeof(struct xsctp_inpcb);
-+ /* Local addresses */
-+ xladdr = (struct xsctp_laddr *)(buf + offset);
-+ while (xladdr->last == 0) {
-+ offset += sizeof(struct xsctp_laddr);
-+ xladdr = (struct xsctp_laddr *)(buf + offset);
-+ }
-+ offset += sizeof(struct xsctp_laddr);
-+ /* Associations */
-+ xstcb = (struct xsctp_tcb *)(buf + offset);
-+ while (xstcb->last == 0) {
-+ xstcb = (struct xsctp_tcb *)(buf + offset);
-+ offset += sizeof(struct xsctp_tcb);
-+ parse_assoc_xstcb(containers, xstcb);
-+ /* Local addresses */
-+ xladdr = (struct xsctp_laddr *)(buf + offset);
-+ while (xladdr->last == 0) {
-+ parse_assoc_local_addresses(containers, xladdr);
-+ offset += sizeof(struct xsctp_laddr);
-+ xladdr = (struct xsctp_laddr *)(buf + offset);
-+ }
-+ offset += sizeof(struct xsctp_laddr);
-+
-+ /* Remote addresses */
-+ xraddr = (struct xsctp_raddr *)(buf + offset);
-+ while (xraddr->last == 0) {
-+ parse_remaddr_xraddr(containers, xraddr);
-+ offset += sizeof(struct xsctp_raddr);
-+ xraddr = (struct xsctp_raddr *)(buf + offset);
-+ }
-+ offset += sizeof(struct xsctp_raddr);
-+ xstcb = (struct xsctp_tcb *)(buf + offset);
-+ }
-+ offset += sizeof(struct xsctp_tcb);
-+ xinp = (struct xsctp_inpcb *)(buf + offset);
-+ }
-+ free((void *)buf);
-+ return ret;
-+}
diff --git a/net-mgmt/net-snmp-devel/files/patch-snmpTCPIPv6Domain.c b/net-mgmt/net-snmp-devel/files/patch-snmpTCPIPv6Domain.c
deleted file mode 100644
index 44c26b86d08c..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-snmpTCPIPv6Domain.c
+++ /dev/null
@@ -1,31 +0,0 @@
---- snmplib/snmpTCPIPv6Domain.c.orig 2008-06-17 17:57:14.000000000 +0900
-+++ snmplib/snmpTCPIPv6Domain.c 2008-11-14 21:34:12.000000000 +0900
-@@ -96,12 +96,23 @@
- if (to == NULL) {
- return strdup("TCP/IPv6: unknown");
- } else {
-- char addr[INET6_ADDRSTRLEN];
-- char tmp[INET6_ADDRSTRLEN + 18];
-+ char addr[NI_MAXHOST], tmp[NI_MAXHOST + NI_MAXSERV + 12];
-
-- sprintf(tmp, "TCP/IPv6: [%s]:%hd",
-- inet_ntop(AF_INET6, (void *) &(to->sin6_addr), addr,
-- INET6_ADDRSTRLEN), ntohs(to->sin6_port));
-+/*
-+ * NI_WITHSCOPEID will be obsoleted. But some implementations require
-+ * this flag to retrieve scoped name.
-+ * (2002-07-25: kuriyama@FreeBSD.org)
-+ */
-+#ifndef NI_WITHSCOPEID
-+#define NI_WITHSCOPEID 0
-+#endif
-+ if (getnameinfo((struct sockaddr *)to, sizeof(struct sockaddr_in6),
-+ addr, sizeof(addr), NULL, 0,
-+ NI_NUMERICHOST | NI_WITHSCOPEID)) {
-+ return strdup("UDP/IPv6: unknown");
-+ }
-+ snprintf(tmp, sizeof(tmp), "TCP/IPv6: [%s]:%hd", addr,
-+ ntohs(to->sin6_port));
- return strdup(tmp);
- }
- }
diff --git a/net-mgmt/net-snmp-devel/files/patch-snmpUCDIPv6Domain.c b/net-mgmt/net-snmp-devel/files/patch-snmpUCDIPv6Domain.c
deleted file mode 100644
index 62ceec96c330..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-snmpUCDIPv6Domain.c
+++ /dev/null
@@ -1,31 +0,0 @@
---- snmplib/snmpUDPIPv6Domain.c.orig 2007-09-29 22:10:22.000000000 +0900
-+++ snmplib/snmpUDPIPv6Domain.c 2008-11-14 21:36:45.000000000 +0900
-@@ -109,12 +109,22 @@
- if (to == NULL) {
- return strdup("UDP/IPv6: unknown");
- } else {
-- char addr[INET6_ADDRSTRLEN];
-- char tmp[INET6_ADDRSTRLEN + 18];
--
-- sprintf(tmp, "UDP/IPv6: [%s]:%hu",
-- inet_ntop(AF_INET6, (void *) &(to->sin6_addr), addr,
-- INET6_ADDRSTRLEN), ntohs(to->sin6_port));
-+ char addr[NI_MAXHOST], tmp[NI_MAXHOST + NI_MAXSERV + 12];
-+/*
-+ * NI_WITHSCOPEID will be obsoleted. But some implementations require
-+ * this flag to retrieve scoped name.
-+ * (2002-07-25: kuriyama@FreeBSD.org)
-+ */
-+#ifndef NI_WITHSCOPEID
-+#define NI_WITHSCOPEID 0
-+#endif
-+ if (getnameinfo((struct sockaddr *)to, sizeof(struct sockaddr_in6),
-+ addr, sizeof(addr), NULL, 0,
-+ NI_NUMERICHOST | NI_WITHSCOPEID)) {
-+ return strdup("UDP/IPv6: unknown");
-+ }
-+ snprintf(tmp, sizeof(tmp), "UDP/IPv6: [%s]:%hu", addr,
-+ ntohs(to->sin6_port));
- return strdup(tmp);
- }
- }
diff --git a/net-mgmt/net-snmp-devel/files/patch-snmp_agent.c b/net-mgmt/net-snmp-devel/files/patch-snmp_agent.c
deleted file mode 100644
index 6428559eb68b..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-snmp_agent.c
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: agent/snmp_agent.c
-diff -u -p agent/snmp_agent.c.orig agent/snmp_agent.c
---- agent/snmp_agent.c.orig Thu Aug 16 22:31:40 2007
-+++ agent/snmp_agent.c Fri Jan 11 13:06:27 2008
-@@ -819,7 +819,7 @@ netsnmp_agent_check_packet(netsnmp_sessi
- }
- #ifdef USE_LIBWRAP
- /* Catch udp,udp6,tcp,tcp6 transports using "[" */
-- tcpudpaddr = strstr(addr_string, "[");
-+ tcpudpaddr = strrchr(addr_string, '[');
- if ( tcpudpaddr != 0 ) {
- char sbuf[64];
- char *xp;
diff --git a/net-mgmt/net-snmp-devel/files/patch-snmp_auth.c b/net-mgmt/net-snmp-devel/files/patch-snmp_auth.c
deleted file mode 100644
index be52a5e4fd36..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-snmp_auth.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- snmplib/snmp_auth.c.orig Tue Jan 25 10:08:14 2005
-+++ snmplib/snmp_auth.c Tue Jan 25 10:08:34 2005
-@@ -63,6 +63,9 @@
- #include <arpa/inet.h>
- #endif
-
-+#if HAVE_UNISTD_H
-+#include <unistd.h>
-+#endif
- #if HAVE_DMALLOC_H
- #include <dmalloc.h>
- #endif
diff --git a/net-mgmt/net-snmp-devel/files/patch-snmp_debug.c b/net-mgmt/net-snmp-devel/files/patch-snmp_debug.c
deleted file mode 100644
index 6b24b5354b77..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-snmp_debug.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- snmplib/snmp_debug.c.orig Tue Jan 25 10:10:49 2005
-+++ snmplib/snmp_debug.c Tue Jan 25 10:11:06 2005
-@@ -22,6 +22,9 @@
- #include <winsock.h>
- #endif
-
-+#if HAVE_UNISTD_H
-+#include <unistd.h>
-+#endif
- #if HAVE_DMALLOC_H
- #include <dmalloc.h>
- #endif
diff --git a/net-mgmt/net-snmp-devel/files/patch-snmp_logging.c b/net-mgmt/net-snmp-devel/files/patch-snmp_logging.c
deleted file mode 100644
index f66b33d0dd6e..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-snmp_logging.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- snmplib/snmp_logging.c.orig Tue Jan 25 10:14:41 2005
-+++ snmplib/snmp_logging.c Tue Jan 25 10:15:05 2005
-@@ -65,6 +65,9 @@
- #include <varargs.h>
- #endif
-
-+#if HAVE_UNISTD_H
-+#include <unistd.h>
-+#endif
- #if HAVE_DMALLOC_H
- #include <dmalloc.h>
- #endif
diff --git a/net-mgmt/net-snmp-devel/files/patch-snmp_transport.c b/net-mgmt/net-snmp-devel/files/patch-snmp_transport.c
deleted file mode 100644
index e1ae87834fe9..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-snmp_transport.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- snmplib/snmp_transport.c.orig Tue Jan 25 10:21:33 2005
-+++ snmplib/snmp_transport.c Tue Jan 25 10:21:52 2005
-@@ -12,6 +12,9 @@
- #include <stdlib.h>
- #endif
-
-+#if HAVE_UNISTD_H
-+#include <unistd.h>
-+#endif
- #if HAVE_DMALLOC_H
- #include <dmalloc.h>
- #endif
diff --git a/net-mgmt/net-snmp-devel/files/patch-snmpd.c b/net-mgmt/net-snmp-devel/files/patch-snmpd.c
deleted file mode 100644
index c7d6d4ed06c8..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-snmpd.c
+++ /dev/null
@@ -1,32 +0,0 @@
---- agent/snmpd.c.orig 2009-01-25 17:25:26.000000000 +0900
-+++ agent/snmpd.c 2009-01-25 17:36:52.000000000 +0900
-@@ -426,6 +426,9 @@
- char *cptr, **argvptr;
- char *pid_file = NULL;
- char option_compatability[] = "-Le";
-+#if HAVE_UNISTD_H
-+ const char *ccptr;
-+#endif
- #if HAVE_GETPID
- int fd;
- FILE *PID;
-@@ -960,8 +963,8 @@
- #endif
-
- #if HAVE_UNISTD_H
-- cptr = get_persistent_directory();
-- mkdirhier( cptr, NETSNMP_AGENT_DIRECTORY_MODE, 0 );
-+ ccptr = get_persistent_directory();
-+ mkdirhier( ccptr, NETSNMP_AGENT_DIRECTORY_MODE, 0 );
-
- uid = netsnmp_ds_get_int(NETSNMP_DS_APPLICATION_ID,
- NETSNMP_DS_AGENT_USERID);
-@@ -970,7 +973,7 @@
-
- #ifdef HAVE_CHOWN
- if ( uid != 0 || gid != 0 )
-- chown( cptr, uid, gid );
-+ chown( ccptr, uid, gid );
- #endif
-
- #ifdef HAVE_SETGID
diff --git a/net-mgmt/net-snmp-devel/files/patch-snmpusm.c b/net-mgmt/net-snmp-devel/files/patch-snmpusm.c
deleted file mode 100644
index 4eae56c1a0f0..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-snmpusm.c
+++ /dev/null
@@ -1,21 +0,0 @@
---- snmplib/snmpusm.c.orig Thu Sep 16 07:57:47 2004
-+++ snmplib/snmpusm.c Tue Jan 25 10:23:02 2005
-@@ -54,6 +54,9 @@
- #include <netinet/in.h>
- #endif
-
-+#if HAVE_UNISTD_H
-+#include <unistd.h>
-+#endif
- #if HAVE_DMALLOC_H
- #include <dmalloc.h>
- #endif
-@@ -89,6 +92,8 @@
- oid usmAESPrivProtocol[10] = { 1, 3, 6, 1, 6, 3, 10, 1, 2, 4 };
- /* backwards compat */
- oid *usmAES128PrivProtocol = usmAESPrivProtocol;
-+oid *usmAES192PrivProtocol = usmAESPrivProtocol;
-+oid *usmAES256PrivProtocol = usmAESPrivProtocol;
-
- static u_int dummy_etime, dummy_eboot; /* For ISENGINEKNOWN(). */
-
diff --git a/net-mgmt/net-snmp-devel/files/patch-tcpTable.c b/net-mgmt/net-snmp-devel/files/patch-tcpTable.c
deleted file mode 100644
index d96d0976189b..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-tcpTable.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- agent/mibgroup/mibII/tcpTable.c.orig Wed Jun 9 05:53:17 2004
-+++ agent/mibgroup/mibII/tcpTable.c Thu Jun 24 23:21:32 2004
-@@ -275,6 +277,9 @@
-
- int
- TCP_Count_Connections( void ) {
-+#if (defined(CAN_USE_SYSCTL) && defined(TCPCTL_PCBLIST))
-+ tcpTable_load(NULL, NULL);
-+#endif
- return tcp_estab;
- }
-
diff --git a/net-mgmt/net-snmp-devel/files/patch-tools.c b/net-mgmt/net-snmp-devel/files/patch-tools.c
deleted file mode 100644
index f24a401ec9e6..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-tools.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- snmplib/tools.c.orig Tue Jan 25 10:13:50 2005
-+++ snmplib/tools.c Tue Jan 25 10:14:06 2005
-@@ -44,6 +44,9 @@
- #include <arpa/inet.h>
- #endif
-
-+#if HAVE_UNISTD_H
-+#include <unistd.h>
-+#endif
- #if HAVE_DMALLOC_H
- #include <dmalloc.h>
- #endif
diff --git a/net-mgmt/net-snmp-devel/files/patch-transform_oids.h b/net-mgmt/net-snmp-devel/files/patch-transform_oids.h
deleted file mode 100644
index 674d4c1acb22..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-transform_oids.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- include/net-snmp/library/transform_oids.h.orig 2006-10-28 05:19:44.000000000 +0900
-+++ include/net-snmp/library/transform_oids.h 2008-03-26 07:50:45.393507729 +0900
-@@ -23,6 +23,8 @@
- /* XXX: OIDs not defined yet */
- NETSNMP_IMPORT oid usmAESPrivProtocol[10]; /* == { 1,3,6,1,6,3,10,1,2,4 }; */
- NETSNMP_IMPORT oid *usmAES128PrivProtocol; /* backwards compat */
-+NETSNMP_IMPORT oid *usmAES192PrivProtocol; /* backwards compat */
-+NETSNMP_IMPORT oid *usmAES256PrivProtocol; /* backwards compat */
-
- #define USM_AUTH_PROTO_NOAUTH_LEN 10
- #define USM_AUTH_PROTO_MD5_LEN 10
diff --git a/net-mgmt/net-snmp-devel/files/snmpd.sh.in b/net-mgmt/net-snmp-devel/files/snmpd.sh.in
deleted file mode 100644
index 0af14f41a7b0..000000000000
--- a/net-mgmt/net-snmp-devel/files/snmpd.sh.in
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: /tmp/pcvs/ports/net-mgmt/net-snmp-devel/files/Attic/snmpd.sh.in,v 1.7 2007-10-27 07:20:34 kuriyama Exp $
-#
-# PROVIDE: snmpd
-# REQUIRE: DAEMON
-#
-# Add the following line to /etc/rc.conf to enable snmpd:
-#
-# snmpd_enable="YES"
-#
-
-snmpd_enable=${snmpd_enable-"NO"}
-snmpd_flags=${snmpd_flags-""}
-snmpd_pidfile=${snmpd_pidfile-"/var/run/snmpd.pid"}
-snmpd_conffile=${snmpd_conffile-""}
-snmpd_flush_cache=${snmpd_flush_cache-"NO"}
-
-. %%RC_SUBR%%
-
-load_rc_config net_snmpd
-
-if [ ! -z "$net_snmpd_enable" ]; then
- echo "Warning: \$net_snmpd_enable is obsoleted."
- echo " Use \$snmpd_enable instead."
- snmpd_enable="$net_snmpd_enable"
- [ ! -z "$net_snmpd_flags" ] && snmpd_flags="$net_snmpd_flags"
-fi
-
-name=snmpd
-rcvar=`set_rcvar`
-
-command=%%PREFIX%%/sbin/${name}
-pidfile=${snmpd_pidfile}
-start_precmd=snmpd_precmd
-
-load_rc_config ${name}
-
-snmpd_precmd () {
- if checkyesno snmpd_flush_cache; then
- rm -vf /var/net-snmp/.snmp-exec-cache
- fi
-}
-
-case "${snmpd_flags}" in
-*-p\ *)
- echo "Warning: \$snmpd_flags includes -p option." \
- "Please use \$snmpd_pidfile instead."
- ;;
-*)
- snmpd_flags="-p ${snmpd_pidfile} ${snmpd_flags}"
- ;;
-esac
-
-for conffile in ${snmpd_conffile}; do
- if [ ! -z ${conffile} -a -f ${conffile} ]; then
- if [ -z ${snmpd_conffile_set} ]; then
- snmpd_conffile_set="${conffile}"
- else
- snmpd_conffile_set="${snmpd_conffile_set},${conffile}"
- fi
- else
- echo "snmpd configuration file $conffile not set or not found."
- exit 1
- fi
-done
-
-case "${snmpd_flags}" in
-*-c\ *)
- echo "Warning: \$snmpd_flags includes -c option." \
- "Please use \$snmpd_conffile instead."
- ;;
-*)
- if [ ! -z "${snmpd_conffile_set}" ]; then
- snmpd_flags="-c ${snmpd_conffile_set} ${snmpd_flags}"
- fi
- ;;
-esac
-
-run_rc_command "$1"
diff --git a/net-mgmt/net-snmp-devel/files/snmptrapd.sh.in b/net-mgmt/net-snmp-devel/files/snmptrapd.sh.in
deleted file mode 100644
index 33c3b2a44551..000000000000
--- a/net-mgmt/net-snmp-devel/files/snmptrapd.sh.in
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: /tmp/pcvs/ports/net-mgmt/net-snmp-devel/files/Attic/snmptrapd.sh.in,v 1.1 2006-05-08 05:00:27 clsung Exp $
-#
-# PROVIDE: snmptrapd
-# REQUIRE: DAEMON
-#
-# Add the following line to /etc/rc.conf to enable snmptrapd:
-#
-# snmptrapd_enable="YES"
-#
-
-snmptrapd_enable=${snmptrapd_enable-"NO"}
-snmptrapd_flags=${snmptrapd_flags-"-p /var/run/snmptrapd.pid"}
-
-. %%RC_SUBR%%
-
-load_rc_config net_snmptrapd
-
-if [ ! -z "$net_snmptrapd_enable" ]; then
- echo "Warning: \$net_snmptrapd_enable is obsoleted."
- echo " Use \$snmptrapd_enable instead."
- snmptrapd_enable="$net_snmptrapd_enable"
- [ ! -z "$net_snmptrapd_flags" ] && snmptrapd_flags="$net_snmptrapd_flags"
-fi
-
-name=snmptrapd
-rcvar=`set_rcvar`
-
-command=%%PREFIX%%/sbin/${name}
-pidfile=/var/run/${name}.pid
-
-load_rc_config ${name}
-run_rc_command "$1"
diff --git a/net-mgmt/net-snmp-devel/files/test.t b/net-mgmt/net-snmp-devel/files/test.t
deleted file mode 100644
index cca9d9ed4191..000000000000
--- a/net-mgmt/net-snmp-devel/files/test.t
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/perl -w
-#
-# $FreeBSD$
-
-use strict;
-use Test::More tests => 1;
-
-my $cmd = 'snmpwalk -c public -v 1 localhost';
-
-# ports/86572
-my $output = `$cmd hrSWRunType`;
-like($output, qr/operatingSystem/, 'hrSWRunType');