summaryrefslogtreecommitdiff
path: root/net-mgmt/net-snmp4
diff options
context:
space:
mode:
Diffstat (limited to 'net-mgmt/net-snmp4')
-rw-r--r--net-mgmt/net-snmp4/Makefile82
-rw-r--r--net-mgmt/net-snmp4/distinfo1
-rw-r--r--net-mgmt/net-snmp4/files/freebsd4.h1
-rw-r--r--net-mgmt/net-snmp4/files/patch-Makefile.top11
-rw-r--r--net-mgmt/net-snmp4/files/patch-aa13
-rw-r--r--net-mgmt/net-snmp4/files/patch-ab56
-rw-r--r--net-mgmt/net-snmp4/files/patch-ad47
-rw-r--r--net-mgmt/net-snmp4/files/patch-af14
-rw-r--r--net-mgmt/net-snmp4/files/patch-ag11
-rw-r--r--net-mgmt/net-snmp4/files/patch-ah7
-rw-r--r--net-mgmt/net-snmp4/files/patch-ak21
-rw-r--r--net-mgmt/net-snmp4/files/patch-al29
-rw-r--r--net-mgmt/net-snmp4/files/patch-ao11
-rw-r--r--net-mgmt/net-snmp4/files/patch-ap11
-rw-r--r--net-mgmt/net-snmp4/files/patch-hr_swrun.c309
-rw-r--r--net-mgmt/net-snmp4/files/snmpd.sh.sample20
-rw-r--r--net-mgmt/net-snmp4/pkg-comment1
-rw-r--r--net-mgmt/net-snmp4/pkg-descr12
-rw-r--r--net-mgmt/net-snmp4/pkg-plist142
19 files changed, 0 insertions, 799 deletions
diff --git a/net-mgmt/net-snmp4/Makefile b/net-mgmt/net-snmp4/Makefile
deleted file mode 100644
index c64556f88633..000000000000
--- a/net-mgmt/net-snmp4/Makefile
+++ /dev/null
@@ -1,82 +0,0 @@
-# New ports collection makefile for: ucd-snmp
-# Date created: 26 June 1996
-# Whom: gpalmer
-#
-# $FreeBSD$
-#
-
-PORTNAME= ucd-snmp
-PORTVERSION= 4.2
-CATEGORIES= net ipv6
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
- ftp://ucd-snmp.ucdavis.edu/ \
- ftp://sunsite.cnlab-switch.ch/mirror/ucd-snmp/ \
- ftp://ftp.win.or.jp/pub/network/snmp/ucd-snmp/
-MASTER_SITE_SUBDIR= net-snmp
-
-MAINTAINER= billf@FreeBSD.org
-
-USE_AUTOCONF= yes
-USE_LIBTOOL= yes
-INSTALLS_SHLIB= yes
-LIBTOOLFLAGS= --disable-ltlibs --release-ignore
-
-CONFIGURE_ARGS+= --enable-shared --with-mib-modules="host" --with-gnu-ld
-.if defined(BATCH)
-CONFIGURE_ARGS+= --with-defaults --with-sys-contact=nobody@no.where
-.else
-IS_INTERACTIVE= yes
-.endif
-
-MAN1= snmpbulkget.1 snmpbulkwalk.1 snmpcmd.1 snmpconf.1 snmpd.1 \
- snmpdelta.1 snmpdf.1 snmpget.1 snmpgetnext.1 snmpinform.1 \
- snmpnetstat.1 snmpset.1 snmpstatus.1 snmptable.1 snmptest.1 \
- snmptranslate.1 snmptrap.1 snmpusm.1 snmpwalk.1
-MAN3= add_mibdir.3 add_module_replacement.3 default_store.3 \
- get_module_node.3 init_mib.3 init_mib_internals.3 mib_api.3 \
- print_description.3 print_mib.3 print_objid.3 print_value.3 \
- print_variable.3 read_all_mibs.3 read_config.3 read_mib.3 \
- read_module.3 read_module_node.3 read_objid.3 shutdown_mib.3 \
- snmp_agent_api.3 snmp_alarm.3 snmp_api.3 snmp_close.3 \
- snmp_free_pdu.3 snmp_open.3 snmp_read.3 snmp_select_info.3 \
- snmp_send.3 snmp_sess_api.3 snmp_sess_async_send.3 \
- snmp_sess_close.3 snmp_sess_error.3 snmp_sess_init.3 \
- snmp_sess_open.3 snmp_sess_read.3 snmp_sess_select_info.3 \
- snmp_sess_send.3 snmp_sess_session.3 snmp_sess_timeout.3 \
- snmp_set_mib_warnings.3 snmp_set_save_descriptions.3 \
- snmp_timeout.3 snmp_trap_api.3
-MAN5= snmp.conf.5 snmp_config.5 snmpd.conf.5 \
- snmptrapd.conf.5 variables.5
-MAN8= snmptrapd.8
-BIN= snmpbulkwalk snmpget snmpgetnext snmpnetstat snmpset \
- snmpstatus snmptest snmptranslate snmptrap snmpwalk
-SBIN= snmpd snmptrapd
-
-STARTUP_FILE= ${PREFIX}/etc/rc.d/snmpd.sh
-
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 400014
-CONFIGURE_ARGS+= --enable-ipv6
-.endif
-
-SHLIB_VERSION= 4
-PLIST_SUB+= shlib=${SHLIB_VERSION}
-
-post-patch:
- @${CP} ${FILESDIR}/freebsd4.h ${WRKSRC}/s
-
-post-install:
- @( cd ${PREFIX}/bin && strip ${BIN} )
- @( cd ${PREFIX}/sbin && strip ${SBIN} )
- @( cd ${PREFIX}/include/ucd-snmp && ${CHMOD} 644 * )
- @( cd ${PREFIX}/share/snmp/mibs && ${CHMOD} 644 * )
- @${MKDIR} ${PREFIX}/share/examples/ucd-snmp
- @for F in ${WRKSRC}/EXAMPLE.conf ${WRKSRC}/agent/mibgroup/examples/ucdDemoPublic.conf; do \
- ${INSTALL_DATA} $$F ${PREFIX}/share/examples/ucd-snmp ; done
- @if [ ! -f ${STARTUP_FILE} ]; then \
- ${ECHO} "Creating ${PREFIX}/etc/rc.d/snmpd.sh startup file."; \
- ${INSTALL_SCRIPT} -m 751 ${FILESDIR}/snmpd.sh.sample ${STARTUP_FILE}; \
- fi
-
-.include <bsd.port.post.mk>
diff --git a/net-mgmt/net-snmp4/distinfo b/net-mgmt/net-snmp4/distinfo
deleted file mode 100644
index bda76becbe98..000000000000
--- a/net-mgmt/net-snmp4/distinfo
+++ /dev/null
@@ -1 +0,0 @@
-MD5 (ucd-snmp-4.2.tar.gz) = 7370edec952a6830459948d9808da7cb
diff --git a/net-mgmt/net-snmp4/files/freebsd4.h b/net-mgmt/net-snmp4/files/freebsd4.h
deleted file mode 100644
index e0774c7e4cd6..000000000000
--- a/net-mgmt/net-snmp4/files/freebsd4.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "freebsd3.h"
diff --git a/net-mgmt/net-snmp4/files/patch-Makefile.top b/net-mgmt/net-snmp4/files/patch-Makefile.top
deleted file mode 100644
index 2ecdb3d91c59..000000000000
--- a/net-mgmt/net-snmp4/files/patch-Makefile.top
+++ /dev/null
@@ -1,11 +0,0 @@
---- Makefile.top.orig Mon Nov 20 05:58:05 2000
-+++ Makefile.top Thu Feb 8 01:21:42 2001
-@@ -51,7 +51,7 @@
- # Misc Compiling Stuff
- CC = @CC@
- # version number is prefixed by a 0 for a better shared library version number
--LIB_LD_CMD = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -rpath $(libdir) -release 0.$(VERSION) -o
-+LIB_LD_CMD = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -rpath $(libdir) -release $(VERSION).0 -version-info 4 -o
- LIB_EXTENSION = la
- LIB_VERSION =
- LIB_LDCONFIG_CMD = $(LIBTOOL) --mode=finish $(libdir)
diff --git a/net-mgmt/net-snmp4/files/patch-aa b/net-mgmt/net-snmp4/files/patch-aa
deleted file mode 100644
index 6c287d18ac93..000000000000
--- a/net-mgmt/net-snmp4/files/patch-aa
+++ /dev/null
@@ -1,13 +0,0 @@
---- snmplib/Makefile.in.orig Mon Oct 2 11:41:46 2000
-+++ snmplib/Makefile.in Wed Jan 17 18:29:44 2001
-@@ -70,6 +70,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)
-
- installdirs:
diff --git a/net-mgmt/net-snmp4/files/patch-ab b/net-mgmt/net-snmp4/files/patch-ab
deleted file mode 100644
index 4a8f9a65a244..000000000000
--- a/net-mgmt/net-snmp4/files/patch-ab
+++ /dev/null
@@ -1,56 +0,0 @@
---- agent/mibgroup/ucd-snmp/disk.c~ Fri Mar 5 08:45:00 1999
-+++ agent/mibgroup/ucd-snmp/disk.c Sat Apr 3 13:33:11 1999
-@@ -24,12 +24,12 @@
- #include <sys/vmmeter.h>
- #endif
- #endif
--#if HAVE_SYS_CONF_H
--#include <sys/conf.h>
--#endif
- #if HAVE_SYS_PARAM_H
- #include <sys/param.h>
- #endif
-+#if HAVE_SYS_CONF_H
-+#include <sys/conf.h>
-+#endif
- #if HAVE_ASM_PAGE_H
- #include <asm/page.h>
- #endif
-@@ -86,6 +86,7 @@
- #include <vm/vm.h>
- #endif
- #if HAVE_VM_SWAP_PAGER_H
-+#include <vm/vm.h>
- #include <vm/swap_pager.h>
- #endif
- #if HAVE_SYS_FIXPOINT_H
---- agent/mibgroup/ucd-snmp/errormib.c~ Tue Mar 2 05:27:30 1999
-+++ agent/mibgroup/ucd-snmp/errormib.c Sat Apr 3 13:33:44 1999
-@@ -93,6 +93,7 @@
- #define statvfs statfs
- #endif
- #if HAVE_VM_SWAP_PAGER_H
-+#include <vm/vm.h>
- #include <vm/swap_pager.h>
- #endif
- #if HAVE_SYS_FIXPOINT_H
---- agent/mibgroup/ucd-snmp/extensible.c~ Fri Mar 5 08:45:01 1999
-+++ agent/mibgroup/ucd-snmp/extensible.c Sat Apr 3 13:34:13 1999
-@@ -81,6 +81,7 @@
- #define statvfs statfs
- #endif
- #if HAVE_VM_SWAP_PAGER_H
-+#include <vm/vm.h>
- #include <vm/swap_pager.h>
- #endif
- #if HAVE_SYS_FIXPOINT_H
---- agent/mibgroup/ucd-snmp/loadave.c~ Tue Mar 16 08:21:02 1999
-+++ agent/mibgroup/ucd-snmp/loadave.c Sat Apr 3 13:34:39 1999
-@@ -80,6 +80,7 @@
- #define statvfs statfs
- #endif
- #if HAVE_VM_SWAP_PAGER_H
-+#include <vm/vm.h>
- #include <vm/swap_pager.h>
- #endif
- #if HAVE_SYS_FIXPOINT_H
diff --git a/net-mgmt/net-snmp4/files/patch-ad b/net-mgmt/net-snmp4/files/patch-ad
deleted file mode 100644
index bd85f7453919..000000000000
--- a/net-mgmt/net-snmp4/files/patch-ad
+++ /dev/null
@@ -1,47 +0,0 @@
---- agent/mibgroup/mibII/interfaces.c.orig Fri Dec 1 14:17:21 2000
-+++ agent/mibgroup/mibII/interfaces.c Thu Jan 18 00:04:42 2001
-@@ -129,7 +129,7 @@
- #if HAVE_SYS_SYSCTL_H
- #include <sys/sysctl.h>
-
--#ifdef freebsd3
-+#if defined(freebsd3) || defined(freebsd4) || defined(freebsd5)
- # define USE_SYSCTL_IFLIST
- #else
- # if defined(CTL_NET) && !defined(freebsd2)
-@@ -1842,10 +1842,18 @@
- 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);
-@@ -1868,6 +1876,7 @@
- }
- sa = (struct sockaddr *)cp;
- }
-+#endif
- rtm = (struct rt_msghdr *)cp;
- }
- }
-@@ -1982,7 +1991,7 @@
- if (ifmd.ifmd_data.ifi_lastchange.tv_sec == 0 &&
- ifmd.ifmd_data.ifi_lastchange.tv_usec == 0) {
- long_return = 0;
-- else if (ifmd.ifmd_data.ifi_lastchange.tv_sec < starttime.tv_sec)
-+ } else if (ifmd.ifmd_data.ifi_lastchange.tv_sec < starttime.tv_sec) {
- long_return = 0;
- } else {
- long_return = (u_long)
diff --git a/net-mgmt/net-snmp4/files/patch-af b/net-mgmt/net-snmp4/files/patch-af
deleted file mode 100644
index 546933895230..000000000000
--- a/net-mgmt/net-snmp4/files/patch-af
+++ /dev/null
@@ -1,14 +0,0 @@
---- agent/mibgroup/ucd_snmp.h.orig Fri Feb 26 03:03:41 1999
-+++ agent/mibgroup/ucd_snmp.h Sun Apr 4 13:52:23 1999
-@@ -18,5 +18,11 @@
- config_arch_require(bsdi3, ucd-snmp/memory)
- config_arch_require(linux, ucd-snmp/vmstat)
- config_arch_require(freebsd2, ucd-snmp/vmstat_freebsd2)
-+config_arch_require(freebsd3, ucd-snmp/vmstat_freebsd2)
-+config_arch_require(freebsd4, ucd-snmp/vmstat_freebsd2)
-+config_arch_require(freebsd5, ucd-snmp/vmstat_freebsd2)
- config_arch_require(freebsd2, ucd-snmp/memory_freebsd2)
-+config_arch_require(freebsd3, ucd-snmp/memory_freebsd2)
-+config_arch_require(freebsd4, ucd-snmp/memory_freebsd2)
-+config_arch_require(freebsd5, ucd-snmp/memory_freebsd2)
- config_add_mib(UCD-SNMP-MIB)
diff --git a/net-mgmt/net-snmp4/files/patch-ag b/net-mgmt/net-snmp4/files/patch-ag
deleted file mode 100644
index 4f8dbd1fe650..000000000000
--- a/net-mgmt/net-snmp4/files/patch-ag
+++ /dev/null
@@ -1,11 +0,0 @@
---- snmplib/ucd-snmp-includes.h.orig Wed Jan 20 18:18:42 1999
-+++ snmplib/ucd-snmp-includes.h Sat Aug 28 02:13:56 1999
-@@ -4,7 +4,7 @@
- #include <netinet/in.h>
-
- /* uncomment if you don't have in_addr_t in netinet/in.h */
--/* typedef u_int in_addr_t; */
-+typedef u_int in_addr_t;
-
- #include <ucd-snmp/asn1.h>
- #include <ucd-snmp/snmp_api.h>
diff --git a/net-mgmt/net-snmp4/files/patch-ah b/net-mgmt/net-snmp4/files/patch-ah
deleted file mode 100644
index 194cbf3574b9..000000000000
--- a/net-mgmt/net-snmp4/files/patch-ah
+++ /dev/null
@@ -1,7 +0,0 @@
---- local/tkmib~ Wed Jul 26 08:53:26 2000
-+++ local/tkmib Wed Jan 17 18:32:52 2001
-@@ -1,4 +1,3 @@
--#!/usr/bin/perl
- #!/usr/bin/perl -w
-
- require 5;
diff --git a/net-mgmt/net-snmp4/files/patch-ak b/net-mgmt/net-snmp4/files/patch-ak
deleted file mode 100644
index 8a9d310cd7a0..000000000000
--- a/net-mgmt/net-snmp4/files/patch-ak
+++ /dev/null
@@ -1,21 +0,0 @@
---- agent/Makefile.in.orig Sun Nov 19 12:58:06 2000
-+++ agent/Makefile.in Wed Jan 17 18:37:02 2001
-@@ -68,10 +68,18 @@
-
- libucdagent.$(LIB_EXTENSION)$(LIB_VERSION): ${LLIBAGENTOBJS} libucdmibs.$(LIB_EXTENSION)$(LIB_VERSION)
- $(LIB_LD_CMD) libucdagent.$(LIB_EXTENSION)$(LIB_VERSION) ${LLIBAGENTOBJS} $(LIB_LD_LIBS)
-+ ld -Bshareable -soname libucdagent.$(LIB_EXTENSION)$(LIB_VERSION) \
-+ -o libucdagent.so ${LIBAGENTOBJS}
-+ ln -f libucdagent.so \
-+ ../libucdagent.so.4
- $(RANLIB) libucdmibs.$(LIB_EXTENSION)$(LIB_VERSION)
-
- libucdmibs.$(LIB_EXTENSION)$(LIB_VERSION): ${LMIBOBJS}
- $(LIB_LD_CMD) libucdmibs.$(LIB_EXTENSION)$(LIB_VERSION) ${LMIBOBJS} $(LIB_LD_LIBS)
-+ ld -Bshareable -soname libucdmibs.so.4 \
-+ -o libucdmibs.so ${MIBOBJS}
-+ ln -f libucdmibs.so \
-+ ../libucdmibs.so.4
- $(RANLIB) libucdmibs.$(LIB_EXTENSION)$(LIB_VERSION)
-
- clean:
diff --git a/net-mgmt/net-snmp4/files/patch-al b/net-mgmt/net-snmp4/files/patch-al
deleted file mode 100644
index c2464056b6bc..000000000000
--- a/net-mgmt/net-snmp4/files/patch-al
+++ /dev/null
@@ -1,29 +0,0 @@
---- configure.in~ Sat May 6 01:46:26 2000
-+++ configure.in Wed May 17 11:09:08 2000
-@@ -1286,6 +1286,26 @@
- 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([
- #include <sys/types.h>
diff --git a/net-mgmt/net-snmp4/files/patch-ao b/net-mgmt/net-snmp4/files/patch-ao
deleted file mode 100644
index 9ba64ec94695..000000000000
--- a/net-mgmt/net-snmp4/files/patch-ao
+++ /dev/null
@@ -1,11 +0,0 @@
---- agent/mibgroup/host/hr_filesys.c.orig Wed Jan 17 19:09:48 2001
-+++ agent/mibgroup/host/hr_filesys.c Wed Jan 17 19:10:22 2001
-@@ -38,7 +38,7 @@
- #include <stdlib.h>
- #endif
-
--#if defined(freebsd3) || defined(bsdi4)
-+#if defined(freebsd3) || defined(bsdi4) || defined(freebsd4) || defined(freebsd5)
- #if HAVE_GETFSSTAT
- #if defined(MFSNAMELEN)
- #define MOUNT_NFS "nfs"
diff --git a/net-mgmt/net-snmp4/files/patch-ap b/net-mgmt/net-snmp4/files/patch-ap
deleted file mode 100644
index 4d2ec3fa92ab..000000000000
--- a/net-mgmt/net-snmp4/files/patch-ap
+++ /dev/null
@@ -1,11 +0,0 @@
---- man/Makefile.in.orig Thu Jan 18 01:37:31 2001
-+++ man/Makefile.in Thu Jan 18 01:37:39 2001
-@@ -2,7 +2,7 @@
-
- MAN1 = snmpcmd.1 snmpget.1 snmpset.1 snmpwalk.1 snmpbulkwalk.1 snmpbulkget.1 \
- snmpgetnext.1 snmptest.1 snmpnetstat.1 snmptranslate.1 snmpstatus.1 \
-- snmptrap.1 snmpdelta.1 snmptable.1 snmpusm.1 snmpinform.1 snmpdf.1
-+ snmptrap.1 snmpdelta.1 snmptable.1 snmpusm.1 snmpinform.1 snmpdf.1 snmpconf.1
- MAN1G = snmpd.1
- MAN3 = snmp_agent_api.3 snmp_api.3 mib_api.3 snmp_sess_api.3 snmp_trap_api.3 \
- snmp_alarm.3 snmp_close.3 snmp_free_pdu.3 snmp_open.3 snmp_read.3 \
diff --git a/net-mgmt/net-snmp4/files/patch-hr_swrun.c b/net-mgmt/net-snmp4/files/patch-hr_swrun.c
deleted file mode 100644
index bd81ed25a52e..000000000000
--- a/net-mgmt/net-snmp4/files/patch-hr_swrun.c
+++ /dev/null
@@ -1,309 +0,0 @@
---- agent/mibgroup/host/hr_swrun.c.orig Tue Oct 3 13:36:38 2000
-+++ agent/mibgroup/host/hr_swrun.c Fri Feb 2 11:27:39 2001
-@@ -216,15 +216,15 @@
- if ( pid == -1 )
- break;
- newname[HRSWRUN_ENTRY_NAME_LENGTH] = pid;
-- DEBUGMSGOID(("host/hr_swrun", newname, *length));
-- DEBUGMSG(("host/hr_swrun","\n"));
-+ DEBUGMSGOID(("host/hr_swrun", newname, *length));
-+ DEBUGMSG(("host/hr_swrun","\n"));
- result = snmp_oid_compare(name, *length, newname, vp->namelen + 1);
- if (exact && (result == 0)) {
- LowPid = pid;
- #ifndef linux
- LowProcIndex = current_proc_entry-1;
- #endif
--DEBUGMSGTL(("host/hr_swrun", " saved\n"));
-+ DEBUGMSGTL(("host/hr_swrun", " saved\n"));
- /* Save process status information */
- break;
- }
-@@ -235,9 +235,9 @@
- LowProcIndex = current_proc_entry-1;
- #endif
- /* Save process status information */
--DEBUGMSG(("host/hr_swrun", " saved"));
-+ DEBUGMSG(("host/hr_swrun", " saved"));
- }
--DEBUGMSG(("host/hr_swrun", "\n"));
-+ DEBUGMSG(("host/hr_swrun", "\n"));
- }
-
- if ( LowPid == -1 ) {
-@@ -279,16 +279,16 @@
- #elif defined(solaris2)
- #if _SLASH_PROC_METHOD_
- static psinfo_t psinfo;
-- static psinfo_t *proc_buf = &psinfo;
-+ static psinfo_t *proc_buf;
- int procfd;
- char procfn[sizeof "/proc/00000/psinfo"];
- #else
- static struct proc *proc_buf;
-+ char *cp1;
- #endif /* _SLASH_PROC_METHOD_ */
- static time_t when = 0;
- time_t now;
- static int oldpid = -1;
-- char *cp1;
- #endif
- #if HAVE_KVM_GETPROCS
- char **argv;
-@@ -321,10 +321,13 @@
- }
- if (oldpid != pid || proc_buf == NULL) {
- #if _SLASH_PROC_METHOD_
-+ proc_buf = &psinfo;
- sprintf(procfn, "/proc/%.5d/psinfo", pid);
-- if ((procfd = open(procfn, O_RDONLY)) == -1) return NULL;
-- if (read(procfd, proc_buf, sizeof(*proc_buf)) != sizeof(*proc_buf)) abort();
-- close(procfd);
-+ if ((procfd = open(procfn, O_RDONLY)) != -1) {
-+ if (read(procfd, proc_buf, sizeof(*proc_buf)) != sizeof(*proc_buf)) abort();
-+ close(procfd);
-+ } else
-+ proc_buf = NULL;
- #else
- if (kd == NULL) return NULL;
- if ((proc_buf = kvm_getproc(kd, pid)) == NULL) return NULL;
-@@ -340,8 +343,8 @@
- return NULL;
- #else
- long_return = 1; /* Probably! */
--#endif
- return (u_char *)&long_return;
-+#endif
-
- case HRSWRUN_INDEX:
- long_return = pid;
-@@ -354,12 +357,19 @@
- *cp = '\0';
- #elif defined(solaris2)
- #if _SLASH_PROC_METHOD_
-- strcpy(string, proc_buf->pr_fname);
-+ if (proc_buf)
-+ strcpy(string, proc_buf->pr_fname);
-+ else
-+ strcpy(string, "<exited>");
- #else
- strcpy(string, proc_buf->p_user.u_comm);
- #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) return NULL;
-@@ -398,7 +408,10 @@
- *cp = '\0';
- #elif defined(solaris2)
- #ifdef _SLASH_PROC_METHOD_
-- strcpy(string, proc_buf->pr_psargs);
-+ if (proc_buf)
-+ strcpy(string, proc_buf->pr_psargs);
-+ else
-+ sprintf(string, "<exited>");
- cp = strchr(string, ' ');
- if (cp) *cp = 0;
- #else
-@@ -408,7 +421,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) return NULL;
-@@ -448,9 +465,12 @@
- string[0] = '\0';
- #elif defined(solaris2)
- #ifdef _SLASH_PROC_METHOD_
-- cp = strchr(proc_buf->pr_psargs, ' ');
-- if (cp) strcpy(string, cp+1);
-- else string[0] = 0;
-+ if (proc_buf) {
-+ cp = strchr(proc_buf->pr_psargs, ' ');
-+ if (cp) strcpy(string, cp+1);
-+ else string[0] = 0;
-+ } else
-+ string[0] = 0;
- #else
- cp = proc_buf->p_user.u_psargs;
- while (*cp && *cp != ' ') cp++;
-@@ -470,9 +490,15 @@
- sprintf( string, "/proc/%d/cmdline", pid );
- if ((fp = fopen( string, "r")) == NULL) return NULL;
- memset( buf, 0, sizeof(buf) );
-- if(!fgets( buf, sizeof(buf)-2, fp ))
-- return NULL; /* argv[0] '\0' argv[1] '\0' .... */
-
-+ /* argv[0] '\0' argv[1] '\0' .... */
-+ if(!fgets( buf, sizeof(buf)-2, fp )) {
-+ /* maybe be empty (even argv[0] is missing) */
-+ string[0] = '\0';
-+ *var_len = 0;
-+ return string;
-+ }
-+
- /* Skip over argv[0] */
- cp = buf;
- while ( *cp )
-@@ -531,10 +557,14 @@
- }
- #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(solaris2)
- #if _SLASH_PROC_METHOD_
-- switch (proc_buf->pr_lwp.pr_state) {
-+ switch (proc_buf ? proc_buf->pr_lwp.pr_state : SIDL) {
- #else
- switch ( proc_buf->p_stat ) {
- #endif
-@@ -566,32 +596,34 @@
- #endif
- #else
- sprintf( string, "/proc/%d/stat", pid );
-- if ((fp = fopen( string, "r")) == NULL) return NULL;
-- fgets( buf, sizeof(buf), fp );
-- cp = buf;
-- for ( i = 0 ; i < 2 ; ++i ) { /* skip two fields */
-- while ( *cp != ' ')
-+ if ((fp = fopen( string, "r")) != NULL) {
-+ fgets( buf, sizeof(buf), fp );
-+ cp = buf;
-+ for ( i = 0 ; i < 2 ; ++i ) { /* skip two fields */
-+ while ( *cp != ' ')
-+ ++cp;
- ++cp;
-- ++cp;
-- }
-+ }
-
-- switch ( *cp ) {
-- case 'R':
-+ switch ( *cp ) {
-+ case 'R':
- long_return = 1; /* running */
- break;
-- case 'S':
-+ case 'S':
- long_return = 2; /* runnable */
- break;
-- case 'D':
-- case 'T':
-+ case 'D':
-+ case 'T':
- long_return = 3; /* notRunnable */
- break;
-- case 'Z':
-- default:
-+ case 'Z':
-+ default:
- long_return = 4; /* invalid */
- break;
-- }
-- fclose(fp);
-+ }
-+ fclose(fp);
-+ } else
-+ long_return = 4; /* invalid */
- #endif
- return (u_char *)&long_return;
-
-@@ -603,16 +635,24 @@
- */
- #elif defined(solaris2)
- #if _SLASH_PROC_METHOD_
-- long_return = proc_buf->pr_time.tv_sec * 100 +
-- proc_buf->pr_time.tv_nsec/10000000;
-+ long_return = proc_buf ? proc_buf->pr_time.tv_sec * 100 +
-+ proc_buf->pr_time.tv_nsec/10000000 : 0;
- #else
- 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) return NULL;
-@@ -645,13 +685,20 @@
- long_return = (proc_buf.pst_rssize << PGSHIFT)/1024;
- #elif defined(solaris2)
- #if _SLASH_PROC_METHOD_
-- long_return = proc_buf->pr_rssize;
-+ long_return = proc_buf ? proc_buf->pr_rssize : 0;
- #else
- long_return = proc_buf->p_swrss;
- #endif
- #elif HAVE_KVM_GETPROCS
--#ifdef freebsd3
-+#if defined(freebsd3)
- long_return = proc_table[LowProcIndex].kp_eproc.e_vm.vm_map.size/1024;
-+#elif 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;
- #else
- long_return = proc_table[LowProcIndex].kp_eproc.e_vm.vm_tsize +
- proc_table[LowProcIndex].kp_eproc.e_vm.vm_ssize +
-@@ -747,6 +794,10 @@
- }
- #elif HAVE_KVM_GETPROCS
- {
-+ if (kd == NULL) {
-+ nproc = 0;
-+ return;
-+ }
- proc_table = kvm_getprocs(kd, KERN_PROC_ALL, 0, &nproc);
- }
- #else
-@@ -794,8 +845,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;
-@@ -853,7 +909,7 @@
-
- int count_processes (void)
- {
--#ifndef linux
-+#if !(defined(linux) || defined(hpux10) || defined(solaris2) || HAVE_KVM_GETPROCS)
- int i;
- #endif
- int total=0;
diff --git a/net-mgmt/net-snmp4/files/snmpd.sh.sample b/net-mgmt/net-snmp4/files/snmpd.sh.sample
deleted file mode 100644
index 71f8b504ce81..000000000000
--- a/net-mgmt/net-snmp4/files/snmpd.sh.sample
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
- echo "$0: Cannot determine the PREFIX" >&2
- exit 1
-fi
-
-case "$1" in
-start)
- [ -x ${PREFIX}/sbin/snmpd ] && ${PREFIX}/sbin/snmpd && echo -n ' snmpd'
- ;;
-stop)
- killall snmpd && echo -n ' snmpd'
- ;;
-*)
- echo "Usage: `basename $0` {start|stop}" >&2
- ;;
-esac
-
-exit 0
diff --git a/net-mgmt/net-snmp4/pkg-comment b/net-mgmt/net-snmp4/pkg-comment
deleted file mode 100644
index fbaaa7ab347c..000000000000
--- a/net-mgmt/net-snmp4/pkg-comment
+++ /dev/null
@@ -1 +0,0 @@
-An extendable SNMP implimentation
diff --git a/net-mgmt/net-snmp4/pkg-descr b/net-mgmt/net-snmp4/pkg-descr
deleted file mode 100644
index d7c5d86a1b58..000000000000
--- a/net-mgmt/net-snmp4/pkg-descr
+++ /dev/null
@@ -1,12 +0,0 @@
-This is UCD SNMP, a derivative of CMU's SNMP package.
-
-Various tools relating to the Simple Network Management Protocol including:
-
- An extensible agent
- An SNMP library
- tools to request or set information from SNMP agents
- tools to generate and handle SNMP traps
- a version of the unix 'netstat' command using SNMP
- a Tk/perl mib browser
-
-WWW: http://net-snmp.sourceforge.net/
diff --git a/net-mgmt/net-snmp4/pkg-plist b/net-mgmt/net-snmp4/pkg-plist
deleted file mode 100644
index 013bd98a5326..000000000000
--- a/net-mgmt/net-snmp4/pkg-plist
+++ /dev/null
@@ -1,142 +0,0 @@
-bin/encode_keychange
-bin/mib2c
-bin/snmpbulkget
-bin/snmpbulkwalk
-bin/snmpcheck
-bin/snmpconf
-bin/snmpdelta
-bin/snmpdf
-bin/snmpget
-bin/snmpgetnext
-bin/snmpinform
-bin/snmpnetstat
-bin/snmpset
-bin/snmpstatus
-bin/snmptable
-bin/snmptest
-bin/snmptranslate
-bin/snmptrap
-bin/snmpusm
-bin/snmpvacm
-bin/snmpwalk
-bin/tkmib
-etc/rc.d/snmpd.sh
-include/ucd-snmp/agent_index.h
-include/ucd-snmp/agent_read_config.h
-include/ucd-snmp/agent_registry.h
-include/ucd-snmp/agent_trap.h
-include/ucd-snmp/asn1.h
-include/ucd-snmp/auto_nlist.h
-include/ucd-snmp/callback.h
-include/ucd-snmp/default_store.h
-include/ucd-snmp/ds_agent.h
-include/ucd-snmp/header_complex.h
-include/ucd-snmp/int64.h
-include/ucd-snmp/keytools.h
-include/ucd-snmp/mib.h
-include/ucd-snmp/mibincl.h
-include/ucd-snmp/parse.h
-include/ucd-snmp/read_config.h
-include/ucd-snmp/scapi.h
-include/ucd-snmp/snmp.h
-include/ucd-snmp/snmp_agent.h
-include/ucd-snmp/snmp_alarm.h
-include/ucd-snmp/snmp_api.h
-include/ucd-snmp/snmp_client.h
-include/ucd-snmp/snmp_debug.h
-include/ucd-snmp/snmp_impl.h
-include/ucd-snmp/snmp_logging.h
-include/ucd-snmp/snmp_parse_args.h
-include/ucd-snmp/snmp_vars.h
-include/ucd-snmp/snmpusm.h
-include/ucd-snmp/snmpv3.h
-include/ucd-snmp/struct.h
-include/ucd-snmp/system.h
-include/ucd-snmp/tools.h
-include/ucd-snmp/transform_oids.h
-include/ucd-snmp/ucd-snmp-agent-includes.h
-include/ucd-snmp/ucd-snmp-config.h
-include/ucd-snmp/ucd-snmp-includes.h
-include/ucd-snmp/util_funcs.h
-include/ucd-snmp/var_struct.h
-include/ucd-snmp/version.h
-@dirrm include/ucd-snmp
-lib/libsnmp.a
-lib/libsnmp.so
-lib/libsnmp.so.%%shlib%%
-lib/libucdagent.a
-lib/libucdagent.so
-lib/libucdagent.so.%%shlib%%
-lib/libucdmibs.a
-lib/libucdmibs.so
-lib/libucdmibs.so.%%shlib%%
-sbin/snmpd
-sbin/snmptrapd
-share/examples/ucd-snmp/EXAMPLE.conf
-share/examples/ucd-snmp/ucdDemoPublic.conf
-@dirrm share/examples/ucd-snmp
-share/snmp/mib2c.conf
-share/snmp/mib2c.storage.conf
-share/snmp/mib2c.vartypes.conf
-share/snmp/mibs/AGENTX-MIB.txt
-share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt
-share/snmp/mibs/DISMAN-SCRIPT-MIB.txt
-share/snmp/mibs/EtherLike-MIB.txt
-share/snmp/mibs/HCNUM-TC.txt
-share/snmp/mibs/HOST-RESOURCES-MIB.txt
-share/snmp/mibs/HOST-RESOURCES-TYPES.txt
-share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
-share/snmp/mibs/IANA-LANGUAGE-MIB.txt
-share/snmp/mibs/IANAifType-MIB.txt
-share/snmp/mibs/IF-INVERTED-STACK-MIB.txt
-share/snmp/mibs/IF-MIB.txt
-share/snmp/mibs/INET-ADDRESS-MIB.txt
-share/snmp/mibs/IP-MIB.txt
-share/snmp/mibs/IP-FORWARD-MIB.txt
-share/snmp/mibs/IPV6-ICMP-MIB.txt
-share/snmp/mibs/IPV6-MIB.txt
-share/snmp/mibs/IPV6-TC.txt
-share/snmp/mibs/IPV6-TCP-MIB.txt
-share/snmp/mibs/IPV6-UDP-MIB.txt
-share/snmp/mibs/RFC1155-SMI.txt
-share/snmp/mibs/RFC1213-MIB.txt
-share/snmp/mibs/RFC-1215.txt
-share/snmp/mibs/RMON-MIB.txt
-share/snmp/mibs/SMUX-MIB.txt
-share/snmp/mibs/SNMP-COMMUNITY-MIB.txt
-share/snmp/mibs/SNMP-FRAMEWORK-MIB.txt
-share/snmp/mibs/SNMP-MPD-MIB.txt
-share/snmp/mibs/SNMP-NOTIFICATION-MIB.txt
-share/snmp/mibs/SNMP-PROXY-MIB.txt
-share/snmp/mibs/SNMP-TARGET-MIB.txt
-share/snmp/mibs/SNMP-USER-BASED-SM-MIB.txt
-share/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.txt
-share/snmp/mibs/SNMPv2-CONF.txt
-share/snmp/mibs/SNMPv2-MIB.txt
-share/snmp/mibs/SNMPv2-SMI.txt
-share/snmp/mibs/SNMPv2-TC.txt
-share/snmp/mibs/SNMPv2-TM.txt
-share/snmp/mibs/TCP-MIB.txt
-share/snmp/mibs/UCD-DEMO-MIB.txt
-share/snmp/mibs/UCD-DISKIO-MIB.txt
-share/snmp/mibs/UCD-DLMOD-MIB.txt
-share/snmp/mibs/UCD-IPFWACC-MIB.txt
-share/snmp/mibs/UCD-SNMP-MIB.txt
-share/snmp/mibs/UDP-MIB.txt
-share/snmp/snmpconf/snmp.conf/authopts
-share/snmp/snmpconf/snmp.conf/debugging
-share/snmp/snmpconf/snmp.conf/mibs
-share/snmp/snmpconf/snmp.conf/output
-share/snmp/snmpconf/snmpd.conf/acl
-share/snmp/snmpconf/snmpd.conf/basic_setup
-share/snmp/snmpconf/snmpd.conf/extending
-share/snmp/snmpconf/snmpd.conf/monitor
-share/snmp/snmpconf/snmpd.conf/operation
-share/snmp/snmpconf/snmpd.conf/system
-share/snmp/snmpconf/snmpd.conf/trapsinks
-@unexec rm -f %D/share/snmp/mibs/.index
-@dirrm share/snmp/mibs
-@dirrm share/snmp/snmpconf/snmp.conf
-@dirrm share/snmp/snmpconf/snmpd.conf
-@dirrm share/snmp/snmpconf
-@dirrm share/snmp