[Midnightbsd-cvs] mports: net-snmp/files: update patchset

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Nov 4 07:46:18 EST 2007


Log Message:
-----------
update patchset

Modified Files:
--------------
    mports/net-mgmt/net-snmp/files:
        patch-configure.in (r1.1 -> r1.2)
        patch-interfaces.c (r1.1 -> r1.2)
        patch-ucd_snmp.h (r1.1 -> r1.2)
        snmpd.sh.in (r1.1 -> r1.2)

Added Files:
-----------
    mports/net-mgmt/net-snmp/files:
        patch-memory_freebsd2.c (r1.1)
        patch-net-snmp-config.h.in (r1.1)

Removed Files:
-------------
    mports/net-mgmt/net-snmp/files:
        patch-Makefile.in
        patch-agent_index.c
        patch-agent_read_config.c
        patch-agent_registry.c
        patch-at.c
        patch-auto_nlist.c
        patch-hr_swrun.c
        patch-master.c
        patch-master_admin.c
        patch-oid_stash.c
        patch-snmpUDPDomain.c
        patch-snmp_vars.c
        patch-snmpd.8.def
        patch-subagent.c
        patch-sysORTable.c

-------------- next part --------------
--- net-mgmt/net-snmp/files/patch-Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- Makefile.in.orig	Tue Oct 11 20:49:23 2005
-+++ Makefile.in	Wed Nov 30 11:35:12 2005
-@@ -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 freebsd5.h freebsd6.h \
-+	darwin.h darwin7.h darwin8.h freebsd5.h freebsd6.h freebsd7.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.6.h solaris2.7.h solaris2.8.h solaris2.9.h solaris2.10.h \
--- net-mgmt/net-snmp/files/patch-snmp_vars.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- agent/snmp_vars.c.orig	Mon Jan 24 09:12:09 2005
-+++ agent/snmp_vars.c	Mon Jan 24 09:12:23 2005
-@@ -136,10 +136,6 @@
- #include <inet/mib2.h>
- #endif
- 
--#if HAVE_DMALLOC_H
--#include <dmalloc.h>
--#endif
--
- #include <net-snmp/net-snmp-includes.h>
- #include <net-snmp/agent/net-snmp-agent-includes.h>
- #include <net-snmp/agent/mib_modules.h>
Index: patch-ucd_snmp.h
===================================================================
RCS file: /home/cvs/mports/net-mgmt/net-snmp/files/patch-ucd_snmp.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lnet-mgmt/net-snmp/files/patch-ucd_snmp.h -Lnet-mgmt/net-snmp/files/patch-ucd_snmp.h -u -r1.1 -r1.2
--- net-mgmt/net-snmp/files/patch-ucd_snmp.h
+++ net-mgmt/net-snmp/files/patch-ucd_snmp.h
@@ -1,14 +1,9 @@
-
-$FreeBSD: ports/net-mgmt/net-snmp/files/patch-ucd_snmp.h,v 1.2 2006/07/26 01:21:25 sobomax Exp $
-
---- agent/mibgroup/ucd_snmp.h.orig
-+++ agent/mibgroup/ucd_snmp.h
-@@ -39,6 +39,10 @@
- config_arch_require(freebsd4, ucd-snmp/memory_freebsd2)
- config_arch_require(freebsd5, ucd-snmp/vmstat_freebsd2)
+--- agent/mibgroup/ucd_snmp.h.orig	Tue Feb 27 20:44:04 2007
++++ agent/mibgroup/ucd_snmp.h	Tue Feb 27 20:44:20 2007
+@@ -41,6 +41,8 @@
  config_arch_require(freebsd5, ucd-snmp/memory_freebsd2)
-+config_arch_require(freebsd6, ucd-snmp/vmstat_freebsd2)
-+config_arch_require(freebsd6, ucd-snmp/memory_freebsd2)
+ config_arch_require(freebsd6, ucd-snmp/vmstat_freebsd2)
+ config_arch_require(freebsd6, ucd-snmp/memory_freebsd2)
 +config_arch_require(freebsd7, ucd-snmp/vmstat_freebsd2)
 +config_arch_require(freebsd7, ucd-snmp/memory_freebsd2)
  config_arch_require(netbsd1, ucd-snmp/vmstat_netbsd1)
