Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jun 2003 12:19:37 +0200 (CEST)
From:      Janos Mohacsi <mohacsi@niif.hu>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/53671: NEW PORT: rude/crude UDP traffic generator tool version 0.70
Message-ID:  <200306241019.h5OAJbP4043383@norfolk.ki.iif.hu>
Resent-Message-ID: <200306241020.h5OAKCK7026670@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         53671
>Category:       ports
>Synopsis:       NEW PORT: rude/crude UDP traffic generator tool version 0.70
>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:   Tue Jun 24 03:20:12 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Janos Mohacsi
>Release:        FreeBSD 4.8-STABLE i386
>Organization:
NIIF
>Environment:
System: FreeBSD norfolk.ki.iif.hu 4.8-STABLE FreeBSD 4.8-STABLE #2: Sun Jun 15 21:04:49 CEST 2003 root@norfolk.ki.iif.hu:/usr/obj/usr/src/sys/NORFOLK i386

>Description:
	NEW PORT: rude is a UDP traffic generator too and its collector crude
	It is capable of measuring traffic nearly realtime accuracy with
	realtime scheduling.
>How-To-Repeat:
	Apply this shar.
>Fix:

# 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:
#
#	rude
#	rude/pkg-descr
#	rude/distinfo
#	rude/Makefile
#	rude/pkg-plist
#	rude/files
#	rude/files/patch-include::rude.h
#	rude/files/patch-rude::main.c
#	rude/files/patch-crude::main.c
#	rude/files/patch-rude::Makefile.in
#	rude/files/patch-crude::Makefile.in
#	rude/files/patch-grude::grude
#
echo c - rude
mkdir -p rude > /dev/null 2>&1
echo x - rude/pkg-descr
sed 's/^X//' >rude/pkg-descr << 'END-of-rude/pkg-descr'
XRUDE stands for Real-time UDP Data Emitter and CRUDE for Collector for RUDE. 
XRUDE is a small and flexible program that generates traffic to the network, 
Xwhich can be received and logged on the other side of the network with the 
XCRUDE. Currently these programs can generate and measure only UDP traffic.
XActually these tools were designed and coded bacause of the accuracy 
Xlimitations in the MGEN program.
X
XWWW: http://rude.sourceforge.net/
END-of-rude/pkg-descr
echo x - rude/distinfo
sed 's/^X//' >rude/distinfo << 'END-of-rude/distinfo'
XMD5 (rude-0.70.tar.gz) = 04f3206da3aada5aba04cc0ffe0113b4
END-of-rude/distinfo
echo x - rude/Makefile
sed 's/^X//' >rude/Makefile << 'END-of-rude/Makefile'
X# New ports collection makefile for:	rude
X# Date created:		rude
X# Whom:			Janos.Mohacsi@bsd.hu
X#
X# $FreeBSD$
X#
X
XPORTNAME=	rude
XPORTVERSION=	0.70
XCATEGORIES=	net
XMASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR=	${PORTNAME}
X
XMAINTAINER=	Janos.Mohacsi@bsd.hu
XCOMMENT=	Rude is a Real-time UDP Data Emitter and Collector (crude)
X
XRUN_DEPENDS=	${SITE_PERL}/${PERL_ARCH}/Tk.pm:${PORTSDIR}/x11-toolkits/p5-Tk \
X		${SITE_PERL}/File/Temp.pm:${PORTSDIR}/devel/p5-File-Temp
X
XHAS_CONFIGURE=	yes
XCONFIGURE_ENV=	"--with-debug-lvl=3"
XWRKSRC=		${WRKDIR}/rude
XMAN8=		rude.8 crude.8
XDOC_FILES=	README README.rude README.crude TODO example.cfg
XEXAMPLE_FILES=	crude_jitter.pl crude_parse.pl dump2trace.pl
X
Xpost-install:
X		${INSTALL_SCRIPT} ${WRKSRC}/grude/grude ${PREFIX}/bin
X.ifndef(NOPORTDOCS)
X	@${MKDIR} ${DOCSDIR}
X.for file in ${DOC_FILES}
X	@${INSTALL_DATA} ${WRKSRC}/DOC/${file} ${DOCSDIR}
X.endfor
X.for file in ${EXAMPLE_FILES}
X	@${INSTALL_DATA} ${WRKSRC}/scripts/${file} ${DOCSDIR}
X.endfor
X.endif
X
X.include <bsd.port.mk>
END-of-rude/Makefile
echo x - rude/pkg-plist
sed 's/^X//' >rude/pkg-plist << 'END-of-rude/pkg-plist'
Xbin/crude
Xbin/grude
Xbin/rude
X%%PORTDOCS%%share/doc/rude/README
X%%PORTDOCS%%share/doc/rude/README.crude
X%%PORTDOCS%%share/doc/rude/README.rude
X%%PORTDOCS%%share/doc/rude/TODO
X%%PORTDOCS%%share/doc/rude/example.cfg
X%%PORTDOCS%%share/doc/rude/crude_jitter.pl
X%%PORTDOCS%%share/doc/rude/crude_parse.pl
X%%PORTDOCS%%share/doc/rude/dump2trace.pl
X%%PORTDOCS%%@dirrm share/doc/rude
END-of-rude/pkg-plist
echo c - rude/files
mkdir -p rude/files > /dev/null 2>&1
echo x - rude/files/patch-include::rude.h
sed 's/^X//' >rude/files/patch-include::rude.h << 'END-of-rude/files/patch-include::rude.h'
X--- include/rude.h.orig	Mon Jun 23 17:35:23 2003
X+++ include/rude.h	Mon Jun 23 17:35:42 2003
X@@ -24,6 +24,7 @@
X #ifndef _RUDE_H
X #define _RUDE_H
X 
X+#include <sys/types.h>
X #include <netinet/in.h>  /* for struct sockaddr_in */
X #include <sys/time.h>    /* for struct timeval     */
X 
END-of-rude/files/patch-include::rude.h
echo x - rude/files/patch-rude::main.c
sed 's/^X//' >rude/files/patch-rude::main.c << 'END-of-rude/files/patch-rude::main.c'
X--- rude/main.c.orig	Mon Jun 23 17:38:44 2003
X+++ rude/main.c	Mon Jun 23 17:40:18 2003
X@@ -204,9 +204,7 @@
X    */
X   if((user_id == 0) && (priority > 0)){
X     /* Try to lock the memory to avoid paging delays */
X-    if(mlockall(MCL_CURRENT | MCL_FUTURE) < 0){
X-      RUDEBUG1("rude: memory lock failed: %s\n", strerror(errno));
X-    }
X+      RUDEBUG1("rude: memory lock unsupported\n");
X 
X     /* Switch to Round-Robin-Real-Time Scheduling */
X     p.sched_priority = priority;
X@@ -242,8 +240,6 @@
X       RUDEBUG7("rude: program priority restored\n");
X     }
X 
X-    /* Release the locked memory */
X-    munlockall();
X   }
X 
X  rude_exit1:
X@@ -275,7 +271,6 @@
X     }
X   }
X 
X-  munlockall();
X   clean_up();
X   exit(ret_val);
X } /* main() */
END-of-rude/files/patch-rude::main.c
echo x - rude/files/patch-crude::main.c
sed 's/^X//' >rude/files/patch-crude::main.c << 'END-of-rude/files/patch-crude::main.c'
X--- crude/main.c.orig	Thu Jun 13 14:15:21 2002
X+++ crude/main.c	Mon Jun 23 17:49:02 2003
X@@ -294,9 +294,7 @@
X    */
X   if((user_id == 0) && (priority > 0)){
X     /* Try to lock the memory to avoid paging delays */
X-    if(mlockall(MCL_CURRENT | MCL_FUTURE) < 0){
X-      RUDEBUG1("crude: memory lock failed: %s\n", strerror(errno));
X-    }
X+      RUDEBUG1("crude: memory lock unsupported\n");
X 
X     /* Switch to Round-Robin-Real-Time Scheduling */
X     p.sched_priority = priority;
X@@ -346,8 +344,6 @@
X       RUDEBUG7("crude: program priority restored\n");
X     }
X 
X-    /* Release the locked memory */
X-    munlockall();
X   }                                                                             
X 
X   if(ps_flag){ print_stats(); }
X@@ -663,8 +659,8 @@
X 
X     /* print average delay as sign and absolute value */
X     if ( (sec < 0) || (usec < 0) ) {
X-      sec  = llabs( sec );
X-      usec = llabs( usec );
X+      sec  = -1*( sec );
X+      usec = -1*( usec );
X       printf("Delay: average = -%lld.%06llu   ", sec, usec);
X     } else {
X       printf("Delay: average = %lld.%06llu   ", sec, usec);
END-of-rude/files/patch-crude::main.c
echo x - rude/files/patch-rude::Makefile.in
sed 's/^X//' >rude/files/patch-rude::Makefile.in << 'END-of-rude/files/patch-rude::Makefile.in'
X--- rude/Makefile.in.orig	Thu Jun 13 14:15:21 2002
X+++ rude/Makefile.in	Tue Jun 24 11:26:06 2003
X@@ -19,7 +19,7 @@
X sbindir       = @sbindir@
X srcdir        = @srcdir@
X 
X-INSTALL  = @INSTALL@ -o root -g root -m 0755
X+INSTALL  = @INSTALL@ -o root -g wheel -m 0755
X VPATH    = @srcdir@
X 
X CC       = @CC@
END-of-rude/files/patch-rude::Makefile.in
echo x - rude/files/patch-crude::Makefile.in
sed 's/^X//' >rude/files/patch-crude::Makefile.in << 'END-of-rude/files/patch-crude::Makefile.in'
X--- crude/Makefile.in.orig	Tue Jun 24 11:26:39 2003
X+++ crude/Makefile.in	Tue Jun 24 11:26:57 2003
X@@ -19,7 +19,7 @@
X sbindir       = @sbindir@
X srcdir        = @srcdir@
X 
X-INSTALL  = @INSTALL@ -o root -g root -m 0755
X+INSTALL  = @INSTALL@ -o root -g wheel -m 0755
X VPATH    = @srcdir@
X 
X CC       = @CC@
END-of-rude/files/patch-crude::Makefile.in
echo x - rude/files/patch-grude::grude
sed 's/^X//' >rude/files/patch-grude::grude << 'END-of-rude/files/patch-grude::grude'
X--- grude/grude.orig	Tue Jun 24 11:38:38 2003
X+++ grude/grude	Tue Jun 24 11:39:18 2003
X@@ -1418,7 +1418,7 @@
X       $erro = 'Can\'t save file components';
X       goto ERRO;
X    }
X-   if (system('tar c * | gzip -c > archive') != 0) {
X+   if (system('tar cf - * | gzip -c > archive') != 0) {
X       $erro = 'Can\'t create compressed file';
X       goto ERRO;
X    }
END-of-rude/files/patch-grude::grude
exit


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200306241019.h5OAJbP4043383>