aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt
diff options
context:
space:
mode:
authorJun Kuriyama <kuriyama@FreeBSD.org>2008-05-27 02:08:01 +0000
committerJun Kuriyama <kuriyama@FreeBSD.org>2008-05-27 02:08:01 +0000
commitaa1cb89f22817b76f25fb24d260e7735eb2875b5 (patch)
tree8a64a69542303d096e9b4aadc81ea72757a4fdc0 /net-mgmt
parentfbc7f73681c1d6d1039e89bc68adf8f365424356 (diff)
downloadports-aa1cb89f22817b76f25fb24d260e7735eb2875b5.tar.gz
ports-aa1cb89f22817b76f25fb24d260e7735eb2875b5.zip
Notes
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/net-snmp-devel/Makefile8
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-memory_freebsd.c39
-rw-r--r--net-mgmt/net-snmp/Makefile8
-rw-r--r--net-mgmt/net-snmp/files/patch-memory_freebsd.c39
4 files changed, 92 insertions, 2 deletions
diff --git a/net-mgmt/net-snmp-devel/Makefile b/net-mgmt/net-snmp-devel/Makefile
index 36df177ccd4c..811a72845f89 100644
--- a/net-mgmt/net-snmp-devel/Makefile
+++ b/net-mgmt/net-snmp-devel/Makefile
@@ -7,7 +7,7 @@
PORTNAME= snmp
PORTVERSION= 5.4.1
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= net-mgmt ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= net-snmp
@@ -94,6 +94,12 @@ NET_SNMP_PERSISTENTDIR?=/var/net-snmp
NET_SNMP_MIB_MODULES?= ${NET_SNMP_MIB_MODULE_LIST}
NET_SNMP_MIB_MODULE_LIST=host disman/event-mib smux mibII/mta_sendmail mibII/tcpTable ucd-snmp/diskio
+
+.if defined(WITH_MFD_REWRITES)
+CONFIGURE_ARGS+=--enable-mfd-rewrites
+NET_SNMP_MIB_MODULE_LIST+= if-mib
+.endif
+
_NET_SNMP_MIB_MODULES=
.for module1 in ${NET_SNMP_MIB_MODULE_LIST}
_module1=${module1}
diff --git a/net-mgmt/net-snmp-devel/files/patch-memory_freebsd.c b/net-mgmt/net-snmp-devel/files/patch-memory_freebsd.c
new file mode 100644
index 000000000000..69e3f6617257
--- /dev/null
+++ b/net-mgmt/net-snmp-devel/files/patch-memory_freebsd.c
@@ -0,0 +1,39 @@
+--- agent/mibgroup/hardware/memory/memory_freebsd.c.orig 2006-03-06 17:23:52.000000000 +0100
++++ agent/mibgroup/hardware/memory/memory_freebsd.c 2008-04-14 16:45:19.000000000 +0200
+@@ -47,6 +47,9 @@
+ int phys_mem_mib[] = { CTL_HW, HW_PHYSMEM };
+ int user_mem_mib[] = { CTL_HW, HW_USERMEM };
+
++ long bufspace;
++
++
+ /*
+ * Retrieve the memory information from the underlying O/S...
+ */
+@@ -54,6 +57,7 @@
+ sysctl(phys_mem_mib, 2, &phys_mem, &mem_size, NULL, 0);
+ sysctl(user_mem_mib, 2, &user_mem, &mem_size, NULL, 0);
+ auto_nlist(SUM_SYMBOL, (char *) &vmem, sizeof(vmem));
++ auto_nlist(BUFSPACE_SYMBOL, (char *) &bufspace, sizeof(bufspace));
+ #ifndef freebsd4
+ pagesize = 1024;
+ #else
+@@ -129,6 +133,18 @@
+ mem->free = -1;
+ }
+
++ mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_MBUF, 1 );
++ if (!mem) {
++ snmp_log_perror("No Memory Buffer info entry");
++ } else {
++ if (!mem->descr)
++ mem->descr = strdup("Memory Buffer");
++ mem->units = pagesize;
++ mem->size = bufspace/pagesize;
++ mem->free = -1;
++ }
++
++
+ nswap = swapmode(pagesize);
+ mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_SWAP, 1 );
+ if (!mem) {
diff --git a/net-mgmt/net-snmp/Makefile b/net-mgmt/net-snmp/Makefile
index 36df177ccd4c..811a72845f89 100644
--- a/net-mgmt/net-snmp/Makefile
+++ b/net-mgmt/net-snmp/Makefile
@@ -7,7 +7,7 @@
PORTNAME= snmp
PORTVERSION= 5.4.1
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= net-mgmt ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= net-snmp
@@ -94,6 +94,12 @@ NET_SNMP_PERSISTENTDIR?=/var/net-snmp
NET_SNMP_MIB_MODULES?= ${NET_SNMP_MIB_MODULE_LIST}
NET_SNMP_MIB_MODULE_LIST=host disman/event-mib smux mibII/mta_sendmail mibII/tcpTable ucd-snmp/diskio
+
+.if defined(WITH_MFD_REWRITES)
+CONFIGURE_ARGS+=--enable-mfd-rewrites
+NET_SNMP_MIB_MODULE_LIST+= if-mib
+.endif
+
_NET_SNMP_MIB_MODULES=
.for module1 in ${NET_SNMP_MIB_MODULE_LIST}
_module1=${module1}
diff --git a/net-mgmt/net-snmp/files/patch-memory_freebsd.c b/net-mgmt/net-snmp/files/patch-memory_freebsd.c
new file mode 100644
index 000000000000..69e3f6617257
--- /dev/null
+++ b/net-mgmt/net-snmp/files/patch-memory_freebsd.c
@@ -0,0 +1,39 @@
+--- agent/mibgroup/hardware/memory/memory_freebsd.c.orig 2006-03-06 17:23:52.000000000 +0100
++++ agent/mibgroup/hardware/memory/memory_freebsd.c 2008-04-14 16:45:19.000000000 +0200
+@@ -47,6 +47,9 @@
+ int phys_mem_mib[] = { CTL_HW, HW_PHYSMEM };
+ int user_mem_mib[] = { CTL_HW, HW_USERMEM };
+
++ long bufspace;
++
++
+ /*
+ * Retrieve the memory information from the underlying O/S...
+ */
+@@ -54,6 +57,7 @@
+ sysctl(phys_mem_mib, 2, &phys_mem, &mem_size, NULL, 0);
+ sysctl(user_mem_mib, 2, &user_mem, &mem_size, NULL, 0);
+ auto_nlist(SUM_SYMBOL, (char *) &vmem, sizeof(vmem));
++ auto_nlist(BUFSPACE_SYMBOL, (char *) &bufspace, sizeof(bufspace));
+ #ifndef freebsd4
+ pagesize = 1024;
+ #else
+@@ -129,6 +133,18 @@
+ mem->free = -1;
+ }
+
++ mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_MBUF, 1 );
++ if (!mem) {
++ snmp_log_perror("No Memory Buffer info entry");
++ } else {
++ if (!mem->descr)
++ mem->descr = strdup("Memory Buffer");
++ mem->units = pagesize;
++ mem->size = bufspace/pagesize;
++ mem->free = -1;
++ }
++
++
+ nswap = swapmode(pagesize);
+ mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_SWAP, 1 );
+ if (!mem) {