diff options
Diffstat (limited to 'net-mgmt/net-snmp-devel/files')
-rw-r--r-- | net-mgmt/net-snmp-devel/files/extra-patch-local:Makefile.in | 8 | ||||
-rw-r--r-- | net-mgmt/net-snmp-devel/files/patch-Makefile.in | 11 | ||||
-rw-r--r-- | net-mgmt/net-snmp-devel/files/patch-configure.in | 18 | ||||
-rw-r--r-- | net-mgmt/net-snmp-devel/files/patch-freebsd6.h | 5 | ||||
-rw-r--r-- | net-mgmt/net-snmp-devel/files/patch-hr_storage.c | 40 | ||||
-rw-r--r-- | net-mgmt/net-snmp-devel/files/patch-ipv6.c | 87 | ||||
-rw-r--r-- | net-mgmt/net-snmp-devel/files/patch-local:mib2c | 15 | ||||
-rw-r--r-- | net-mgmt/net-snmp-devel/files/patch-local:snmpconf | 44 | ||||
-rw-r--r-- | net-mgmt/net-snmp-devel/files/patch-snmpTCPIPv6Domain.c | 8 | ||||
-rw-r--r-- | net-mgmt/net-snmp-devel/files/patch-snmpUCDIPv6Domain.c | 8 |
10 files changed, 109 insertions, 135 deletions
diff --git a/net-mgmt/net-snmp-devel/files/extra-patch-local:Makefile.in b/net-mgmt/net-snmp-devel/files/extra-patch-local:Makefile.in index 7f648103d7aa..d3da47b8a662 100644 --- a/net-mgmt/net-snmp-devel/files/extra-patch-local:Makefile.in +++ b/net-mgmt/net-snmp-devel/files/extra-patch-local:Makefile.in @@ -1,11 +1,11 @@ ---- local/Makefile.in.orig Sat Apr 20 16:30:13 2002 -+++ local/Makefile.in Wed Apr 24 01:45:55 2002 -@@ -12,7 +12,7 @@ +--- local/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 - PERLPROG=@PERLPROG@ diff --git a/net-mgmt/net-snmp-devel/files/patch-Makefile.in b/net-mgmt/net-snmp-devel/files/patch-Makefile.in index fb3d1aa0a25a..e69de29bb2d1 100644 --- a/net-mgmt/net-snmp-devel/files/patch-Makefile.in +++ b/net-mgmt/net-snmp-devel/files/patch-Makefile.in @@ -1,11 +0,0 @@ ---- Makefile.in.orig Thu Feb 19 05:35:25 2004 -+++ Makefile.in Wed Mar 24 08:25:27 2004 -@@ -15,7 +15,7 @@ - INSTALLHEADERS=version.h - INCLUDESUBDIR=system - INCLUDESUBDIRHEADERS= aix.h bsd.h bsdi3.h bsdi4.h bsdi.h cygwin.h darwin.h \ -- dynix.h freebsd2.h freebsd3.h freebsd4.h freebsd.h generic.h hpux.h \ -+ dynix.h freebsd2.h freebsd3.h freebsd4.h freebsd5.h freebsd6.h freebsd.h generic.h hpux.h \ - irix.h linux.h mingw32.h mips.h netbsd.h openbsd.h osf5.h \ - solaris2.6.h solaris2.7.h solaris2.8.h solaris2.9.h solaris.h \ - sunos.h svr5.h sysv.h ultrix4.h diff --git a/net-mgmt/net-snmp-devel/files/patch-configure.in b/net-mgmt/net-snmp-devel/files/patch-configure.in index bc45eecc20b7..99cd2dad2893 100644 --- a/net-mgmt/net-snmp-devel/files/patch-configure.in +++ b/net-mgmt/net-snmp-devel/files/patch-configure.in @@ -1,7 +1,7 @@ ---- configure.in.orig Thu Mar 6 07:41:13 2003 -+++ configure.in Tue May 27 14:53:22 2003 -@@ -1246,7 +1246,7 @@ - dnl fall back +--- 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 @@ -9,17 +9,17 @@ do if test -f $i -o $CFLAG $i; then ac_cv_KERNEL_LOC="$i" -@@ -1659,7 +1659,7 @@ +@@ -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 netdb.h sys/dmap.h machine/pte.h xti.h sys/sockio.h sys/socket.h sys/un.h fstab.h sys/fs.h mtab.h ufs/fs.h ufs/ffs/fs.h sys/fixpoint.h machine/param.h sys/vm.h vm/vm.h sys/vmmeter.h sys/vmparam.h sys/vmmac.h sys/vmsystm.h sys/mbuf.h sys/time.h sys/swap.h inet/mib2.h sys/statvfs.h sys/vfs.h sys/mnttab.h sys/user.h sys/proc.h sys/select.h mntent.h sys/mntent.h kstat.h utsname.h sys/utsname.h sys/cdefs.h getopt.h locale.h pthread.h sys/loadavg.h regex.h linux/tasks.h pwd.h grp.h utmpx.h) + 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 -@@ -1866,6 +1866,26 @@ - dnl checking for 4.3 vs 4.4 rtentry. +@@ -2811,6 +2811,26 @@ + # checking for 4.3 vs 4.4 rtentry. AC_CACHE_CHECK(type of rtentry structure,ac_cv_RTENTRY_TYPE, [ + @@ -43,5 +43,5 @@ + rt.rt_dst; + ], ac_cv_RTENTRY_TYPE="BSD-4.4") - dnl 4.4 compat + # 4.4 compat AC_TRY_COMPILE([ diff --git a/net-mgmt/net-snmp-devel/files/patch-freebsd6.h b/net-mgmt/net-snmp-devel/files/patch-freebsd6.h index 95fb5509c798..e69de29bb2d1 100644 --- a/net-mgmt/net-snmp-devel/files/patch-freebsd6.h +++ b/net-mgmt/net-snmp-devel/files/patch-freebsd6.h @@ -1,5 +0,0 @@ ---- /dev/null Tue Aug 31 23:33:01 2004 -+++ include/net-snmp/system/freebsd6.h Tue Aug 31 23:36:22 2004 -@@ -0,0 +1,2 @@ -+#include "freebsd5.h" -+ diff --git a/net-mgmt/net-snmp-devel/files/patch-hr_storage.c b/net-mgmt/net-snmp-devel/files/patch-hr_storage.c index b8185f23c26e..3fe873c4eaac 100644 --- a/net-mgmt/net-snmp-devel/files/patch-hr_storage.c +++ b/net-mgmt/net-snmp-devel/files/patch-hr_storage.c @@ -1,5 +1,5 @@ ---- agent/mibgroup/host/hr_storage.c.orig Sat Jun 19 03:39:14 2004 -+++ agent/mibgroup/host/hr_storage.c Mon Jul 5 16:38:55 2004 +--- 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 @@ -11,7 +11,7 @@ #define HRSTORE_MEMSIZE 1 #define HRSTORE_INDEX 2 #define HRSTORE_TYPE 3 -@@ -450,7 +454,8 @@ +@@ -451,7 +455,8 @@ NULL, "Memory Buffers", /* HRS_TYPE_MBUF */ "Real Memory", /* HRS_TYPE_MEM */ @@ -21,7 +21,7 @@ }; -@@ -565,6 +570,7 @@ +@@ -566,6 +571,7 @@ storage_type_id[storage_type_len - 1] = 3; /* Virtual Mem */ break; case HRS_TYPE_MBUF: @@ -29,7 +29,7 @@ storage_type_id[storage_type_len - 1] = 1; /* Other */ break; default: -@@ -650,7 +656,7 @@ +@@ -654,7 +660,7 @@ case HRS_TYPE_SWAP: long_return = memory_totals.t_vm; break; @@ -38,7 +38,7 @@ case HRS_TYPE_MEM: long_return = physmem; break; -@@ -660,6 +666,8 @@ +@@ -664,6 +670,8 @@ #endif long_return = 0; break; @@ -47,7 +47,7 @@ case HRS_TYPE_MBUF: #if HAVE_SYS_POOL_H long_return = 0; -@@ -669,7 +677,26 @@ +@@ -673,7 +681,26 @@ i++) long_return += mbstat.m_mtypes[i]; #elif defined(MBSTAT_SYMBOL) @@ -74,7 +74,7 @@ #elif defined(NO_DUMMY_VALUES) goto try_next; #else -@@ -677,6 +704,18 @@ +@@ -681,6 +708,18 @@ #endif break; #endif /* !linux && !solaris2 && !hpux10 && !hpux11 && ... */ @@ -93,26 +93,20 @@ default: #if NO_DUMMY_VALUES goto try_next; -@@ -727,7 +766,18 @@ - * mbpool.pr_size + (mclpool.pr_nget - mclpool.pr_nput) +@@ -733,6 +772,12 @@ * mclpool.pr_size; - #elif defined(MBSTAT_SYMBOL) -+#if !defined(__FreeBSD__) || __FreeBSD_version < 500021 + #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; ++ /* mbuf stats disabled */ ++ return NULL; +#elif defined(__FreeBSD__) -+ collect_mbuf((long*)&long_return, (long*)NULL); -+ break; -+#else -+ /* XXX not supported. */ -+ return NULL; -+#endif ++ collect_mbuf((long*)&long_return, (long*)NULL); ++ break; #elif defined(NO_DUMMY_VALUES) goto try_next; #else -@@ -735,6 +785,11 @@ +@@ -740,6 +785,11 @@ #endif break; #endif /* !linux && !solaris2 && !hpux10 && !hpux11 && ... */ @@ -124,7 +118,7 @@ default: #if NO_DUMMY_VALUES goto try_next; -@@ -761,7 +816,11 @@ +@@ -766,7 +816,11 @@ break; #if !defined(linux) && !defined(solaris2) && !defined(hpux10) && !defined(hpux11) && defined(MBSTAT_SYMBOL) case HRS_TYPE_MBUF: @@ -136,7 +130,7 @@ break; #endif /* !linux && !solaris2 && !hpux10 && !hpux11 && MBSTAT_SYMBOL */ default: -@@ -872,3 +931,97 @@ +@@ -892,3 +946,97 @@ *usedP = ainfo.ani_resv; } #endif /* solaris2 */ diff --git a/net-mgmt/net-snmp-devel/files/patch-ipv6.c b/net-mgmt/net-snmp-devel/files/patch-ipv6.c index 348fe8b3cf86..29e2de99aa97 100644 --- a/net-mgmt/net-snmp-devel/files/patch-ipv6.c +++ b/net-mgmt/net-snmp-devel/files/patch-ipv6.c @@ -1,5 +1,5 @@ ---- agent/mibgroup/mibII/ipv6.c.orig Wed Jun 30 22:35:24 2004 -+++ agent/mibgroup/mibII/ipv6.c Wed Aug 11 20:45:32 2004 +--- 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 @@ -106,7 +106,7 @@ if (!auto_nlist("udb6", (char *) &udb6, sizeof(udb6))) return NULL; p = (caddr_t) udb6.in6p_next; -@@ -1274,41 +1290,44 @@ +@@ -1274,9 +1290,10 @@ (int) vp->namelen * sizeof(oid)); DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p)); while ( @@ -115,11 +115,11 @@ 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) - #endif -+ +@@ -1284,31 +1301,32 @@ ) { DEBUGMSGTL(("mibII/ipv6", "looping: p=%x\n", p)); @@ -144,7 +144,6 @@ 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; @@ -159,12 +158,12 @@ + newname[j++] = ntohs(tstpcb.in6p_lport); + if (IN6_IS_ADDR_LINKLOCAL(&tstpcb.in6p_laddr)) newname[j++] = -- ntohs(*(u_int16_t *) & in6pcb.in6p_laddr.s6_addr[2]); -+ ntohs(*(u_int16_t *) & tstpcb.in6p_laddr.s6_addr[2]); +- 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 +1338,7 @@ +@@ -1319,7 +1337,7 @@ result = snmp_oid_compare(name, *length, newname, j); if (exact && (result == 0)) { @@ -173,7 +172,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1330,7 +1349,7 @@ +@@ -1330,7 +1348,7 @@ */ if ((savnameLen == 0) || (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) { @@ -182,7 +181,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1338,15 +1357,15 @@ +@@ -1338,15 +1356,15 @@ } skip: @@ -203,7 +202,7 @@ free(sysctl_buf); #endif DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found)); -@@ -1354,7 +1373,7 @@ +@@ -1354,7 +1372,7 @@ return NULL; *length = savnameLen; memcpy((char *) name, (char *) savname, *length * sizeof(oid)); @@ -212,7 +211,7 @@ *write_method = 0; *var_len = sizeof(long); /* default to 'long' results */ -@@ -1367,14 +1386,14 @@ +@@ -1367,14 +1385,14 @@ switch (vp->magic) { case IPV6UDPLOCALADDRESS: *var_len = sizeof(struct in6_addr); @@ -226,12 +225,12 @@ - if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_laddr)) + if (IN6_IS_ADDR_LINKLOCAL(&savpcb.in6p_laddr)) long_return = -- ntohs(*(u_int16_t *) & in6pcb.in6p_laddr.s6_addr[2]); -+ ntohs(*(u_int16_t *) & savpcb.in6p_laddr.s6_addr[2]); +- 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 +1411,24 @@ +@@ -1392,24 +1410,24 @@ size_t * length, int exact, size_t * var_len, WriteMethod ** write_method) { @@ -263,7 +262,7 @@ #endif if (!initialized) { -@@ -1431,11 +1450,11 @@ +@@ -1431,11 +1449,11 @@ DEBUGMSGOID(("mibII/ipv6", name, *length)); DEBUGMSG(("mibII/ipv6", " %d\n", exact)); @@ -277,7 +276,7 @@ if (!auto_nlist("tcb6", (char *) &tcb6, sizeof(tcb6))) return NULL; p = (caddr_t) tcb6.in6p_next; -@@ -1464,9 +1483,10 @@ +@@ -1464,9 +1482,10 @@ (int) vp->namelen * sizeof(oid)); DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p)); while ( @@ -290,7 +289,7 @@ p && (u_long) p != auto_nlist_value("tcb6") #else xig->xig_len > sizeof(struct xinpgen) -@@ -1474,41 +1494,43 @@ +@@ -1474,41 +1493,41 @@ ) { DEBUGMSGTL(("mibII/ipv6", "looping: p=%x\n", p)); @@ -310,12 +309,10 @@ -#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; ++ 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; @@ -344,12 +341,12 @@ + newname[j++] = ntohs(tstpcb.in6p_fport); + if (IN6_IS_ADDR_LINKLOCAL(&tstpcb.in6p_laddr)) newname[j++] = -- ntohs(*(u_int16_t *) & in6pcb.in6p_laddr.s6_addr[2]); -+ ntohs(*(u_int16_t *) & tstpcb.in6p_laddr.s6_addr[2]); +- 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 +1541,13 @@ +@@ -1519,13 +1538,13 @@ DEBUGMSG(("mibII/ipv6", " %d\n", exact)); #if 1 /* this is very odd but sometimes happen, and cause infinite loop */ @@ -365,7 +362,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1536,7 +1558,7 @@ +@@ -1536,7 +1555,7 @@ */ if ((savnameLen == 0) || (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) { @@ -374,7 +371,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1544,15 +1566,15 @@ +@@ -1544,15 +1563,15 @@ } skip: @@ -395,7 +392,7 @@ free(sysctl_buf); #endif DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found)); -@@ -1573,20 +1595,20 @@ +@@ -1573,20 +1592,20 @@ switch (vp->magic) { case IPV6TCPLOCALADDR: *var_len = sizeof(struct in6_addr); @@ -417,12 +414,12 @@ - if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_laddr)) + if (IN6_IS_ADDR_LINKLOCAL(&savpcb.in6p_laddr)) long_return = -- ntohs(*(u_int16_t *) & in6pcb.in6p_laddr.s6_addr[2]); -+ ntohs(*(u_int16_t *) & savpcb.in6p_laddr.s6_addr[2]); +- 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 +1655,23 @@ +@@ -1633,22 +1652,23 @@ size_t * length, int exact, size_t * var_len, WriteMethod ** write_method) { @@ -453,7 +450,7 @@ #endif DEBUGMSGTL(("mibII/ipv6", "var_tcp6: ")); -@@ -1688,9 +1711,9 @@ +@@ -1688,9 +1708,9 @@ (int) vp->namelen * sizeof(oid)); DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p)); while ( @@ -465,14 +462,14 @@ p && (u_long) p != auto_nlist_value("tcb6") #else xig->xig_len > sizeof(struct xinpgen) -@@ -1698,41 +1721,43 @@ +@@ -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(tstpcb)) < 0) { ++ if (klookup((u_long) p, (char *) &tstpcb, sizeof(in6pcb)) < 0) { DEBUGMSGTL(("mibII/ipv6", "klookup fail for tcb6 at %x\n", p)); found = 0; @@ -485,12 +482,10 @@ -#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; ++ 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; @@ -520,12 +515,12 @@ + newname[j++] = ntohs(tstpcb.in6p_fport); + if (IN6_IS_ADDR_LINKLOCAL(&tstpcb.in6p_laddr)) newname[j++] = -- ntohs(*(u_int16_t *) & in6pcb.in6p_laddr.s6_addr[2]); -+ ntohs(*(u_int16_t *) & tstpcb.in6p_laddr.s6_addr[2]); +- 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 +1768,12 @@ +@@ -1743,12 +1763,12 @@ DEBUGMSG(("mibII/ipv6", " %d\n", exact)); #if 1 /* this is very odd but sometimes happen, and cause infinite loop */ @@ -540,7 +535,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1759,7 +1784,7 @@ +@@ -1759,7 +1779,7 @@ */ if ((savnameLen == 0) || (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) { @@ -549,7 +544,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1767,15 +1792,15 @@ +@@ -1767,15 +1787,15 @@ } skip: @@ -570,7 +565,7 @@ free(sysctl_buf); #endif DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found)); -@@ -1783,7 +1808,7 @@ +@@ -1783,7 +1803,7 @@ return NULL; *length = savnameLen; memcpy((char *) name, (char *) savname, *length * sizeof(oid)); @@ -579,7 +574,7 @@ *write_method = 0; *var_len = sizeof(long); /* default to 'long' results */ -@@ -1796,20 +1821,20 @@ +@@ -1796,20 +1816,20 @@ switch (vp->magic) { case IPV6TCPLOCALADDR: *var_len = sizeof(struct in6_addr); @@ -601,8 +596,8 @@ - if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_laddr)) + if (IN6_IS_ADDR_LINKLOCAL(&savpcb.in6p_laddr)) long_return = -- ntohs(*(u_int16_t *) & in6pcb.in6p_laddr.s6_addr[2]); -+ ntohs(*(u_int16_t *) & savpcb.in6p_laddr.s6_addr[2]); +- ntohs(*(uint16_t *) & in6pcb.in6p_laddr.s6_addr[2]); ++ ntohs(*(uint16_t *) & savpcb.in6p_laddr.s6_addr[2]); else long_return = 0; /*XXX*/ return (u_char *) & long_return; diff --git a/net-mgmt/net-snmp-devel/files/patch-local:mib2c b/net-mgmt/net-snmp-devel/files/patch-local:mib2c index 6609d77609c9..a0a2ce336f86 100644 --- a/net-mgmt/net-snmp-devel/files/patch-local:mib2c +++ b/net-mgmt/net-snmp-devel/files/patch-local:mib2c @@ -1,20 +1,21 @@ ---- local/mib2c.orig Fri Nov 14 02:28:39 2003 -+++ local/mib2c Wed Feb 4 09:05:44 2004 +--- 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.36 2003/11/14 01:28:39 rstory Exp $ -@@ -56,8 +55,8 @@ + # $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, $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 { - print "$0 [-h] [-c configfile] [-f prefix] mibNode\n\n"; diff --git a/net-mgmt/net-snmp-devel/files/patch-local:snmpconf b/net-mgmt/net-snmp-devel/files/patch-local:snmpconf index 584e473e27d2..5b3623782df9 100644 --- a/net-mgmt/net-snmp-devel/files/patch-local:snmpconf +++ b/net-mgmt/net-snmp-devel/files/patch-local:snmpconf @@ -1,30 +1,30 @@ ---- local/snmpconf.orig Tue Apr 20 23:20:51 2004 -+++ local/snmpconf Thu Jun 24 23:12:06 2004 +--- 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 -@@ -21,7 +21,7 @@ - $opts{'c'} = "$ENV{SNMPSHAREPATH}/snmpconf-data"; +@@ -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 { -- $opts{'c'} = "/usr/local/share/snmp/snmpconf-data"; -+ $opts{'c'} = "%%PREFIX%%/share/snmp/snmpconf-data"; - } - - # default config file path -@@ -29,7 +29,7 @@ - $confpath = "$ENV{SNMPCONFPATH}"; - } - else { -- $confpath = "/usr/local/share/snmp"; -+ $confpath = "%%PREFIX%%/share/snmp"; - } - - # home environment variable -@@ -84,7 +84,7 @@ + else +@@ -128,7 +128,7 @@ # # Find existing files to possibly read in. # @@ -33,7 +33,7 @@ push @searchpath, $opts{I} if ($opts{I}); foreach my $i (@searchpath) { debug("searching $i\n"); -@@ -183,7 +183,7 @@ +@@ -227,7 +227,7 @@ if ($opts{'i'} || $opts{'I'}) { $opts{'I'} = "$confpath" if (!$opts{'I'}); @@ -42,7 +42,7 @@ print "\nCould not create $opts{'I'} directory: $!\n"; print ("File $didfile{$i} left in current directory\n"); } -@@ -198,7 +198,7 @@ +@@ -242,7 +242,7 @@ } } } elsif ($opts{'p'}) { diff --git a/net-mgmt/net-snmp-devel/files/patch-snmpTCPIPv6Domain.c b/net-mgmt/net-snmp-devel/files/patch-snmpTCPIPv6Domain.c index 9a6e083a98bc..365b6f398ebe 100644 --- a/net-mgmt/net-snmp-devel/files/patch-snmpTCPIPv6Domain.c +++ b/net-mgmt/net-snmp-devel/files/patch-snmpTCPIPv6Domain.c @@ -1,6 +1,6 @@ ---- snmplib/snmpTCPIPv6Domain.c.orig Fri Aug 9 22:57:43 2002 -+++ snmplib/snmpTCPIPv6Domain.c Sun Oct 6 01:07:12 2002 -@@ -62,13 +62,21 @@ +--- 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 { @@ -8,7 +8,7 @@ - char tmp[INET6_ADDRSTRLEN + 8]; + char tmp[NI_MAXHOST]; -- sprintf(tmp, "[%s]:%hd", +- sprintf(tmp, "TCP/IPv6: [%s]:%hd", - inet_ntop(AF_INET6, (void *) &(to->sin6_addr), addr, - INET6_ADDRSTRLEN), ntohs(to->sin6_port)); - return strdup(tmp); diff --git a/net-mgmt/net-snmp-devel/files/patch-snmpUCDIPv6Domain.c b/net-mgmt/net-snmp-devel/files/patch-snmpUCDIPv6Domain.c index 6f1f6c4caeed..c36abaaba730 100644 --- a/net-mgmt/net-snmp-devel/files/patch-snmpUCDIPv6Domain.c +++ b/net-mgmt/net-snmp-devel/files/patch-snmpUCDIPv6Domain.c @@ -1,6 +1,6 @@ ---- snmplib/snmpUDPIPv6Domain.c.orig Fri Aug 9 22:57:43 2002 -+++ snmplib/snmpUDPIPv6Domain.c Sun Oct 6 18:03:18 2002 -@@ -62,13 +62,21 @@ +--- 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 { @@ -8,7 +8,7 @@ - char tmp[INET6_ADDRSTRLEN + 8]; + char tmp[NI_MAXHOST]; -- sprintf(tmp, "[%s]:%hd", +- sprintf(tmp, "UDP/IPv6: [%s]:%hd", - inet_ntop(AF_INET6, (void *) &(to->sin6_addr), addr, - INET6_ADDRSTRLEN), ntohs(to->sin6_port)); - return strdup(tmp); |