diff options
author | pav <pav@FreeBSD.org> | 2003-12-22 07:12:25 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2003-12-22 07:12:25 +0800 |
commit | 6ea7be959b4fa3ab57c589d575a529cf5c158f8b (patch) | |
tree | 8c5ba815749ce8c2a973f5020d5ceeeb9b046dc2 /net/rude | |
parent | ee4c9bb27623e15469ebbb9444c8c50f12df60ca (diff) | |
download | freebsd-ports-gnome-6ea7be959b4fa3ab57c589d575a529cf5c158f8b.tar.gz freebsd-ports-gnome-6ea7be959b4fa3ab57c589d575a529cf5c158f8b.tar.zst freebsd-ports-gnome-6ea7be959b4fa3ab57c589d575a529cf5c158f8b.zip |
Add rude, an UDP traffic generator and its collector crude.
It's capable of accurate measuring of traffic.
PR: ports/53671
Submitted by: Janos Mohacsi <janos.mohacsi@bsd.hu>
Diffstat (limited to 'net/rude')
-rw-r--r-- | net/rude/Makefile | 41 | ||||
-rw-r--r-- | net/rude/distinfo | 1 | ||||
-rw-r--r-- | net/rude/files/patch-crude::Makefile.in | 11 | ||||
-rw-r--r-- | net/rude/files/patch-crude::main.c | 33 | ||||
-rw-r--r-- | net/rude/files/patch-grude::grude | 11 | ||||
-rw-r--r-- | net/rude/files/patch-include::rude.h | 10 | ||||
-rw-r--r-- | net/rude/files/patch-rude::Makefile.in | 11 | ||||
-rw-r--r-- | net/rude/files/patch-rude::main.c | 30 | ||||
-rw-r--r-- | net/rude/pkg-descr | 8 | ||||
-rw-r--r-- | net/rude/pkg-plist | 12 |
10 files changed, 168 insertions, 0 deletions
diff --git a/net/rude/Makefile b/net/rude/Makefile new file mode 100644 index 000000000000..25ec5d23bfb9 --- /dev/null +++ b/net/rude/Makefile @@ -0,0 +1,41 @@ +# New ports collection makefile for: rude +# Date created: rude +# Whom: Janos.Mohacsi@bsd.hu +# +# $FreeBSD$ +# + +PORTNAME= rude +PORTVERSION= 0.70 +CATEGORIES= net +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= ${PORTNAME} + +MAINTAINER= Janos.Mohacsi@bsd.hu +COMMENT= Rude is a Real-time UDP Data Emitter and Collector (crude) + +RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Tk.pm:${PORTSDIR}/x11-toolkits/p5-Tk \ + ${SITE_PERL}/File/Temp.pm:${PORTSDIR}/devel/p5-File-Temp + +HAS_CONFIGURE= yes +CONFIGURE_ENV= --with-debug-lvl=3 +WRKSRC= ${WRKDIR}/${PORTNAME} + +MAN8= rude.8 crude.8 + +DOC_FILES= README README.rude README.crude TODO example.cfg +EXAMPLE_FILES= crude_jitter.pl crude_parse.pl dump2trace.pl + +post-install: + ${INSTALL_SCRIPT} ${WRKSRC}/grude/grude ${PREFIX}/bin +.ifndef(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} +.for FILE in ${DOC_FILES} + @${INSTALL_DATA} ${WRKSRC}/DOC/${FILE} ${DOCSDIR} +.endfor +.for FILE in ${EXAMPLE_FILES} + @${INSTALL_DATA} ${WRKSRC}/scripts/${FILE} ${DOCSDIR} +.endfor +.endif + +.include <bsd.port.mk> diff --git a/net/rude/distinfo b/net/rude/distinfo new file mode 100644 index 000000000000..1c6cb56599d4 --- /dev/null +++ b/net/rude/distinfo @@ -0,0 +1 @@ +MD5 (rude-0.70.tar.gz) = 04f3206da3aada5aba04cc0ffe0113b4 diff --git a/net/rude/files/patch-crude::Makefile.in b/net/rude/files/patch-crude::Makefile.in new file mode 100644 index 000000000000..a0075a180071 --- /dev/null +++ b/net/rude/files/patch-crude::Makefile.in @@ -0,0 +1,11 @@ +--- crude/Makefile.in.orig Tue Jun 24 11:26:39 2003 ++++ crude/Makefile.in Tue Jun 24 11:26:57 2003 +@@ -19,7 +19,7 @@ + sbindir = @sbindir@ + srcdir = @srcdir@ + +-INSTALL = @INSTALL@ -o root -g root -m 0755 ++INSTALL = @INSTALL@ -o root -g wheel -m 0755 + VPATH = @srcdir@ + + CC = @CC@ diff --git a/net/rude/files/patch-crude::main.c b/net/rude/files/patch-crude::main.c new file mode 100644 index 000000000000..b7b047412909 --- /dev/null +++ b/net/rude/files/patch-crude::main.c @@ -0,0 +1,33 @@ +--- crude/main.c.orig Thu Jun 13 14:15:21 2002 ++++ crude/main.c Mon Jun 23 17:49:02 2003 +@@ -294,9 +294,7 @@ + */ + if((user_id == 0) && (priority > 0)){ + /* Try to lock the memory to avoid paging delays */ +- if(mlockall(MCL_CURRENT | MCL_FUTURE) < 0){ +- RUDEBUG1("crude: memory lock failed: %s\n", strerror(errno)); +- } ++ RUDEBUG1("crude: memory lock unsupported\n"); + + /* Switch to Round-Robin-Real-Time Scheduling */ + p.sched_priority = priority; +@@ -346,8 +344,6 @@ + RUDEBUG7("crude: program priority restored\n"); + } + +- /* Release the locked memory */ +- munlockall(); + } + + if(ps_flag){ print_stats(); } +@@ -663,8 +659,8 @@ + + /* print average delay as sign and absolute value */ + if ( (sec < 0) || (usec < 0) ) { +- sec = llabs( sec ); +- usec = llabs( usec ); ++ sec = -1*( sec ); ++ usec = -1*( usec ); + printf("Delay: average = -%lld.%06llu ", sec, usec); + } else { + printf("Delay: average = %lld.%06llu ", sec, usec); diff --git a/net/rude/files/patch-grude::grude b/net/rude/files/patch-grude::grude new file mode 100644 index 000000000000..bc46e52f68d8 --- /dev/null +++ b/net/rude/files/patch-grude::grude @@ -0,0 +1,11 @@ +--- grude/grude.orig Tue Jun 24 11:38:38 2003 ++++ grude/grude Tue Jun 24 11:39:18 2003 +@@ -1418,7 +1418,7 @@ + $erro = 'Can\'t save file components'; + goto ERRO; + } +- if (system('tar c * | gzip -c > archive') != 0) { ++ if (system('tar cf - * | gzip -c > archive') != 0) { + $erro = 'Can\'t create compressed file'; + goto ERRO; + } diff --git a/net/rude/files/patch-include::rude.h b/net/rude/files/patch-include::rude.h new file mode 100644 index 000000000000..0c89c7c4f599 --- /dev/null +++ b/net/rude/files/patch-include::rude.h @@ -0,0 +1,10 @@ +--- include/rude.h.orig Mon Jun 23 17:35:23 2003 ++++ include/rude.h Mon Jun 23 17:35:42 2003 +@@ -24,6 +24,7 @@ + #ifndef _RUDE_H + #define _RUDE_H + ++#include <sys/types.h> + #include <netinet/in.h> /* for struct sockaddr_in */ + #include <sys/time.h> /* for struct timeval */ + diff --git a/net/rude/files/patch-rude::Makefile.in b/net/rude/files/patch-rude::Makefile.in new file mode 100644 index 000000000000..361cd96a7929 --- /dev/null +++ b/net/rude/files/patch-rude::Makefile.in @@ -0,0 +1,11 @@ +--- rude/Makefile.in.orig Thu Jun 13 14:15:21 2002 ++++ rude/Makefile.in Tue Jun 24 11:26:06 2003 +@@ -19,7 +19,7 @@ + sbindir = @sbindir@ + srcdir = @srcdir@ + +-INSTALL = @INSTALL@ -o root -g root -m 0755 ++INSTALL = @INSTALL@ -o root -g wheel -m 0755 + VPATH = @srcdir@ + + CC = @CC@ diff --git a/net/rude/files/patch-rude::main.c b/net/rude/files/patch-rude::main.c new file mode 100644 index 000000000000..0f835cd476a8 --- /dev/null +++ b/net/rude/files/patch-rude::main.c @@ -0,0 +1,30 @@ +--- rude/main.c.orig Mon Jun 23 17:38:44 2003 ++++ rude/main.c Mon Jun 23 17:40:18 2003 +@@ -204,9 +204,7 @@ + */ + if((user_id == 0) && (priority > 0)){ + /* Try to lock the memory to avoid paging delays */ +- if(mlockall(MCL_CURRENT | MCL_FUTURE) < 0){ +- RUDEBUG1("rude: memory lock failed: %s\n", strerror(errno)); +- } ++ RUDEBUG1("rude: memory lock unsupported\n"); + + /* Switch to Round-Robin-Real-Time Scheduling */ + p.sched_priority = priority; +@@ -242,8 +240,6 @@ + RUDEBUG7("rude: program priority restored\n"); + } + +- /* Release the locked memory */ +- munlockall(); + } + + rude_exit1: +@@ -275,7 +271,6 @@ + } + } + +- munlockall(); + clean_up(); + exit(ret_val); + } /* main() */ diff --git a/net/rude/pkg-descr b/net/rude/pkg-descr new file mode 100644 index 000000000000..28a554f8b9b2 --- /dev/null +++ b/net/rude/pkg-descr @@ -0,0 +1,8 @@ +RUDE stands for Real-time UDP Data Emitter and CRUDE for Collector for RUDE. +RUDE is a small and flexible program that generates traffic to the network, +which can be received and logged on the other side of the network with the +CRUDE. Currently these programs can generate and measure only UDP traffic. +Actually these tools were designed and coded bacause of the accuracy +limitations in the MGEN program. + +WWW: http://rude.sourceforge.net/ diff --git a/net/rude/pkg-plist b/net/rude/pkg-plist new file mode 100644 index 000000000000..90f47414f161 --- /dev/null +++ b/net/rude/pkg-plist @@ -0,0 +1,12 @@ +bin/crude +bin/grude +bin/rude +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/README.crude +%%PORTDOCS%%%%DOCSDIR%%/README.rude +%%PORTDOCS%%%%DOCSDIR%%/TODO +%%PORTDOCS%%%%DOCSDIR%%/example.cfg +%%PORTDOCS%%%%DOCSDIR%%/crude_jitter.pl +%%PORTDOCS%%%%DOCSDIR%%/crude_parse.pl +%%PORTDOCS%%%%DOCSDIR%%/dump2trace.pl +%%PORTDOCS%%@dirrm %%DOCSDIR%% |