aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2005-01-16 01:23:23 +0800
committerpav <pav@FreeBSD.org>2005-01-16 01:23:23 +0800
commit70a10f17a5e75660d487c36bfa60da91e6d3caa5 (patch)
tree5c29d1d7147834092d7e0492ca4ddd4653d10642
parent4d8b01553998536069e37a0f66c577f133c7b1e3 (diff)
downloadfreebsd-ports-gnome-70a10f17a5e75660d487c36bfa60da91e6d3caa5.tar.gz
freebsd-ports-gnome-70a10f17a5e75660d487c36bfa60da91e6d3caa5.tar.zst
freebsd-ports-gnome-70a10f17a5e75660d487c36bfa60da91e6d3caa5.zip
Add brutecopy, an application that pushes data using UDP protocol through rotten,
overloaded and otherwise disgusting lines. It should work well even on lines on which TCP completely chokes. The transmission is performed at user-preprogrammed fixed data rate with no flow control, only with lost-packet retransmits. Brutalcopy always transfers the file without error, even on erroneous lines. It uses a CRC-32 checksum algorithm together with the checksum in the UDP packets. PR: ports/76239 Submitted by: Radim Kolar <hsn@netmag.cz>
-rw-r--r--net/Makefile1
-rw-r--r--net/brutecopy/Makefile38
-rw-r--r--net/brutecopy/distinfo2
-rw-r--r--net/brutecopy/files/patch-client54
-rw-r--r--net/brutecopy/files/patch-makefile32
-rw-r--r--net/brutecopy/files/patch-server53
-rw-r--r--net/brutecopy/pkg-descr14
7 files changed, 194 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile
index 91f68a8f30d6..f8d19f9f0964 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -49,6 +49,7 @@
SUBDIR += boclient
SUBDIR += boinc-client
SUBDIR += bounce
+ SUBDIR += brutecopy
SUBDIR += bsdproxy
SUBDIR += btqueue
SUBDIR += c3270
diff --git a/net/brutecopy/Makefile b/net/brutecopy/Makefile
new file mode 100644
index 000000000000..16a29f946599
--- /dev/null
+++ b/net/brutecopy/Makefile
@@ -0,0 +1,38 @@
+# New ports collection makefile for: brutecopy
+# Date created: 11 Jan 2005
+# Whom: x
+#
+# $FreeBSD$
+#
+
+PORTNAME= brutecopy
+PORTVERSION= 20011229
+CATEGORIES= net
+MASTER_SITES= ftp://atrey.karlin.mff.cuni.cz/pub/local/clock/bcp/
+DISTNAME= bcp-${PORTVERSION}
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= ports@FreeBSD.org
+COMMENT= Transferring files over Internet via UDP
+
+PLIST_FILES= bin/bcpc bin/bcps
+MAN1= bcp.1
+MANCOMPRESSED= yes
+
+.if defined(WITH_OPTIMIZED_CFLAGS)
+CFLAGS+= -O3 -Wall -fomit-frame-pointer -falign-functions=0
+.endif
+
+do-install:
+ ${MKDIR} ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/bcps ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/bcpc ${PREFIX}/bin
+ ${MKDIR} ${MAN1PREFIX}/man/man1
+ ${INSTALL_MAN} ${WRKSRC}/bcp.1.gz ${MAN1PREFIX}/man/man1
+
+pre-everything::
+.ifndef WITH_OPTIMIZED_CFLAGS
+ @${ECHO} "Define WITH_OPTIMIZED_CFLAGS for compiling with -O3"
+.endif
+
+.include <bsd.port.mk>
diff --git a/net/brutecopy/distinfo b/net/brutecopy/distinfo
new file mode 100644
index 000000000000..bf2adc69d366
--- /dev/null
+++ b/net/brutecopy/distinfo
@@ -0,0 +1,2 @@
+MD5 (bcp-20011229.tgz) = 2ecd273d34455d43d23cdd03db40b9ab
+SIZE (bcp-20011229.tgz) = 21711
diff --git a/net/brutecopy/files/patch-client b/net/brutecopy/files/patch-client
new file mode 100644
index 000000000000..19dff38ec99c
--- /dev/null
+++ b/net/brutecopy/files/patch-client
@@ -0,0 +1,54 @@
+--- bcpc.c.orig Sat Dec 29 15:03:13 2001
++++ bcpc.c Tue Jan 11 18:49:25 2005
+@@ -80,24 +80,23 @@
+ void
+ print_help(void)
+ {
+- fprintf(stderr,"bcpc -- a Brutalcopy client half
+-Brutalcopy (c) 2000 Karel Kulhavy, Clocksoft
+-
+-Brutalcopy is a program for transferring rather large files by means of UDP
+-protocol in order to bypass TCP tendency to screw up on bad lines. Brutalcopy is
+-based on manual flow control.
+-
+-Usage: bcpc -l <server hostname> -p <server port> [-h] [-i
+-<filename>] [-s <payload_size>] [-r <sot_retransmit_time>] [-b <bytes_per_sec>]
+-
+--l <server> DNS name or IP address (in dot notation) of the server.
+--p <dist_port> Port must be some high number (>=1024). Default is 1235.
+--h Prints out help and ends.
+--i <filename> File to dump the received data from. Default is bcp.dat.
+--s <payload> Number of bytes as a data payload in a single packet.
+--r <srt> Number of microsecond after which is SOT retransmitted.
+--b <Bps> Bytes of payload per second
+-");
++ fprintf(stderr,"bcpc -- a Brutalcopy client half\n"
++"Brutalcopy (c) 2000 Karel Kulhavy, Clocksoft\n"
++"\n"
++"Brutalcopy is a program for transferring rather large files by means of UDP\n"
++"protocol in order to bypass TCP tendency to screw up on bad lines. Brutalcopy is\n"
++"based on manual flow control.\n"
++"\n"
++"Usage: bcpc -l <server hostname> -p <server port> [-h] [-i\n"
++"<filename>] [-s <payload_size>] [-r <sot_retransmit_time>] [-b <bytes_per_sec>]\n"
++"-l <server> DNS name or IP address (in dot notation) of the server.\n"
++"-p <dist_port> Port must be some high number (>=1024). Default is 1235.\n"
++"-h Prints out help and ends.\n"
++"-i <filename> File to dump the received data from. Default is bcp.dat.\n"
++"-s <payload> Number of bytes as a data payload in a single packet.\n"
++"-r <srt> Number of microsecond after which is SOT retransmitted.\n"
++"-b <Bps> Bytes of payload per second\n"
++"\n");
+ }
+
+ void
+@@ -289,8 +288,7 @@
+
+ if (n>=n_packets)
+ {
+- fprintf(stderr,"Invalid packet seq# of %u from %lu came! It means data are
+-corrupted. Quitting immediately.\n",n,n_packets);
++ fprintf(stderr,"Invalid packet seq# of %u from %lu came! It means data are\ncorrupted. Quitting immediately.\n",n,n_packets);
+ die();
+ }
+ if ((bitmap[byte]>>bit)&1) return;
diff --git a/net/brutecopy/files/patch-makefile b/net/brutecopy/files/patch-makefile
new file mode 100644
index 000000000000..2967b4359292
--- /dev/null
+++ b/net/brutecopy/files/patch-makefile
@@ -0,0 +1,32 @@
+--- Makefile.orig Sat Dec 29 15:03:13 2001
++++ Makefile Tue Jan 11 18:55:19 2005
+@@ -1,5 +1,4 @@
+-CFLAGS= -O3 -Wall -fomit-frame-pointer -malign-functions=0
+-LDFLAGS= -s
++CFLAGS?=-O3 -Wall -fomit-frame-pointer -falign-functions=0
+
+ all: bcps bcpc
+
+@@ -7,18 +6,18 @@
+ rm -f *.o bcps bcpc
+
+ bcps.o: bcps.c def.h crc32.c
+- gcc -c $(CFLAGS) bcps.c -o bcps.o
++ $(CC) -c $(CFLAGS) bcps.c -o bcps.o
+
+ bcpc.o: bcpc.c def.h crc32.c
+- gcc -c $(CFLAGS) bcpc.c -o bcpc.o
++ $(CC) -c $(CFLAGS) bcpc.c -o bcpc.o
+
+ crc32.o: crc32.c
+
+ bcps: bcps.o crc32.o
+- gcc $(LDFLAGS) bcps.o crc32.o -o bcps
++ $(CC) $(LDFLAGS) bcps.o crc32.o -o bcps
+
+ bcpc: bcpc.o crc32.o
+- gcc $(LDFLAGS) bcpc.o crc32.o -o bcpc
++ $(CC) $(LDFLAGS) bcpc.o crc32.o -o bcpc
+
+ install: all
+ install -o root -g root -m 755 bcpc $(DESTDIR)/usr/bin
diff --git a/net/brutecopy/files/patch-server b/net/brutecopy/files/patch-server
new file mode 100644
index 000000000000..d7ab286bec67
--- /dev/null
+++ b/net/brutecopy/files/patch-server
@@ -0,0 +1,53 @@
+--- bcps.c.orig Sat Dec 29 15:03:13 2001
++++ bcps.c Tue Jan 11 18:44:43 2005
+@@ -99,28 +99,28 @@
+ void
+ print_help(void)
+ {
+- fprintf(stderr,"bcps -- a Brutalcopy server half
+-Brutalcopy (c) 2000 Karel Kulhavy, Clocksoft
+-
+-Brutalcopy is a program for transferring rather large files by means of UDP
+-protocol in order to bypass TCP tendency to screw up on bad lines. Brutalcopy
+-is based on manual flow control.
+-
+-Usage: bcps -p <number_of_port_to_listen on> [-h] [-o
+-<filename>] [-s] [-e <number_of_eots>] [-r <eot_period>] [-1] [-2]
+-[-q <info_retransmit_timeout>]
+-
+--p <port> Port must be some high number. Default is 1235.
+--h Prints out help and ends.
+--o <filename> File to dump the received data to. Default is bcp.dat.
+--s Print tickers
+--e <n_eots> Number of EOT packets sent at the end. Default is 3.
+--r <eot_p> Time distance between consecutive EOT packets in microseconds.
+- Default is 100,000.
+--q Info packet retransmit timeout in usec.
+--1 Do not print tickers
+--2 Print nothing
+-");
++ fprintf(stderr,"bcps -- a Brutalcopy server half\n"
++"Brutalcopy (c) 2000 Karel Kulhavy, Clocksoft\n"
++"\n"
++"Brutalcopy is a program for transferring rather large files by means of UDP\n"
++"protocol in order to bypass TCP tendency to screw up on bad lines. Brutalcopy\n"
++"is based on manual flow control.\n"
++"\n"
++"Usage: bcps -p <number_of_port_to_listen on> [-h] [-o\n"
++"<filename>] [-s] [-e <number_of_eots>] [-r <eot_period>] [-1] [-2]\n"
++"[-q <info_retransmit_timeout>]\n"
++"\n"
++"-p <port> Port must be some high number. Default is 1235.\n"
++"-h Prints out help and ends.\n"
++"-o <filename> File to dump the received data to. Default is bcp.dat.\n"
++"-s Print tickers\n"
++"-e <n_eots> Number of EOT packets sent at the end. Default is 3.\n"
++"-r <eot_p> Time distance between consecutive EOT packets in microseconds.\n"
++" Default is 100,000.\n"
++"-q Info packet retransmit timeout in usec.\n"
++"-1 Do not print tickers\n"
++"-2 Print nothing\n"
++"\n");
+ }
+
+ void
diff --git a/net/brutecopy/pkg-descr b/net/brutecopy/pkg-descr
new file mode 100644
index 000000000000..d6c6cd8481c8
--- /dev/null
+++ b/net/brutecopy/pkg-descr
@@ -0,0 +1,14 @@
+It's an application that pushes data using UDP protocol through rotten,
+overloaded and otherwise disgusting lines. It should work well even on lines
+on which TCP completely chokes. The transmission is performed at
+user-preprogrammed fixed data rate with no flow control, only with lost-packet
+retransmits. Brutalcopy always transfers the file without error, even on
+erroneous lines. It uses a CRC-32 checksum algorithm together with the checksum
+in the UDP packets.
+
+Warning: using this utility can cause total line congestion. Don't use it on
+with high transfer rates unless you know what you do. On some routers, the
+UDP is artificially throttled in order to prevent such practices. Use
+FSP for more user and bandwidth friendly file transfers.
+
+WWW: http://atrey.karlin.mff.cuni.cz/~clock/twibright/bcp/