diff options
author | Jun Kuriyama <kuriyama@FreeBSD.org> | 2008-03-27 10:55:44 +0000 |
---|---|---|
committer | Jun Kuriyama <kuriyama@FreeBSD.org> | 2008-03-27 10:55:44 +0000 |
commit | eda27ad6b62e923ce73604196ef0f17717340912 (patch) | |
tree | 3431955bd93ffb73cb1b0743c7b0132d1a6e24ff /net-mgmt/net-snmp | |
parent | 8d56991bfc17944ce929eda2efed71ce49ea961c (diff) | |
download | ports-eda27ad6b62e923ce73604196ef0f17717340912.tar.gz ports-eda27ad6b62e923ce73604196ef0f17717340912.zip |
Notes
Diffstat (limited to 'net-mgmt/net-snmp')
-rw-r--r-- | net-mgmt/net-snmp/Makefile | 71 | ||||
-rw-r--r-- | net-mgmt/net-snmp/distinfo | 6 | ||||
-rw-r--r-- | net-mgmt/net-snmp/files/patch-Makefile.in | 10 | ||||
-rw-r--r-- | net-mgmt/net-snmp/files/patch-freebsd5.h | 16 | ||||
-rw-r--r-- | net-mgmt/net-snmp/files/patch-generic.h | 14 | ||||
-rw-r--r-- | net-mgmt/net-snmp/files/patch-hr_storage.c | 228 | ||||
-rw-r--r-- | net-mgmt/net-snmp/files/patch-ipv6.c | 89 | ||||
-rw-r--r-- | net-mgmt/net-snmp/files/patch-net-snmp-config.h.in | 14 | ||||
-rw-r--r-- | net-mgmt/net-snmp/files/patch-snmpUCDIPv6Domain.c | 10 | ||||
-rw-r--r-- | net-mgmt/net-snmp/files/patch-snmpUDPDomain.c | 11 | ||||
-rw-r--r-- | net-mgmt/net-snmp/files/patch-transform_oids.h | 12 | ||||
-rw-r--r-- | net-mgmt/net-snmp/files/patch-ucd_snmp.h | 11 |
12 files changed, 145 insertions, 347 deletions
diff --git a/net-mgmt/net-snmp/Makefile b/net-mgmt/net-snmp/Makefile index 07e48dc1e782..216c812d667b 100644 --- a/net-mgmt/net-snmp/Makefile +++ b/net-mgmt/net-snmp/Makefile @@ -6,8 +6,7 @@ # PORTNAME= snmp -PORTVERSION= 5.3.2 -PORTREVISION= 1 +PORTVERSION= 5.4.1 CATEGORIES= net-mgmt ipv6 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= net-snmp @@ -81,7 +80,7 @@ PLIST_SUB+= WITH_IPV6="" PLIST_SUB+= WITH_IPV6="@comment " .endif -SHLIB_VERSION= 10 +SHLIB_VERSION= 16 PLIST_SUB+= SHLIB_VERSION=${SHLIB_VERSION} SCRIPTS_SUB= PREFIX=${PREFIX} PERL=${PERL} @@ -118,22 +117,53 @@ MAN1= encode_keychange.1 fixproc.1 mib2c.1 mib2c-update.1 \ snmpnetstat.1 snmpset.1 snmpstatus.1 snmptable.1 snmptest.1 \ snmptranslate.1 snmptrap.1 snmpusm.1 snmpvacm.1 snmpwalk.1 \ tkmib.1 traptoemail.1 -MAN3= add_mibdir.3 add_module_replacement.3 default_store.3 \ +MAN3= add_mibdir.3 add_module_replacement.3 \ + config_perror.3 config_pwarn.3 \ + default_store.3 fprint_description.3 \ + fprint_objid.3 fprint_value.3 fprint_variable.3 \ get_module_node.3 init_mib.3 init_mib_internals.3 mib_api.3 \ - netsnmp_agent.3 netsnmp_bulk_to_next.3 netsnmp_debug.3 \ + netsnmp_Container_iterator.3 \ + netsnmp_agent.3 \ + netsnmp_baby_steps.3 \ + netsnmp_bulk_to_next.3 \ + netsnmp_cache_handler.3 netsnmp_container.3 \ + netsnmp_debug.3 \ + netsnmp_ds_get_boolean.3 netsnmp_ds_get_int.3 \ + netsnmp_ds_get_string.3 \ + netsnmp_ds_register_config.3 netsnmp_ds_register_premib.3 \ + netsnmp_ds_set_boolean.3 netsnmp_ds_set_int.3 \ + netsnmp_ds_set_string.3 netsnmp_ds_shutdown.3 \ netsnmp_example_scalar_int.3 netsnmp_handler.3 \ - netsnmp_instance.3 netsnmp_library.3 \ + netsnmp_instance.3 \ + netsnmp_iterator_info_s.3 \ + netsnmp_leaf.3 netsnmp_library.3 \ netsnmp_mib_handler_methods.3 netsnmp_mib_utilities.3 \ netsnmp_mode_end_call.3 netsnmp_multiplexer.3 \ - netsnmp_old_api.3 netsnmp_read_only.3 netsnmp_scalar.3 \ - netsnmp_serialize.3 netsnmp_table.3 netsnmp_table_array.3 \ + netsnmp_old_api.3 netsnmp_read_only.3 \ + netsnmp_row_merge.3 \ + netsnmp_scalar.3 \ + netsnmp_scalar_group_group.3 \ + netsnmp_serialize.3 \ + netsnmp_stash_cache.3 \ + netsnmp_table.3 netsnmp_table_array.3 \ netsnmp_table_data.3 netsnmp_table_dataset.3 \ - netsnmp_table_iterator.3 netsnmp_watcher.3 \ + netsnmp_table_iterator.3 \ + netsnmp_utilities.3 \ + netsnmp_watcher.3 \ print_description.3 print_mib.3 print_objid.3 print_value.3 \ - print_variable.3 read_all_mibs.3 read_config.3 read_mib.3 \ - read_module.3 read_module_node.3 read_objid.3 shutdown_mib.3 \ - snmp_agent_api.3 snmp_alarm.3 snmp_api.3 \ - snmp_api_errstring.3 snmp_close.3 \ + print_variable.3 read_all_mibs.3 \ + read_config.3 read_configs.3 read_config_print_usage.3 \ + read_mib.3 read_module.3 read_module_node.3 read_objid.3 \ + read_premib_configs.3 \ + register_app_config_handler.3 register_app_premib_handler.3 \ + register_config_handler.3 register_mib_handlers.3 \ + register_premib_handler.3 \ + send_easy_trap.3 send_trap_vars.3 send_v2trap.3 \ + shutdown_mib.3 \ + snmp_agent_api.3 \ + snmp_alarm.3 snmp_alarm_register.3 \ + snmp_alarm_register_hr.3 snmp_alarm_unregister.3 \ + snmp_api.3 snmp_api_errstring.3 snmp_close.3 \ snmp_error.3 snmp_free_pdu.3 snmp_open.3 snmp_perror.3 \ snmp_read.3 snmp_select_info.3 \ snmp_send.3 snmp_sess_api.3 snmp_sess_async_send.3 \ @@ -143,13 +173,10 @@ MAN3= add_mibdir.3 add_module_replacement.3 default_store.3 \ snmp_sess_send.3 snmp_sess_session.3 snmp_sess_timeout.3 \ snmp_set_mib_warnings.3 snmp_set_save_descriptions.3 \ snmp_timeout.3 snmp_trap_api.3 \ - netsnmp_Container_iterator.3 \ - netsnmp_baby_steps.3 \ - netsnmp_cache_handler.3 netsnmp_container.3 \ - netsnmp_iterator_info_s.3 \ - netsnmp_leaf.3 \ - netsnmp_row_merge.3 netsnmp_scalar_group_group.3 \ - netsnmp_stash_cache.3 netsnmp_utilities.3 + snprint_objid.3 snprint_value.3 snprint_variable.3 \ + sprint_realloc_objid.3 sprint_realloc_value.3 \ + sprint_realloc_variable.3 \ + unregister_app_config_handler.3 \unregister_config_handler.3 .if !defined(WITHOUT_PERL) MAN3PERL= NetSNMP::ASN.3 NetSNMP::OID.3 NetSNMP::agent.3 \ @@ -180,7 +207,7 @@ DOC_FILES= AGENT.txt COPYING FAQ NEWS README \ agent/mibgroup/README.smux PS_CMD?= /bin/ps -CONFLICTS= net-snmp-4.* +CONFLICTS= net-snmp-4.* net-snmp-5.3.* pre-everything:: @${ECHO_MSG} @@ -211,6 +238,8 @@ pre-everything:: post-patch: patch-autoconf patch-script-files patch-autoconf: + +x-patch-autoconf: @${AWK} '/@synopsis/,/taken from libtool.m4/' ${WRKSRC}/aclocal.m4 > ${WRKSRC}/aclocal.m4.tmp @${CAT} ${LIBTOOL_M4} >> ${WRKSRC}/aclocal.m4.tmp @${CP} ${LTMAIN} ${WRKSRC} diff --git a/net-mgmt/net-snmp/distinfo b/net-mgmt/net-snmp/distinfo index 9d7148eaa1d5..add5fe8aefb6 100644 --- a/net-mgmt/net-snmp/distinfo +++ b/net-mgmt/net-snmp/distinfo @@ -1,3 +1,3 @@ -MD5 (net-snmp-5.3.2.tar.gz) = 978b9c5e26a36806945761b8ad0a0ecb -SHA256 (net-snmp-5.3.2.tar.gz) = 8171e0592b8c7e5dbb4009a44843c9b7f3b089f4685555578a0f3eeb849d49e7 -SIZE (net-snmp-5.3.2.tar.gz) = 4320436 +MD5 (net-snmp-5.4.1.tar.gz) = 6c974df7a5a5b1579f72115e6b045bda +SHA256 (net-snmp-5.4.1.tar.gz) = 0ea976722c993c87dede8eb6348e6feb059e3851bbef2de824bf18ac97cdb565 +SIZE (net-snmp-5.4.1.tar.gz) = 5122455 diff --git a/net-mgmt/net-snmp/files/patch-Makefile.in b/net-mgmt/net-snmp/files/patch-Makefile.in index a32696df6a06..fece19085317 100644 --- a/net-mgmt/net-snmp/files/patch-Makefile.in +++ b/net-mgmt/net-snmp/files/patch-Makefile.in @@ -1,11 +1,11 @@ ---- Makefile.in.orig Tue Oct 11 20:49:23 2005 -+++ Makefile.in Wed Nov 30 11:35:12 2005 +--- Makefile.in.orig 2007-06-09 05:32:56.000000000 +0900 ++++ Makefile.in 2008-03-25 21:10:08.842515763 +0900 @@ -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 freebsd8.h \ +- darwin.h darwin7.h darwin8.h darwin9.h freebsd5.h freebsd6.h \ ++ darwin.h darwin7.h darwin8.h darwin9.h freebsd5.h freebsd6.h freebsd7.h freebsd8.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 \ + solaris2.3.h solaris2.4.h solaris2.5.h solaris2.6.h \ diff --git a/net-mgmt/net-snmp/files/patch-freebsd5.h b/net-mgmt/net-snmp/files/patch-freebsd5.h index 8bc6de2831b5..dcb8f97d093d 100644 --- a/net-mgmt/net-snmp/files/patch-freebsd5.h +++ b/net-mgmt/net-snmp/files/patch-freebsd5.h @@ -1,10 +1,10 @@ ---- 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 +--- include/net-snmp/system/freebsd5.h.orig 2006-08-18 08:14:20.000000000 +0900 ++++ include/net-snmp/system/freebsd5.h 2008-03-25 21:12:05.556475473 +0900 +@@ -1,6 +1,7 @@ /* freebsd5 is a superset of freebsd4 */ - #define freebsd4 1 -+#define freebsd5 1 + #include "freebsd4.h" + #define freebsd4 freebsd4 ++#define freebsd5 freebsd5 - #undef IFADDR_SYMBOL - #define IFADDR_SYMBOL "in_ifaddrhead" + /* don't define _KERNEL on FreeBSD 5.3 even if configure thinks we need it */ + #ifdef freebsd5 diff --git a/net-mgmt/net-snmp/files/patch-generic.h b/net-mgmt/net-snmp/files/patch-generic.h new file mode 100644 index 000000000000..9eddc80e0d1a --- /dev/null +++ b/net-mgmt/net-snmp/files/patch-generic.h @@ -0,0 +1,14 @@ +--- include/net-snmp/system/generic.h.orig 2008-03-26 10:28:25.802233395 +0900 ++++ include/net-snmp/system/generic.h 2008-03-26 10:29:40.629721291 +0900 +@@ -1,3 +1,5 @@ ++#ifndef __NET_SNMP_SYSTEM_GENERIC_H__ ++#define __NET_SNMP_SYSTEM_GENERIC_H__ + + #define bsdlike bsdlike + +@@ -72,3 +74,5 @@ + */ + #define INP_NEXT_SYMBOL inp_next + #define INP_PREV_SYMBOL inp_prev ++ ++#endif /* !__NET_SNMP_SYSTEM_GENERIC_H__ */ diff --git a/net-mgmt/net-snmp/files/patch-hr_storage.c b/net-mgmt/net-snmp/files/patch-hr_storage.c index 673cd4e57b0d..4fc2bd0d5544 100644 --- a/net-mgmt/net-snmp/files/patch-hr_storage.c +++ b/net-mgmt/net-snmp/files/patch-hr_storage.c @@ -1,26 +1,11 @@ --- agent/mibgroup/host/hr_storage.c.orig 2007-06-08 19:33:58.000000000 +0900 -+++ agent/mibgroup/host/hr_storage.c 2008-01-11 21:37:48.767962726 +0900 -@@ -229,7 +229,7 @@ - mach_port_t myHost; - #endif ++++ agent/mibgroup/host/hr_storage.c 2008-03-25 21:26:23.470718989 +0900 +@@ -489,11 +489,13 @@ + * + *********************/ --static int physmem, pagesize; -+static u_long physmem, pagesize; - static void parse_storage_config(const char *, char *); - - /********************* -@@ -252,6 +252,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 -@@ -499,7 +503,8 @@ ++/* kuriyama: should be removed? */ + static const char *hrs_descr[] = { NULL, "Memory Buffers", /* HRS_TYPE_MBUF */ "Real Memory", /* HRS_TYPE_MEM */ @@ -30,204 +15,3 @@ }; -@@ -647,6 +652,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: -@@ -752,7 +758,7 @@ - long_return = memory_totals.t_vm; - #endif - break; --#else /* !linux && !solaris2 && !hpux10 && !hpux11 && ... */ -+#else - case HRS_TYPE_MEM: - long_return = physmem; - break; -@@ -774,13 +780,45 @@ - i++) - long_return += mbstat.m_mtypes[i]; - #elif defined(MBSTAT_SYMBOL) && defined(STRUCT_MBSTAT_HAS_M_MBUFS) -+#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 -+#error "XXX" -+ /* XXX TODO: implement new method */ -+ return NULL; -+#endif /* __FreeBSD__ */ - #elif defined(NO_DUMMY_VALUES) - goto try_next; - #else - long_return = 0; - #endif - break; -+#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; -@@ -856,6 +894,12 @@ - #endif - #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 -@@ -863,6 +907,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; -@@ -889,7 +938,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: -@@ -1015,6 +1068,100 @@ - } - #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 -+ - #ifdef WIN32 - char *win_realpath(const char *file_name, char *resolved_name) - { diff --git a/net-mgmt/net-snmp/files/patch-ipv6.c b/net-mgmt/net-snmp/files/patch-ipv6.c index 29e2de99aa97..86637254c1c4 100644 --- a/net-mgmt/net-snmp/files/patch-ipv6.c +++ b/net-mgmt/net-snmp/files/patch-ipv6.c @@ -1,5 +1,5 @@ ---- 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 +--- agent/mibgroup/mibII/ipv6.c.orig 2007-05-25 07:01:04.000000000 +0900 ++++ agent/mibgroup/mibII/ipv6.c 2008-03-26 07:29:07.122940424 +0900 @@ -8,10 +8,25 @@ #define _KERNEL 1 #define _I_DEFINED_KERNEL @@ -36,7 +36,7 @@ # if HAVE_NETINET_IN_PCB_H # include <netinet/in_pcb.h> # endif -@@ -575,7 +590,7 @@ +@@ -578,7 +593,7 @@ memcpy(result, &tmp, sizeof(tmp)); return 0; } @@ -45,7 +45,7 @@ q = (caddr_t) TAILQ_NEXT(&tmp, if_link); #else # if defined(__NetBSD__) || defined(__OpenBSD__) -@@ -806,7 +821,7 @@ +@@ -809,7 +824,7 @@ if (if_getifnet(interface, &ifnet) < 0) break; @@ -54,7 +54,7 @@ ifa = (caddr_t) TAILQ_FIRST(&ifnet.if_addrhead); #else # if defined(__NetBSD__) || defined(__OpenBSD__) -@@ -827,7 +842,7 @@ +@@ -836,7 +851,7 @@ *var_len = sdl.sdl_alen; return (u_char *) (sdl.sdl_data + sdl.sdl_nlen); } @@ -63,7 +63,7 @@ ifa = (caddr_t) TAILQ_NEXT(&ifaddr, ifa_link); #else # if defined(__NetBSD__) || defined(__OpenBSD__) -@@ -1220,32 +1235,33 @@ +@@ -1229,32 +1244,33 @@ size_t * length, int exact, size_t * var_len, WriteMethod ** write_method) { @@ -106,7 +106,7 @@ if (!auto_nlist("udb6", (char *) &udb6, sizeof(udb6))) return NULL; p = (caddr_t) udb6.in6p_next; -@@ -1274,9 +1290,10 @@ +@@ -1283,9 +1299,10 @@ (int) vp->namelen * sizeof(oid)); DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p)); while ( @@ -119,14 +119,14 @@ p && (u_long) p != auto_nlist_value("udb6") #else xig->xig_len > sizeof(struct xinpgen) -@@ -1284,31 +1301,32 @@ +@@ -1293,31 +1310,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 (!NETSNMP_KLOOKUP(p, (char *) &in6pcb, sizeof(in6pcb))) { +#if OS_NOT_FREEBSD_NOR_DARWIN -+ if (klookup((u_long) p, (char *) &tstpcb, sizeof(tstpcb)) < 0) { ++ if (!NETSNMP_KLOOKUP(p, (char *) &tstpcb, sizeof(tstpcb))) { DEBUGMSGTL(("mibII/ipv6", "klookup fail for udb6 at %x\n", p)); found = 0; @@ -163,7 +163,7 @@ else newname[j++] = 0; /*XXX*/ -@@ -1319,7 +1337,7 @@ +@@ -1328,7 +1346,7 @@ result = snmp_oid_compare(name, *length, newname, j); if (exact && (result == 0)) { @@ -172,7 +172,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1330,7 +1348,7 @@ +@@ -1339,7 +1357,7 @@ */ if ((savnameLen == 0) || (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) { @@ -181,7 +181,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1338,15 +1356,15 @@ +@@ -1347,15 +1365,15 @@ } skip: @@ -202,7 +202,7 @@ free(sysctl_buf); #endif DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found)); -@@ -1354,7 +1372,7 @@ +@@ -1363,7 +1381,7 @@ return NULL; *length = savnameLen; memcpy((char *) name, (char *) savname, *length * sizeof(oid)); @@ -211,7 +211,7 @@ *write_method = 0; *var_len = sizeof(long); /* default to 'long' results */ -@@ -1367,14 +1385,14 @@ +@@ -1376,14 +1394,14 @@ switch (vp->magic) { case IPV6UDPLOCALADDRESS: *var_len = sizeof(struct in6_addr); @@ -230,7 +230,7 @@ else long_return = 0; /*XXX*/ return (u_char *) & long_return; -@@ -1392,24 +1410,24 @@ +@@ -1401,24 +1419,24 @@ size_t * length, int exact, size_t * var_len, WriteMethod ** write_method) { @@ -262,7 +262,7 @@ #endif if (!initialized) { -@@ -1431,11 +1449,11 @@ +@@ -1440,11 +1458,11 @@ DEBUGMSGOID(("mibII/ipv6", name, *length)); DEBUGMSG(("mibII/ipv6", " %d\n", exact)); @@ -276,7 +276,7 @@ if (!auto_nlist("tcb6", (char *) &tcb6, sizeof(tcb6))) return NULL; p = (caddr_t) tcb6.in6p_next; -@@ -1464,9 +1482,10 @@ +@@ -1473,9 +1491,10 @@ (int) vp->namelen * sizeof(oid)); DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p)); while ( @@ -289,14 +289,14 @@ p && (u_long) p != auto_nlist_value("tcb6") #else xig->xig_len > sizeof(struct xinpgen) -@@ -1474,41 +1493,41 @@ +@@ -1483,39 +1502,39 @@ ) { 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 (!NETSNMP_KLOOKUP(p, (char *) &in6pcb, sizeof(in6pcb))) { +#if OS_NOT_FREEBSD_NOR_DARWIN -+ if (klookup((u_long) p, (char *) &tstpcb, sizeof(tstpcb)) < 0) { ++ if (!NETSNMP_KLOOKUP(p, (char *) &tstpcb, sizeof(tstpcb))) { DEBUGMSGTL(("mibII/ipv6", "klookup fail for tcb6 at %x\n", p)); found = 0; @@ -314,13 +314,11 @@ -#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)) ++ if (0 == (tstpcb.inp_vflag & INP_IPV6)) goto skip; #endif - if (klookup -- ((u_long) in6pcb.in6p_ppcb, (char *) &tcp6cb, sizeof(tcp6cb)) -+ ((u_long) tstpcb.in6p_ppcb, (char *) &tcp6cb, sizeof(tcp6cb)) - < 0) { +- if (!NETSNMP_KLOOKUP(in6pcb.in6p_ppcb, (char *) &tcp6cb, sizeof(tcp6cb))) { ++ if (!NETSNMP_KLOOKUP(tstpcb.in6p_ppcb, (char *) &tcp6cb, sizeof(tcp6cb))) { DEBUGMSGTL(("mibII/ipv6", "klookup fail for tcb6.tcp6cb at %x\n", - in6pcb.in6p_ppcb)); + tstpcb.in6p_ppcb)); @@ -346,7 +344,7 @@ else newname[j++] = 0; /*XXX*/ newname[j++] = tcp6statemap[tcp6cb.t_state]; -@@ -1519,13 +1538,13 @@ +@@ -1526,13 +1545,13 @@ DEBUGMSG(("mibII/ipv6", " %d\n", exact)); #if 1 /* this is very odd but sometimes happen, and cause infinite loop */ @@ -362,7 +360,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1536,7 +1555,7 @@ +@@ -1543,7 +1562,7 @@ */ if ((savnameLen == 0) || (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) { @@ -371,7 +369,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1544,15 +1563,15 @@ +@@ -1551,15 +1570,15 @@ } skip: @@ -392,7 +390,7 @@ free(sysctl_buf); #endif DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found)); -@@ -1573,20 +1592,20 @@ +@@ -1580,20 +1599,20 @@ switch (vp->magic) { case IPV6TCPLOCALADDR: *var_len = sizeof(struct in6_addr); @@ -419,7 +417,7 @@ else long_return = 0; /*XXX*/ return (u_char *) & long_return; -@@ -1633,22 +1652,23 @@ +@@ -1640,22 +1659,23 @@ size_t * length, int exact, size_t * var_len, WriteMethod ** write_method) { @@ -450,7 +448,7 @@ #endif DEBUGMSGTL(("mibII/ipv6", "var_tcp6: ")); -@@ -1688,9 +1708,9 @@ +@@ -1695,9 +1715,9 @@ (int) vp->namelen * sizeof(oid)); DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p)); while ( @@ -462,14 +460,14 @@ p && (u_long) p != auto_nlist_value("tcb6") #else xig->xig_len > sizeof(struct xinpgen) -@@ -1698,41 +1718,41 @@ +@@ -1705,39 +1725,39 @@ ) { 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 (!NETSNMP_KLOOKUP(p, (char *) &in6pcb, sizeof(in6pcb))) { +#if OS_NOT_FREEBSD_NOR_DARWIN -+ if (klookup((u_long) p, (char *) &tstpcb, sizeof(in6pcb)) < 0) { ++ if (!NETSNMP_KLOOKUP(p, (char *) &tstpcb, sizeof(tstpcb))) { DEBUGMSGTL(("mibII/ipv6", "klookup fail for tcb6 at %x\n", p)); found = 0; @@ -487,16 +485,13 @@ -#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)) ++ if (0 == (tstpcb.inp_vflag & INP_IPV6)) 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", +- if (!NETSNMP_KLOOKUP(in6pcb.in6p_ppcb, (char *) &tcpcb, sizeof(tcpcb))) { ++ if (!NETSNMP_KLOOKUP(tstpcb.in6p_ppcb, (char *) &tcpcb, sizeof(tcpcb))) { + 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; @@ -520,7 +515,7 @@ else newname[j++] = 0; /*XXX*/ newname[j++] = mapTcpState((int)tcpcb.t_state); -@@ -1743,12 +1763,12 @@ +@@ -1748,12 +1768,12 @@ DEBUGMSG(("mibII/ipv6", " %d\n", exact)); #if 1 /* this is very odd but sometimes happen, and cause infinite loop */ @@ -535,7 +530,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1759,7 +1779,7 @@ +@@ -1764,7 +1784,7 @@ */ if ((savnameLen == 0) || (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) { @@ -544,7 +539,7 @@ savnameLen = j; memcpy(savname, newname, j * sizeof(oid)); found++; -@@ -1767,15 +1787,15 @@ +@@ -1772,15 +1792,15 @@ } skip: @@ -565,7 +560,7 @@ free(sysctl_buf); #endif DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found)); -@@ -1783,7 +1803,7 @@ +@@ -1788,7 +1808,7 @@ return NULL; *length = savnameLen; memcpy((char *) name, (char *) savname, *length * sizeof(oid)); @@ -574,7 +569,7 @@ *write_method = 0; *var_len = sizeof(long); /* default to 'long' results */ -@@ -1796,20 +1816,20 @@ +@@ -1801,20 +1821,20 @@ switch (vp->magic) { case IPV6TCPLOCALADDR: *var_len = sizeof(struct in6_addr); diff --git a/net-mgmt/net-snmp/files/patch-net-snmp-config.h.in b/net-mgmt/net-snmp/files/patch-net-snmp-config.h.in index 0069a7226a36..ad6a26dc319e 100644 --- a/net-mgmt/net-snmp/files/patch-net-snmp-config.h.in +++ b/net-mgmt/net-snmp/files/patch-net-snmp-config.h.in @@ -1,11 +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 @@ +--- include/net-snmp/net-snmp-config.h.in.orig 2007-07-20 06:00:35.000000000 +0900 ++++ include/net-snmp/net-snmp-config.h.in 2008-03-26 07:45:24.236908694 +0900 +@@ -1561,7 +1561,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 */ + #define NETSNMP_EXCACHETIME 30 + #define NETSNMP_CACHEFILE ".snmp-exec-cache" +-#define NETSNMP_MAXCACHESIZE (200*80) /* roughly 200 lines max */ ++#define NETSNMP_MAXCACHESIZE (1500*80) /* roughly 1500 lines max */ /* misc defaults */ diff --git a/net-mgmt/net-snmp/files/patch-snmpUCDIPv6Domain.c b/net-mgmt/net-snmp/files/patch-snmpUCDIPv6Domain.c index e830283e3d4a..ad98e534bdf2 100644 --- a/net-mgmt/net-snmp/files/patch-snmpUCDIPv6Domain.c +++ b/net-mgmt/net-snmp/files/patch-snmpUCDIPv6Domain.c @@ -1,13 +1,11 @@ -Index: snmplib/snmpUDPIPv6Domain.c -diff -u -p snmplib/snmpUDPIPv6Domain.c.orig snmplib/snmpUDPIPv6Domain.c ---- snmplib/snmpUDPIPv6Domain.c.orig Mon Aug 20 17:06:42 2007 -+++ snmplib/snmpUDPIPv6Domain.c Fri Jan 11 13:39:36 2008 -@@ -103,13 +103,24 @@ netsnmp_udp6_fmtaddr(netsnmp_transport * +--- snmplib/snmpUDPIPv6Domain.c.orig 2007-06-11 07:22:55.000000000 +0900 ++++ snmplib/snmpUDPIPv6Domain.c 2008-03-26 07:47:55.942743517 +0900 +@@ -109,13 +109,24 @@ if (to == NULL) { return strdup("UDP/IPv6: unknown"); } else { - char addr[INET6_ADDRSTRLEN]; -- char tmp[INET6_ADDRSTRLEN + 18]; +- char tmp[INET6_ADDRSTRLEN + 8]; + char addr[NI_MAXHOST], tmp[NI_MAXHOST + NI_MAXSERV + 12]; - sprintf(tmp, "UDP/IPv6: [%s]:%hu", diff --git a/net-mgmt/net-snmp/files/patch-snmpUDPDomain.c b/net-mgmt/net-snmp/files/patch-snmpUDPDomain.c index 36aba5c59798..e69de29bb2d1 100644 --- a/net-mgmt/net-snmp/files/patch-snmpUDPDomain.c +++ b/net-mgmt/net-snmp/files/patch-snmpUDPDomain.c @@ -1,11 +0,0 @@ ---- snmplib/snmpUDPDomain.c.orig 2008-01-11 21:53:12.214973877 +0900 -+++ snmplib/snmpUDPDomain.c 2008-01-11 21:54:13.707245200 +0900 -@@ -105,7 +105,7 @@ - inet_ntoa(addr_pair->local_addr)); - } else { - sprintf(tmp, "UDP: [%s]->", inet_ntoa(addr_pair->local_addr)); -- sprintf(tmp + strlen(tmp), "[%s]:%hd", -+ sprintf(tmp + strlen(tmp), "[%s]:%hu", - inet_ntoa(to->sin_addr), ntohs(to->sin_port)); - } - return strdup(tmp); diff --git a/net-mgmt/net-snmp/files/patch-transform_oids.h b/net-mgmt/net-snmp/files/patch-transform_oids.h index 874acac2f086..674d4c1acb22 100644 --- a/net-mgmt/net-snmp/files/patch-transform_oids.h +++ b/net-mgmt/net-snmp/files/patch-transform_oids.h @@ -1,11 +1,11 @@ ---- 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 +--- include/net-snmp/library/transform_oids.h.orig 2006-10-28 05:19:44.000000000 +0900 ++++ include/net-snmp/library/transform_oids.h 2008-03-26 07:50:45.393507729 +0900 @@ -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 */ + NETSNMP_IMPORT oid usmAESPrivProtocol[10]; /* == { 1,3,6,1,6,3,10,1,2,4 }; */ + NETSNMP_IMPORT oid *usmAES128PrivProtocol; /* backwards compat */ ++NETSNMP_IMPORT oid *usmAES192PrivProtocol; /* backwards compat */ ++NETSNMP_IMPORT oid *usmAES256PrivProtocol; /* backwards compat */ #define USM_AUTH_PROTO_NOAUTH_LEN 10 #define USM_AUTH_PROTO_MD5_LEN 10 diff --git a/net-mgmt/net-snmp/files/patch-ucd_snmp.h b/net-mgmt/net-snmp/files/patch-ucd_snmp.h index 00f89af5eb57..e69de29bb2d1 100644 --- a/net-mgmt/net-snmp/files/patch-ucd_snmp.h +++ b/net-mgmt/net-snmp/files/patch-ucd_snmp.h @@ -1,11 +0,0 @@ ---- 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(freebsd7, ucd-snmp/vmstat_freebsd2) -+config_arch_require(freebsd7, ucd-snmp/memory_freebsd2) - config_arch_require(netbsd1, ucd-snmp/vmstat_netbsd1) - config_arch_require(netbsd1, ucd-snmp/memory_netbsd1) - config_arch_require(netbsd, ucd-snmp/vmstat_netbsd1) |