summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2020-09-25 18:02:50 +0200
committerJeroen Roovers <jer@gentoo.org>2020-09-25 18:03:00 +0200
commit31829e0c487e47b3a0499780f3b511a616b63d1c (patch)
tree9d9b8231767a71069471b9f45c17b9c42f99acd3 /net-misc/nemesis
parentsci-geosciences/gpsd: Stabilize 3.21 x86, #743556 (diff)
downloadgentoo-31829e0c487e47b3a0499780f3b511a616b63d1c.tar.gz
gentoo-31829e0c487e47b3a0499780f3b511a616b63d1c.tar.bz2
gentoo-31829e0c487e47b3a0499780f3b511a616b63d1c.zip
net-misc/nemesis: Version 1.7
Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'net-misc/nemesis')
-rw-r--r--net-misc/nemesis/Manifest1
-rw-r--r--net-misc/nemesis/files/nemesis-1.7-fno-common.patch86
-rw-r--r--net-misc/nemesis/nemesis-1.4-r2.ebuild8
-rw-r--r--net-misc/nemesis/nemesis-1.7.ebuild30
4 files changed, 121 insertions, 4 deletions
diff --git a/net-misc/nemesis/Manifest b/net-misc/nemesis/Manifest
index f22967545a2..a2667476693 100644
--- a/net-misc/nemesis/Manifest
+++ b/net-misc/nemesis/Manifest
@@ -1 +1,2 @@
DIST nemesis-1.4.tar.gz 144187 BLAKE2B 9b16fa37283e4a659312bbd24e5ab850cf11cbee9c598f9e57bda517f462448a0a74721425144ec00afb2cde5ba86fcb020d2d7dbf4d6df688b67f7c282d9d38 SHA512 a8d4b434a9b0287e704ab923900c43051dc3aac4a7063e702aa93d7c89cfdeac287a6f40138bdca140e2c889e024f885288c4953940104ac12631cf7394501c8
+DIST nemesis-1.7.tar.gz 93423 BLAKE2B d46d19ae46852ea5a5f745b719779f3e4fbd77b918c8f53eaf743beb53d3ee345fa1663350d98095519481e819c5174fbe41b356da643b0aff9a2d5825494436 SHA512 6085cb91535c895325ca04e7583b29df9073731d8bee1d48ef46d09d25042d5220a73b2d02d77b4101de649877c0a2d0f4af5c06f125389fbd97c7350449134b
diff --git a/net-misc/nemesis/files/nemesis-1.7-fno-common.patch b/net-misc/nemesis/files/nemesis-1.7-fno-common.patch
new file mode 100644
index 00000000000..fba7641a493
--- /dev/null
+++ b/net-misc/nemesis/files/nemesis-1.7-fno-common.patch
@@ -0,0 +1,86 @@
+--- a/src/nemesis.h
++++ b/src/nemesis.h
+@@ -164,10 +164,10 @@
+ extern int verbose;
+ extern int interval;
+ extern int count;
+-int got_link;
+-int got_payload;
+-int got_ipoptions;
+-int got_tcpoptions;
++extern int got_link;
++extern int got_payload;
++extern int got_ipoptions;
++extern int got_tcpoptions;
+
+ struct file {
+ uint8_t *file_buf; /* pointer to file memory */
+--- a/src/nemesis.c
++++ b/src/nemesis.c
+@@ -10,6 +10,9 @@
+ #include <string.h>
+ #include <unistd.h>
+
++int got_payload;
++int mode;
++
+ extern int optind;
+
+ static int usage(char *arg)
+--- a/src/nemesis-icmp.c
++++ b/src/nemesis-icmp.c
+@@ -12,6 +12,8 @@
+ #include <pcap.h>
+ #endif
+
++int got_origoptions;
++
+ static ETHERhdr etherhdr;
+ static IPhdr iphdr;
+ static IPhdr ipunreach;
+--- a/src/nemesis-icmp.h
++++ b/src/nemesis-icmp.h
+@@ -39,8 +39,8 @@
+ #include "nemesis.h"
+ #include <libnet.h>
+
+-int mode; /* ICMP injection mode */
+-int got_origoptions;
++extern int mode; /* ICMP injection mode */
++extern int got_origoptions;
+
+ int buildicmp(ETHERhdr *, IPhdr *, ICMPhdr *, IPhdr *, struct file *, struct file *, struct file *, libnet_t *);
+
+--- a/src/nemesis-ospf.h
++++ b/src/nemesis-ospf.h
+@@ -43,7 +43,7 @@
+ extern NETLSAhdr netlsahdr;
+ extern SUMLSAhdr sumlsahdr;
+
+-int mode; /* OSPF injection mode */
++extern int mode; /* OSPF injection mode */
+
+ int buildospf(ETHERhdr *, IPhdr *, struct file *, struct file *, libnet_t *, int);
+
+--- a/src/nemesis-dns.c
++++ b/src/nemesis-dns.c
+@@ -12,6 +12,8 @@
+ #include <pcap.h>
+ #endif
+
++int state;
++
+ static ETHERhdr etherhdr;
+ static IPhdr iphdr;
+ static TCPhdr tcphdr;
+--- a/src/nemesis-dns.h
++++ b/src/nemesis-dns.h
+@@ -29,7 +29,7 @@
+ #include "nemesis.h"
+ #include <libnet.h>
+
+-int state; /* default to UDP */
++extern int state; /* default to UDP */
+
+ int builddns(ETHERhdr *, IPhdr *, TCPhdr *, UDPhdr *, DNShdr *, struct file *, struct file *, struct file *, libnet_t *);
+
diff --git a/net-misc/nemesis/nemesis-1.4-r2.ebuild b/net-misc/nemesis/nemesis-1.4-r2.ebuild
index 12ed858e34a..0d74247451f 100644
--- a/net-misc/nemesis/nemesis-1.4-r2.ebuild
+++ b/net-misc/nemesis/nemesis-1.4-r2.ebuild
@@ -23,10 +23,10 @@ DEPEND="
DOCS="CREDITS ChangeLog README"
PATCHES=(
- "${FILESDIR}"/${P}-fileio.patch
- "${FILESDIR}"/${P}-libnet-1.0.patch
- "${FILESDIR}"/${P}-prototcp.patch
- "${FILESDIR}"/${P}-fno-common.patch
+ "${FILESDIR}"/${PN}-1.4-fileio.patch
+ "${FILESDIR}"/${PN}-1.4-libnet-1.0.patch
+ "${FILESDIR}"/${PN}-1.4-prototcp.patch
+ "${FILESDIR}"/${PN}-1.4-fno-common.patch
)
src_prepare() {
diff --git a/net-misc/nemesis/nemesis-1.7.ebuild b/net-misc/nemesis/nemesis-1.7.ebuild
new file mode 100644
index 00000000000..5dce3d23490
--- /dev/null
+++ b/net-misc/nemesis/nemesis-1.7.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools
+
+DESCRIPTION="A commandline-based, portable human IP stack for UNIX/Linux"
+HOMEPAGE="https://github.com/libnet/nemesis"
+SRC_URI="https://github.com/libnet/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~sparc ~x86"
+
+RDEPEND="
+ net-libs/libpcap
+"
+DEPEND="
+ ${RDEPEND}
+ =net-libs/libnet-1.0*
+"
+DOCS="ChangeLog.md docs/CONTRIBUTING.md docs/CREDITS README.md"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.7-fno-common.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}