summaryrefslogtreecommitdiff
path: root/net/shaperprobe/files/patch-prober.c
diff options
context:
space:
mode:
authorSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2012-07-04 08:27:19 +0000
committerSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2012-07-04 08:27:19 +0000
commit8da230fca6d51236e79a01d9927e38e8a100e744 (patch)
tree6365c3924b3c85eecdade6e22e88de1a0c4337d4 /net/shaperprobe/files/patch-prober.c
parent- Update to 2.19 (diff)
- Update to 0.2
Note that maintainer requested author to release new version (Jan '12) as 0.2. PR: ports/168916 Submitted by: sunpoet (myself) Approved by: Josh Carroll <josh.carroll@gmail.com> (maintainer)
Diffstat (limited to 'net/shaperprobe/files/patch-prober.c')
-rw-r--r--net/shaperprobe/files/patch-prober.c54
1 files changed, 32 insertions, 22 deletions
diff --git a/net/shaperprobe/files/patch-prober.c b/net/shaperprobe/files/patch-prober.c
index 5c32f00eaea8..c1e1856c9d00 100644
--- a/net/shaperprobe/files/patch-prober.c
+++ b/net/shaperprobe/files/patch-prober.c
@@ -1,5 +1,5 @@
---- ./prober.c.orig 2009-11-29 00:47:46.000000000 -0800
-+++ ./prober.c 2011-06-11 10:51:08.000000000 -0700
+--- prober.c.orig 2012-01-25 04:33:22.000000000 +0800
++++ prober.c 2012-06-07 16:37:14.013216127 +0800
@@ -34,6 +34,8 @@
#include <stdlib.h>
#include <string.h>
@@ -9,37 +9,47 @@
#define __FAVOR_BSD /* For compilation in Linux. */
#include <netinet/in.h>
#include <netinet/udp.h>
-@@ -356,27 +358,27 @@
- //XXX: the meas code needs trains and lower cpu
+@@ -357,27 +359,27 @@
+ //following two lines for 802.11a/b/g/n links
if(capacityup < 80000) capacityup = measupcap;
if(capacitydown < 80000) capacitydown = measdowncap;
-- if(capacityup > 100000)
-+ /* if(capacityup > 100000)
- {
- printf("Upstream: greater than 100 Mbps.\n");
- capacityup = 95000;
- }
- else
+- if(capacityup > 200000)
- {
-+ { */
+- printf("Upstream: greater than 200 Mbps.\n");
+- capacityup = 195000;
+- }
+- else
+- {
++// if(capacityup > 200000)
++// {
++// printf("Upstream: greater than 200 Mbps.\n");
++// capacityup = 195000;
++// }
++// else
++// {
printf("Upstream: %d Kbps.\n", (int)capacityup);
// capacityup *= 0.95; //reduce loss-based aborts
- }
-+ /* } */
++// }
truecapup = capacityup;
-- if(capacitydown > 100000)
-+ /* if(capacitydown > 100000)
- {
- printf("Downstream: greater than 100 Mbps.\n");
- capacitydown = 95000;
- }
- else
+- if(capacitydown > 200000)
+- {
+- printf("Downstream: greater than 200 Mbps.\n");
+- capacitydown = 195000;
+- }
+- else
- {
-+ { */
++// if(capacitydown > 200000)
++// {
++// printf("Downstream: greater than 200 Mbps.\n");
++// capacitydown = 195000;
++// }
++// else
++// {
printf("Downstream: %d Kbps.\n", (int)capacitydown);
// capacitydown *= 0.95; //reduce loss-based aborts
- }
-+ /* } */
++// }
truecapdown = capacitydown;
printf("\nThe measurement will last for about %.1f minutes. Please wait.\n",