diff options
Diffstat (limited to 'net-mgmt/net-snmp53/files')
27 files changed, 0 insertions, 1612 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 d3da47b8a662..000000000000 --- a/net-mgmt/net-snmp53/files/extra-patch-local:Makefile.in +++ /dev/null @@ -1,11 +0,0 @@ ---- local/Makefile.in.orig Fri Sep 17 02:34:58 2004 -+++ local/Makefile.in Mon Oct 25 07:39:24 2004 -@@ -15,7 +15,7 @@ - # local info - # - SNMPCONFPATH=@SNMPCONFPATH@ --PERLSCRIPTS=snmpcheck tkmib mib2c fixproc ipf-mod.pl snmpconf traptoemail -+PERLSCRIPTS=snmpcheck mib2c fixproc ipf-mod.pl snmpconf traptoemail - SHELLSCRIPTS=mib2c-update - SCRIPTSMADEFORPERL=snmpcheck.made tkmib.made mib2c.made fixproc.made \ - ipf-mod.pl.made snmpconf.made traptoemail.made diff --git a/net-mgmt/net-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-configure.in b/net-mgmt/net-snmp53/files/patch-configure.in deleted file mode 100644 index 99cd2dad2893..000000000000 --- a/net-mgmt/net-snmp53/files/patch-configure.in +++ /dev/null @@ -1,47 +0,0 @@ ---- configure.in.orig Sat Oct 30 14:05:59 2004 -+++ configure.in Sat Oct 30 15:02:25 2004 -@@ -2071,7 +2071,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 /dev/null - do - if test -f $i -o $CFLAG $i; then - ac_cv_KERNEL_LOC="$i" -@@ -2357,7 +2357,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 net/if_arp.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/times.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 -@@ -2811,6 +2811,26 @@ - # 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") - - # 4.4 compat - AC_TRY_COMPILE([ 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 8bc6de2831b5..000000000000 --- a/net-mgmt/net-snmp53/files/patch-freebsd5.h +++ /dev/null @@ -1,10 +0,0 @@ ---- include/net-snmp/system/freebsd5.h.orig Wed Sep 1 00:13:46 2004 -+++ include/net-snmp/system/freebsd5.h Wed Sep 1 00:13:57 2004 -@@ -7,6 +7,7 @@ - #define freebsd3 1 - /* freebsd5 is a superset of freebsd4 */ - #define freebsd4 1 -+#define freebsd5 1 - - #undef IFADDR_SYMBOL - #define IFADDR_SYMBOL "in_ifaddrhead" 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 3fe873c4eaac..000000000000 --- a/net-mgmt/net-snmp53/files/patch-hr_storage.c +++ /dev/null @@ -1,230 +0,0 @@ ---- agent/mibgroup/host/hr_storage.c.orig Sun Oct 17 10:59:14 2004 -+++ agent/mibgroup/host/hr_storage.c Mon Oct 25 07:49:40 2004 -@@ -212,6 +212,10 @@ - void sol_get_swapinfo(int *, int *); - #endif - -+#if defined(__FreeBSD__) && __FreeBSD_version >= 500102 -+void collect_mbuf(long *long_mbuf, long *long_mbufc); -+#endif -+ - #define HRSTORE_MEMSIZE 1 - #define HRSTORE_INDEX 2 - #define HRSTORE_TYPE 3 -@@ -451,7 +455,8 @@ - NULL, - "Memory Buffers", /* HRS_TYPE_MBUF */ - "Real Memory", /* HRS_TYPE_MEM */ -- "Swap Space" /* HRS_TYPE_SWAP */ -+ "Swap Space", /* HRS_TYPE_SWAP */ -+ "Memory Buffer Clusters" /* HRS_TYPE_MBUFCLUSTER */ - }; - - -@@ -566,6 +571,7 @@ - storage_type_id[storage_type_len - 1] = 3; /* Virtual Mem */ - break; - case HRS_TYPE_MBUF: -+ case HRS_TYPE_MBUFCLUSTER: - storage_type_id[storage_type_len - 1] = 1; /* Other */ - break; - default: -@@ -654,7 +660,7 @@ - case HRS_TYPE_SWAP: - long_return = memory_totals.t_vm; - break; --#else /* !linux && !solaris2 && !hpux10 && !hpux11 && ... */ -+#else - case HRS_TYPE_MEM: - long_return = physmem; - break; -@@ -664,6 +670,8 @@ - #endif - long_return = 0; - break; -+#endif /* linux || solaris2 || hpux10 || hpux11 || ... */ -+#if !defined(linux) && !defined(solaris2) && !defined(hpux10) && !defined(hpux11) - case HRS_TYPE_MBUF: - #if HAVE_SYS_POOL_H - long_return = 0; -@@ -673,7 +681,26 @@ - i++) - long_return += mbstat.m_mtypes[i]; - #elif defined(MBSTAT_SYMBOL) -+#if !defined(__FreeBSD__) || __FreeBSD_version < 500021 - long_return = mbstat.m_mbufs; -+#elif defined(__FreeBSD__) && __FreeBSD_version < 500024 -+ /* mbuf stats disabled */ -+ return NULL; -+#elif defined(__FreeBSD__) -+ { -+ size_t mlen = sizeof(int); -+ int nmbufs; -+ if (sysctlbyname("kern.ipc.nmbufs", &nmbufs, &mlen, -+ NULL, 0) < 0) { -+ return NULL; -+ } -+ long_return = nmbufs; -+ break; -+ } -+#else -+ /* XXX TODO: implement new method */ -+ return NULL; -+#endif /* __FreeBSD__ */ - #elif defined(NO_DUMMY_VALUES) - goto try_next; - #else -@@ -681,6 +708,18 @@ - #endif - break; - #endif /* !linux && !solaris2 && !hpux10 && !hpux11 && ... */ -+#if defined(__FreeBSD__) && __FreeBSD_version >= 500024 -+ case HRS_TYPE_MBUFCLUSTER: { -+ size_t mlen = sizeof(int); -+ int nmbclusters; -+ if (sysctlbyname("kern.ipc.nmbclusters", &nmbclusters, &mlen, -+ NULL, 0) < 0) { -+ return NULL; -+ } -+ long_return = nmbclusters; -+ break; -+ } -+#endif - default: - #if NO_DUMMY_VALUES - goto try_next; -@@ -733,6 +772,12 @@ - * mclpool.pr_size; - #elif defined(MBSTAT_SYMBOL) && defined(STRUCT_MBSTAT_HAS_M_CLUSTERS) - long_return = mbstat.m_clusters - mbstat.m_clfree; /* unlikely, but... */ -+#elif defined(__FreeBSD__) && __FreeBSD_version < 500102 -+ /* mbuf stats disabled */ -+ return NULL; -+#elif defined(__FreeBSD__) -+ collect_mbuf((long*)&long_return, (long*)NULL); -+ break; - #elif defined(NO_DUMMY_VALUES) - goto try_next; - #else -@@ -740,6 +785,11 @@ - #endif - break; - #endif /* !linux && !solaris2 && !hpux10 && !hpux11 && ... */ -+#if defined(__FreeBSD__) && __FreeBSD_version >= 500102 -+ case HRS_TYPE_MBUFCLUSTER: -+ collect_mbuf(NULL, &long_return); -+ break; -+#endif - default: - #if NO_DUMMY_VALUES - goto try_next; -@@ -766,7 +816,11 @@ - break; - #if !defined(linux) && !defined(solaris2) && !defined(hpux10) && !defined(hpux11) && defined(MBSTAT_SYMBOL) - case HRS_TYPE_MBUF: -+#if defined(__FreeBSD__) && __FreeBSD_version >= 502113 -+ long_return = mbstat.m_mcfail + mbstat.m_mpfail; -+#else - long_return = mbstat.m_drops; -+#endif - break; - #endif /* !linux && !solaris2 && !hpux10 && !hpux11 && MBSTAT_SYMBOL */ - default: -@@ -892,3 +946,97 @@ - *usedP = ainfo.ani_resv; - } - #endif /* solaris2 */ -+ -+#if defined(__FreeBSD__) && __FreeBSD_version >= 500102 -+void -+collect_mbuf(long *long_mbuf, long *long_mbufc) -+{ -+#if __FreeBSD_version >= 502113 -+ size_t mlen; -+ struct mbstat mbstat; -+ -+ mlen = sizeof mbstat; -+ if (sysctlbyname("kern.ipc.mbstat", &mbstat, &mlen, NULL, 0) < 0) { -+ warn("sysctl: retrieving mbstat"); -+ return; -+ } -+ if (mbstat.m_mbufs < 0) mbstat.m_mbufs = 0; /* XXX */ -+ if (mbstat.m_mclusts < 0) mbstat.m_mclusts = 0; /* XXX */ -+ if (long_mbuf) { -+ *long_mbuf = mbstat.m_mbufs; -+ } -+ if (long_mbufc) { -+ *long_mbufc = mbstat.m_mclusts; -+ } -+#else -+ int i, j, num_objs; -+ size_t mlen; -+ u_long totused[2]; -+ u_long totnum, totfree; -+ struct mbstat mbstat; -+ struct mbpstat **mbpstat = NULL; -+ -+ if (sysctlbyname("kern.ipc.mb_statpcpu", NULL, &mlen, NULL, 0) < 0) { -+ warn("sysctl: retrieving mb_statpcpu len"); -+ goto err; -+ } -+ num_objs = (int)(mlen / sizeof(struct mbpstat)); -+ if ((mbpstat = calloc(num_objs, sizeof(struct mbpstat *))) == NULL) { -+ warn("calloc: cannot allocate memory for mbpstats pointers"); -+ goto err; -+ } -+ if ((mbpstat[0] = calloc(num_objs, sizeof(struct mbpstat))) == NULL) { -+ warn("calloc: cannot allocate memory for mbpstats"); -+ goto err; -+ } -+ -+ if (sysctlbyname("kern.ipc.mb_statpcpu", mbpstat[0], &mlen, NULL, 0) < 0) { -+ warn("sysctl: retrieving mb_statpcpu"); -+ goto err; -+ } -+ mlen = sizeof mbstat; -+ if (sysctlbyname("kern.ipc.mbstat", &mbstat, &mlen, NULL, 0) < 0) { -+ warn("sysctl: retrieving mbstat"); -+ goto err; -+ } -+ -+ for (i = 0; i < num_objs; i++) -+ mbpstat[i] = mbpstat[0] + i; -+ -+#define GENLST (num_objs - 1) -+ -+ totnum = mbpstat[GENLST]->mb_mbbucks * mbstat.m_mbperbuck; -+ totfree = mbpstat[GENLST]->mb_mbfree; -+ for (i = 0; i < (num_objs - 1); i++) { -+ if (mbpstat[i]->mb_active == 0) -+ continue; -+ totnum += mbpstat[i]->mb_mbbucks * mbstat.m_mbperbuck; -+ totfree += mbpstat[i]->mb_mbfree; -+ } -+ totused[0] = totnum - totfree; -+ totnum = mbpstat[GENLST]->mb_clbucks * mbstat.m_clperbuck; -+ totfree = mbpstat[GENLST]->mb_clfree; -+ for (i = 0; i < (num_objs - 1); i++) { -+ if (mbpstat[i]->mb_active == 0) -+ continue; -+ totnum += mbpstat[i]->mb_clbucks * mbstat.m_clperbuck; -+ totfree += mbpstat[i]->mb_clfree; -+ } -+ totused[1] = totnum - totfree; -+ -+ if (long_mbuf) { -+ *long_mbuf = totused[0]; -+ } -+ if (long_mbufc) { -+ *long_mbufc = totused[1]; -+ } -+ -+ err: -+ if (mbpstat != NULL) { -+ if (mbpstat[0] != NULL) -+ free(mbpstat[0]); -+ free(mbpstat); -+ } -+#endif -+} -+#endif diff --git a/net-mgmt/net-snmp53/files/patch-hr_storage.h b/net-mgmt/net-snmp53/files/patch-hr_storage.h deleted file mode 100644 index a14eb9f1043c..000000000000 --- a/net-mgmt/net-snmp53/files/patch-hr_storage.h +++ /dev/null @@ -1,11 +0,0 @@ ---- agent/mibgroup/host/hr_storage.h.orig Tue Feb 25 22:17:48 2003 -+++ agent/mibgroup/host/hr_storage.h Wed May 5 15:27:40 2004 -@@ -12,6 +12,7 @@ - #define HRS_TYPE_MBUF 1 - #define HRS_TYPE_MEM 2 - #define HRS_TYPE_SWAP 3 --#define HRS_TYPE_FIXED_MAX 3 /* the largest fixed type */ -+#define HRS_TYPE_MBUFCLUSTER 4 -+#define HRS_TYPE_FIXED_MAX 4 /* the largest fixed type */ - - #endif /* _MIBGROUP_HRSTORAGE_H */ diff --git a/net-mgmt/net-snmp53/files/patch-hr_swrun.c b/net-mgmt/net-snmp53/files/patch-hr_swrun.c deleted file mode 100644 index 3bd1e7800e7b..000000000000 --- a/net-mgmt/net-snmp53/files/patch-hr_swrun.c +++ /dev/null @@ -1,69 +0,0 @@ ---- agent/mibgroup/host/hr_swrun.c.orig Wed Jun 9 05:56:03 2004 -+++ agent/mibgroup/host/hr_swrun.c Fri Jun 25 10:56:38 2004 -@@ -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); -@@ -694,7 +694,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); -@@ -889,7 +889,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) { -@@ -988,7 +988,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 + -@@ -1063,7 +1069,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 = - #if defined(freebsd5) - proc_table[LowProcIndex].ki_size / 1024; -@@ -1349,7 +1362,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 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-interface_ioctl.c b/net-mgmt/net-snmp53/files/patch-interface_ioctl.c deleted file mode 100644 index 4939166949be..000000000000 --- a/net-mgmt/net-snmp53/files/patch-interface_ioctl.c +++ /dev/null @@ -1,13 +0,0 @@ ---- ./agent/mibgroup/if-mib/data_access/interface_ioctl.c.orig Mon Oct 25 12:57:23 2004 -+++ ./agent/mibgroup/if-mib/data_access/interface_ioctl.c Mon Oct 25 12:56:33 2004 -@@ -385,6 +385,10 @@ - if (rc < 0) - return 0; - -+#if defined(__FreeBSD__) -+ return ifrq.ifr_index; -+#else - return ifrq.ifr_ifindex; -+#endif - #endif /* SIOCGIFINDEX */ - } diff --git a/net-mgmt/net-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 29e2de99aa97..000000000000 --- a/net-mgmt/net-snmp53/files/patch-ipv6.c +++ /dev/null @@ -1,603 +0,0 @@ ---- agent/mibgroup/mibII/ipv6.c.orig Thu Jul 8 05:31:54 2004 -+++ agent/mibgroup/mibII/ipv6.c Mon Oct 25 08:32:31 2004 -@@ -8,10 +8,25 @@ - #define _KERNEL 1 - #define _I_DEFINED_KERNEL - #endif -+ -+/* make this source a wee bit more readable */ -+#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -+#define OS_NET_BSD_16_OR_LATER 1 -+#endif -+#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin) -+#define OS_NOT_FREEBSD_NOR_DARWIN 1 -+#endif -+#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -+#define OS_FREEBSD_OR_DARWIN 1 -+#if !defined(INP_IPV6PROTO) -+#define INP_IPV6PROTO 0x04 -+#endif -+#endif -+ - #include <sys/types.h> - #include <sys/param.h> - #include <sys/socket.h> --#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -+#if OS_FREEBSD_OR_DARWIN - # if HAVE_SYS_SOCKETVAR_H - # include <sys/socketvar.h> - # endif -@@ -80,7 +95,7 @@ - # include <netinet6/ip6_var.h> - #endif - #include <net/route.h> --#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -+#if OS_FREEBSD_OR_DARWIN - # if HAVE_NETINET_IN_PCB_H - # include <netinet/in_pcb.h> - # endif -@@ -575,7 +590,7 @@ - memcpy(result, &tmp, sizeof(tmp)); - return 0; - } --#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -+#if OS_FREEBSD_OR_DARWIN - q = (caddr_t) TAILQ_NEXT(&tmp, if_link); - #else - # if defined(__NetBSD__) || defined(__OpenBSD__) -@@ -806,7 +821,7 @@ - - if (if_getifnet(interface, &ifnet) < 0) - break; --#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -+#if OS_FREEBSD_OR_DARWIN - ifa = (caddr_t) TAILQ_FIRST(&ifnet.if_addrhead); - #else - # if defined(__NetBSD__) || defined(__OpenBSD__) -@@ -827,7 +842,7 @@ - *var_len = sdl.sdl_alen; - return (u_char *) (sdl.sdl_data + sdl.sdl_nlen); - } --#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -+#if OS_FREEBSD_OR_DARWIN - ifa = (caddr_t) TAILQ_NEXT(&ifaddr, ifa_link); - #else - # if defined(__NetBSD__) || defined(__OpenBSD__) -@@ -1220,32 +1235,33 @@ - size_t * length, - int exact, size_t * var_len, WriteMethod ** write_method) - { -- oid newname[MAX_OID_LEN]; -- oid savname[MAX_OID_LEN]; -+ oid newname[MAX_OID_LEN], savname[MAX_OID_LEN]; - int result; - int i, j; - caddr_t p; -- static struct in6pcb in6pcb, savpcb; -+ static struct in6pcb tstpcb, savpcb; - int found, savnameLen; --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -+#if OS_NOT_FREEBSD_NOR_DARWIN -+ static struct in6pcb udb6; -+#endif -+#if OS_NET_BSD_16_OR_LATER - struct inpcbtable udbtable; - caddr_t first; --#elif (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -+#endif -+#if OS_FREEBSD_OR_DARWIN - char *sysctl_buf; - struct xinpgen *xig, *oxig; --#else -- static struct in6pcb udb6; - #endif - - DEBUGMSGTL(("mibII/ipv6", "var_udp6: ")); - DEBUGMSGOID(("mibII/ipv6", name, *length)); - DEBUGMSG(("mibII/ipv6", " %d\n", exact)); - --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -+#if OS_NET_BSD_16_OR_LATER - if (!auto_nlist("udbtable", (char *) &udbtable, sizeof(udbtable))) - return NULL; - first = p = (caddr_t)udbtable.inpt_queue.cqh_first; --#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin) -+#elif OS_NOT_FREEBSD_NOR_DARWIN - if (!auto_nlist("udb6", (char *) &udb6, sizeof(udb6))) - return NULL; - p = (caddr_t) udb6.in6p_next; -@@ -1274,9 +1290,10 @@ - (int) vp->namelen * sizeof(oid)); - DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p)); - while ( --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -+#if OS_NET_BSD_16_OR_LATER - p && p != first --#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin) -+#elif OS_NOT_FREEBSD_NOR_DARWIN -+ - p && (u_long) p != auto_nlist_value("udb6") - #else - xig->xig_len > sizeof(struct xinpgen) -@@ -1284,31 +1301,32 @@ - ) { - DEBUGMSGTL(("mibII/ipv6", "looping: p=%x\n", p)); - --#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin) -- if (klookup((u_long) p, (char *) &in6pcb, sizeof(in6pcb)) < 0) { -+#if OS_NOT_FREEBSD_NOR_DARWIN -+ if (klookup((u_long) p, (char *) &tstpcb, sizeof(tstpcb)) < 0) { - DEBUGMSGTL(("mibII/ipv6", "klookup fail for udb6 at %x\n", - p)); - found = 0; - break; - } - #else -- in6pcb = ((struct xinpcb *) xig)->xi_inp; -+ tstpcb = ((struct xinpcb *) xig)->xi_inp; - #endif --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -- if (in6pcb.in6p_af != AF_INET6) -+#if OS_NET_BSD_16_OR_LATER -+ if (tstpcb.in6p_af != AF_INET6) { -+ p = (caddr_t)tstpcb.in6p_queue.cqe_next; - goto skip; --#elif (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -- if (0 == (in6pcb.inp_vflag & INP_IPV6)) -+#elif OS_FREEBSD_OR_DARWIN -+ if (0 == (tstpcb.inp_vflag & INP_IPV6PROTO)) - goto skip; - #endif - - j = (int) vp->namelen; - for (i = 0; i < sizeof(struct in6_addr); i++) -- newname[j++] = in6pcb.in6p_laddr.s6_addr[i]; -- newname[j++] = ntohs(in6pcb.in6p_lport); -- if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_laddr)) -+ newname[j++] = tstpcb.in6p_laddr.s6_addr[i]; -+ newname[j++] = ntohs(tstpcb.in6p_lport); -+ if (IN6_IS_ADDR_LINKLOCAL(&tstpcb.in6p_laddr)) - newname[j++] = -- ntohs(*(uint16_t *) & in6pcb.in6p_laddr.s6_addr[2]); -+ ntohs(*(uint16_t *) & tstpcb.in6p_laddr.s6_addr[2]); - else - newname[j++] = 0; - /*XXX*/ -@@ -1319,7 +1337,7 @@ - - result = snmp_oid_compare(name, *length, newname, j); - if (exact && (result == 0)) { -- memcpy(&savpcb, &in6pcb, sizeof(savpcb)); -+ memcpy(&savpcb, &tstpcb, sizeof(savpcb)); - savnameLen = j; - memcpy(savname, newname, j * sizeof(oid)); - found++; -@@ -1330,7 +1348,7 @@ - */ - if ((savnameLen == 0) || - (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) { -- memcpy(&savpcb, &in6pcb, sizeof(savpcb)); -+ memcpy(&savpcb, &tstpcb, sizeof(savpcb)); - savnameLen = j; - memcpy(savname, newname, j * sizeof(oid)); - found++; -@@ -1338,15 +1356,15 @@ - } - - skip: --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -- p = (caddr_t)in6pcb.in6p_queue.cqe_next; --#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin) -- p = (caddr_t) in6pcb.in6p_next; -+#if OS_NET_BSD_16_OR_LATER -+ p = (caddr_t)tstpcb.in6p_queue.cqe_next; -+#elif OS_NOT_FREEBSD_NOR_DARWIN -+ p = (caddr_t) tstpcb.in6p_next; - #else - xig = (struct xinpgen *) ((char *) xig + xig->xig_len); - #endif - } --#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -+#if OS_FREEBSD_OR_DARWIN - free(sysctl_buf); - #endif - DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found)); -@@ -1354,7 +1372,7 @@ - return NULL; - *length = savnameLen; - memcpy((char *) name, (char *) savname, *length * sizeof(oid)); -- memcpy(&in6pcb, &savpcb, sizeof(savpcb)); -+ memcpy(&tstpcb, &savpcb, sizeof(savpcb)); - *write_method = 0; - *var_len = sizeof(long); /* default to 'long' results */ - -@@ -1367,14 +1385,14 @@ - switch (vp->magic) { - case IPV6UDPLOCALADDRESS: - *var_len = sizeof(struct in6_addr); -- return in6pcb.in6p_laddr.s6_addr; -+ return savpcb.in6p_laddr.s6_addr; - case IPV6UDPLOCALPORT: -- long_return = ntohs(in6pcb.in6p_lport); -+ long_return = ntohs(savpcb.in6p_lport); - return (u_char *) & long_return; - case IPV6UDPIFINDEX: -- if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_laddr)) -+ if (IN6_IS_ADDR_LINKLOCAL(&savpcb.in6p_laddr)) - long_return = -- ntohs(*(uint16_t *) & in6pcb.in6p_laddr.s6_addr[2]); -+ ntohs(*(uint16_t *) & savpcb.in6p_laddr.s6_addr[2]); - else - long_return = 0; - /*XXX*/ return (u_char *) & long_return; -@@ -1392,24 +1410,24 @@ - size_t * length, - int exact, size_t * var_len, WriteMethod ** write_method) - { -- oid newname[MAX_OID_LEN]; -- oid savname[MAX_OID_LEN]; -+ oid newname[MAX_OID_LEN], savname[MAX_OID_LEN]; - int result; - int i, j; - caddr_t p; -- static struct in6pcb in6pcb, savpcb; -+ static struct in6pcb tstpcb, savpcb; - struct tcp6cb tcp6cb; - int found, savnameLen; - static int tcp6statemap[TCP6_NSTATES]; - static int initialized = 0; --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -+#if OS_NOT_FREEBSD_NOR_DARWIN -+ static struct in6pcb tcb6; -+#endif -+#if OS_NET_BSD_16_OR_LATER - struct inpcbtable tcbtable; - caddr_t first; --#elif (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -+#elif OS_FREEBSD_OR_DARWIN - char *sysctl_buf; - struct xinpgen *xig, *oxig; --#else -- static struct in6pcb tcb6; - #endif - - if (!initialized) { -@@ -1431,11 +1449,11 @@ - DEBUGMSGOID(("mibII/ipv6", name, *length)); - DEBUGMSG(("mibII/ipv6", " %d\n", exact)); - --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -+#if OS_NET_BSD_16_OR_LATER - if (!auto_nlist("tcbtable", (char *) &tcbtable, sizeof(tcbtable))) - return NULL; - first = p = (caddr_t)tcbtable.inpt_queue.cqh_first; --#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin) -+#elif OS_NOT_FREEBSD_NOR_DARWIN - if (!auto_nlist("tcb6", (char *) &tcb6, sizeof(tcb6))) - return NULL; - p = (caddr_t) tcb6.in6p_next; -@@ -1464,9 +1482,10 @@ - (int) vp->namelen * sizeof(oid)); - DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p)); - while ( --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -+#if OS_NET_BSD_16_OR_LATER - p && p != first --#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin) -+#elif OS_NOT_FREEBSD_NOR_DARWIN -+ - p && (u_long) p != auto_nlist_value("tcb6") - #else - xig->xig_len > sizeof(struct xinpgen) -@@ -1474,41 +1493,41 @@ - ) { - DEBUGMSGTL(("mibII/ipv6", "looping: p=%x\n", p)); - --#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin) -- if (klookup((u_long) p, (char *) &in6pcb, sizeof(in6pcb)) < 0) { -+#if OS_NOT_FREEBSD_NOR_DARWIN -+ if (klookup((u_long) p, (char *) &tstpcb, sizeof(tstpcb)) < 0) { - DEBUGMSGTL(("mibII/ipv6", "klookup fail for tcb6 at %x\n", - p)); - found = 0; - break; - } - #else -- in6pcb = ((struct xinpcb *) xig)->xi_inp; -+ tstpcb = ((struct xinpcb *) xig)->xi_inp; - #endif --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -- if (in6pcb.in6p_af != AF_INET6) -+#if OS_NET_BSD_16_OR_LATER -+ if (tstpcb.in6p_af != AF_INET6) - goto skip; --#elif (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -- if (0 == (in6pcb.inp_vflag & INP_IPV6)) -+#elif OS_FREEBSD_OR_DARWIN -+ if (0 == (tstpcb.inp_vflag & INP_IPV6PROTO)) - goto skip; - #endif - if (klookup -- ((u_long) in6pcb.in6p_ppcb, (char *) &tcp6cb, sizeof(tcp6cb)) -+ ((u_long) tstpcb.in6p_ppcb, (char *) &tcp6cb, sizeof(tcp6cb)) - < 0) { - DEBUGMSGTL(("mibII/ipv6", "klookup fail for tcb6.tcp6cb at %x\n", -- in6pcb.in6p_ppcb)); -+ tstpcb.in6p_ppcb)); - found = 0; - break; - } - j = (int) vp->namelen; - for (i = 0; i < sizeof(struct in6_addr); i++) -- newname[j++] = in6pcb.in6p_laddr.s6_addr[i]; -- newname[j++] = ntohs(in6pcb.in6p_lport); -+ newname[j++] = tstpcb.in6p_laddr.s6_addr[i]; -+ newname[j++] = ntohs(tstpcb.in6p_lport); - for (i = 0; i < sizeof(struct in6_addr); i++) -- newname[j++] = in6pcb.in6p_faddr.s6_addr[i]; -- newname[j++] = ntohs(in6pcb.in6p_fport); -- if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_laddr)) -+ newname[j++] = tstpcb.in6p_faddr.s6_addr[i]; -+ newname[j++] = ntohs(tstpcb.in6p_fport); -+ if (IN6_IS_ADDR_LINKLOCAL(&tstpcb.in6p_laddr)) - newname[j++] = -- ntohs(*(uint16_t *) & in6pcb.in6p_laddr.s6_addr[2]); -+ ntohs(*(uint16_t *) & tstpcb.in6p_laddr.s6_addr[2]); - else - newname[j++] = 0; - /*XXX*/ newname[j++] = tcp6statemap[tcp6cb.t_state]; -@@ -1519,13 +1538,13 @@ - DEBUGMSG(("mibII/ipv6", " %d\n", exact)); - - #if 1 /* this is very odd but sometimes happen, and cause infinite loop */ -- if (ntohs(in6pcb.in6p_lport) == 0) -+ if (ntohs(tstpcb.in6p_lport) == 0) - goto skip; - #endif - - result = snmp_oid_compare(name, *length, newname, j); - if (exact && (result == 0)) { -- memcpy(&savpcb, &in6pcb, sizeof(savpcb)); -+ memcpy(&savpcb, &tstpcb, sizeof(savpcb)); - savnameLen = j; - memcpy(savname, newname, j * sizeof(oid)); - found++; -@@ -1536,7 +1555,7 @@ - */ - if ((savnameLen == 0) || - (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) { -- memcpy(&savpcb, &in6pcb, sizeof(savpcb)); -+ memcpy(&savpcb, &tstpcb, sizeof(savpcb)); - savnameLen = j; - memcpy(savname, newname, j * sizeof(oid)); - found++; -@@ -1544,15 +1563,15 @@ - } - - skip: --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -- p = (caddr_t)in6pcb.in6p_queue.cqe_next; --#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin) -- p = (caddr_t) in6pcb.in6p_next; -+#if OS_NET_BSD_16_OR_LATER -+ p = (caddr_t)tstpcb.in6p_queue.cqe_next; -+#elif OS_NOT_FREEBSD_NOR_DARWIN -+ p = (caddr_t) tstpcb.in6p_next; - #else - xig = (struct xinpgen *) ((char *) xig + xig->xig_len); - #endif - } --#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -+#if OS_FREEBSD_OR_DARWIN - free(sysctl_buf); - #endif - DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found)); -@@ -1573,20 +1592,20 @@ - switch (vp->magic) { - case IPV6TCPLOCALADDR: - *var_len = sizeof(struct in6_addr); -- return (u_char *) & in6pcb.in6p_laddr.s6_addr[0]; -+ return (u_char *) & savpcb.in6p_laddr.s6_addr[0]; - case IPV6TCPLOCALPORT: -- long_return = ntohs(in6pcb.in6p_lport); -+ long_return = ntohs(savpcb.in6p_lport); - return (u_char *) & long_return; - case IPV6TCPREMOTEADDR: - *var_len = sizeof(struct in6_addr); -- return (u_char *) & in6pcb.in6p_faddr.s6_addr[0]; -+ return (u_char *) & savpcb.in6p_faddr.s6_addr[0]; - case IPV6TCPREMOTEPORT: -- long_return = ntohs(in6pcb.in6p_fport); -+ long_return = ntohs(savpcb.in6p_fport); - return (u_char *) & long_return; - case IPV6TCPIFINDEX: -- if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_laddr)) -+ if (IN6_IS_ADDR_LINKLOCAL(&savpcb.in6p_laddr)) - long_return = -- ntohs(*(uint16_t *) & in6pcb.in6p_laddr.s6_addr[2]); -+ ntohs(*(uint16_t *) & savpcb.in6p_laddr.s6_addr[2]); - else - long_return = 0; - /*XXX*/ return (u_char *) & long_return; -@@ -1633,22 +1652,23 @@ - size_t * length, - int exact, size_t * var_len, WriteMethod ** write_method) - { -- oid newname[MAX_OID_LEN]; -- oid savname[MAX_OID_LEN]; -+ oid newname[MAX_OID_LEN], savname[MAX_OID_LEN]; - int result; - int i, j; - caddr_t p; -- static struct in6pcb in6pcb, savpcb; -+ static struct in6pcb tstpcb, savpcb; - struct tcpcb tcpcb; - int found, savnameLen; --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -+#if OS_NOT_FREEBSD_NOR_DARWIN -+ static struct in6pcb tcb6; -+#endif -+#if OS_NET_BSD_16_OR_LATER - struct inpcbtable tcbtable; - caddr_t first; --#elif (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -+#endif -+#if OS_FREEBSD_OR_DARWIN - char *sysctl_buf; - struct xinpgen *xig, *oxig; --#else -- static struct in6pcb tcb6; - #endif - - DEBUGMSGTL(("mibII/ipv6", "var_tcp6: ")); -@@ -1688,9 +1708,9 @@ - (int) vp->namelen * sizeof(oid)); - DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p)); - while ( --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -+#if OS_NET_BSD_16_OR_LATER - p && p != first --#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin) -+#elif OS_NOT_FREEBSD_NOR_DARWIN - p && (u_long) p != auto_nlist_value("tcb6") - #else - xig->xig_len > sizeof(struct xinpgen) -@@ -1698,41 +1718,41 @@ - ) { - DEBUGMSGTL(("mibII/ipv6", "looping: p=%x\n", p)); - --#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin) -- if (klookup((u_long) p, (char *) &in6pcb, sizeof(in6pcb)) < 0) { -+#if OS_NOT_FREEBSD_NOR_DARWIN -+ if (klookup((u_long) p, (char *) &tstpcb, sizeof(in6pcb)) < 0) { - DEBUGMSGTL(("mibII/ipv6", "klookup fail for tcb6 at %x\n", - p)); - found = 0; - break; - } - #else -- in6pcb = ((struct xinpcb *) xig)->xi_inp; -+ tstpcb = ((struct xinpcb *) xig)->xi_inp; - #endif --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -- if (in6pcb.in6p_af != AF_INET6) -+#if OS_NET_BSD_16_OR_LATER -+ if (tstpcb.in6p_af != AF_INET6) - goto skip; --#elif (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -- if (0 == (in6pcb.inp_vflag & INP_IPV6)) -+#elif OS_FREEBSD_OR_DARWIN -+ if (0 == (tstpcb.inp_vflag & INP_IPV6PROTO)) - goto skip; - #endif - if (klookup -- ((u_long) in6pcb.in6p_ppcb, (char *) &tcpcb, sizeof(tcpcb)) -+ ((u_long) tstpcb.in6p_ppcb, (char *) &tcpcb, sizeof(tcpcb)) - < 0) { -- DEBUGMSGTL(("mibII/ipv6", "klookup fail for tcb6.tcpcb at %x\n", -- in6pcb.in6p_ppcb)); -+ DEBUGMSGTL(("mibII/ipv6", "klookup fail for tcb6.tcp6cb at %x\n", -+ tstpcb.in6p_ppcb)); - found = 0; - break; - } - j = (int) vp->namelen; - for (i = 0; i < sizeof(struct in6_addr); i++) -- newname[j++] = in6pcb.in6p_laddr.s6_addr[i]; -- newname[j++] = ntohs(in6pcb.in6p_lport); -+ newname[j++] = tstpcb.in6p_laddr.s6_addr[i]; -+ newname[j++] = ntohs(tstpcb.in6p_lport); - for (i = 0; i < sizeof(struct in6_addr); i++) -- newname[j++] = in6pcb.in6p_faddr.s6_addr[i]; -- newname[j++] = ntohs(in6pcb.in6p_fport); -- if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_laddr)) -+ newname[j++] = tstpcb.in6p_faddr.s6_addr[i]; -+ newname[j++] = ntohs(tstpcb.in6p_fport); -+ if (IN6_IS_ADDR_LINKLOCAL(&tstpcb.in6p_laddr)) - newname[j++] = -- ntohs(*(uint16_t *) & in6pcb.in6p_laddr.s6_addr[2]); -+ ntohs(*(uint16_t *) & tstpcb.in6p_laddr.s6_addr[2]); - else - newname[j++] = 0; - /*XXX*/ newname[j++] = mapTcpState((int)tcpcb.t_state); -@@ -1743,12 +1763,12 @@ - DEBUGMSG(("mibII/ipv6", " %d\n", exact)); - - #if 1 /* this is very odd but sometimes happen, and cause infinite loop */ -- if (ntohs(in6pcb.in6p_lport) == 0) -+ if (ntohs(tstpcb.in6p_lport) == 0) - goto skip; - #endif - result = snmp_oid_compare(name, *length, newname, j); - if (exact && (result == 0)) { -- memcpy(&savpcb, &in6pcb, sizeof(savpcb)); -+ memcpy(&savpcb, &tstpcb, sizeof(savpcb)); - savnameLen = j; - memcpy(savname, newname, j * sizeof(oid)); - found++; -@@ -1759,7 +1779,7 @@ - */ - if ((savnameLen == 0) || - (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) { -- memcpy(&savpcb, &in6pcb, sizeof(savpcb)); -+ memcpy(&savpcb, &tstpcb, sizeof(savpcb)); - savnameLen = j; - memcpy(savname, newname, j * sizeof(oid)); - found++; -@@ -1767,15 +1787,15 @@ - } - - skip: --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -- p = (caddr_t)in6pcb.in6p_queue.cqe_next; --#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin) -- p = (caddr_t) in6pcb.in6p_next; -+#if OS_NET_BSD_16_OR_LATER -+ p = (caddr_t)tstpcb.in6p_queue.cqe_next; -+#elif OS_NOT_FREEBSD_NOR_DARWIN -+ p = (caddr_t) tstpcb.in6p_next; - #else - xig = (struct xinpgen *) ((char *) xig + xig->xig_len); - #endif - } --#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -+#if OS_FREEBSD_OR_DARWIN - free(sysctl_buf); - #endif - DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found)); -@@ -1783,7 +1803,7 @@ - return NULL; - *length = savnameLen; - memcpy((char *) name, (char *) savname, *length * sizeof(oid)); -- memcpy(&in6pcb, &savpcb, sizeof(savpcb)); -+ memcpy(&tstpcb, &savpcb, sizeof(savpcb)); - *write_method = 0; - *var_len = sizeof(long); /* default to 'long' results */ - -@@ -1796,20 +1816,20 @@ - switch (vp->magic) { - case IPV6TCPLOCALADDR: - *var_len = sizeof(struct in6_addr); -- return (u_char *) & in6pcb.in6p_laddr.s6_addr[0]; -+ return (u_char *) & savpcb.in6p_laddr.s6_addr[0]; - case IPV6TCPLOCALPORT: -- long_return = ntohs(in6pcb.in6p_lport); -+ long_return = ntohs(savpcb.in6p_lport); - return (u_char *) & long_return; - case IPV6TCPREMOTEADDR: - *var_len = sizeof(struct in6_addr); -- return (u_char *) & in6pcb.in6p_faddr.s6_addr[0]; -+ return (u_char *) & savpcb.in6p_faddr.s6_addr[0]; - case IPV6TCPREMOTEPORT: -- long_return = ntohs(in6pcb.in6p_fport); -+ long_return = ntohs(savpcb.in6p_fport); - return (u_char *) & long_return; - case IPV6TCPIFINDEX: -- if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_laddr)) -+ if (IN6_IS_ADDR_LINKLOCAL(&savpcb.in6p_laddr)) - long_return = -- ntohs(*(uint16_t *) & in6pcb.in6p_laddr.s6_addr[2]); -+ ntohs(*(uint16_t *) & savpcb.in6p_laddr.s6_addr[2]); - else - long_return = 0; - /*XXX*/ return (u_char *) & long_return; diff --git a/net-mgmt/net-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 a0a2ce336f86..000000000000 --- a/net-mgmt/net-snmp53/files/patch-local:mib2c +++ /dev/null @@ -1,21 +0,0 @@ ---- local/mib2c.orig Fri Sep 10 21:30:15 2004 -+++ local/mib2c Mon Oct 25 08:38:30 2004 -@@ -1,5 +1,4 @@ --#!/usr/bin/perl --#!/usr/bin/perl -w -+#!%%PERL%% - - # - # $Id: mib2c,v 5.57 2004/09/10 12:30:15 dts12 Exp $ -@@ -60,8 +59,9 @@ - if($ENV{MIB2C_DIR}) { - push @def_search_dirs, split(/:/, $ENV{MIB2C_DIR}); - } --push @def_search_dirs, "/usr/local/share/snmp/"; --push @def_search_dirs, "/usr/local/share/snmp/mib2c-data"; -+push @def_search_dirs, "%%PREFIX%%/share/snmp/"; -+push @def_search_dirs, "%%PREFIX%%/etc/snmp/"; -+push @def_search_dirs, "%%PREFIX%%/share/snmp/mib2c-data"; - push @def_search_dirs, "./mib2c-conf.d"; - - sub usage { diff --git a/net-mgmt/net-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 5b3623782df9..000000000000 --- a/net-mgmt/net-snmp53/files/patch-local:snmpconf +++ /dev/null @@ -1,53 +0,0 @@ ---- local/snmpconf.orig Sat Oct 9 01:01:37 2004 -+++ local/snmpconf Mon Oct 25 08:42:23 2004 -@@ -1,4 +1,4 @@ --#!/usr/bin/perl -w -+#!%%PERL%% -w - - # - # A simple configuration file builder based on questions listed in -@@ -32,7 +32,7 @@ - $opts{'c'} = "$ENV{SNMPSHAREPATH}/snmpconf-data"; - } - else { -- $opts{'c'} = "/usr/local/share/snmp/snmpconf-data"; -+ $opts{'c'} = "%%PREFIX%%/share/snmp/snmpconf-data"; - } - - # default config file path -@@ -40,7 +40,7 @@ - $confpath = "$ENV{SNMPCONFPATH}"; - } - else { -- $confpath = "/usr/local/share/snmp"; -+ $confpath = "%%PREFIX%%/share/snmp"; - } - } - else -@@ -128,7 +128,7 @@ - # - # Find existing files to possibly read in. - # --my @searchpath = ("$confpath","/usr/local/etc/snmp", ".", "$home"); -+my @searchpath = ("$confpath","%%PREFIX%%/etc/snmp", ".", "$home"); - push @searchpath, $opts{I} if ($opts{I}); - foreach my $i (@searchpath) { - debug("searching $i\n"); -@@ -227,7 +227,7 @@ - if ($opts{'i'} || $opts{'I'}) { - $opts{'I'} = "$confpath" if (!$opts{'I'}); - -- if (! (-d "$opts{'I'}") && ! (mkdir ("$opts{'I'}"))) { -+ if (! (-d "$opts{'I'}") && ! (mkdir ("$opts{'I'}", 0777))) { - print "\nCould not create $opts{'I'} directory: $!\n"; - print ("File $didfile{$i} left in current directory\n"); - } -@@ -242,7 +242,7 @@ - } - } - } elsif ($opts{'p'}) { -- if (! (-d "$home") && ! (mkdir ("$home"))) { -+ if (! (-d "$home") && ! (mkdir ("$home", 0777))) { - print "\nCould not create $home directory: $!\n"; - print ("File $didfile{$i} left in current directory\n"); - } 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-snmpTCPIPv6Domain.c b/net-mgmt/net-snmp53/files/patch-snmpTCPIPv6Domain.c deleted file mode 100644 index 365b6f398ebe..000000000000 --- a/net-mgmt/net-snmp53/files/patch-snmpTCPIPv6Domain.c +++ /dev/null @@ -1,30 +0,0 @@ ---- snmplib/snmpTCPIPv6Domain.c.orig Sat Oct 16 03:52:29 2004 -+++ snmplib/snmpTCPIPv6Domain.c Mon Oct 25 09:22:06 2004 -@@ -95,13 +95,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, "TCP/IPv6: [%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 c36abaaba730..000000000000 --- a/net-mgmt/net-snmp53/files/patch-snmpUCDIPv6Domain.c +++ /dev/null @@ -1,30 +0,0 @@ ---- snmplib/snmpUDPIPv6Domain.c.orig Sat Oct 16 03:52:29 2004 -+++ snmplib/snmpUDPIPv6Domain.c Mon Oct 25 09:28:10 2004 -@@ -104,13 +104,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, "UDP/IPv6: [%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-snmpusm.c b/net-mgmt/net-snmp53/files/patch-snmpusm.c deleted file mode 100644 index 7b0ced219ae5..000000000000 --- a/net-mgmt/net-snmp53/files/patch-snmpusm.c +++ /dev/null @@ -1,11 +0,0 @@ ---- snmplib/snmpusm.c.orig Wed Dec 8 19:32:52 2004 -+++ snmplib/snmpusm.c Wed Dec 8 19:33:30 2004 -@@ -89,6 +89,8 @@ - oid usmAESPrivProtocol[10] = { 1, 3, 6, 1, 6, 3, 10, 1, 2, 4 }; - /* backwards compat */ - oid *usmAES128PrivProtocol = usmAESPrivProtocol; -+oid *usmAES192PrivProtocol = usmAESPrivProtocol; -+oid *usmAES256PrivProtocol = usmAESPrivProtocol; - - static u_int dummy_etime, dummy_eboot; /* For ISENGINEKNOWN(). */ - diff --git a/net-mgmt/net-snmp53/files/patch-tcpTable.c b/net-mgmt/net-snmp53/files/patch-tcpTable.c deleted file mode 100644 index d96d0976189b..000000000000 --- a/net-mgmt/net-snmp53/files/patch-tcpTable.c +++ /dev/null @@ -1,12 +0,0 @@ ---- agent/mibgroup/mibII/tcpTable.c.orig Wed Jun 9 05:53:17 2004 -+++ agent/mibgroup/mibII/tcpTable.c Thu Jun 24 23:21:32 2004 -@@ -275,6 +277,9 @@ - - int - TCP_Count_Connections( void ) { -+#if (defined(CAN_USE_SYSCTL) && defined(TCPCTL_PCBLIST)) -+ tcpTable_load(NULL, NULL); -+#endif - return tcp_estab; - } - diff --git a/net-mgmt/net-snmp53/files/patch-transform_oids.h b/net-mgmt/net-snmp53/files/patch-transform_oids.h deleted file mode 100644 index 874acac2f086..000000000000 --- a/net-mgmt/net-snmp53/files/patch-transform_oids.h +++ /dev/null @@ -1,11 +0,0 @@ ---- include/net-snmp/library/transform_oids.h.orig Wed Dec 8 19:34:06 2004 -+++ include/net-snmp/library/transform_oids.h Wed Dec 8 19:34:34 2004 -@@ -23,6 +23,8 @@ - /* XXX: OIDs not defined yet */ - extern oid usmAESPrivProtocol[10]; /* == { 1,3,6,1,6,3,10,1,2,4 }; */ - extern oid *usmAES128PrivProtocol; /* backwards compat */ -+extern oid *usmAES192PrivProtocol; /* backwards compat */ -+extern oid *usmAES256PrivProtocol; /* backwards compat */ - - #define USM_AUTH_PROTO_NOAUTH_LEN 10 - #define USM_AUTH_PROTO_MD5_LEN 10 diff --git a/net-mgmt/net-snmp53/files/patch-ucd_snmp.h b/net-mgmt/net-snmp53/files/patch-ucd_snmp.h deleted file mode 100644 index 2690553112a1..000000000000 --- a/net-mgmt/net-snmp53/files/patch-ucd_snmp.h +++ /dev/null @@ -1,11 +0,0 @@ ---- agent/mibgroup/ucd_snmp.h.orig Mon Oct 25 21:36:55 2004 -+++ agent/mibgroup/ucd_snmp.h Mon Oct 25 21:37:20 2004 -@@ -39,6 +39,8 @@ - config_arch_require(freebsd4, ucd-snmp/memory_freebsd2) - config_arch_require(freebsd5, ucd-snmp/vmstat_freebsd2) - 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(netbsd1, ucd-snmp/vmstat_netbsd1) - config_arch_require(netbsd1, ucd-snmp/memory_netbsd1) - config_arch_require(openbsd2, ucd-snmp/vmstat_netbsd1) 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 6e089e397b40..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=${snmpd_enable-"NO"} -snmpd_flags=${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 b3b48c2d79c2..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=${snmptrapd_enable-"NO"} -snmptrapd_flags=${snmptrapd_flags-"-p /var/run/snmptrapd.pid"} - -. %%RC_SUBR%% - -load_rc_config net_snmptrapd - -if [ ! -z "$net_snmptrapd_enable" ]; then - echo "Warning: \$net_snmptrapd_enable is obsoleted." - echo " Use \$snmptrapd_enable instead." - snmptrapd_enable="$net_snmptrapd_enable" - [ ! -z "$net_snmptrapd_flags" ] && snmptrapd_flags="$net_snmptrapd_flags" -fi - -name=snmptrapd -rcvar=`set_rcvar` - -command=%%PREFIX%%/sbin/${name} -pidfile=/var/run/${name}.pid - -load_rc_config ${name} -run_rc_command "$1" |