ports/157773: [NEW PORT] net/shaperprobe: Utility to check for traffic shapers

Josh Carroll josh.carroll at gmail.com
Sat Jun 11 18:30:11 UTC 2011


>Number:         157773
>Category:       ports
>Synopsis:       [NEW PORT] net/shaperprobe: Utility to check for traffic shapers
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 11 18:30:10 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Josh Carroll
>Release:        FreeBSD 8.2-RELEASE-p2 amd64
>Organization:
>Environment:
System: FreeBSD pflog.net 8.2-RELEASE-p2 FreeBSD 8.2-RELEASE-p2 #0: Thu Jun  9 13:39:17 PDT
>Description:
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

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:

--- shaperprobe-0.1.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	shaperprobe
#	shaperprobe/pkg-descr
#	shaperprobe/Makefile
#	shaperprobe/distinfo
#	shaperprobe/files
#	shaperprobe/files/patch-diffprobe.h
#	shaperprobe/files/patch-measflow.c
#	shaperprobe/files/patch-prober.c
#	shaperprobe/files/patch-tcpclient.h
#	shaperprobe/files/patch-tcpserver.h
#
echo c - shaperprobe
mkdir -p shaperprobe > /dev/null 2>&1
echo x - shaperprobe/pkg-descr
sed 's/^X//' >shaperprobe/pkg-descr << '367072ff5a626c5fa958add0e59bd517'
XShaperprobe is a speed test utility to analyze traffic shaping being done and
Xdetermine max downstream and upstream throughput.
X
XWWW: http://www.cc.gatech.edu/~partha/diffprobe/shaperprobe.html
367072ff5a626c5fa958add0e59bd517
echo x - shaperprobe/Makefile
sed 's/^X//' >shaperprobe/Makefile << '236c61650631b4de08733d8fde8b090c'
X# New ports collection makefile for:	shaperprobe
X# Date created:		2011-06-11
X# Whom:			Josh Carroll <josh.carroll at gmail.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	shaperprobe
XPORTVERSION=0.1
XCATEGORIES=	net
XMASTER_SITES=http://www.cc.gatech.edu/~partha/diffprobe/
XDISTNAME=shaperprobe
XEXTRACT_SUFX=.tgz
X
XMAINTAINER=	josh.carroll at gmail.com
XCOMMENT=Utility to check for traffic shapers
X
XMAKEFILE=Makefile.osx
XPLIST_FILES=bin/prober
X
X.include <bsd.port.pre.mk>
X
Xdo-install:
X	@${INSTALL} ${WRKSRC}/prober ${PREFIX}/bin
X
X.include <bsd.port.post.mk>
236c61650631b4de08733d8fde8b090c
echo x - shaperprobe/distinfo
sed 's/^X//' >shaperprobe/distinfo << '22027872f424ffed95342a34950eeb34'
XSHA256 (shaperprobe.tgz) = 9b19cd96f987dad9a90873342325b5921537848ce8082af8a6798d79f49dffd6
XSIZE (shaperprobe.tgz) = 16455
22027872f424ffed95342a34950eeb34
echo c - shaperprobe/files
mkdir -p shaperprobe/files > /dev/null 2>&1
echo x - shaperprobe/files/patch-diffprobe.h
sed 's/^X//' >shaperprobe/files/patch-diffprobe.h << '42bbce9b7b7c628b36c5731db2a640ef'
X--- ./diffprobe.h.orig	2009-12-01 12:47:55.000000000 -0800
X+++ ./diffprobe.h	2011-06-11 10:51:08.000000000 -0700
X@@ -26,6 +26,8 @@
X #ifndef _DIFFPROBE_H_
X #define _DIFFPROBE_H_
X 
X+#include <netinet/in.h>
X+
X #define VERSION 3
X #define RATE_FACTOR 0.9
X #define RATE_DROP_FACTOR 2
X@@ -69,7 +71,7 @@
X int prober_bind_port(int port);
X 
X double prober_sleep_resolution();
X-void prober_sbusywait(struct timeval);
X+inline void prober_sbusywait(struct timeval);
X void prober_swait(struct timeval, double sleepRes);
X struct timeval prober_packet_gap(struct timeval y, struct timeval x);
X 
42bbce9b7b7c628b36c5731db2a640ef
echo x - shaperprobe/files/patch-measflow.c
sed 's/^X//' >shaperprobe/files/patch-measflow.c << 'ee35f1e87a21c4834386b6630f25f26d'
X--- ./measflow.c.orig	2009-12-01 13:20:07.000000000 -0800
X+++ ./measflow.c	2011-06-11 10:51:08.000000000 -0700
X@@ -41,7 +41,6 @@
X 
X struct timeval prober_packet_gap(struct timeval y, struct timeval x);
X void prober_swait(struct timeval tv, double sleepRes);
X-void prober_sbusywait(struct timeval tv);
X 
X int mflowSender(int tcpsock, int udpsock, struct sockaddr_in *from, 
X 		double capacity, double sleepRes, double *recvrate)
ee35f1e87a21c4834386b6630f25f26d
echo x - shaperprobe/files/patch-prober.c
sed 's/^X//' >shaperprobe/files/patch-prober.c << '4f8474b80cb4baeb94d4e7c95558b2d2'
X--- ./prober.c.orig	2009-11-29 00:47:46.000000000 -0800
X+++ ./prober.c	2011-06-11 10:51:08.000000000 -0700
X@@ -34,6 +34,8 @@
X #include <stdlib.h>
X #include <string.h>
X 
X+#include <sys/types.h>
X+
X #define __FAVOR_BSD /* For compilation in Linux.  */
X #include <netinet/in.h>
X #include <netinet/udp.h>
X@@ -356,27 +358,27 @@
X   //XXX: the meas code needs trains and lower cpu
X   if(capacityup < 80000) capacityup = measupcap;
X   if(capacitydown < 80000) capacitydown = measdowncap;
X-  if(capacityup > 100000)
X+  /* if(capacityup > 100000)
X   {
X 	  printf("Upstream: greater than 100 Mbps.\n");
X 	  capacityup = 95000;
X   }
X   else
X-  {
X+  { */
X 	  printf("Upstream: %d Kbps.\n", (int)capacityup);
X //	  capacityup *= 0.95; //reduce loss-based aborts
X-  }
X+  /* } */
X   truecapup = capacityup;
X-  if(capacitydown > 100000)
X+  /* if(capacitydown > 100000)
X   {
X 	  printf("Downstream: greater than 100 Mbps.\n");
X 	  capacitydown = 95000;
X   }
X   else
X-  {
X+  { */
X 	  printf("Downstream: %d Kbps.\n", (int)capacitydown);
X //	  capacitydown *= 0.95; //reduce loss-based aborts
X-  }
X+  /* } */
X   truecapdown = capacitydown;
X 
X   printf("\nThe measurement will last for about %.1f minutes. Please wait.\n",
4f8474b80cb4baeb94d4e7c95558b2d2
echo x - shaperprobe/files/patch-tcpclient.h
sed 's/^X//' >shaperprobe/files/patch-tcpclient.h << '97fec0dc4fd98ff1950f8122cd0c1d3b'
X--- ./tcpclient.h.orig	2009-11-28 22:41:42.000000000 -0800
X+++ ./tcpclient.h	2011-06-11 10:51:08.000000000 -0700
X@@ -27,6 +27,7 @@
X #define _TCPCLIENT_
X 
X #include "packet.h"
X+#include <netinet/in.h>
X 
X int connect2server(unsigned int serverip, int fileid);
X double estimateCapacity(int tcpsock, int udpsock, struct sockaddr_in *);
97fec0dc4fd98ff1950f8122cd0c1d3b
echo x - shaperprobe/files/patch-tcpserver.h
sed 's/^X//' >shaperprobe/files/patch-tcpserver.h << '2b6c94ba55d03d3f8d0c2dcad640441e'
X--- ./tcpserver.h.orig	2009-11-28 22:41:42.000000000 -0800
X+++ ./tcpserver.h	2011-06-11 10:51:08.000000000 -0700
X@@ -27,6 +27,7 @@
X #define _TCPSERVER_
X 
X #include "packet.h"
X+#include <netinet/in.h>
X 
X int create_server();
X int preprocess_newclient(int conn_s, int udpsock0, 
2b6c94ba55d03d3f8d0c2dcad640441e
exit
--- shaperprobe-0.1.shar ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list