summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakov Smolic <jakov.smolic@sartura.hr>2021-01-18 12:36:03 +0100
committerDavid Seifert <soap@gentoo.org>2021-01-18 12:36:03 +0100
commit22ece324ea24ebe3b22ee63b8e0c75eb85db1d41 (patch)
treeeaa96a2fbba32eba6fa0321ff4dff0f873dfa3e3 /net-misc/nemesis/files
parentnet-mail/mlmmj: Remove old (diff)
downloadgentoo-22ece324ea24ebe3b22ee63b8e0c75eb85db1d41.tar.gz
gentoo-22ece324ea24ebe3b22ee63b8e0c75eb85db1d41.tar.bz2
gentoo-22ece324ea24ebe3b22ee63b8e0c75eb85db1d41.zip
net-misc/nemesis: Remove old
Bug: https://bugs.gentoo.org/763930 Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr> Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'net-misc/nemesis/files')
-rw-r--r--net-misc/nemesis/files/nemesis-1.4-fileio.patch37
-rw-r--r--net-misc/nemesis/files/nemesis-1.4-fno-common.patch150
-rw-r--r--net-misc/nemesis/files/nemesis-1.4-libnet-1.0.patch158
-rw-r--r--net-misc/nemesis/files/nemesis-1.4-prototcp.patch33
4 files changed, 0 insertions, 378 deletions
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 d39cef3d6508..000000000000
--- 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 068fef61b6e4..000000000000
--- 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 a5a0a83d54a0..000000000000
--- 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 b4a4e7c71378..000000000000
--- 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);