net-mgmt/ipgen: Add new port

The ipgen utility is a high-performance L2/L3 packet traffic generator based
on netmap with RFC 2544 benchmarking methodology and an interactive user
interface to show throughput and frame loss rate.
This commit is contained in:
Hiroki Sato 2024-11-08 09:09:07 +09:00
parent 04d8b3b433
commit 725341500a
11 changed files with 136 additions and 0 deletions

View file

@ -117,6 +117,7 @@
SUBDIR += ipcad SUBDIR += ipcad
SUBDIR += ipcalc SUBDIR += ipcalc
SUBDIR += ipfixcol2 SUBDIR += ipfixcol2
SUBDIR += ipgen
SUBDIR += iprange SUBDIR += iprange
SUBDIR += ipv6calc SUBDIR += ipv6calc
SUBDIR += ipv6gen SUBDIR += ipv6gen

32
net-mgmt/ipgen/Makefile Normal file
View file

@ -0,0 +1,32 @@
PORTNAME= ipgen
PORTVERSION= 1.30.20240527
CATEGORIES= net-mgmt
MAINTAINER= hrs@FreeBSD.org
COMMENT= Interactive Packet Generator and Benchmarking Utility
WWW= https://github.com/iij/ipgen
LICENSE= BSD2CLAUSE
LIB_DEPENDS= libevent.so:devel/libevent
USES= gmake perl5 shebangfix
USE_GITHUB= yes
GH_ACCOUNT= iij
GH_TAGNAME= 9e649f4
SHEBANG_FILES= gen/layout_generator
MAKEFILE= GNUmakefile
PORTDOCS= README.md
OPTIONS_DEFINE= DOCS
OPTIONS_DEFAULT=DOCS
pre-build:
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} -f ${MAKEFILE} depend
pre-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
post-install-DOCS-on:
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>

3
net-mgmt/ipgen/distinfo Normal file
View file

@ -0,0 +1,3 @@
TIMESTAMP = 1731024085
SHA256 (iij-ipgen-1.30.20240527-9e649f4_GH0.tar.gz) = 03303932fca65a9073b6372c0133e9958f26c0a44fa192846fea2019076e5aa6
SIZE (iij-ipgen-1.30.20240527-9e649f4_GH0.tar.gz) = 267985

View file

@ -0,0 +1,13 @@
--- Makefile.inc.orig 2024-05-27 06:59:46 UTC
+++ Makefile.inc
@@ -1,3 +1,10 @@ MANDIR?= ${PREFIX}/share/man
PREFIX?= /usr/local
LOCALBASE?= ${PREFIX}
MANDIR?= ${PREFIX}/share/man
+
+BSD_INSTALL_CMD?= install -o root -g wheel
+BSD_INSTALL_PROGRAM?= ${BSD_INSTALL_CMD} -m 555
+BSD_INSTALL_MAN?= ${BSD_INSTALL_CMD} -m 444
+BSD_INSTALL_SCRIPT?= ${BSD_INSTALL_CMD} -m 444
+BSD_INSTALL_DATA?= ${BSD_INSTALL_CMD} -m 444
+BSD_INSTALL_DIR?= ${BSD_INSTALL_CMD} -d -m 755

View file

@ -0,0 +1,15 @@
--- gen/GNUmakefile.orig 2024-05-27 06:59:46 UTC
+++ gen/GNUmakefile
@@ -46,9 +46,9 @@ install:
rm -f .depend GPATH GRTAGS GSYMS GTAGS
install:
- install -o root -g wheel -m 550 ipgen ${DESTDIR}${PREFIX}/bin/
- install -o root -g wheel -m 755 -d ${DESTDIR}${MANDIR}/man1
- install -o root -g wheel -m 444 ipgen.1 ${DESTDIR}${MANDIR}/man1
+ ${BSD_INSTALL_PROGRAM} ipgen ${DESTDIR}${PREFIX}/bin/
+ ${BSD_INSTALL_DIR} -d ${DESTDIR}${MANDIR}/man1
+ ${BSD_INSTALL_MAN} ipgen.1 ${DESTDIR}${MANDIR}/man1
sequencecheck: sequencecheck.c seqcheck_test.c
$(CC) -o $@ sequencecheck.c $(CFLAGS) -DTEST

View file

