aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/net-snmp53/files
diff options
context:
space:
mode:
authorcvs2svn <cvs2svn@FreeBSD.org>2004-05-15 15:49:17 +0000
committercvs2svn <cvs2svn@FreeBSD.org>2004-05-15 15:49:17 +0000
commit6f316ce2e89f972a4f22e1b97e1dda5e9d58cefa (patch)
treefb8d61358190cc429db453d54fb9920ccfde716f /net-mgmt/net-snmp53/files
parentea16706c62b542adc8f3b887256bf215bf914db6 (diff)
Diffstat (limited to 'net-mgmt/net-snmp53/files')
-rw-r--r--net-mgmt/net-snmp53/files/extra-patch-local:Makefile.in11
-rw-r--r--net-mgmt/net-snmp53/files/extra-patch-snmplib::mib.c136
-rw-r--r--net-mgmt/net-snmp53/files/patch-Makefile.in11
-rw-r--r--net-mgmt/net-snmp53/files/patch-Makefile.top11
-rw-r--r--net-mgmt/net-snmp53/files/patch-aa13
-rw-r--r--net-mgmt/net-snmp53/files/patch-aclocal.m448
-rw-r--r--net-mgmt/net-snmp53/files/patch-auto_nlist.c10
-rw-r--r--net-mgmt/net-snmp53/files/patch-configure.in47
-rw-r--r--net-mgmt/net-snmp53/files/patch-diskio.c56
-rw-r--r--net-mgmt/net-snmp53/files/patch-freebsd.h11
-rw-r--r--net-mgmt/net-snmp53/files/patch-freebsd5.h22
-rw-r--r--net-mgmt/net-snmp53/files/patch-hr_storage.c52
-rw-r--r--net-mgmt/net-snmp53/files/patch-hr_swrun.c86
-rw-r--r--net-mgmt/net-snmp53/files/patch-hr_system.c11
-rw-r--r--net-mgmt/net-snmp53/files/patch-interfaces.c16
-rw-r--r--net-mgmt/net-snmp53/files/patch-ipv6.c113
-rw-r--r--net-mgmt/net-snmp53/files/patch-local:fixproc138
-rw-r--r--net-mgmt/net-snmp53/files/patch-local:ipf-mod.pl21
-rw-r--r--net-mgmt/net-snmp53/files/patch-local:mib2c20
-rw-r--r--net-mgmt/net-snmp53/files/patch-local:snmpcheck.def8
-rw-r--r--net-mgmt/net-snmp53/files/patch-local:snmpconf53
-rw-r--r--net-mgmt/net-snmp53/files/patch-local:tkmib9
-rw-r--r--net-mgmt/net-snmp53/files/patch-local:traptoemail16
-rw-r--r--net-mgmt/net-snmp53/files/patch-memory_freebsd2.c37
-rw-r--r--net-mgmt/net-snmp53/files/patch-snmpTCPIPv6Domain.c30
-rw-r--r--net-mgmt/net-snmp53/files/patch-snmpUCDIPv6Domain.c30
-rw-r--r--net-mgmt/net-snmp53/files/patch-snmpd.8.def13
-rw-r--r--net-mgmt/net-snmp53/files/patch-tcpTable.c46
-rw-r--r--net-mgmt/net-snmp53/files/patch-udpTable.c25
-rw-r--r--net-mgmt/net-snmp53/files/patch-vmstat_freebsd2.c14
-rw-r--r--net-mgmt/net-snmp53/files/snmpd.sh.sample36
-rw-r--r--net-mgmt/net-snmp53/files/snmptrapd.sh.sample35
32 files changed, 0 insertions, 1185 deletions
diff --git a/net-mgmt/net-snmp53/files/extra-patch-local:Makefile.in b/net-mgmt/net-snmp53/files/extra-patch-local:Makefile.in
deleted file mode 100644
index 7f648103d7aa..000000000000
--- a/net-mgmt/net-snmp53/files/extra-patch-local:Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- local/Makefile.in.orig Sat Apr 20 16:30:13 2002
-+++ local/Makefile.in Wed Apr 24 01:45:55 2002
-@@ -12,7 +12,7 @@
- # local info
- #
- SNMPCONFPATH=@SNMPCONFPATH@
--PERLSCRIPTS=snmpcheck tkmib mib2c fixproc ipf-mod.pl snmpconf traptoemail
-+PERLSCRIPTS=snmpcheck mib2c fixproc ipf-mod.pl snmpconf traptoemail
- SCRIPTSMADEFORPERL=snmpcheck.made tkmib.made mib2c.made fixproc.made \
- ipf-mod.pl.made snmpconf.made traptoemail.made
- PERLPROG=@PERLPROG@
diff --git a/net-mgmt/net-snmp53/files/extra-patch-snmplib::mib.c b/net-mgmt/net-snmp53/files/extra-patch-snmplib::mib.c
deleted file mode 100644
index 9ee51d8abf67..000000000000
--- a/net-mgmt/net-snmp53/files/extra-patch-snmplib::mib.c
+++ /dev/null
@@ -1,136 +0,0 @@
---- snmplib/mib.c.orig Sun Nov 2 12:50:39 2003
-+++ snmplib/mib.c Sat Jan 3 03:08:38 2004
-@@ -167,6 +167,14 @@
- {NULL, 0} /* end of list */
- };
-
-+enum inet_address_type {
-+ IPV4 = 1,
-+ IPV6 = 2,
-+ IPV4Z = 3,
-+ IPV6Z = 4,
-+ DNS = 16
-+};
-+
-
- /**
- * @internal
-@@ -3734,6 +3742,80 @@
- return SNMPERR_SUCCESS;
- }
-
-+/*
-+ * dump_realloc_oid_to_inetaddress:
-+ * return 1 for success,
-+ * return 0 for failure,
-+ * return 2 for not handled
-+ */
-+
-+int
-+dump_realloc_oid_to_inetaddress(const int addr_type, const oid * objid, size_t objidlen,
-+ u_char ** buf, size_t * buf_len,
-+ size_t * out_len, int allow_realloc,
-+ char quotechar)
-+{
-+ if (buf) {
-+ int i, len;
-+ char intbuf[64], * p;
-+ u_int32_t zone;
-+
-+ memset(intbuf, 0, 64);
-+
-+ p = intbuf;
-+ *p = quotechar;
-+ p++;
-+ switch (addr_type) {
-+ case IPV4:
-+ case IPV4Z:
-+ if ((addr_type == IPV4 && objidlen != 4) ||
-+ (addr_type == IPV4Z && objidlen != 8))
-+ return 2;
-+
-+ len = sprintf(p, "%lu.%lu.%lu.%lu", objid[0], objid[1], objid[2], objid[3]);
-+ p += len;
-+ if (addr_type == IPV4Z) {
-+ zone = ntohl(*((u_int32_t *) objid[4]));
-+ len = sprintf(p, "\%%lu", zone);
-+ p += len;
-+ }
-+
-+ break;
-+
-+ case IPV6:
-+ case IPV6Z:
-+ if ((addr_type == IPV6 && objidlen != 16) ||
-+ (addr_type == IPV6Z && objidlen != 20))
-+ return 2;
-+
-+ len = 0;
-+ for (i = 0; i < 16; i ++) {
-+ len += snprintf(p, 4, "%02x:", objid[i]);
-+ p += 3;
-+ }
-+ p-- ; /* do not include the last ':' */
-+
-+ if (addr_type == IPV6Z) {
-+ zone = ntohl(*((u_int32_t *) objid[4]));
-+ len = sprintf(p, "\%%lu", zone);
-+ p += len;
-+ }
-+
-+ break;
-+
-+ case DNS:
-+ default:
-+ /* DNS can just be handled by dump_realloc_oid_to_string() */
-+ return 2;
-+ }
-+
-+ *p = quotechar;
-+ return snmp_strcat(buf, buf_len, out_len, allow_realloc,
-+ (const u_char *) intbuf);
-+ }
-+ return 1;
-+}
-+
- int
- dump_realloc_oid_to_string(const oid * objid, size_t objidlen,
- u_char ** buf, size_t * buf_len,
-@@ -4043,7 +4125,36 @@
- }
- } else {
- if (!*buf_overflow) {
-- if (!dump_realloc_oid_to_string
-+ struct tree * next_peer;
-+ int normal_handling = 1;
-+
-+ if (tp->next_peer) {
-+ next_peer = tp->next_peer;
-+ }
-+
-+ /* Try handling the InetAddress in the OID, in case of failure,
-+ * use the normal_handling.
-+ */
-+ if (tp->next_peer &&
-+ strcmp(get_tc_descriptor(tp->tc_index), "InetAddress") == 0 &&
-+ strcmp(get_tc_descriptor(next_peer->tc_index),
-+ "InetAddressType") == 0 ) {
-+
-+ int ret;
-+ int addr_type = *(objid - 1);
-+
-+ ret = dump_realloc_oid_to_inetaddress(addr_type,
-+ objid + 1, numids - 1, buf, buf_len, out_len,
-+ allow_realloc, '"');
-+ if (ret != 2) {
-+ normal_handling = 0;
-+ if (ret == 0) {
-+ *buf_overflow = 1;
-+ }
-+
-+ }
-+ }
-+ if (normal_handling && !dump_realloc_oid_to_string
- (objid + 1, numids - 1, buf, buf_len, out_len,
- allow_realloc, '"')) {
- *buf_overflow = 1;
diff --git a/net-mgmt/net-snmp53/files/patch-Makefile.in b/net-mgmt/net-snmp53/files/patch-Makefile.in
deleted file mode 100644
index a751bb7b7223..000000000000
--- a/net-mgmt/net-snmp53/files/patch-Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- Makefile.in.orig Thu Feb 19 05:35:25 2004
-+++ Makefile.in Wed Mar 24 08:25:27 2004
-@@ -15,7 +15,7 @@
- INSTALLHEADERS=version.h
- INCLUDESUBDIR=system
- INCLUDESUBDIRHEADERS= aix.h bsd.h bsdi3.h bsdi4.h bsdi.h cygwin.h darwin.h \
-- dynix.h freebsd2.h freebsd3.h freebsd4.h freebsd.h generic.h hpux.h \
-+ dynix.h freebsd2.h freebsd3.h freebsd4.h freebsd5.h freebsd.h generic.h hpux.h \
- irix.h linux.h mingw32.h mips.h netbsd.h openbsd.h osf5.h \
- solaris2.6.h solaris2.7.h solaris2.8.h solaris2.9.h solaris.h \
- sunos.h svr5.h sysv.h ultrix4.h
diff --git a/net-mgmt/net-snmp53/files/patch-Makefile.top b/net-mgmt/net-snmp53/files/patch-Makefile.top
deleted file mode 100644
index 33bed26b787a..000000000000
--- a/net-mgmt/net-snmp53/files/patch-Makefile.top
+++ /dev/null
@@ -1,11 +0,0 @@
---- Makefile.top.orig Thu Mar 6 05:08:26 2003
-+++ Makefile.top Sat Mar 29 21:54:50 2003
-@@ -59,7 +59,7 @@
- # generally, LIBCURRENT should stay the same unless major changes occur.
- # Increment REVISION every release.
- # Increment AGE if new stuff is available.
--LIB_LD_CMD = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o
-+LIB_LD_CMD = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -rpath $(libdir) -release $(LIBCURRENT) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o
- LIB_EXTENSION = la
- LIB_VERSION =
- LIB_LDCONFIG_CMD = $(LIBTOOL) --mode=finish $(libdir)
diff --git a/net-mgmt/net-snmp53/files/patch-aa b/net-mgmt/net-snmp53/files/patch-aa
deleted file mode 100644
index 4d371fdbd56e..000000000000
--- a/net-mgmt/net-snmp53/files/patch-aa
+++ /dev/null
@@ -1,13 +0,0 @@
---- snmplib/Makefile.in.orig Wed Jul 17 02:50:49 2002
-+++ snmplib/Makefile.in Mon Jul 22 12:24:37 2002
-@@ -140,6 +140,10 @@
-
- libsnmp.$(LIB_EXTENSION)$(LIB_VERSION): ${TOBJS}
- $(LIB_LD_CMD) libsnmp.$(LIB_EXTENSION)$(LIB_VERSION) ${TOBJS}
-+ ld -Bshareable -soname libsnmp.so.4 \
-+ -o libsnmp.so ${OBJS}
-+ ln -f libsnmp.so \
-+ ../libsnmp.so.4
- $(RANLIB) libsnmp.$(LIB_EXTENSION)$(LIB_VERSION)
-
- #how to build dependencies
diff --git a/net-mgmt/net-snmp53/files/patch-aclocal.m4 b/net-mgmt/net-snmp53/files/patch-aclocal.m4
deleted file mode 100644
index eb2e519aa7f0..000000000000
--- a/net-mgmt/net-snmp53/files/patch-aclocal.m4
+++ /dev/null
@@ -1,48 +0,0 @@
---- aclocal.m4.orig Tue Sep 18 17:08:01 2001
-+++ aclocal.m4 Mon Jan 21 10:38:40 2002
-@@ -196,8 +196,23 @@
- AC_DEFUN([AC_PROG_LIBTOOL],
- [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-
-+# Save cache, so that ltconfig can load it
-+AC_CACHE_SAVE
-+
-+# Actually configure libtool. ac_aux_dir is where install-sh is found.
-+CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-+LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-+LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
-+DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
-+${CONFIG_SHELL-/bin/sh} %%LTCONFIG%% --no-reexec \
-+$libtool_flags --no-verify --disable-ltlibs --release-ignore %%LTMAIN%% $lt_target \
-+|| AC_MSG_ERROR([libtool configure failed])
-+
-+# Reload cache, that may have been modified by ltconfig
-+AC_CACHE_LOAD
-+
- # This can be used to rebuild libtool when needed
--LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
-+LIBTOOL_DEPS="--disable-ltlibs --release-ignore %%LTMAIN%%"
-
- # Always use our own libtool.
- LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-@@ -224,6 +239,11 @@
- AC_REQUIRE([AC_EXEEXT])dnl
- dnl
-
-+case "$target" in
-+NONE) lt_target="$host" ;;
-+*) lt_target="$target" ;;
-+esac
-+
- _LT_AC_PROG_ECHO_BACKSLASH
- # Only perform the check for file, if the check method requires it
- case $deplibs_check_method in
-@@ -875,7 +895,7 @@
- # All known linkers require a `.a' archive for static linking (except M$VC,
- # which needs '.lib').
- libext=a
--ltmain="$ac_aux_dir/ltmain.sh"
-+ltmain="--disable-ltlibs --release-ignore %%LTMAIN%%"
- ofile="$default_ofile"
- with_gnu_ld="$lt_cv_prog_gnu_ld"
- need_locks="$enable_libtool_lock"
diff --git a/net-mgmt/net-snmp53/files/patch-auto_nlist.c b/net-mgmt/net-snmp53/files/patch-auto_nlist.c
deleted file mode 100644
index 79feff8f64ee..000000000000
--- a/net-mgmt/net-snmp53/files/patch-auto_nlist.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- agent/auto_nlist.c.orig Sun Feb 29 21:24:25 2004
-+++ agent/auto_nlist.c Sun Feb 29 21:24:43 2004
-@@ -57,6 +57,7 @@
- }
- if (*ptr == 0) {
- *ptr = (struct autonlist *) malloc(sizeof(struct autonlist));
-+ memset(*ptr, 0, sizeof(struct autonlist));
- it = *ptr;
- it->left = 0;
- it->right = 0;
diff --git a/net-mgmt/net-snmp53/files/patch-configure.in b/net-mgmt/net-snmp53/files/patch-configure.in
deleted file mode 100644
index bc45eecc20b7..000000000000
--- a/net-mgmt/net-snmp53/files/patch-configure.in
+++ /dev/null
@@ -1,47 +0,0 @@
---- configure.in.orig Thu Mar 6 07:41:13 2003
-+++ configure.in Tue May 27 14:53:22 2003
-@@ -1246,7 +1246,7 @@
- dnl fall back
- CFLAG="-f"
- fi
--for i in /vmunix /hp-ux /stand/vmunix /dev/ksyms /kernel/unix /kernel/genunix /netbsd /unix /kernel /bsd /mach_kernel
-+for i in /vmunix /hp-ux /stand/vmunix /dev/ksyms /kernel/unix /kernel/genunix /netbsd /unix /kernel /bsd /mach_kernel /boot/kernel/kernel /dev/null
- do
- if test -f $i -o $CFLAG $i; then
- ac_cv_KERNEL_LOC="$i"
-@@ -1659,7 +1659,7 @@
- AC_HEADER_SYS_WAIT
- AC_CHECK_HEADERS(stdarg.h string.h fcntl.h limits.h sys/file.h sys/ioctl.h syslog.h unistd.h netinet/tcpip.h netinet/in.h netinet/ip.h netinet/ip_icmp.h net/if.h netdb.h sys/dmap.h machine/pte.h xti.h sys/sockio.h sys/socket.h sys/un.h fstab.h sys/fs.h mtab.h ufs/fs.h ufs/ffs/fs.h sys/fixpoint.h machine/param.h sys/vm.h vm/vm.h sys/vmmeter.h sys/vmparam.h sys/vmmac.h sys/vmsystm.h sys/mbuf.h sys/time.h sys/swap.h inet/mib2.h sys/statvfs.h sys/vfs.h sys/mnttab.h sys/user.h sys/proc.h sys/select.h mntent.h sys/mntent.h kstat.h utsname.h sys/utsname.h sys/cdefs.h getopt.h locale.h pthread.h sys/loadavg.h regex.h linux/tasks.h pwd.h grp.h utmpx.h)
- # FreeBSD required headers
--AC_CHECK_HEADERS(malloc.h sys/param.h net/if_dl.h sys/sysctl.h stdlib.h net/if_mib.h net/if_types.h net/if_var.h sys/queue.h osreldate.h machine/types.h sys/socketvar.h)
-+AC_CHECK_HEADERS(malloc.h sys/param.h net/if_dl.h sys/sysctl.h stdlib.h net/if_mib.h net/if_types.h net/if_var.h sys/queue.h osreldate.h sys/socketvar.h)
- # Linux
- AC_CHECK_HEADERS(sys/conf.h netinet/in_systm.h netinet/tcp.h netinet/udp.h netinet/in_var.h netinet/if_ether.h netinet/ip_var.h netinet/tcp_timer.h netinet/tcp_var.h netinet/tcp_fsm.h netinet/udp_var.h netinet/icmp_var.h sys/protosw.h nlist.h ioctls.h asm/page.h netipx/ipx.h)
- # NetBSD required headers
-@@ -1866,6 +1866,26 @@
- dnl checking for 4.3 vs 4.4 rtentry.
- AC_CACHE_CHECK(type of rtentry structure,ac_cv_RTENTRY_TYPE,
- [
-+
-+dnl 4.4 compatible but renamed on FreeBSD
-+AC_TRY_COMPILE([
-+#include <sys/types.h>
-+#define KERNEL
-+#define _KERNEL
-+#include <sys/socket.h>
-+#undef KERNEL
-+#undef _KERNEL
-+#include <net/route.h>
-+],[
-+
-+#ifndef STRUCT_RTENTRY_HAS_RT_DST
-+#define rt_dst rt_nodes->rn_key
-+#endif
-+
-+ struct rtentry rt;
-+ rt.rt_nodes[0].rn_bit = 1;
-+ rt.rt_dst;
-+ ], ac_cv_RTENTRY_TYPE="BSD-4.4")
-
- dnl 4.4 compat
- AC_TRY_COMPILE([
diff --git a/net-mgmt/net-snmp53/files/patch-diskio.c b/net-mgmt/net-snmp53/files/patch-diskio.c
deleted file mode 100644
index 609168f22e9c..000000000000
--- a/net-mgmt/net-snmp53/files/patch-diskio.c
+++ /dev/null
@@ -1,56 +0,0 @@
---- agent/mibgroup/ucd-snmp/diskio.c.orig Thu Mar 6 07:55:01 2003
-+++ agent/mibgroup/ucd-snmp/diskio.c Sat Mar 29 22:41:29 2003
-@@ -49,7 +49,12 @@
- #endif /* bsdi */
-
- #if defined (freebsd4) || defined(freebsd5)
-+#include <sys/param.h>
-+#if __FreeBSD_version >= 500101
-+#include <sys/resource.h>
-+#else
- #include <sys/dkstat.h>
-+#endif
- #include <devstat.h>
- #endif /* freebsd */
-
-@@ -380,7 +385,11 @@
- }
- memset(stat->dinfo, 0, sizeof(struct devinfo));
-
-+#if defined(freebsd5) && (__FreeBSD_version >= 500107)
-+ if ((devstat_getdevs(NULL, stat)) == -1) {
-+#else
- if ((getdevs(stat)) == -1) {
-+#endif
- fprintf(stderr, "Can't get devices:%s\n", devstat_errbuf);
- return 1;
- }
-@@ -429,6 +438,20 @@
- case DISKIO_DEVICE:
- *var_len = strlen(stat->dinfo->devices[indx].device_name);
- return (u_char *) stat->dinfo->devices[indx].device_name;
-+#if defined(freebsd5) && (__FreeBSD_version >= 500107)
-+ case DISKIO_NREAD:
-+ long_ret = (signed long) stat->dinfo->devices[indx].bytes[DEVSTAT_READ];
-+ return (u_char *) & long_ret;
-+ case DISKIO_NWRITTEN:
-+ long_ret = (signed long) stat->dinfo->devices[indx].bytes[DEVSTAT_WRITE];
-+ return (u_char *) & long_ret;
-+ case DISKIO_READS:
-+ long_ret = (signed long) stat->dinfo->devices[indx].operations[DEVSTAT_READ];
-+ return (u_char *) & long_ret;
-+ case DISKIO_WRITES:
-+ long_ret = (signed long) stat->dinfo->devices[indx].operations[DEVSTAT_WRITE];
-+ return (u_char *) & long_ret;
-+#else
- case DISKIO_NREAD:
- long_ret = (signed long) stat->dinfo->devices[indx].bytes_read;
- return (u_char *) & long_ret;
-@@ -441,6 +464,7 @@
- case DISKIO_WRITES:
- long_ret = (signed long) stat->dinfo->devices[indx].num_writes;
- return (u_char *) & long_ret;
-+#endif
-
- default:
- ERROR_MSG("diskio.c: don't know how to handle this request.");
diff --git a/net-mgmt/net-snmp53/files/patch-freebsd.h b/net-mgmt/net-snmp53/files/patch-freebsd.h
deleted file mode 100644
index c445b0abeb58..000000000000
--- a/net-mgmt/net-snmp53/files/patch-freebsd.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- include/net-snmp/system/freebsd.h.orig Sat Apr 3 14:56:45 2004
-+++ include/net-snmp/system/freebsd.h Sat Apr 3 14:56:59 2004
-@@ -6,7 +6,7 @@
- * udp_inpcb list symbol
- */
- #undef INP_NEXT_SYMBOL
--#define INP_NEXT_SYMBOL inp_next
-+#define INP_NEXT_SYMBOL inp_list.le_next
-
- #undef TCP_TTL_SYMBOL
- #define TCP_TTL_SYMBOL "ip_defttl"
diff --git a/net-mgmt/net-snmp53/files/patch-freebsd5.h b/net-mgmt/net-snmp53/files/patch-freebsd5.h
deleted file mode 100644
index 697589ec48b8..000000000000
--- a/net-mgmt/net-snmp53/files/patch-freebsd5.h
+++ /dev/null
@@ -1,22 +0,0 @@
---- /dev/null Sat Aug 16 16:33:01 2003
-+++ include/net-snmp/system/freebsd5.h Sat Aug 16 16:42:08 2003
-@@ -0,0 +1,19 @@
-+#include "freebsd.h"
-+
-+/*
-+ * freebsd4 is a superset of freebsd2 and freebsd3
-+ */
-+#define freebsd2 1
-+#define freebsd3 1
-+#define freebsd4 1
-+
-+#undef IFADDR_SYMBOL
-+#define IFADDR_SYMBOL "in_ifaddrhead"
-+
-+#undef PROC_SYMBOL
-+#define PROC_SYMBOL "allproc"
-+
-+#undef NPROC_SYMBOL
-+#define NPROC_SYMBOL "nprocs"
-+
-+#undef TOTAL_MEMORY_SYMBOL
diff --git a/net-mgmt/net-snmp53/files/patch-hr_storage.c b/net-mgmt/net-snmp53/files/patch-hr_storage.c
deleted file mode 100644
index e5638709fbfa..000000000000
--- a/net-mgmt/net-snmp53/files/patch-hr_storage.c
+++ /dev/null
@@ -1,52 +0,0 @@
---- agent/mibgroup/host/hr_storage.c.orig Tue Feb 25 22:17:46 2003
-+++ agent/mibgroup/host/hr_storage.c Fri Nov 14 13:03:07 2003
-@@ -148,7 +148,7 @@
- #define HRFS_mount mnt_mountp
- #define HRFS_statfs statvfs
-
--#elif defined(HAVE_STATVFS)
-+#elif defined(HAVE_STATVFS) && defined(HAVE_MNTENT)
-
- extern struct mntent *HRFS_entry;
- extern int fscount;
-@@ -564,7 +564,7 @@
- }
- case HRSTORE_UNITS:
- if (store_idx > HRS_TYPE_FIXED_MAX)
--#if STRUCT_STATVFS_HAS_F_FRSIZE
-+#if defined(STRUCT_STATVFS_HAS_F_FRSIZE) && defined(HAVE_MNTENT)
- long_return = stat_buf.f_frsize;
- #else
- long_return = stat_buf.f_bsize;
-@@ -647,7 +647,15 @@
- i++)
- long_return += mbstat.m_mtypes[i];
- #elif defined(MBSTAT_SYMBOL)
-+#if !defined(__FreeBSD__) || __FreeBSD_version < 500021
- long_return = mbstat.m_mbufs;
-+#elif defined(freebsd5) && __FreeBSD_version < 500024
-+ /* mbuf stats disabled */
-+ return NULL;
-+#else
-+ /* XXX TODO: implement new method */
-+ return NULL;
-+#endif
- #elif defined(NO_DUMMY_VALUES)
- return NULL;
- #else
-@@ -705,7 +713,15 @@
- * mbpool.pr_size + (mclpool.pr_nget - mclpool.pr_nput)
- * mclpool.pr_size;
- #elif defined(MBSTAT_SYMBOL)
-+#if !defined(__FreeBSD__) || __FreeBSD_version < 500021
- long_return = mbstat.m_clusters - mbstat.m_clfree; /* unlikely, but... */
-+#elif defined(freebsd5) && __FreeBSD_version < 500024
-+ /* mbuf stats disabled */
-+ return NULL;
-+#else
-+ /* XXX TODO: implement new method */
-+ return NULL;
-+#endif
- #elif defined(NO_DUMMY_VALUES)
- return NULL;
- #else
diff --git a/net-mgmt/net-snmp53/files/patch-hr_swrun.c b/net-mgmt/net-snmp53/files/patch-hr_swrun.c
deleted file mode 100644
index 5ff95f18ca72..000000000000
--- a/net-mgmt/net-snmp53/files/patch-hr_swrun.c
+++ /dev/null
@@ -1,86 +0,0 @@
---- agent/mibgroup/host/hr_swrun.c.orig Fri Dec 20 00:07:30 2002
-+++ agent/mibgroup/host/hr_swrun.c Sat Aug 16 17:10:54 2003
-@@ -561,7 +561,11 @@
- string[ sizeof(string)-1 ] = 0;
- #endif
- #elif HAVE_KVM_GETPROCS
-+#if defined(freebsd5) && __FreeBSD_version >= 500014
-+ strcpy(string, proc_table[LowProcIndex].ki_comm);
-+#else
- strcpy(string, proc_table[LowProcIndex].kp_proc.p_comm);
-+#endif
- #elif defined(linux)
- sprintf(string, "/proc/%d/status", pid);
- if ((fp = fopen(string, "r")) == NULL)
-@@ -666,7 +670,11 @@
- *cp1 = 0;
- #endif
- #elif HAVE_KVM_GETPROCS
-+#if defined(freebsd5) && __FreeBSD_version >= 500014
-+ strcpy(string, proc_table[LowProcIndex].ki_comm);
-+#else
- strcpy(string, proc_table[LowProcIndex].kp_proc.p_comm);
-+#endif
- #elif defined(linux)
- sprintf(string, "/proc/%d/cmdline", pid);
- if ((fp = fopen(string, "r")) == NULL)
-@@ -857,7 +865,11 @@
- }
- #else
- #if HAVE_KVM_GETPROCS
-+#if defined(freebsd5) && __FreeBSD_version >= 500014
-+ switch ( proc_table[LowProcIndex].ki_stat ) {
-+#else
- switch (proc_table[LowProcIndex].kp_proc.p_stat) {
-+#endif
- #elif defined(dynix)
- switch (lowpsinfo.pr_state) {
- #elif defined(solaris2)
-@@ -952,9 +964,17 @@
- long_return = proc_buf->p_utime * 100 + proc_buf->p_stime * 100;
- #endif
- #elif HAVE_KVM_GETPROCS
-+#if defined(freebsd5) && __FreeBSD_version >= 500014
-+ /* XXX: Accessing ki_paddr causes sig10 ...
-+ long_return = proc_table[LowProcIndex].ki_paddr->p_uticks +
-+ proc_table[LowProcIndex].ki_paddr->p_sticks +
-+ proc_table[LowProcIndex].ki_paddr->p_iticks; */
-+ long_return = 0;
-+#else
- long_return = proc_table[LowProcIndex].kp_proc.p_uticks +
- proc_table[LowProcIndex].kp_proc.p_sticks +
- proc_table[LowProcIndex].kp_proc.p_iticks;
-+#endif
- #elif defined(linux)
- sprintf(string, "/proc/%d/stat", pid);
- if ((fp = fopen(string, "r")) == NULL)
-@@ -1023,7 +1043,14 @@
- long_return = proc_buf->p_swrss;
- #endif
- #elif HAVE_KVM_GETPROCS
--#if defined(freebsd3) && !defined(darwin)
-+#if defined(freebsd5) && __FreeBSD_version >= 500014
-+ /* XXX
-+ long_return = proc_table[LowProcIndex].ki_vmspace->vm_tsize +
-+ proc_table[LowProcIndex].ki_vmspace->vm_ssize +
-+ proc_table[LowProcIndex].ki_vmspace->vm_dsize;
-+ long_return = long_return * (getpagesize() / 1024); */
-+ long_return = 0;
-+#elif defined(freebsd3) && !defined(darwin)
- long_return =
- proc_table[LowProcIndex].kp_eproc.e_vm.vm_map.size / 1024;
- #else
-@@ -1303,8 +1330,13 @@
- #elif defined(solaris2)
- return proc_table[current_proc_entry++];
- #elif HAVE_KVM_GETPROCS
-+#if defined(freebsd5) && __FreeBSD_version >= 500014
-+ if ( proc_table[current_proc_entry].ki_stat != 0 )
-+ return proc_table[current_proc_entry++].ki_pid;
-+#else
- if (proc_table[current_proc_entry].kp_proc.p_stat != 0)
- return proc_table[current_proc_entry++].kp_proc.p_pid;
-+#endif
- #else
- if (proc_table[current_proc_entry].p_stat != 0)
- return proc_table[current_proc_entry++].p_pid;
diff --git a/net-mgmt/net-snmp53/files/patch-hr_system.c b/net-mgmt/net-snmp53/files/patch-hr_system.c
deleted file mode 100644
index f2d810ac0771..000000000000
--- a/net-mgmt/net-snmp53/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-snmp53/files/patch-interfaces.c b/net-mgmt/net-snmp53/files/patch-interfaces.c
deleted file mode 100644
index c9d465c00859..000000000000
--- a/net-mgmt/net-snmp53/files/patch-interfaces.c
+++ /dev/null
@@ -1,16 +0,0 @@
---- agent/mibgroup/mibII/interfaces.c.orig Sat Jun 8 00:18:03 2002
-+++ agent/mibgroup/mibII/interfaces.c Mon Jul 29 12:35:08 2002
-@@ -555,11 +555,9 @@
- ifp->ifm_type));
- }
- }
-- if (have_ifinfo && have_addr) {
-+ if (have_ifinfo) {
- return 0;
-- } else if (have_ifinfo && !(if_msg->ifm_flags & IFF_UP))
-- return 0;
-- else {
-+ } else {
- return -1;
- }
- }
diff --git a/net-mgmt/net-snmp53/files/patch-ipv6.c b/net-mgmt/net-snmp53/files/patch-ipv6.c
deleted file mode 100644
index 0ee3f76c99ad..000000000000
--- a/net-mgmt/net-snmp53/files/patch-ipv6.c
+++ /dev/null
@@ -1,113 +0,0 @@
---- agent/mibgroup/mibII/ipv6.c.orig Fri Feb 28 18:13:36 2003
-+++ agent/mibgroup/mibII/ipv6.c Wed Nov 19 00:16:27 2003
-@@ -1238,6 +1238,7 @@
- if (!auto_nlist("udb6", (char *) &udb6, sizeof(udb6)))
- return NULL;
- p = (caddr_t) udb6.in6p_next;
-+ DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p));
- #else
- {
- const char *udblist = "net.inet.udp.pcblist";
-@@ -1254,11 +1255,11 @@
- oxig = (struct xinpgen *) sysctl_buf;
- xig = (struct xinpgen *) ((char *) oxig + oxig->xig_len);
- }
-+ DEBUGMSGTL(("mibII/ipv6", "start: xig=%p\n", xig));
- #endif
- found = hitnext = 0;
- memcpy((char *) newname, (char *) vp->name,
- (int) vp->namelen * sizeof(oid));
-- DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p));
- while (
- #if !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
- p && (u_long) p != auto_nlist_value("udb6")
-@@ -1266,12 +1267,16 @@
- xig->xig_len > sizeof(struct xinpgen)
- #endif
- ) {
-- DEBUGMSGTL(("mibII/ipv6", "looping: p=%x\n", p));
-
- #if !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
-+ DEBUGMSGTL(("mibII/ipv6", "looping: p=%x\n", p));
- klookup((u_long) p, (char *) &in6pcb, sizeof(in6pcb));
- #else
- in6pcb = ((struct xinpcb *) xig)->xi_inp;
-+ if (!(in6pcb.inp_vflag & 0x02)) { /* Skip non-IPv6 pcb */
-+ xig = (struct xinpgen *) ((char *) xig + xig->xig_len);
-+ continue;
-+ }
- #endif
- j = (int) vp->namelen;
- for (i = 0; i < sizeof(struct in6_addr); i++)
-@@ -1283,8 +1288,8 @@
- else
- newname[j++] = 0;
- /*XXX*/
-- DEBUGMSGTL(("mibII/ipv6", "var_udp6 new: %d %d ",
-- (int) vp->namelen, j));
-+ DEBUGMSGTL(("mibII/ipv6", "var_udp6 new: %d %d ",
-+ (int) vp->namelen, j));
- DEBUGMSGOID(("mibII/ipv6", newname, j));
- DEBUGMSG(("mibII/ipv6", " %d\n", exact));
-
-@@ -1447,9 +1452,6 @@
- p));
- break;
- }
--#else
-- in6pcb = ((struct xinpcb *) xig)->xi_inp;
--#endif
- if (klookup
- ((u_long) in6pcb.in6p_ppcb, (char *) &tcp6cb, sizeof(tcp6cb))
- < 0) {
-@@ -1457,6 +1459,14 @@
- in6pcb.in6p_ppcb));
- break;
- }
-+#else
-+ in6pcb = ((struct xinpcb *) xig)->xi_inp;
-+ struct xtcpcb *xp = (struct xtcpcb *)xig;
-+ tcp6cb = xp->xt_tp;
-+ if (!(in6pcb.inp_vflag & 0x02)) { /* Skip non-IPv6 pcb */
-+ goto skip;
-+ }
-+#endif
- j = (int) vp->namelen;
- for (i = 0; i < sizeof(struct in6_addr); i++)
- newname[j++] = in6pcb.in6p_laddr.s6_addr[i];
-@@ -1590,6 +1600,7 @@
- #if defined(__FreeBSD__) && __FreeBSD__ >= 3
- char *sysctl_buf;
- struct xinpgen *xig, *oxig;
-+ struct xtcpcb *xp;
- #endif /* defined(__FreeBSD__) && __FreeBSD__ >= 3 */
-
- if (!initialized) {
-@@ -1646,11 +1657,7 @@
- DEBUGMSGTL(("mibII/ipv6", "looping: p=%x\n", p));
-
- #if !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
-- if (klookup((u_long) p, (char *) &in6pcb, sizeof(in6pcb)) < 0)
--#else
-- in6pcb = ((struct xinpcb *) xig)->xi_inp;
--#endif
-- {
-+ if (klookup((u_long) p, (char *) &in6pcb, sizeof(in6pcb)) < 0) {
- DEBUGMSGTL(("mibII/ipv6", "klookup fail for in6pcb at %x\n",
- p));
- break;
-@@ -1662,6 +1669,14 @@
- in6pcb.in6p_ppcb));
- break;
- }
-+#else
-+ in6pcb = ((struct xinpcb *) xig)->xi_inp;
-+ xp = (struct xtcpcb *)xig;
-+ tcp6cb = xp->xt_tp;
-+ if (!(in6pcb.inp_vflag & 0x02)) { /* Skip non-IPv6 pcb */
-+ goto skip;
-+ }
-+#endif
- j = (int) vp->namelen;
- for (i = 0; i < sizeof(struct in6_addr); i++)
- newname[j++] = in6pcb.in6p_laddr.s6_addr[i];
diff --git a/net-mgmt/net-snmp53/files/patch-local:fixproc b/net-mgmt/net-snmp53/files/patch-local:fixproc
deleted file mode 100644
index 5d6e3515467d..000000000000
--- a/net-mgmt/net-snmp53/files/patch-local:fixproc
+++ /dev/null
@@ -1,138 +0,0 @@
---- local/fixproc.orig Sat Apr 20 09:30:13 2002
-+++ local/fixproc Sat Mar 6 01:59:59 2004
-@@ -1,4 +1,4 @@
--#!/usr/bin/perl
-+#!%%PERL%%
- #
- # fixproc [-min n] [-max n] [-check | -kill | -restart | -exist | -fix] proc ...
- #
-@@ -129,7 +129,7 @@
- #
- # Timothy Kong 3/1995
-
--$database_file = '/local/etc/fixproc.conf';
-+$database_file = '%%PREFIX%%/etc/fixproc.conf';
-
- $debug = 0; # specify debug level using -dN
- # currently defined: -d1
-@@ -155,6 +155,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
-@@ -203,7 +211,9 @@
- $i++;
- }
- close (file);
-- system "chmod +x $file";
-+ ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
-+ $atime,$mtime,$ctime,$blksize,$blocks) = stat($file);
-+ chmod $mode | 0111, $file;
- return file;
- }
-
-@@ -237,8 +247,8 @@
-
- # return code is number divided by 256
- $error_code = (system "$tmpfile") / 256;
-- system "rm $tmpfile";
-- return ($fix_failed_error) if ($error_code != 0);
-+ unlink $tmpfile;
-+ return ($cannot_fix_error) if ($error_code != 0);
- # sleep needed here?
- return &do_exist ($proc);
- }
-@@ -268,7 +278,7 @@
-
- # return code is number divided by 256
- $error_code = (system "$tmpfile") / 256;
-- system "rm $tmpfile";
-+ unlink $tmpfile;
- return ($check_failed_error) if ($error_code != 0);
-
- # check passed, continue
-@@ -285,10 +295,12 @@
-
- # do ps, check to see if min <= no. of processes <= max
- $! = $fixproc_error;
-- open (command, "/bin/ps -e | /bin/grep $proc | /bin/wc -l |")
-+ open (command, "/bin/ps $ps_opts |")
- || die "$0: can't run ps-grep-wc command\n";
-- $proc_count = <command>;
-- if (($proc_count < $min{$proc}) || ($proc_count > $max{$proc}))
-+ @allprocs = <command>;
-+ close command;
-+ @procs = grep(/$proc/, @allprocs);
-+ if (($#procs < $min{$proc}) || ($#procs > $max{$proc}))
- {
- return $check_failed_error;
- }
-@@ -305,41 +317,48 @@
-
- # 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-snmp53/files/patch-local:ipf-mod.pl b/net-mgmt/net-snmp53/files/patch-local:ipf-mod.pl
deleted file mode 100644
index 8bf98d4f1d52..000000000000
--- a/net-mgmt/net-snmp53/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-snmp53/files/patch-local:mib2c b/net-mgmt/net-snmp53/files/patch-local:mib2c
deleted file mode 100644
index 6609d77609c9..000000000000
--- a/net-mgmt/net-snmp53/files/patch-local:mib2c
+++ /dev/null
@@ -1,20 +0,0 @@
---- local/mib2c.orig Fri Nov 14 02:28:39 2003
-+++ local/mib2c Wed Feb 4 09:05:44 2004
-@@ -1,5 +1,4 @@
--#!/usr/bin/perl
--#!/usr/bin/perl -w
-+#!%%PERL%%
-
- #
- # $Id: mib2c,v 5.36 2003/11/14 01:28:39 rstory Exp $
-@@ -56,8 +55,8 @@
- if($ENV{MIB2C_DIR}) {
- push @def_search_dirs, $ENV{MIB2C_DIR};
- }
--push @def_search_dirs, "/usr/local/share/snmp/";
--
-+push @def_search_dirs, "%%PREFIX%%/share/snmp/";
-+push @def_search_dirs, "%%PREFIX%%/etc/snmp/";
-
- sub usage {
- print "$0 [-h] [-c configfile] [-f prefix] mibNode\n\n";
diff --git a/net-mgmt/net-snmp53/files/patch-local:snmpcheck.def b/net-mgmt/net-snmp53/files/patch-local:snmpcheck.def
deleted file mode 100644
index 4f3b4a2491da..000000000000
--- a/net-mgmt/net-snmp53/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-snmp53/files/patch-local:snmpconf b/net-mgmt/net-snmp53/files/patch-local:snmpconf
deleted file mode 100644
index ae537cfcddd8..000000000000
--- a/net-mgmt/net-snmp53/files/patch-local:snmpconf
+++ /dev/null
@@ -1,53 +0,0 @@
---- local/snmpconf.orig Wed Feb 11 01:33:42 2004
-+++ local/snmpconf Fri Apr 2 23:42:35 2004
-@@ -1,4 +1,4 @@
--#!/usr/bin/perl -w
-+#!%%PERL%% -w
-
- #
- # A simple configuration file builder based on questions listed in
-@@ -17,7 +17,7 @@
- %arrayitems=qw(question 1 validanswer 1);
-
- #defaults
--$opts{'c'} = "/usr/local/share/snmp/snmpconf-data";
-+$opts{'c'} = "%%PREFIX%%/share/snmp/snmpconf-data";
-
- # read the argument string
- getopts("qadhfc:piI:r:R:g:G", \%opts);
-@@ -27,7 +27,7 @@
- print "$0 [options] [FILETOCREATE...]\n";
- print "options:\n";
- print " -f overwrite existing files without prompting\n";
-- print " -i install created files into /usr/local/share/snmp.\n";
-+ print " -i install created files into %%PREFIX%%/share/snmp.\n";
- print " -p install created files into $ENV{HOME}/.snmp.\n";
- print " -I DIR install created files into DIR.\n";
- print " -a Don't ask any questions, just read in current\n";
-@@ -63,7 +63,7 @@
- #
- # Find existing files to possibly read in.
- #
--my @searchpath = (qw(/usr/local/share/snmp /usr/local/etc/snmp .), "$ENV{HOME}/.snmp");
-+my @searchpath = (qw(%%PREFIX%%/share/snmp %%PREFIX%%/etc/snmp .), "$ENV{HOME}/.snmp");
- push @searchpath, $opts{I} if ($opts{I});
- foreach my $i (@searchpath) {
- debug("searching $i\n");
-@@ -160,7 +160,7 @@
- foreach my $i (@didfiles) {
- if ($didfile{$i} ne "1") {
- if ($opts{'i'} || $opts{'I'}) {
-- $opts{'I'} = "/usr/local/share/snmp" if (!$opts{'I'});
-+ $opts{'I'} = "%%PREFIX%%/share/snmp" if (!$opts{'I'});
-
- move ("$opts{'I'}/$i", "$opts{'I'}/$i.bak") if (-f "$opts{'I'}/$i");
- if (move ("$didfile{$i}", "$opts{'I'}")) {
-@@ -198,7 +198,7 @@
- }
-
- if (!$opts{'p'} && !$opts{'i'} && !$opts{'I'}) {
-- Print("\nThese files should be moved to /usr/local/share/snmp/ if you
-+ Print("\nThese files should be moved to %%PREFIX%%/share/snmp/ if you
- want them used by everyone on the system. In the future, if you add
- the -i option to the command line I'll copy them there automatically for you.
-
diff --git a/net-mgmt/net-snmp53/files/patch-local:tkmib b/net-mgmt/net-snmp53/files/patch-local:tkmib
deleted file mode 100644
index 3278d27c3809..000000000000
--- a/net-mgmt/net-snmp53/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-snmp53/files/patch-local:traptoemail b/net-mgmt/net-snmp53/files/patch-local:traptoemail
deleted file mode 100644
index 402506b540c6..000000000000
--- a/net-mgmt/net-snmp53/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-snmp53/files/patch-memory_freebsd2.c b/net-mgmt/net-snmp53/files/patch-memory_freebsd2.c
deleted file mode 100644
index caffe13901b9..000000000000
--- a/net-mgmt/net-snmp53/files/patch-memory_freebsd2.c
+++ /dev/null
@@ -1,37 +0,0 @@
---- agent/mibgroup/ucd-snmp/memory_freebsd2.c.orig Sat Nov 9 15:59:53 2002
-+++ agent/mibgroup/ucd-snmp/memory_freebsd2.c Sat Feb 21 11:55:05 2004
-@@ -204,6 +204,7 @@
- if (kd == NULL)
- kd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, NULL);
-
-+#if !defined(freebsd5)
- auto_nlist(NSWDEV_SYMBOL, (char *) &nswdev, sizeof(nswdev));
- auto_nlist(DMMAX_SYMBOL, (char *) &dmmax, sizeof(dmmax));
-
-@@ -212,6 +213,7 @@
- return;
-
- auto_nlist(SWDEVT_SYMBOL, (char *) sw, nswdev * sizeof(*sw));
-+#endif
-
- n = kvm_getswapinfo(kd, kswap, sizeof(kswap) / sizeof(kswap[0]), 0);
-
-@@ -242,7 +244,9 @@
- swapUsed *= pagesize;
- swapFree *= pagesize;
-
-+#if !defined(freebsd5)
- free(sw);
-+#endif
- }
- #endif
-
-@@ -274,7 +278,7 @@
- size_t total_size = sizeof(total);
- int total_mib[] = { CTL_VM, VM_METER };
-
-- long phys_mem;
-+ u_long phys_mem;
- size_t phys_mem_size = sizeof(phys_mem);
- int phys_mem_mib[] = { CTL_HW, HW_USERMEM };
-
diff --git a/net-mgmt/net-snmp53/files/patch-snmpTCPIPv6Domain.c b/net-mgmt/net-snmp53/files/patch-snmpTCPIPv6Domain.c
deleted file mode 100644
index 9a6e083a98bc..000000000000
--- a/net-mgmt/net-snmp53/files/patch-snmpTCPIPv6Domain.c
+++ /dev/null
@@ -1,30 +0,0 @@
---- snmplib/snmpTCPIPv6Domain.c.orig Fri Aug 9 22:57:43 2002
-+++ snmplib/snmpTCPIPv6Domain.c Sun Oct 6 01:07:12 2002
-@@ -62,13 +62,21 @@
- if (to == NULL) {
- return strdup("TCP/IPv6: unknown");
- } else {
-- char addr[INET6_ADDRSTRLEN];
-- char tmp[INET6_ADDRSTRLEN + 8];
-+ char tmp[NI_MAXHOST];
-
-- sprintf(tmp, "[%s]:%hd",
-- inet_ntop(AF_INET6, (void *) &(to->sin6_addr), addr,
-- INET6_ADDRSTRLEN), ntohs(to->sin6_port));
-- return strdup(tmp);
-+/*
-+ * 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(to, sizeof(struct sockaddr_in6), tmp, sizeof(tmp),
-+ NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID)) {
-+ return strdup("UDP/IPv6: unknown");
-+ }
-+ return strdup(tmp);
- }
- }
-
diff --git a/net-mgmt/net-snmp53/files/patch-snmpUCDIPv6Domain.c b/net-mgmt/net-snmp53/files/patch-snmpUCDIPv6Domain.c
deleted file mode 100644
index 6f1f6c4caeed..000000000000
--- a/net-mgmt/net-snmp53/files/patch-snmpUCDIPv6Domain.c
+++ /dev/null
@@ -1,30 +0,0 @@
---- snmplib/snmpUDPIPv6Domain.c.orig Fri Aug 9 22:57:43 2002
-+++ snmplib/snmpUDPIPv6Domain.c Sun Oct 6 18:03:18 2002
-@@ -62,13 +62,21 @@
- if (to == NULL) {
- return strdup("UDP/IPv6: unknown");
- } else {
-- char addr[INET6_ADDRSTRLEN];
-- char tmp[INET6_ADDRSTRLEN + 8];
-+ char tmp[NI_MAXHOST];
-
-- sprintf(tmp, "[%s]:%hd",
-- inet_ntop(AF_INET6, (void *) &(to->sin6_addr), addr,
-- INET6_ADDRSTRLEN), ntohs(to->sin6_port));
-- return strdup(tmp);
-+/*
-+ * 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(to, sizeof(struct sockaddr_in6), tmp, sizeof(tmp),
-+ NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID)) {
-+ return strdup("UDP/IPv6: unknown");
-+ }
-+ return strdup(tmp);
- }
- }
-
diff --git a/net-mgmt/net-snmp53/files/patch-snmpd.8.def b/net-mgmt/net-snmp53/files/patch-snmpd.8.def
deleted file mode 100644
index ac853823ca25..000000000000
--- a/net-mgmt/net-snmp53/files/patch-snmpd.8.def
+++ /dev/null
@@ -1,13 +0,0 @@
---- man/snmpd.8.def.orig Wed Feb 26 04:11:19 2003
-+++ man/snmpd.8.def Sat Mar 29 22:05:07 2003
-@@ -211,6 +211,10 @@
- the error "Error opening specified endpoint". Likewise, since AAL5
- PVC support is only currently available on Linux, it will fail with
- the same error on other platforms.
-+.PP
-+.B snmpd
-+uses libwrap's access control if configured by --with-libwrap.
-+Access control patterns may only reference IP addresses.
-
- .RE
- .SH CONFIGURATION FILES
diff --git a/net-mgmt/net-snmp53/files/patch-tcpTable.c b/net-mgmt/net-snmp53/files/patch-tcpTable.c
deleted file mode 100644
index 0d33547108b6..000000000000
--- a/net-mgmt/net-snmp53/files/patch-tcpTable.c
+++ /dev/null
@@ -1,46 +0,0 @@
---- agent/mibgroup/mibII/tcpTable.c.orig Tue Mar 16 08:27:45 2004
-+++ agent/mibgroup/mibII/tcpTable.c Wed Apr 14 09:40:00 2004
-@@ -95,6 +95,8 @@
- #define TCPTABLE_REMOTEADDRESS pcb.inp_faddr.s_addr
- #define TCPTABLE_REMOTEPORT pcb.inp_fport
- #define TCPTABLE_IS_LINKED_LIST
-+#undef INP_NEXT_SYMBOL
-+#define INP_NEXT_SYMBOL inp_next
-
- #endif /* linux */
- #endif /* WIN32 */
-@@ -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;
- }
-
-@@ -691,6 +696,7 @@
- struct xinpgen *xig = NULL;
- netsnmp_inpcb *nnew;
- int StateMap[] = { 1, 2, 3, 4, 5, 8, 6, 10, 9, 7, 11 };
-+ struct tcpcb *tp = NULL;
-
- tcpTable_free(NULL, NULL);
-
-@@ -717,12 +723,13 @@
- nnew = SNMP_MALLOC_TYPEDEF(netsnmp_inpcb);
- if (!nnew)
- break;
-- nnew->state = StateMap[((struct xinpcb *) xig)->xt_tp.t_state];
-+ tp = &((struct xtcpcb *)xig)->xt_tp;
-+ nnew->state = StateMap[tp->t_state];
- if (nnew->state == 5 /* established */ ||
- nnew->state == 8 /* closeWait */ )
- tcp_estab++;
-- memcpy(&(nnew->pcb), &(((struct xinpcb *) xig)->xt_inp),
-- sizeof(struct inpcb));
-+ memcpy(&(nnew->pcb), &(((struct xtcpcb *) xig)->xt_tp),
-+ sizeof(struct tcpcb));
-
- nnew->inp_next = tcp_head;
- tcp_head = nnew;
diff --git a/net-mgmt/net-snmp53/files/patch-udpTable.c b/net-mgmt/net-snmp53/files/patch-udpTable.c
deleted file mode 100644
index 83364a9a338d..000000000000
--- a/net-mgmt/net-snmp53/files/patch-udpTable.c
+++ /dev/null
@@ -1,25 +0,0 @@
---- agent/mibgroup/mibII/udpTable.c.orig Fri Nov 14 15:14:52 2003
-+++ agent/mibgroup/mibII/udpTable.c Fri Nov 14 15:18:08 2003
-@@ -577,6 +577,7 @@
- * Unpick this into the constituent 'xinpgen' structures, and extract
- * the 'inpcb' elements into a linked list (built in reverse)
- */
-+#if 0
- xig = (struct xinpgen *) udpcb_buf;
- xig = (struct xinpgen *) ((char *) xig + xig->xig_len);
-
-@@ -584,12 +585,13 @@
- nnew = SNMP_MALLOC_TYPEDEF(struct inpcb);
- if (!nnew)
- break;
-- memcpy(nnew, ((struct xinpcb *) xig)->xi_inp, sizeof(struct inpcb));
-+ memcpy(nnew, &((struct xinpcb *) xig)->xi_inp, sizeof(struct inpcb));
-
- nnew->next = udp_head; /* XXX - ?? Check 'next' pointer */
- udp_head = nnew;
- xig = (struct xinpgen *) ((char *) xig + xig->xig_len);
- }
-+#endif
-
- free(udpcb_buf);
- if (udp_head) {
diff --git a/net-mgmt/net-snmp53/files/patch-vmstat_freebsd2.c b/net-mgmt/net-snmp53/files/patch-vmstat_freebsd2.c
deleted file mode 100644
index 7e64f3979bcf..000000000000
--- a/net-mgmt/net-snmp53/files/patch-vmstat_freebsd2.c
+++ /dev/null
@@ -1,14 +0,0 @@
---- agent/mibgroup/ucd-snmp/vmstat_freebsd2.c.orig Thu May 23 17:39:41 2002
-+++ agent/mibgroup/ucd-snmp/vmstat_freebsd2.c Thu Feb 20 08:08:20 2003
-@@ -10,7 +10,11 @@
- #include <sys/param.h>
- #include <sys/time.h>
- #include <sys/proc.h>
-+#if defined(freebsd5) && __FreeBSD_version >= 500101
-+#include <sys/resource.h>
-+#else
- #include <sys/dkstat.h>
-+#endif
- #ifdef freebsd5
- #include <sys/bio.h>
- #endif
diff --git a/net-mgmt/net-snmp53/files/snmpd.sh.sample b/net-mgmt/net-snmp53/files/snmpd.sh.sample
deleted file mode 100644
index 814c0b7ac701..000000000000
--- a/net-mgmt/net-snmp53/files/snmpd.sh.sample
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-# PROVIDE: snmpd
-# REQUIRE: DAEMON
-# KEYWORD: FreeBSD
-#
-# Add the following line to /etc/rc.conf to enable snmpd:
-#
-# snmpd_enable="YES"
-#
-
-snmpd_enable="NO"
-snmpd_flags="-p /var/run/snmpd.pid"
-
-. %%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=/var/run/${name}.pid
-sig_stop=-KILL
-
-load_rc_config ${name}
-run_rc_command "$1"
diff --git a/net-mgmt/net-snmp53/files/snmptrapd.sh.sample b/net-mgmt/net-snmp53/files/snmptrapd.sh.sample
deleted file mode 100644
index 760c260ccfe4..000000000000
--- a/net-mgmt/net-snmp53/files/snmptrapd.sh.sample
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-# PROVIDE: snmptrapd
-# REQUIRE: DAEMON
-# KEYWORD: FreeBSD
-#
-# Add the following line to /etc/rc.conf to enable snmptrapd:
-#
-# snmptrapd_enable="YES"
-#
-
-snmptrapd_enable="NO"
-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"