From f67e946c8e1d62692778d227d882d2410ea74984 Mon Sep 17 00:00:00 2001 From: Pav Lucistnik Date: Thu, 4 Nov 2004 23:39:51 +0000 Subject: [PATCH] Add mgen, The Multi-Generator, an open source software by the Naval Research Laboratory (NRL) PROTocol Engineering Advanced Networking (PROTEAN) Research Group. MGEN provides the ability to perform IP network performance tests and measurements using UDP/IP traffic (TCP is currently being developed). PR: ports/73532 Submitted by: Janos Mohacsi --- net/Makefile | 1 + net/mgen/Makefile | 40 +++++++++++++++++++++++++ net/mgen/distinfo | 2 ++ net/mgen/files/patch-common_mgen.cpp | 14 +++++++++ net/mgen/files/patch-common_mgenApp.cpp | 22 ++++++++++++++ net/mgen/pkg-descr | 16 ++++++++++ 6 files changed, 95 insertions(+) create mode 100644 net/mgen/Makefile create mode 100644 net/mgen/distinfo create mode 100644 net/mgen/files/patch-common_mgen.cpp create mode 100644 net/mgen/files/patch-common_mgenApp.cpp create mode 100644 net/mgen/pkg-descr diff --git a/net/Makefile b/net/Makefile index 1231052af064..28bfacf11a85 100644 --- a/net/Makefile +++ b/net/Makefile @@ -332,6 +332,7 @@ SUBDIR += meanwhile SUBDIR += meanwhile-gaim SUBDIR += merlinmon + SUBDIR += mgen SUBDIR += micq SUBDIR += minisapserver SUBDIR += mldonkey diff --git a/net/mgen/Makefile b/net/mgen/Makefile new file mode 100644 index 000000000000..b2346e8c1efb --- /dev/null +++ b/net/mgen/Makefile @@ -0,0 +1,40 @@ +# New ports collection makefile for: rude +# Date created: 04/11/2004 +# Whom: janos.mohacsi@bsd.hu +# +# $FreeBSD$ +# + +PORTNAME= mgen +PORTVERSION= 4.2b5 +CATEGORIES= net +MASTER_SITES= http://downloads.pf.itd.nrl.navy.mil/mgen/ +EXTRACT_SUFX= .tgz +DISTFILES= src-${DISTNAME}${EXTRACT_SUFX} + +MAINTAINER= janos.mohacsi@bsd.hu +COMMENT= An IP network performance tests and measurements + +USE_GMAKE= yes +USE_REINPLACE= yes + +PLIST_FILES= bin/mgen +PORTDOCS= README.TXT VERSION.TXT mgen.html example.mgn + +post-patch: + @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/unix/Makefile.common \ + ${WRKSRC}/protolib/unix/Makefile.common + +do-build: + cd ${WRKSRC}/unix && ${GMAKE} -f Makefile.freebsd ${PORTNAME} + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/unix/mgen ${PREFIX}/bin +.ifndef(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} +.for FILE in ${PORTDOCS} + @${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR} +.endfor +.endif + +.include diff --git a/net/mgen/distinfo b/net/mgen/distinfo new file mode 100644 index 000000000000..bf660173259b --- /dev/null +++ b/net/mgen/distinfo @@ -0,0 +1,2 @@ +MD5 (src-mgen-4.2b5.tgz) = ca6c45d36ce84b30030c4436f926ec3f +SIZE (src-mgen-4.2b5.tgz) = 368998 diff --git a/net/mgen/files/patch-common_mgen.cpp b/net/mgen/files/patch-common_mgen.cpp new file mode 100644 index 000000000000..a4867087e68c --- /dev/null +++ b/net/mgen/files/patch-common_mgen.cpp @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- common/mgen.cpp.orig ++++ common/mgen.cpp +@@ -1319,7 +1319,7 @@ + m++; + } + return type; +-}; // end Mgen::GetCmdType() ++} // end Mgen::GetCmdType() + + bool Mgen::OnCommand(Mgen::Command cmd, const char* arg, bool override) + { diff --git a/net/mgen/files/patch-common_mgenApp.cpp b/net/mgen/files/patch-common_mgenApp.cpp new file mode 100644 index 000000000000..98e761298f0d --- /dev/null +++ b/net/mgen/files/patch-common_mgenApp.cpp @@ -0,0 +1,22 @@ + +$FreeBSD$ + +--- common/mgenApp.cpp.orig ++++ common/mgenApp.cpp +@@ -221,7 +221,7 @@ + nextCmd++; + } + return type; +-}; // end MgenApp::GetCmdType() ++} // end MgenApp::GetCmdType() + + bool MgenApp::ProcessCommands(int argc, const char*const* argv) + { +@@ -1388,6 +1388,6 @@ + } // end MgenStreamSource::Read() + + // This macro instantiates our MgenApp instance +-PROTO_INSTANTIATE_APP(MgenApp); ++PROTO_INSTANTIATE_APP(MgenApp) + + diff --git a/net/mgen/pkg-descr b/net/mgen/pkg-descr new file mode 100644 index 000000000000..4e395afb8169 --- /dev/null +++ b/net/mgen/pkg-descr @@ -0,0 +1,16 @@ +The Multi-Generator (MGEN) is open source software by the Naval Research +Laboratory (NRL) PROTocol Engineering Advanced Networking (PROTEAN) +Research Group. MGEN provides the ability to perform IP network +performance tests and measurements using UDP/IP traffic (TCP is currently +being developed). +The toolset generates real-time traffic patterns so that the network can +be loaded in a variety of ways. The generated traffic can also be +received and logged for analyses. Script files are used to drive the +generated loading patterns over the course of time. These script files can +be used to emulate the traffic patterns of unicast and/or multicast UDP/IP +applications. The receive portion of this tool set can be scripted to +dynamically join and leave IP multicast groups. MGEN log data can be used +to calculate performance statistics on throughput, packet loss rates, +communication delay, and more. + +WWW: http://mgen.pf.itd.nrl.navy.mil/