* [gentoo-commits] repo/gentoo:master commit in: net-misc/nemesis/, net-misc/nemesis/files/
@ 2018-06-21 8:32 Jeroen Roovers
0 siblings, 0 replies; 4+ messages in thread
From: Jeroen Roovers @ 2018-06-21 8:32 UTC (permalink / raw
To: gentoo-commits
commit: 604c0137b36980434143d2f697b732de97bca775
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 21 08:29:19 2018 +0000
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Thu Jun 21 08:32:32 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=604c0137
net-misc/nemesis: Update ebuild, clean up patches.
Package-Manager: Portage-2.3.40, Repoman-2.3.9
net-misc/nemesis/files/nemesis-1.4-fileio.patch | 4 +-
.../nemesis/files/nemesis-1.4-libnet-1.0.patch | 177 ++++++++++++---------
net-misc/nemesis/files/nemesis-1.4-prototcp.patch | 4 +-
net-misc/nemesis/nemesis-1.4-r1.ebuild | 29 ++--
4 files changed, 126 insertions(+), 88 deletions(-)
diff --git a/net-misc/nemesis/files/nemesis-1.4-fileio.patch b/net-misc/nemesis/files/nemesis-1.4-fileio.patch
index 07c96bc17a7..d39cef3d650 100644
--- a/net-misc/nemesis/files/nemesis-1.4-fileio.patch
+++ b/net-misc/nemesis/files/nemesis-1.4-fileio.patch
@@ -1,5 +1,5 @@
---- nemesis-1.4-orig/source/src/nemesis-fileio.c Fri Oct 31 16:29:36 2003
-+++ nemesis-1.4/source/src/nemesis-fileio.c Fri May 19 17:31:13 2006
+--- a/src/nemesis-fileio.c
++++ b/src/nemesis-fileio.c
@@ -63,7 +63,7 @@
fp = stdin;
fd = fileno(fp);
diff --git a/net-misc/nemesis/files/nemesis-1.4-libnet-1.0.patch b/net-misc/nemesis/files/nemesis-1.4-libnet-1.0.patch
index b4c55c374ef..a5a0a83d54a 100644
--- a/net-misc/nemesis/files/nemesis-1.4-libnet-1.0.patch
+++ b/net-misc/nemesis/files/nemesis-1.4-libnet-1.0.patch
@@ -1,127 +1,158 @@
---- nemesis-1.4.orig/configure 2006-12-15 13:56:46.000000000 -0700
-+++ nemesis-1.4/configure 2006-12-15 14:17:33.000000000 -0700
-@@ -4150 +4150 @@
+--- a/configure.in
++++ b/configure.in
+@@ -128,22 +128,21 @@
+ dnl LIBS="${LIBS} -L${with_libpcap_libraries}"
+ dnl fi
+
-CPPFLAGS="${CPPFLAGS} `libnet-config --defines`"
+-CFLAGS="${CFLAGS} -funroll-loops -pipe"
+CPPFLAGS="${CPPFLAGS} `libnet-1.0-config --defines`"
-@@ -4153 +4153 @@
+
-if test `libnet-config --cflags | wc -c` = "1"; then
+if test `libnet-1.0-config --cflags | wc -c` = "1"; then
-@@ -4157 +4157 @@
+ CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/sw/include"
+ LIBNET_CONFIG_BROKEN_CFLAGS=yes
+ else
- CPPFLAGS="${CPPFLAGS} `libnet-config --cflags`"
+ CPPFLAGS="${CPPFLAGS} `libnet-1.0-config --cflags`"
-@@ -4160,3 +4160,3 @@
+ fi
+
-if test `libnet-config --libs | wc -c` = "1"; then
-- { echo "$as_me:$LINENO: WARNING: libnet-config --libs is broken on your system. If you" >&5
--echo "$as_me: WARNING: libnet-config --libs is broken on your system. If you" >&2;}
+- AC_MSG_WARN(libnet-config --libs is broken on your system. If you)
+if test `libnet-1.0-config --libs | wc -c` = "1"; then
-+ { echo "$as_me:$LINENO: WARNING: libnet-1.0-config --libs is broken on your system. If you" >&5
-+echo "$as_me: WARNING: libnet-1.0-config --libs is broken on your system. If you" >&2;}
-@@ -4167 +4167 @@
++ AC_MSG_WARN(libnet-1.0-config --libs is broken on your system. If you)
+ AC_MSG_WARN(are using a precompiled package please notify the maintainer.)
+ LIBS="${LIBS} -L/usr/local/lib -L/sw/lib"
+ else
- LIBS="${LIBS} `libnet-config --libs | sed s/\-lnet//`"
-+ LIBS="${LIBS} `libnet-1.0-config --libs | sed s/\-lnet-1.0//`"
-@@ -4712,2 +4712,2 @@
--echo "$as_me:$LINENO: checking for libnet_build_ip in -lnet" >&5
--echo $ECHO_N "checking for libnet_build_ip in -lnet... $ECHO_C" >&6
-+echo "$as_me:$LINENO: checking for libnet_build_ip in -lnet-1.0" >&5
-+echo $ECHO_N "checking for libnet_build_ip in -lnet-1.0... $ECHO_C" >&6
-@@ -4718 +4718 @@
--LIBS="-lnet $LIBS"
-+LIBS="-lnet-1.0 $LIBS"
-@@ -4781 +4781 @@
-- LIBS="-lnet $LIBS"
-+ LIBS="-lnet-1.0 $LIBS"
-@@ -5263 +5263 @@
--for ac_header in libnet.h
-+for ac_header in libnet-1.0.h
-@@ -5433 +5433 @@
++ LIBS="${LIBS} `libnet-1.0-config --libs`"
+ fi
+
+ AC_DEFUN(HEADER_FAIL_MESSAGE,[
+@@ -185,7 +184,7 @@
+ AC_CHECK_LIB(resolv, hstrerror)
+
+ LNET=""
+-AC_CHECK_LIB(net, libnet_build_ip,, LNET="no")
++AC_CHECK_LIB(net-1.0, libnet_build_ip,, LNET="no")
+
+ if test "$LNET" = "no"; then
+ echo
+@@ -193,7 +192,7 @@
+ echo " http://www.packetfactory.net/projects/libnet/"
+ echo " or use the --with-libnet-* options, if you have it installed"
+ echo " in unusual place"
+- exit
++ exit 1
+ fi
+
+ dnl if test "$enable_pcapoutput" != "no" -a "$enable_pcapoutput" = "yes"; then
+@@ -216,7 +215,7 @@
+ AC_CHECK_HEADERS(unistd.h errno.h strings.h netdb.h limits.h machine/endian.h sys/time.h sys/param.h arpa/inet.h netinet/in.h)
+
+ LNET=""
+-AC_CHECK_HEADERS(libnet.h,, LNET="no")
++AC_CHECK_HEADERS(libnet-1.0.h,, LNET="no")
+
+ if test "$LNET" = "no"; then
+ echo
+@@ -235,29 +234,29 @@
+ libnet_dir="/usr/include /usr/local/include /sw/include"
+ fi
+ else
- libnet_dir=`libnet-config --cflags | cut -dI -f2`
+ libnet_dir=`libnet-1.0-config --cflags | cut -dI -f2`
-@@ -5438 +5438 @@
+ fi
+
+ LIBNET_INC_DIR=""
+ for i in $libnet_dir; do
- if test -r $i/libnet.h; then
+ if test -r $i/libnet-1.0.h; then
-@@ -5444 +5444 @@
+ LIBNET_INC_DIR=$i
+ fi
+ done
+
+ if test "$LIBNET_INC_DIR" != ""; then
- if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet.h | grep -v 1.0.2a >/dev/null"; then
+ if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet-1.0.h | grep -v 1.0.2a >/dev/null"; then
-@@ -5455 +5455 @@
-- echo " ERROR: unable to find" "libnet 1.0.2a (libnet.h)"
-+ echo " ERROR: unable to find" "libnet 1.0.2a (libnet-1.0.h)"
-@@ -5474 +5474 @@
-- echo " ERROR: unable to find" "libnet 1.0.2a (libnet.h)"
-+ echo " ERROR: unable to find" "libnet 1.0.2a (libnet-1.0.h)"
-diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-arp.h nemesis-1.4beta3/src/nemesis-arp.h
---- nemesis-1.4beta3.orig/src/nemesis-arp.h 2003-08-19 15:45:45.675664688 -0400
-+++ nemesis-1.4beta3/src/nemesis-arp.h 2003-08-19 15:47:07.631205552 -0400
+ AC_MSG_RESULT(no)
+ echo
+ echo " ERROR! Nemesis will *only* work with libnet version 1.0.2a,"
+ echo " go get it from"
+ echo " http://www.packetfactory.net/projects/libnet/"
+- HEADER_FAIL_MESSAGE("libnet 1.0.2a (libnet.h)", $LIBNET_INC_DIR)
++ HEADER_FAIL_MESSAGE("libnet 1.0.2a (libnet-1.0.h)", $LIBNET_INC_DIR)
+ fi
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+- HEADER_FAIL_MESSAGE("libnet 1.0.2a (libnet.h)", $libnet_dir)
++ HEADER_FAIL_MESSAGE("libnet 1.0.2a (libnet-1.0.h)", $libnet_dir)
+ fi
+
+ dnl if test "$enable_pcapoutput" != "no" -a "$enable_pcapoutput" = "yes"; then
+--- a/src/nemesis-arp.h
++++ b/src/nemesis-arp.h
@@ -30 +30 @@
-#include <libnet.h>
+#include <libnet-1.0.h>
-diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-dns.h nemesis-1.4beta3/src/nemesis-dns.h
---- nemesis-1.4beta3.orig/src/nemesis-dns.h 2003-08-19 15:45:45.675664688 -0400
-+++ nemesis-1.4beta3/src/nemesis-dns.h 2003-08-19 15:47:07.638204488 -0400
+--- a/src/nemesis-dns.h
++++ b/src/nemesis-dns.h
@@ -30 +30 @@
-#include <libnet.h>
+#include <libnet-1.0.h>
-diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-ethernet.h nemesis-1.4beta3/src/nemesis-ethernet.h
---- nemesis-1.4beta3.orig/src/nemesis-ethernet.h 2003-08-19 15:45:45.676664536 -0400
-+++ nemesis-1.4beta3/src/nemesis-ethernet.h 2003-08-19 15:47:07.641204032 -0400
+--- a/src/nemesis-ethernet.h
++++ b/src/nemesis-ethernet.h
@@ -29 +29 @@
-#include <libnet.h>
+#include <libnet-1.0.h>
-diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-functions.c nemesis-1.4beta3/src/nemesis-functions.c
---- nemesis-1.4beta3.orig/src/nemesis-functions.c 2003-08-19 15:45:45.676664536 -0400
-+++ nemesis-1.4beta3/src/nemesis-functions.c 2003-08-19 15:47:07.656201752 -0400
+--- a/src/nemesis-functions.c
++++ b/src/nemesis-functions.c
@@ -37 +37 @@
-#include <libnet.h>
+#include <libnet-1.0.h>
-diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-icmp.h nemesis-1.4beta3/src/nemesis-icmp.h
---- nemesis-1.4beta3.orig/src/nemesis-icmp.h 2003-08-19 15:45:45.676664536 -0400
-+++ nemesis-1.4beta3/src/nemesis-icmp.h 2003-08-19 15:47:07.665200384 -0400
+--- a/src/nemesis-icmp.h
++++ b/src/nemesis-icmp.h
@@ -31 +31 @@
-#include <libnet.h>
+#include <libnet-1.0.h>
-diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-igmp.h nemesis-1.4beta3/src/nemesis-igmp.h
---- nemesis-1.4beta3.orig/src/nemesis-igmp.h 2003-08-19 15:45:45.676664536 -0400
-+++ nemesis-1.4beta3/src/nemesis-igmp.h 2003-08-19 15:47:07.670199624 -0400
+--- a/src/nemesis-igmp.h
++++ b/src/nemesis-igmp.h
@@ -30 +30 @@
-#include <libnet.h>
+#include <libnet-1.0.h>
-diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-ip.h nemesis-1.4beta3/src/nemesis-ip.h
---- nemesis-1.4beta3.orig/src/nemesis-ip.h 2003-08-19 15:45:45.676664536 -0400
-+++ nemesis-1.4beta3/src/nemesis-ip.h 2003-08-19 15:47:07.677198560 -0400
+--- a/src/nemesis-ip.h
++++ b/src/nemesis-ip.h
@@ -26 +26 @@
-#include <libnet.h>
+#include <libnet-1.0.h>
-diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-ospf.h nemesis-1.4beta3/src/nemesis-ospf.h
---- nemesis-1.4beta3.orig/src/nemesis-ospf.h 2003-08-19 15:45:45.677664384 -0400
-+++ nemesis-1.4beta3/src/nemesis-ospf.h 2003-08-19 15:47:07.684197496 -0400
+--- a/src/nemesis-ospf.h
++++ b/src/nemesis-ospf.h
@@ -33 +33 @@
-#include <libnet.h>
+#include <libnet-1.0.h>
-diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-rip.h nemesis-1.4beta3/src/nemesis-rip.h
---- nemesis-1.4beta3.orig/src/nemesis-rip.h 2003-08-19 15:45:45.678664232 -0400
-+++ nemesis-1.4beta3/src/nemesis-rip.h 2003-08-19 15:47:07.717192480 -0400
+--- a/src/nemesis-rip.h
++++ b/src/nemesis-rip.h
@@ -33 +33 @@
-#include <libnet.h>
+#include <libnet-1.0.h>
-diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-tcp.h nemesis-1.4beta3/src/nemesis-tcp.h
---- nemesis-1.4beta3.orig/src/nemesis-tcp.h 2003-08-19 15:45:45.678664232 -0400
-+++ nemesis-1.4beta3/src/nemesis-tcp.h 2003-08-19 15:47:07.723191568 -0400
+--- a/src/nemesis-tcp.h
++++ b/src/nemesis-tcp.h
@@ -30 +30 @@
-#include <libnet.h>
+#include <libnet-1.0.h>
-diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-udp.h nemesis-1.4beta3/src/nemesis-udp.h
---- nemesis-1.4beta3.orig/src/nemesis-udp.h 2003-08-19 15:45:45.678664232 -0400
-+++ nemesis-1.4beta3/src/nemesis-udp.h 2003-08-19 15:47:07.728190808 -0400
+--- a/src/nemesis-udp.h
++++ b/src/nemesis-udp.h
@@ -30 +30 @@
-#include <libnet.h>
+#include <libnet-1.0.h>
-diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis.h nemesis-1.4beta3/src/nemesis.h
---- nemesis-1.4beta3.orig/src/nemesis.h 2003-08-19 15:45:45.678664232 -0400
-+++ nemesis-1.4beta3/src/nemesis.h 2003-08-19 15:47:07.731190352 -0400
+--- a/src/nemesis.h
++++ b/src/nemesis.h
@@ -15 +15 @@
-#include <libnet.h>
+#include <libnet-1.0.h>
---- nemesis-1.4.orig/src/nemesis-printout.c 2006-12-15 13:56:46.000000000 -0700
-+++ nemesis-1.4/src/nemesis-printout.c 2006-12-15 14:47:14.000000000 -0700
+--- a/src/nemesis-printout.c
++++ b/src/nemesis-printout.c
@@ -34 +34 @@
-#include <libnet.h>
+#include <libnet-1.0.h>
diff --git a/net-misc/nemesis/files/nemesis-1.4-prototcp.patch b/net-misc/nemesis/files/nemesis-1.4-prototcp.patch
index 0e75a2e43c3..b4a4e7c7137 100644
--- a/net-misc/nemesis/files/nemesis-1.4-prototcp.patch
+++ b/net-misc/nemesis/files/nemesis-1.4-prototcp.patch
@@ -1,5 +1,5 @@
---- nemesis-1.4-orig/source/src/nemesis-proto_tcp.c Fri Oct 31 16:29:38 2003
-+++ nemesis-1.4/source/src/nemesis-proto_tcp.c Fri May 19 17:31:13 2006
+--- a/src/nemesis-proto_tcp.c
++++ b/src/nemesis-proto_tcp.c
@@ -16,7 +16,7 @@
FileData *ipod, FileData *tcpod, char *device)
{
diff --git a/net-misc/nemesis/nemesis-1.4-r1.ebuild b/net-misc/nemesis/nemesis-1.4-r1.ebuild
index 37cd943d341..6270cd16307 100644
--- a/net-misc/nemesis/nemesis-1.4-r1.ebuild
+++ b/net-misc/nemesis/nemesis-1.4-r1.ebuild
@@ -1,9 +1,8 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI="4"
-
-inherit eutils
+EAPI=6
+inherit autotools
DESCRIPTION="A commandline-based, portable human IP stack for UNIX/Linux"
HOMEPAGE="http://nemesis.sourceforge.net/"
@@ -12,16 +11,24 @@ SRC_URI="mirror://sourceforge/${PN}/${P/_}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~sparc ~x86"
-IUSE=""
-RDEPEND="net-libs/libpcap"
-DEPEND="${RDEPEND}
- =net-libs/libnet-1.0*"
+RDEPEND="
+ net-libs/libpcap
+"
+DEPEND="
+ ${RDEPEND}
+ =net-libs/libnet-1.0*
+"
DOCS="CREDITS ChangeLog README"
+PATCHES=(
+ "${FILESDIR}"/${P}-fileio.patch
+ "${FILESDIR}"/${P}-libnet-1.0.patch
+ "${FILESDIR}"/${P}-prototcp.patch
+)
+
src_prepare() {
- epatch "${FILESDIR}"/${P}-fileio.patch
- epatch "${FILESDIR}"/${P}-libnet-1.0.patch
- epatch "${FILESDIR}"/${P}-prototcp.patch
+ default
+ eautoreconf
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/nemesis/, net-misc/nemesis/files/
@ 2020-01-31 15:28 Jeroen Roovers
0 siblings, 0 replies; 4+ messages in thread
From: Jeroen Roovers @ 2020-01-31 15:28 UTC (permalink / raw
To: gentoo-commits
commit: 24a56226228d802b32fe2f383dcb4301a447b41f
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 31 15:27:53 2020 +0000
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Fri Jan 31 15:28:18 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24a56226
net-misc/nemesis: Fix CFLAGS=-fno-common
Package-Manager: Portage-2.3.86, Repoman-2.3.20
Closes: https://bugs.gentoo.org/show_bug.cgi?id=707292
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
.../nemesis/files/nemesis-1.4-fno-common.patch | 150 +++++++++++++++++++++
net-misc/nemesis/nemesis-1.4-r2.ebuild | 36 +++++
2 files changed, 186 insertions(+)
diff --git a/net-misc/nemesis/files/nemesis-1.4-fno-common.patch b/net-misc/nemesis/files/nemesis-1.4-fno-common.patch
new file mode 100644
index 00000000000..068fef61b6e
--- /dev/null
+++ b/net-misc/nemesis/files/nemesis-1.4-fno-common.patch
@@ -0,0 +1,150 @@
+--- a/src/nemesis.c
++++ b/src/nemesis.c
+@@ -12,6 +12,8 @@
+ #include <string.h>
+ #include "nemesis.h"
+
++int mode; /* injection mode */
++
+ int main(int argc, char **argv)
+ {
+ char **avtmp, *avval;
+--- a/src/nemesis-dns.c
++++ b/src/nemesis-dns.c
+@@ -37,6 +37,8 @@
+ static void dns_validatedata(void);
+ static void dns_verbose(void);
+
++int state; /* default to UDP */
++
+ void nemesis_dns(int argc, char **argv)
+ {
+ const char *module = "DNS Packet Injection";
+--- a/src/nemesis-dns.h
++++ b/src/nemesis-dns.h
+@@ -32,7 +32,7 @@
+ #include <libnet-1.0.h>
+ #include "nemesis.h"
+
+-int state; /* default to UDP */
++extern int state; /* default to UDP */
+
+ int builddns(ETHERhdr *, IPhdr *, TCPhdr *, UDPhdr *, DNShdr *, FileData *,
+ FileData *, FileData *, char *);
+--- a/src/nemesis.h
++++ b/src/nemesis.h
+@@ -122,6 +122,8 @@
+ extern int got_ipoptions;
+ extern int got_tcpoptions;
+
++extern int mode; /* injection mode */
++
+ typedef struct _FileData
+ {
+ int32_t file_s; /* file size */
+--- a/src/nemesis-icmp.c
++++ b/src/nemesis-icmp.c
+@@ -38,6 +38,8 @@
+ static void icmp_validatedata(void);
+ static void icmp_verbose(void);
+
++int got_origoptions;
++
+ void nemesis_icmp(int argc, char **argv)
+ {
+ const char *module = "ICMP Packet Injection";
+--- a/src/nemesis-icmp.h
++++ b/src/nemesis-icmp.h
+@@ -42,8 +42,7 @@
+ #include <libnet-1.0.h>
+ #include "nemesis.h"
+
+-int mode; /* ICMP injection mode */
+-int got_origoptions;
++extern int got_origoptions;
+
+ int buildicmp(ETHERhdr *, IPhdr *, ICMPhdr *, IPhdr *, FileData *, FileData *,
+ FileData *, char *);
+--- a/src/nemesis-ospf.c
++++ b/src/nemesis-ospf.c
+@@ -15,6 +15,37 @@
+ #include <pcap.h>
+ #endif
+
++u_short id, /* IP id */
++ frag, /* frag shit */
++ mtusize, /* Max dgram length (DBD) */
++ num, /* LSA_RTR num */
++ interval, /* secs since last pkt sent */
++ rtr_flags, /* LSA_RTR flags */
++ metric, /* OSPF metric */
++ ospf_age; /* OSPF advertisement age */
++
++u_long source, /* source address */
++ dest, /* destination address */
++ neighbor, /* neighbor router */
++ as_fwd, /* AS_EXT forward address */
++ addrid, /* advertising router id */
++ addaid, /* advertising area id */
++ router, /* advertising router */
++ auth[2], /* authentication type */
++ mask; /* subnet mask (icmp_mask) */
++
++u_char priority, /* OSPF priority */
++ exchange, /* DBD exchange type */
++ rtrtype, /* LSA_RTR type */
++ ooptions; /* OSPF options */
++
++u_int dead_int, /* dead router interval in secs */
++ as_tag, /* AS_EXT tag */
++ seqnum, /* seqnum for LSA */
++ bcastnum, /* num of LSAs to bcast (LSU) */
++ rtrdata, /* LSA_RTR router data */
++ rtrid; /* router id for LSA */
++
+ static ETHERhdr etherhdr;
+ static IPhdr iphdr;
+ static OSPFhdr ospfhdr;
+--- a/src/nemesis-ospf.h
++++ b/src/nemesis-ospf.h
+@@ -35,7 +35,7 @@
+ #include <libnet-1.0.h>
+ #include "nemesis.h"
+
+-u_short id, /* IP id */
++extern u_short id, /* IP id */
+ frag, /* frag shit */
+ mtusize, /* Max dgram length (DBD) */
+ num, /* LSA_RTR num */
+@@ -44,7 +44,7 @@
+ metric, /* OSPF metric */
+ ospf_age; /* OSPF advertisement age */
+
+-u_long source, /* source address */
++extern u_long source, /* source address */
+ dest, /* destination address */
+ neighbor, /* neighbor router */
+ as_fwd, /* AS_EXT forward address */
+@@ -54,20 +54,18 @@
+ auth[2], /* authentication type */
+ mask; /* subnet mask (icmp_mask) */
+
+-u_char priority, /* OSPF priority */
++extern u_char priority, /* OSPF priority */
+ exchange, /* DBD exchange type */
+ rtrtype, /* LSA_RTR type */
+ ooptions; /* OSPF options */
+
+-u_int dead_int, /* dead router interval in secs */
++extern u_int dead_int, /* dead router interval in secs */
+ as_tag, /* AS_EXT tag */
+ seqnum, /* seqnum for LSA */
+ bcastnum, /* num of LSAs to bcast (LSU) */
+ rtrdata, /* LSA_RTR router data */
+ rtrid; /* router id for LSA */
+
+-int mode; /* OSPF injection mode */
+-
+ int buildospf(ETHERhdr *, IPhdr *, FileData *, FileData *, char *);
+
+ #endif /* __NEMESIS_OSPF_H__ */
diff --git a/net-misc/nemesis/nemesis-1.4-r2.ebuild b/net-misc/nemesis/nemesis-1.4-r2.ebuild
new file mode 100644
index 00000000000..e7b2e7d1891
--- /dev/null
+++ b/net-misc/nemesis/nemesis-1.4-r2.ebuild
@@ -0,0 +1,36 @@
+# 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="http://nemesis.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P/_}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~sparc ~x86"
+
+RDEPEND="
+ net-libs/libpcap
+"
+DEPEND="
+ ${RDEPEND}
+ =net-libs/libnet-1.0*
+"
+
+DOCS="CREDITS ChangeLog README"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fileio.patch
+ "${FILESDIR}"/${P}-libnet-1.0.patch
+ "${FILESDIR}"/${P}-prototcp.patch
+)
+
+src_prepare() {
+ default
+for i in src/*.[ch]; do cp -av $i $i.orig || die; done
+ eapply "${FILESDIR}"/${P}-fno-common.patch
+ eautoreconf
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/nemesis/, net-misc/nemesis/files/
@ 2020-09-25 16:03 Jeroen Roovers
0 siblings, 0 replies; 4+ messages in thread
From: Jeroen Roovers @ 2020-09-25 16:03 UTC (permalink / raw
To: gentoo-commits
commit: 31829e0c487e47b3a0499780f3b511a616b63d1c
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 25 16:02:50 2020 +0000
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Fri Sep 25 16:03:00 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31829e0c
net-misc/nemesis: Version 1.7
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
net-misc/nemesis/Manifest | 1 +
.../nemesis/files/nemesis-1.7-fno-common.patch | 86 ++++++++++++++++++++++
net-misc/nemesis/nemesis-1.4-r2.ebuild | 8 +-
.../{nemesis-1.4-r2.ebuild => nemesis-1.7.ebuild} | 13 +---
4 files changed, 95 insertions(+), 13 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.4-r2.ebuild b/net-misc/nemesis/nemesis-1.7.ebuild
similarity index 59%
copy from net-misc/nemesis/nemesis-1.4-r2.ebuild
copy to net-misc/nemesis/nemesis-1.7.ebuild
index 12ed858e34a..5dce3d23490 100644
--- a/net-misc/nemesis/nemesis-1.4-r2.ebuild
+++ b/net-misc/nemesis/nemesis-1.7.ebuild
@@ -5,8 +5,8 @@ EAPI=7
inherit autotools
DESCRIPTION="A commandline-based, portable human IP stack for UNIX/Linux"
-HOMEPAGE="http://nemesis.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P/_}.tar.gz"
+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"
@@ -19,14 +19,9 @@ DEPEND="
${RDEPEND}
=net-libs/libnet-1.0*
"
-
-DOCS="CREDITS ChangeLog README"
-
+DOCS="ChangeLog.md docs/CONTRIBUTING.md docs/CREDITS README.md"
PATCHES=(
- "${FILESDIR}"/${P}-fileio.patch
- "${FILESDIR}"/${P}-libnet-1.0.patch
- "${FILESDIR}"/${P}-prototcp.patch
- "${FILESDIR}"/${P}-fno-common.patch
+ "${FILESDIR}"/${PN}-1.7-fno-common.patch
)
src_prepare() {
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/nemesis/, net-misc/nemesis/files/
@ 2021-01-18 11:36 David Seifert
0 siblings, 0 replies; 4+ messages in thread
From: David Seifert @ 2021-01-18 11:36 UTC (permalink / raw
To: gentoo-commits
commit: 22ece324ea24ebe3b22ee63b8e0c75eb85db1d41
Author: Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
AuthorDate: Mon Jan 18 11:36:03 2021 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Mon Jan 18 11:36:03 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22ece324
net-misc/nemesis: Remove old
Bug: https://bugs.gentoo.org/763930
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
Signed-off-by: David Seifert <soap <AT> gentoo.org>
net-misc/nemesis/Manifest | 1 -
net-misc/nemesis/files/nemesis-1.4-fileio.patch | 37 -----
.../nemesis/files/nemesis-1.4-fno-common.patch | 150 -------------------
.../nemesis/files/nemesis-1.4-libnet-1.0.patch | 158 ---------------------
net-misc/nemesis/files/nemesis-1.4-prototcp.patch | 33 -----
net-misc/nemesis/nemesis-1.4-r1.ebuild | 34 -----
net-misc/nemesis/nemesis-1.4-r2.ebuild | 35 -----
7 files changed, 448 deletions(-)
diff --git a/net-misc/nemesis/Manifest b/net-misc/nemesis/Manifest
index a2667476693..ed93deb0fd1 100644
--- a/net-misc/nemesis/Manifest
+++ b/net-misc/nemesis/Manifest
@@ -1,2 +1 @@
-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.4-fileio.patch b/net-misc/nemesis/files/nemesis-1.4-fileio.patch
deleted file mode 100644
index d39cef3d650..00000000000
--- a/net-misc/nemesis/files/nemesis-1.4-fileio.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- a/src/nemesis-fileio.c
-+++ b/src/nemesis-fileio.c
-@@ -63,7 +63,7 @@
- fp = stdin;
- fd = fileno(fp);
- }
-- else if ((fd = open(file, O_RDONLY)) < 0)
-+ else if ((fp = fopen(file, "rb")) < 0)
- {
- #if !defined(WIN32)
- fprintf(stderr, "ERROR: Unable to open %s file: %s. %s\n",
-@@ -82,8 +82,12 @@
- return -1;
- }
-
-+#ifdef DEBUG
-+ printf("DEBUG: trying to read max %u bytes from %s\n", maxsize, file);
-+#endif
-+
- /* read() can return negative values on successful reads, test for -1 */
-- if ((bytesread = read(fd, (void *)memory, maxsize)) == -1)
-+ if ((bytesread = fread((void *)memory, 1, maxsize, fp)) == -1)
- {
- #if !defined(WIN32)
- fprintf(stderr, "ERROR: Unable to read %s file: %s. %s\n",
-@@ -106,6 +110,11 @@
- if (strncmp(file, "-", 1))
- close(fd);
- }
-+
-+#ifdef DEBUG
-+ printf("DEBUG: bytes read from %s: %u.\n", file, bytesread);
-+#endif
-+
- return bytesread;
- }
-
diff --git a/net-misc/nemesis/files/nemesis-1.4-fno-common.patch b/net-misc/nemesis/files/nemesis-1.4-fno-common.patch
deleted file mode 100644
index 068fef61b6e..00000000000
--- a/net-misc/nemesis/files/nemesis-1.4-fno-common.patch
+++ /dev/null
@@ -1,150 +0,0 @@
---- a/src/nemesis.c
-+++ b/src/nemesis.c
-@@ -12,6 +12,8 @@
- #include <string.h>
- #include "nemesis.h"
-
-+int mode; /* injection mode */
-+
- int main(int argc, char **argv)
- {
- char **avtmp, *avval;
---- a/src/nemesis-dns.c
-+++ b/src/nemesis-dns.c
-@@ -37,6 +37,8 @@
- static void dns_validatedata(void);
- static void dns_verbose(void);
-
-+int state; /* default to UDP */
-+
- void nemesis_dns(int argc, char **argv)
- {
- const char *module = "DNS Packet Injection";
---- a/src/nemesis-dns.h
-+++ b/src/nemesis-dns.h
-@@ -32,7 +32,7 @@
- #include <libnet-1.0.h>
- #include "nemesis.h"
-
--int state; /* default to UDP */
-+extern int state; /* default to UDP */
-
- int builddns(ETHERhdr *, IPhdr *, TCPhdr *, UDPhdr *, DNShdr *, FileData *,
- FileData *, FileData *, char *);
---- a/src/nemesis.h
-+++ b/src/nemesis.h
-@@ -122,6 +122,8 @@
- extern int got_ipoptions;
- extern int got_tcpoptions;
-
-+extern int mode; /* injection mode */
-+
- typedef struct _FileData
- {
- int32_t file_s; /* file size */
---- a/src/nemesis-icmp.c
-+++ b/src/nemesis-icmp.c
-@@ -38,6 +38,8 @@
- static void icmp_validatedata(void);
- static void icmp_verbose(void);
-
-+int got_origoptions;
-+
- void nemesis_icmp(int argc, char **argv)
- {
- const char *module = "ICMP Packet Injection";
---- a/src/nemesis-icmp.h
-+++ b/src/nemesis-icmp.h
-@@ -42,8 +42,7 @@
- #include <libnet-1.0.h>
- #include "nemesis.h"
-
--int mode; /* ICMP injection mode */
--int got_origoptions;
-+extern int got_origoptions;
-
- int buildicmp(ETHERhdr *, IPhdr *, ICMPhdr *, IPhdr *, FileData *, FileData *,
- FileData *, char *);
---- a/src/nemesis-ospf.c
-+++ b/src/nemesis-ospf.c
-@@ -15,6 +15,37 @@
- #include <pcap.h>
- #endif
-
-+u_short id, /* IP id */
-+ frag, /* frag shit */
-+ mtusize, /* Max dgram length (DBD) */
-+ num, /* LSA_RTR num */
-+ interval, /* secs since last pkt sent */
-+ rtr_flags, /* LSA_RTR flags */
-+ metric, /* OSPF metric */
-+ ospf_age; /* OSPF advertisement age */
-+
-+u_long source, /* source address */
-+ dest, /* destination address */
-+ neighbor, /* neighbor router */
-+ as_fwd, /* AS_EXT forward address */
-+ addrid, /* advertising router id */
-+ addaid, /* advertising area id */
-+ router, /* advertising router */
-+ auth[2], /* authentication type */
-+ mask; /* subnet mask (icmp_mask) */
-+
-+u_char priority, /* OSPF priority */
-+ exchange, /* DBD exchange type */
-+ rtrtype, /* LSA_RTR type */
-+ ooptions; /* OSPF options */
-+
-+u_int dead_int, /* dead router interval in secs */
-+ as_tag, /* AS_EXT tag */
-+ seqnum, /* seqnum for LSA */
-+ bcastnum, /* num of LSAs to bcast (LSU) */
-+ rtrdata, /* LSA_RTR router data */
-+ rtrid; /* router id for LSA */
-+
- static ETHERhdr etherhdr;
- static IPhdr iphdr;
- static OSPFhdr ospfhdr;
---- a/src/nemesis-ospf.h
-+++ b/src/nemesis-ospf.h
-@@ -35,7 +35,7 @@
- #include <libnet-1.0.h>
- #include "nemesis.h"
-
--u_short id, /* IP id */
-+extern u_short id, /* IP id */
- frag, /* frag shit */
- mtusize, /* Max dgram length (DBD) */
- num, /* LSA_RTR num */
-@@ -44,7 +44,7 @@
- metric, /* OSPF metric */
- ospf_age; /* OSPF advertisement age */
-
--u_long source, /* source address */
-+extern u_long source, /* source address */
- dest, /* destination address */
- neighbor, /* neighbor router */
- as_fwd, /* AS_EXT forward address */
-@@ -54,20 +54,18 @@
- auth[2], /* authentication type */
- mask; /* subnet mask (icmp_mask) */
-
--u_char priority, /* OSPF priority */
-+extern u_char priority, /* OSPF priority */
- exchange, /* DBD exchange type */
- rtrtype, /* LSA_RTR type */
- ooptions; /* OSPF options */
-
--u_int dead_int, /* dead router interval in secs */
-+extern u_int dead_int, /* dead router interval in secs */
- as_tag, /* AS_EXT tag */
- seqnum, /* seqnum for LSA */
- bcastnum, /* num of LSAs to bcast (LSU) */
- rtrdata, /* LSA_RTR router data */
- rtrid; /* router id for LSA */
-
--int mode; /* OSPF injection mode */
--
- int buildospf(ETHERhdr *, IPhdr *, FileData *, FileData *, char *);
-
- #endif /* __NEMESIS_OSPF_H__ */
diff --git a/net-misc/nemesis/files/nemesis-1.4-libnet-1.0.patch b/net-misc/nemesis/files/nemesis-1.4-libnet-1.0.patch
deleted file mode 100644
index a5a0a83d54a..00000000000
--- a/net-misc/nemesis/files/nemesis-1.4-libnet-1.0.patch
+++ /dev/null
@@ -1,158 +0,0 @@
---- a/configure.in
-+++ b/configure.in
-@@ -128,22 +128,21 @@
- dnl LIBS="${LIBS} -L${with_libpcap_libraries}"
- dnl fi
-
--CPPFLAGS="${CPPFLAGS} `libnet-config --defines`"
--CFLAGS="${CFLAGS} -funroll-loops -pipe"
-+CPPFLAGS="${CPPFLAGS} `libnet-1.0-config --defines`"
-
--if test `libnet-config --cflags | wc -c` = "1"; then
-+if test `libnet-1.0-config --cflags | wc -c` = "1"; then
- CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/sw/include"
- LIBNET_CONFIG_BROKEN_CFLAGS=yes
- else
-- CPPFLAGS="${CPPFLAGS} `libnet-config --cflags`"
-+ CPPFLAGS="${CPPFLAGS} `libnet-1.0-config --cflags`"
- fi
-
--if test `libnet-config --libs | wc -c` = "1"; then
-- AC_MSG_WARN(libnet-config --libs is broken on your system. If you)
-+if test `libnet-1.0-config --libs | wc -c` = "1"; then
-+ AC_MSG_WARN(libnet-1.0-config --libs is broken on your system. If you)
- AC_MSG_WARN(are using a precompiled package please notify the maintainer.)
- LIBS="${LIBS} -L/usr/local/lib -L/sw/lib"
- else
-- LIBS="${LIBS} `libnet-config --libs | sed s/\-lnet//`"
-+ LIBS="${LIBS} `libnet-1.0-config --libs`"
- fi
-
- AC_DEFUN(HEADER_FAIL_MESSAGE,[
-@@ -185,7 +184,7 @@
- AC_CHECK_LIB(resolv, hstrerror)
-
- LNET=""
--AC_CHECK_LIB(net, libnet_build_ip,, LNET="no")
-+AC_CHECK_LIB(net-1.0, libnet_build_ip,, LNET="no")
-
- if test "$LNET" = "no"; then
- echo
-@@ -193,7 +192,7 @@
- echo " http://www.packetfactory.net/projects/libnet/"
- echo " or use the --with-libnet-* options, if you have it installed"
- echo " in unusual place"
-- exit
-+ exit 1
- fi
-
- dnl if test "$enable_pcapoutput" != "no" -a "$enable_pcapoutput" = "yes"; then
-@@ -216,7 +215,7 @@
- AC_CHECK_HEADERS(unistd.h errno.h strings.h netdb.h limits.h machine/endian.h sys/time.h sys/param.h arpa/inet.h netinet/in.h)
-
- LNET=""
--AC_CHECK_HEADERS(libnet.h,, LNET="no")
-+AC_CHECK_HEADERS(libnet-1.0.h,, LNET="no")
-
- if test "$LNET" = "no"; then
- echo
-@@ -235,29 +234,29 @@
- libnet_dir="/usr/include /usr/local/include /sw/include"
- fi
- else
-- libnet_dir=`libnet-config --cflags | cut -dI -f2`
-+ libnet_dir=`libnet-1.0-config --cflags | cut -dI -f2`
- fi
-
- LIBNET_INC_DIR=""
- for i in $libnet_dir; do
-- if test -r $i/libnet.h; then
-+ if test -r $i/libnet-1.0.h; then
- LIBNET_INC_DIR=$i
- fi
- done
-
- if test "$LIBNET_INC_DIR" != ""; then
-- if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet.h | grep -v 1.0.2a >/dev/null"; then
-+ if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet-1.0.h | grep -v 1.0.2a >/dev/null"; then
- AC_MSG_RESULT(no)
- echo
- echo " ERROR! Nemesis will *only* work with libnet version 1.0.2a,"
- echo " go get it from"
- echo " http://www.packetfactory.net/projects/libnet/"
-- HEADER_FAIL_MESSAGE("libnet 1.0.2a (libnet.h)", $LIBNET_INC_DIR)
-+ HEADER_FAIL_MESSAGE("libnet 1.0.2a (libnet-1.0.h)", $LIBNET_INC_DIR)
- fi
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
-- HEADER_FAIL_MESSAGE("libnet 1.0.2a (libnet.h)", $libnet_dir)
-+ HEADER_FAIL_MESSAGE("libnet 1.0.2a (libnet-1.0.h)", $libnet_dir)
- fi
-
- dnl if test "$enable_pcapoutput" != "no" -a "$enable_pcapoutput" = "yes"; then
---- a/src/nemesis-arp.h
-+++ b/src/nemesis-arp.h
-@@ -30 +30 @@
--#include <libnet.h>
-+#include <libnet-1.0.h>
---- a/src/nemesis-dns.h
-+++ b/src/nemesis-dns.h
-@@ -30 +30 @@
--#include <libnet.h>
-+#include <libnet-1.0.h>
---- a/src/nemesis-ethernet.h
-+++ b/src/nemesis-ethernet.h
-@@ -29 +29 @@
--#include <libnet.h>
-+#include <libnet-1.0.h>
---- a/src/nemesis-functions.c
-+++ b/src/nemesis-functions.c
-@@ -37 +37 @@
--#include <libnet.h>
-+#include <libnet-1.0.h>
---- a/src/nemesis-icmp.h
-+++ b/src/nemesis-icmp.h
-@@ -31 +31 @@
--#include <libnet.h>
-+#include <libnet-1.0.h>
---- a/src/nemesis-igmp.h
-+++ b/src/nemesis-igmp.h
-@@ -30 +30 @@
--#include <libnet.h>
-+#include <libnet-1.0.h>
---- a/src/nemesis-ip.h
-+++ b/src/nemesis-ip.h
-@@ -26 +26 @@
--#include <libnet.h>
-+#include <libnet-1.0.h>
---- a/src/nemesis-ospf.h
-+++ b/src/nemesis-ospf.h
-@@ -33 +33 @@
--#include <libnet.h>
-+#include <libnet-1.0.h>
---- a/src/nemesis-rip.h
-+++ b/src/nemesis-rip.h
-@@ -33 +33 @@
--#include <libnet.h>
-+#include <libnet-1.0.h>
---- a/src/nemesis-tcp.h
-+++ b/src/nemesis-tcp.h
-@@ -30 +30 @@
--#include <libnet.h>
-+#include <libnet-1.0.h>
---- a/src/nemesis-udp.h
-+++ b/src/nemesis-udp.h
-@@ -30 +30 @@
--#include <libnet.h>
-+#include <libnet-1.0.h>
---- a/src/nemesis.h
-+++ b/src/nemesis.h
-@@ -15 +15 @@
--#include <libnet.h>
-+#include <libnet-1.0.h>
---- a/src/nemesis-printout.c
-+++ b/src/nemesis-printout.c
-@@ -34 +34 @@
--#include <libnet.h>
-+#include <libnet-1.0.h>
diff --git a/net-misc/nemesis/files/nemesis-1.4-prototcp.patch b/net-misc/nemesis/files/nemesis-1.4-prototcp.patch
deleted file mode 100644
index b4a4e7c7137..00000000000
--- a/net-misc/nemesis/files/nemesis-1.4-prototcp.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- a/src/nemesis-proto_tcp.c
-+++ b/src/nemesis-proto_tcp.c
-@@ -16,7 +16,7 @@
- FileData *ipod, FileData *tcpod, char *device)
- {
- int n;
-- u_int32_t tcp_packetlen = 0, tcp_meta_packetlen = 0;
-+ u_int32_t tcp_packetlen = 0, tcp_meta_packetlen = 0, tcp_headerlen = 0, ip_headerlen = 0;
- static u_int8_t *pkt;
- static int sockfd = -1;
- struct libnet_link_int *l2 = NULL;
-@@ -58,13 +58,20 @@
- #endif
- }
-
-+ ip_headerlen = LIBNET_IP_H + ipod->file_s;
-+ tcp_headerlen = LIBNET_TCP_H + tcpod->file_s;
-+
- tcp_packetlen = link_offset + LIBNET_IP_H + LIBNET_TCP_H + pd->file_s +
- ipod->file_s + tcpod->file_s;
-
-- tcp_meta_packetlen = tcp_packetlen - (link_offset + LIBNET_IP_H);
-+ tcp_meta_packetlen = LIBNET_TCP_H + pd->file_s;
-
- #ifdef DEBUG
-+ printf("DEBUG: link offsetlength %u.\n", link_offset);
-+ printf("DEBUG: IP header length %u.\n", ip_headerlen);
-+ printf("DEBUG: TCP header length %u.\n", tcp_headerlen);
- printf("DEBUG: TCP packet length %u.\n", tcp_packetlen);
-+ printf("DEBUG: TCP meta length %u.\n", tcp_meta_packetlen);
- printf("DEBUG: IP options size %u.\n", ipod->file_s);
- printf("DEBUG: TCP options size %u.\n", tcpod->file_s);
- printf("DEBUG: TCP payload size %u.\n", pd->file_s);
diff --git a/net-misc/nemesis/nemesis-1.4-r1.ebuild b/net-misc/nemesis/nemesis-1.4-r1.ebuild
deleted file mode 100644
index 5df00db4a5b..00000000000
--- a/net-misc/nemesis/nemesis-1.4-r1.ebuild
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit autotools
-
-DESCRIPTION="A commandline-based, portable human IP stack for UNIX/Linux"
-HOMEPAGE="http://nemesis.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P/_}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~alpha amd64 sparc x86"
-
-RDEPEND="
- net-libs/libpcap
-"
-DEPEND="
- ${RDEPEND}
- =net-libs/libnet-1.0*
-"
-
-DOCS="CREDITS ChangeLog README"
-
-PATCHES=(
- "${FILESDIR}"/${P}-fileio.patch
- "${FILESDIR}"/${P}-libnet-1.0.patch
- "${FILESDIR}"/${P}-prototcp.patch
-)
-
-src_prepare() {
- default
- eautoreconf
-}
diff --git a/net-misc/nemesis/nemesis-1.4-r2.ebuild b/net-misc/nemesis/nemesis-1.4-r2.ebuild
deleted file mode 100644
index 0d74247451f..00000000000
--- a/net-misc/nemesis/nemesis-1.4-r2.ebuild
+++ /dev/null
@@ -1,35 +0,0 @@
-# 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="http://nemesis.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P/_}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~sparc ~x86"
-
-RDEPEND="
- net-libs/libpcap
-"
-DEPEND="
- ${RDEPEND}
- =net-libs/libnet-1.0*
-"
-
-DOCS="CREDITS ChangeLog README"
-
-PATCHES=(
- "${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() {
- default
- eautoreconf
-}
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-18 11:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-31 15:28 [gentoo-commits] repo/gentoo:master commit in: net-misc/nemesis/, net-misc/nemesis/files/ Jeroen Roovers
-- strict thread matches above, loose matches on Subject: below --
2021-01-18 11:36 David Seifert
2020-09-25 16:03 Jeroen Roovers
2018-06-21 8:32 Jeroen Roovers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox