diff options
author | crees <crees@FreeBSD.org> | 2011-06-13 00:00:42 +0800 |
---|---|---|
committer | crees <crees@FreeBSD.org> | 2011-06-13 00:00:42 +0800 |
commit | 75af2649a036fb92364aaf97bd1ed53c99a43a1f (patch) | |
tree | 5c732306bf96f69d0297a61d7629edd886d4dfd6 /net | |
parent | 668f5f37b64ee149e2acaf771371968e8156014d (diff) | |
download | freebsd-ports-gnome-75af2649a036fb92364aaf97bd1ed53c99a43a1f.tar.gz freebsd-ports-gnome-75af2649a036fb92364aaf97bd1ed53c99a43a1f.tar.zst freebsd-ports-gnome-75af2649a036fb92364aaf97bd1ed53c99a43a1f.zip |
Shaperprobe is a speed test utility to analyze traffic shaping being done and
determine max downstream and upstream throughput.
WWW: http://www.cc.gatech.edu/~partha/diffprobe/shaperprobe.html
PR: ports/157773
Submitted by: Josh Carroll <josh.carroll at gmail.com>
Approved by: rene (mentor)
Diffstat (limited to 'net')
-rw-r--r-- | net/Makefile | 1 | ||||
-rw-r--r-- | net/shaperprobe/Makefile | 24 | ||||
-rw-r--r-- | net/shaperprobe/distinfo | 2 | ||||
-rw-r--r-- | net/shaperprobe/files/patch-diffprobe.h | 20 | ||||
-rw-r--r-- | net/shaperprobe/files/patch-measflow.c | 10 | ||||
-rw-r--r-- | net/shaperprobe/files/patch-prober.c | 45 | ||||
-rw-r--r-- | net/shaperprobe/files/patch-tcpclient.h | 10 | ||||
-rw-r--r-- | net/shaperprobe/files/patch-tcpserver.h | 10 | ||||
-rw-r--r-- | net/shaperprobe/pkg-descr | 4 |
9 files changed, 126 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile index 1aee70b42774..47cfef040be1 100644 --- a/net/Makefile +++ b/net/Makefile @@ -996,6 +996,7 @@ SUBDIR += service-discovery-applet SUBDIR += serviio SUBDIR += sflowtool + SUBDIR += shaperprobe SUBDIR += sharity-light SUBDIR += shelldap SUBDIR += shmux diff --git a/net/shaperprobe/Makefile b/net/shaperprobe/Makefile new file mode 100644 index 000000000000..381386af723e --- /dev/null +++ b/net/shaperprobe/Makefile @@ -0,0 +1,24 @@ +# New ports collection makefile for: shaperprobe +# Date created: 2011-06-11 +# Whom: Josh Carroll <josh.carroll@gmail.com> +# +# $FreeBSD$ +# + +PORTNAME= shaperprobe +PORTVERSION= 0.1 +CATEGORIES= net +MASTER_SITES= http://www.cc.gatech.edu/~partha/diffprobe/ +DISTNAME= ${PORTNAME} +EXTRACT_SUFX= .tgz + +MAINTAINER= josh.carroll@gmail.com +COMMENT= Utility to check for traffic shapers + +MAKEFILE= Makefile.osx +PLIST_FILES= bin/prober + +do-install: + @${INSTALL} ${WRKSRC}/prober ${PREFIX}/bin + +.include <bsd.port.mk> diff --git a/net/shaperprobe/distinfo b/net/shaperprobe/distinfo new file mode 100644 index 000000000000..0355ffb5af14 --- /dev/null +++ b/net/shaperprobe/distinfo @@ -0,0 +1,2 @@ +SHA256 (shaperprobe.tgz) = 9b19cd96f987dad9a90873342325b5921537848ce8082af8a6798d79f49dffd6 +SIZE (shaperprobe.tgz) = 16455 diff --git a/net/shaperprobe/files/patch-diffprobe.h b/net/shaperprobe/files/patch-diffprobe.h new file mode 100644 index 000000000000..51b0ffbd95aa --- /dev/null +++ b/net/shaperprobe/files/patch-diffprobe.h @@ -0,0 +1,20 @@ +--- ./diffprobe.h.orig 2009-12-01 12:47:55.000000000 -0800 ++++ ./diffprobe.h 2011-06-11 10:51:08.000000000 -0700 +@@ -26,6 +26,8 @@ + #ifndef _DIFFPROBE_H_ + #define _DIFFPROBE_H_ + ++#include <netinet/in.h> ++ + #define VERSION 3 + #define RATE_FACTOR 0.9 + #define RATE_DROP_FACTOR 2 +@@ -69,7 +71,7 @@ + int prober_bind_port(int port); + + double prober_sleep_resolution(); +-void prober_sbusywait(struct timeval); ++inline void prober_sbusywait(struct timeval); + void prober_swait(struct timeval, double sleepRes); + struct timeval prober_packet_gap(struct timeval y, struct timeval x); + diff --git a/net/shaperprobe/files/patch-measflow.c b/net/shaperprobe/files/patch-measflow.c new file mode 100644 index 000000000000..beed4626227c --- /dev/null +++ b/net/shaperprobe/files/patch-measflow.c @@ -0,0 +1,10 @@ +--- ./measflow.c.orig 2009-12-01 13:20:07.000000000 -0800 ++++ ./measflow.c 2011-06-11 10:51:08.000000000 -0700 +@@ -41,7 +41,6 @@ + + struct timeval prober_packet_gap(struct timeval y, struct timeval x); + void prober_swait(struct timeval tv, double sleepRes); +-void prober_sbusywait(struct timeval tv); + + int mflowSender(int tcpsock, int udpsock, struct sockaddr_in *from, + double capacity, double sleepRes, double *recvrate) diff --git a/net/shaperprobe/files/patch-prober.c b/net/shaperprobe/files/patch-prober.c new file mode 100644 index 000000000000..5c32f00eaea8 --- /dev/null +++ b/net/shaperprobe/files/patch-prober.c @@ -0,0 +1,45 @@ +--- ./prober.c.orig 2009-11-29 00:47:46.000000000 -0800 ++++ ./prober.c 2011-06-11 10:51:08.000000000 -0700 +@@ -34,6 +34,8 @@ + #include <stdlib.h> + #include <string.h> + ++#include <sys/types.h> ++ + #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 + 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 +- { ++ { */ + 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 +- { ++ { */ + 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", diff --git a/net/shaperprobe/files/patch-tcpclient.h b/net/shaperprobe/files/patch-tcpclient.h new file mode 100644 index 000000000000..94c3ab6caad6 --- /dev/null +++ b/net/shaperprobe/files/patch-tcpclient.h @@ -0,0 +1,10 @@ +--- ./tcpclient.h.orig 2009-11-28 22:41:42.000000000 -0800 ++++ ./tcpclient.h 2011-06-11 10:51:08.000000000 -0700 +@@ -27,6 +27,7 @@ + #define _TCPCLIENT_ + + #include "packet.h" ++#include <netinet/in.h> + + int connect2server(unsigned int serverip, int fileid); + double estimateCapacity(int tcpsock, int udpsock, struct sockaddr_in *); diff --git a/net/shaperprobe/files/patch-tcpserver.h b/net/shaperprobe/files/patch-tcpserver.h new file mode 100644 index 000000000000..746130f108bc --- /dev/null +++ b/net/shaperprobe/files/patch-tcpserver.h @@ -0,0 +1,10 @@ +--- ./tcpserver.h.orig 2009-11-28 22:41:42.000000000 -0800 ++++ ./tcpserver.h 2011-06-11 10:51:08.000000000 -0700 +@@ -27,6 +27,7 @@ + #define _TCPSERVER_ + + #include "packet.h" ++#include <netinet/in.h> + + int create_server(); + int preprocess_newclient(int conn_s, int udpsock0, diff --git a/net/shaperprobe/pkg-descr b/net/shaperprobe/pkg-descr new file mode 100644 index 000000000000..d057d7e1a0e1 --- /dev/null +++ b/net/shaperprobe/pkg-descr @@ -0,0 +1,4 @@ +Shaperprobe is a speed test utility to analyze traffic shaping being done and +determine max downstream and upstream throughput. + +WWW: http://www.cc.gatech.edu/~partha/diffprobe/shaperprobe.html |