@ -0,0 +1,10 @@
--- htdocs/GNUmakefile.orig 2024-05-27 06:59:46 UTC
+++ htdocs/GNUmakefile
@@ -12,5 +12,5 @@ install:
depend:
install:
- install -o root -g wheel -m 755 -d ${DESTDIR}${PREFIX}/share/ipgen/htdocs
- install -o root -g wheel -m 444 ${FILES} ${DESTDIR}${PREFIX}/share/ipgen/htdocs
+ ${BSD_INSTALL_DIR} ${DESTDIR}${PREFIX}/share/ipgen/htdocs
+ ${BSD_INSTALL_DATA} ${FILES} ${DESTDIR}${PREFIX}/share/ipgen/htdocs

View file

@ -0,0 +1,10 @@
--- libaddrlist/GNUmakefile.orig 2024-02-29 01:39:01 UTC
+++ libaddrlist/GNUmakefile
@@ -3,7 +3,6 @@ SRCS+= addresses.c
SRCS+= addresses.c
-CFLAGS+= -O2
CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
CFLAGS+= -Wreturn-type -Wswitch -Wshadow
CFLAGS+= -Wcast-qual -Wwrite-strings

View file

@ -0,0 +1,10 @@
--- libpkt/GNUmakefile.orig 2024-02-29 01:38:00 UTC
+++ libpkt/GNUmakefile
@@ -8,7 +8,6 @@ SRCS+= utils.c
SRCS+= ip6pkt.c
SRCS+= utils.c
-CFLAGS+= -O2
CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
CFLAGS+= -Wreturn-type -Wswitch -Wshadow
CFLAGS+= -Wcast-qual -Wwrite-strings

View file

@ -0,0 +1,12 @@
--- script/GNUmakefile.orig 2024-05-27 06:59:46 UTC
+++ script/GNUmakefile
@@ -26,6 +26,6 @@ install:
depend:
install:
- install -o root -g wheel -m 555 log2graph ${DESTDIR}${PREFIX}/bin/ipgen_log2graph
- install -o root -g wheel -m 755 -d ${DESTDIR}${PREFIX}/share/ipgen/script
- install -o root -g wheel -m 444 ${FILES} ${DESTDIR}${PREFIX}/share/ipgen/script
+ ${BSD_INSTALL_SCRIPT} log2graph ${DESTDIR}${PREFIX}/bin/ipgen_log2graph
+ ${BSD_INSTALL_DIR} ${DESTDIR}${PREFIX}/share/ipgen/script
+ ${BSD_INSTALL_SCRIPT} ${FILES} ${DESTDIR}${PREFIX}/share/ipgen/script

3
net-mgmt/ipgen/pkg-descr Normal file
View file

@ -0,0 +1,3 @@
ipgen is a high-performance packet traffic generator based on netmap
that can interactively output packets of various sizes/rates to measure
the throughput and frame loss rate.

27
net-mgmt/ipgen/pkg-plist Normal file
View file

@ -0,0 +1,27 @@
bin/ipgen
bin/ipgen_log2graph
share/man/man1/ipgen.1.gz
%%DATADIR%%/htdocs/default.css
%%DATADIR%%/htdocs/dygraph-combined.js
%%DATADIR%%/htdocs/index.html
%%DATADIR%%/htdocs/jquery-1.11.1.min.js
%%DATADIR%%/htdocs/pktgen.js
%%DATADIR%%/script/pktsize46.script
%%DATADIR%%/script/pktsize66.script
%%DATADIR%%/script/pktsize100.script
%%DATADIR%%/script/pktsize200.script
%%DATADIR%%/script/pktsize300.script
%%DATADIR%%/script/pktsize400.script
%%DATADIR%%/script/pktsize500.script
%%DATADIR%%/script/pktsize600.script
%%DATADIR%%/script/pktsize700.script
%%DATADIR%%/script/pktsize800.script
%%DATADIR%%/script/pktsize900.script
%%DATADIR%%/script/pktsize1000.script
%%DATADIR%%/script/pktsize1100.script
%%DATADIR%%/script/pktsize1200.script
%%DATADIR%%/script/pktsize1280.script
%%DATADIR%%/script/pktsize1300.script
%%DATADIR%%/script/pktsize1400.script
%%DATADIR%%/script/pktsize1500.script
%%DATADIR%%/script/pktsizeAll.script