--- net-mgmt/net-snmp/files/patch-agent_index.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- agent/agent_index.c.orig	Mon Jan 24 09:14:39 2005
-+++ agent/agent_index.c	Mon Jan 24 09:14:55 2005
-@@ -39,10 +39,6 @@
- #include <netinet/in.h>
- #endif
- 
--#if HAVE_DMALLOC_H
--#include <dmalloc.h>
--#endif
--
- #include <net-snmp/net-snmp-includes.h>
- #include <net-snmp/agent/net-snmp-agent-includes.h>
- #include <net-snmp/agent/agent_callbacks.h>
--- net-mgmt/net-snmp/files/patch-master_admin.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- agent/mibgroup/agentx/master_admin.c.orig	Mon Jan 24 09:18:07 2005
-+++ agent/mibgroup/agentx/master_admin.c	Mon Jan 24 09:18:15 2005
-@@ -35,9 +35,6 @@
- #if HAVE_SYS_SOCKET_H
- #include <sys/socket.h>
- #endif
--#if HAVE_DMALLOC_H
--#include <dmalloc.h>
--#endif
- 
- #include <net-snmp/net-snmp-includes.h>
- #include <net-snmp/agent/net-snmp-agent-includes.h>
--- net-mgmt/net-snmp/files/patch-hr_swrun.c
+++ /dev/null
@@ -1,78 +0,0 @@
---- agent/mibgroup/host/hr_swrun.c.orig	Thu Oct 20 04:32:20 2005
-+++ agent/mibgroup/host/hr_swrun.c	Wed Nov 30 12:50:12 2005
-@@ -585,7 +585,7 @@
-         string[ sizeof(string)-1 ] = 0;
- #endif
- #elif HAVE_KVM_GETPROCS
--    #if defined(freebsd5)
-+    #if defined(freebsd5) && __FreeBSD_version >= 500014
-         strcpy(string, proc_table[LowProcIndex].ki_comm);
-     #else
-         strcpy(string, proc_table[LowProcIndex].kp_proc.p_comm);
-@@ -698,7 +698,7 @@
-         *cp1 = 0;
- #endif
- #elif HAVE_KVM_GETPROCS
--    #if defined(freebsd5)
-+    #if defined(freebsd5) && __FreeBSD_version >= 500014
-         strcpy(string, proc_table[LowProcIndex].ki_comm);
-     #else
-         strcpy(string, proc_table[LowProcIndex].kp_proc.p_comm);
-@@ -868,8 +868,23 @@
-         if (pid < PID_MAXSYS)
-             long_return = 2;    /* operatingSystem */
-         else
--#endif
-             long_return = 4;    /* application */
-+#elif HAVE_KVM_GETPROCS
-+    #if defined(freebsd5) && __FreeBSD_version >= 500014
-+        if (proc_table[LowProcIndex].ki_flag & P_SYSTEM) {
-+            if (proc_table[LowProcIndex].ki_pri.pri_class == PRI_ITHD)
-+                long_return = 3;/* deviceDriver */
-+            else
-+                long_return = 2;/* operatingSystem */
-+        } else
-+            long_return = 4;    /* application */
-+#else
-+        if (proc_table[LowProcIndex].kp_proc.p_flag & P_SYSTEM)
-+            long_return = 2;    /* operatingSystem */
-+        else
-+            long_return = 4;    /* application */
-+#endif
-+#endif
-         return (u_char *) & long_return;
-     case HRSWRUN_STATUS:
- #if defined(cygwin)
-@@ -901,7 +916,7 @@
-         }
- #else
- #if HAVE_KVM_GETPROCS
--    #if defined(freebsd5)
-+    #if defined(freebsd5) && __FreeBSD_version >= 500014
-         switch (proc_table[LowProcIndex].ki_stat) {
-     #else
-         switch (proc_table[LowProcIndex].kp_proc.p_stat) {
-@@ -1000,7 +1015,13 @@
-         long_return = proc_buf->p_utime * 100 + proc_buf->p_stime * 100;
- #endif
- #elif HAVE_KVM_GETPROCS
--    #if defined(freebsd5)
-+    #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;
-+    #elif defined(freebsd5)
-         long_return = proc_table[LowProcIndex].ki_runtime / 100000;
-     #else
-         long_return = proc_table[LowProcIndex].kp_proc.p_uticks +
-@@ -1365,7 +1386,7 @@
- #elif defined(solaris2)
-         return proc_table[current_proc_entry++];
- #elif HAVE_KVM_GETPROCS
--    #if defined(freebsd5)
-+    #if defined(freebsd5) && __FreeBSD_version >= 500014
-         if (proc_table[current_proc_entry].ki_stat != 0)
-             return proc_table[current_proc_entry++].ki_pid;
-     #else
Index: patch-configure.in
===================================================================
RCS file: /home/cvs/mports/net-mgmt/net-snmp/files/patch-configure.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lnet-mgmt/net-snmp/files/patch-configure.in -Lnet-mgmt/net-snmp/files/patch-configure.in -u -r1.1 -r1.2
--- net-mgmt/net-snmp/files/patch-configure.in
+++ net-mgmt/net-snmp/files/patch-configure.in
@@ -1,15 +1,15 @@
---- configure.in.orig	Tue Nov 29 14:16:55 2005
-+++ configure.in	Wed Nov 30 11:49:24 2005
-@@ -2075,7 +2075,7 @@
+--- configure.in.orig	Fri Jul 14 06:55:27 2006
++++ configure.in	Tue Feb 27 20:29:49 2007
+@@ -2171,7 +2171,7 @@
    # 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
 +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"
-@@ -2989,6 +2989,26 @@
+@@ -3145,6 +3145,26 @@
  # checking for 4.3 vs 4.4 rtentry.
  AC_CACHE_CHECK(type of rtentry structure,ac_cv_RTENTRY_TYPE,
  [
Index: snmpd.sh.in
===================================================================
RCS file: /home/cvs/mports/net-mgmt/net-snmp/files/snmpd.sh.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lnet-mgmt/net-snmp/files/snmpd.sh.in -Lnet-mgmt/net-snmp/files/snmpd.sh.in -u -r1.1 -r1.2
--- net-mgmt/net-snmp/files/snmpd.sh.in
+++ net-mgmt/net-snmp/files/snmpd.sh.in
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $FreeBSD: ports/net-mgmt/net-snmp/files/snmpd.sh.in,v 1.4 2006/09/23 15:03:36 nork Exp $
+# $FreeBSD: ports/net-mgmt/net-snmp/files/snmpd.sh.in,v 1.6 2007/03/25 12:35:45 kuriyama Exp $
 #
 # PROVIDE: snmpd
 # REQUIRE: DAEMON
@@ -14,6 +14,7 @@
 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%%
 
@@ -31,10 +32,16 @@
 
 command=%%PREFIX%%/sbin/${name}
 pidfile=${snmpd_pidfile}
-sig_stop=KILL
+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." \
--- net-mgmt/net-snmp/files/patch-agent_registry.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- agent/agent_registry.c.orig	Mon Jan 24 09:14:00 2005
-+++ agent/agent_registry.c	Mon Jan 24 09:14:08 2005
-@@ -51,10 +51,6 @@
- #include <netinet/in.h>
- #endif
- 
--#if HAVE_DMALLOC_H
--#include <dmalloc.h>
--#endif
--
- #include <net-snmp/net-snmp-includes.h>
- #include <net-snmp/agent/net-snmp-agent-includes.h>
- #include <net-snmp/agent/agent_callbacks.h>
--- net-mgmt/net-snmp/files/patch-agent_read_config.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- agent/agent_read_config.c.orig	Mon Jan 24 09:12:58 2005
-+++ agent/agent_read_config.c	Mon Jan 24 09:13:13 2005
-@@ -84,10 +84,6 @@
- #include <inet/mib2.h>
- #endif
- 
--#if HAVE_DMALLOC_H
--#include <dmalloc.h>
--#endif
--
- #if HAVE_UNISTD_H
- #include <unistd.h>
- #endif
--- net-mgmt/net-snmp/files/patch-snmpUDPDomain.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- snmplib/snmpUDPDomain.c.orig	Mon Jan 24 10:47:16 2005
-+++ snmplib/snmpUDPDomain.c	Mon Jan 24 10:47:41 2005
-@@ -88,7 +88,7 @@
-     } else {
- 	char tmp[64];
- 
--        sprintf(tmp, "UDP: [%s]:%hd",
-+        sprintf(tmp, "UDP: [%s]:%hu",
-                 inet_ntoa(to->sin_addr), ntohs(to->sin_port));
-         return strdup(tmp);
-     }
--- net-mgmt/net-snmp/files/patch-subagent.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- agent/mibgroup/agentx/subagent.c.orig	Mon Jan 24 09:17:08 2005
-+++ agent/mibgroup/agentx/subagent.c	Mon Jan 24 09:17:12 2005
-@@ -36,10 +36,6 @@
- #include <netinet/in.h>
- #endif
- 
--#if HAVE_DMALLOC_H
--#include <dmalloc.h>
--#endif
--
- #include <net-snmp/net-snmp-includes.h>
- #include <net-snmp/agent/net-snmp-agent-includes.h>
- #include <net-snmp/library/snmp_assert.h>
--- net-mgmt/net-snmp/files/patch-auto_nlist.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- agent/auto_nlist.c.orig	Mon Jan 24 09:11:07 2005
-+++ agent/auto_nlist.c	Mon Jan 24 09:11:24 2005
-@@ -21,10 +21,6 @@
- #include <kvm.h>
- #endif
- 
--#if HAVE_DMALLOC_H
--#include <dmalloc.h>
--#endif
--
- #include <net-snmp/agent/auto_nlist.h>
- #include "autonlist.h"
- #include "kernel.h"
--- net-mgmt/net-snmp/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
--- net-mgmt/net-snmp/files/patch-at.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- agent/mibgroup/mibII/at.c.orig	Mon Jan 24 09:08:41 2005
-+++ agent/mibgroup/mibII/at.c	Mon Jan 24 09:08:58 2005
-@@ -90,9 +90,6 @@
- #if HAVE_WINSOCK_H
- #include <winsock.h>
- #endif
--#if HAVE_DMALLOC_H
--#include <dmalloc.h>
--#endif
- 
- #ifdef hpux11
- #include <sys/mib.h>
--- net-mgmt/net-snmp/files/patch-sysORTable.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- agent/mibgroup/mibII/sysORTable.c.orig	Mon Jan 24 08:27:58 2005
-+++ agent/mibgroup/mibII/sysORTable.c	Mon Jan 24 08:28:10 2005
-@@ -34,10 +34,6 @@
- #include <netinet/in.h>
- #endif
- 
--#if HAVE_DMALLOC_H
--#include <dmalloc.h>
--#endif
--
- #include <net-snmp/net-snmp-includes.h>
- #include <net-snmp/agent/net-snmp-agent-includes.h>
- #include <net-snmp/agent/agent_callbacks.h>
--- net-mgmt/net-snmp/files/patch-oid_stash.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- snmplib/oid_stash.c.orig	Mon Jan 24 09:43:04 2005
-+++ snmplib/oid_stash.c	Mon Jan 24 09:43:14 2005
-@@ -5,10 +5,6 @@
- #include <stdlib.h>
- #include <sys/types.h>
- 
--#if HAVE_DMALLOC_H
--#include <dmalloc.h>
--#endif
--
- #include <net-snmp/net-snmp-includes.h>
- 
- /** @defgroup oid_stash Store and retrieve data referenced by an OID.
Index: patch-interfaces.c
===================================================================
RCS file: /home/cvs/mports/net-mgmt/net-snmp/files/patch-interfaces.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lnet-mgmt/net-snmp/files/patch-interfaces.c -Lnet-mgmt/net-snmp/files/patch-interfaces.c -u -r1.1 -r1.2
--- net-mgmt/net-snmp/files/patch-interfaces.c
+++ net-mgmt/net-snmp/files/patch-interfaces.c
@@ -1,6 +1,6 @@
---- agent/mibgroup/mibII/interfaces.c.orig	Tue Jan  4 00:51:32 2005
-+++ agent/mibgroup/mibII/interfaces.c	Thu Apr  7 11:47:45 2005
-@@ -399,6 +399,133 @@
+--- 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;
  }
  
@@ -134,7 +134,7 @@
  #ifdef USE_SYSCTL_IFLIST
  
  static u_char  *if_list = 0;
-@@ -607,10 +734,20 @@
+@@ -603,10 +730,20 @@
          }
          return (u_char *) & long_return;
      case IFPHYSADDRESS:
@@ -155,139 +155,3 @@
      case IFADMINSTATUS:
          long_return = if_msg.ifm_flags & IFF_UP ? 1 : 2;
          return (u_char *) & long_return;
-@@ -2250,129 +2387,17 @@
- u_char         *var_ifEntry(struct variable *, oid *, size_t *, int,
-                             size_t *, WriteMethod ** write);
- 
--static char    *physaddrbuf;
--static int      nphysaddrs;
--struct sockaddr_dl **physaddrs;
--
- void
--init_interfaces_setup(void)
-+Interface_Scan_Init(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
-+Interface_Scan_Next(short *Index,
-+                    char *Name,
-+                    struct ifnet *Retifnet, struct in_ifaddr *Retin_ifaddr)
- {
--    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;
-+    return 0;
- }
- 
- int
--- /dev/null
+++ net-mgmt/net-snmp/files/patch-net-snmp-config.h.in
@@ -0,0 +1,11 @@
+--- include/net-snmp/net-snmp-config.h.in.orig	Sun Mar 25 21:01:16 2007
++++ include/net-snmp/net-snmp-config.h.in	Sun Mar 25 21:01:33 2007
+@@ -1334,7 +1334,7 @@
+ 
+ #define EXCACHETIME 30
+ #define CACHEFILE ".snmp-exec-cache"
+-#define MAXCACHESIZE (200*80)   /* roughly 200 lines max */
++#define MAXCACHESIZE (1500*80)   /* roughly 1500 lines max */
+ 
+ /* misc defaults */
+ 
--- /dev/null
+++ net-mgmt/net-snmp/files/patch-memory_freebsd2.c
@@ -0,0 +1,11 @@
+--- agent/mibgroup/ucd-snmp/memory_freebsd2.c	Sat Mar  3 19:40:34 2007
++++ agent/mibgroup/ucd-snmp/memory_freebsd2.c.orig	Sat Mar  3 19:39:57 2007
+@@ -256,7 +256,7 @@
+ 
+     u_long          phys_mem;
+     size_t          phys_mem_size = sizeof(phys_mem);
+-    int             phys_mem_mib[] = { CTL_HW, HW_USERMEM };
++    int             phys_mem_mib[] = { CTL_HW, HW_PHYSMEM };
+ 
+ #ifdef BUFSPACE_SYMBOL
+     long            bufspace;
--- net-mgmt/net-snmp/files/patch-master.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- agent/mibgroup/agentx/master.c.orig	Mon Jan 24 09:16:00 2005
-+++ agent/mibgroup/agentx/master.c	Mon Jan 24 09:16:21 2005
-@@ -39,10 +39,6 @@
- #endif
- #include <errno.h>
- 
--#if HAVE_DMALLOC_H
--#include <dmalloc.h>
--#endif
--
- #if HAVE_UNISTD_H
- #include <unistd.h>
- #endif


More information about the Midnightbsd-cvs mailing list