summaryrefslogtreecommitdiff
path: root/net-analyzer/sniffit/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-analyzer/sniffit/files
reinit the tree, so we can have metadata
Diffstat (limited to 'net-analyzer/sniffit/files')
-rw-r--r--net-analyzer/sniffit/files/sniffit-0.3.7-gentoo.patch31
-rw-r--r--net-analyzer/sniffit/files/sniffit-0.3.7-misc.patch120
-rw-r--r--net-analyzer/sniffit/files/sniffit-0.3.7-tinfo.patch38
3 files changed, 189 insertions, 0 deletions
diff --git a/net-analyzer/sniffit/files/sniffit-0.3.7-gentoo.patch b/net-analyzer/sniffit/files/sniffit-0.3.7-gentoo.patch
new file mode 100644
index 000000000000..c226b6f00d45
--- /dev/null
+++ b/net-analyzer/sniffit/files/sniffit-0.3.7-gentoo.patch
@@ -0,0 +1,31 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -10,13 +10,13 @@
+ LIBS = @LIBS@
+ DEFS = @DEFS@
+ OS_OPT = @OS_OPT@
+-OBJ_FLAG = -w -O2 -c
+-OBJ_OPT = -I./libpcap -L./libpcap
+-EXE_FLAG = -w -O2 -o sniffit
+-EXE_OPT = -I./libpcap -L./libpcap -lpcap
++OBJ_FLAG = $(CFLAGS) -c
++OBJ_OPT = -I/usr/include/pcap -L/usr/lib
++EXE_FLAG = $(CFLAGS) $(LDFLAGS) -o sniffit
++EXE_OPT = -I/usr/include/pcap -lpcap
+ EXE_OBJ = sn_packets.o sn_generation.o sn_interface.o sn_cfgfile.o \
+ sn_logfile.o sn_resolv.o
+-DEP_FILES = sn_config.h ./libpcap/pcap.h sn_data.h sn_defines.h sn_plugins.h \
++DEP_FILES = sn_config.h sn_data.h sn_defines.h sn_plugins.h \
+ sn_analyse.c sn_conn_desc.c \
+ sn_packets.o \
+ sn_generation.o sn_interface.o sn_cfgfile.o sn_logfile.o \
+@@ -26,9 +26,7 @@
+ @echo "Succesfull compilation..."
+
+ sniffit: $(SNIFFIT) $(DEP_FILES)
+- cd libpcap; make; cd ..
+ $(CC) $(EXE_FLAG) $(SNIFFIT) $(EXE_OBJ) $(EXE_OPT) $(LIBS) $(DEFS) $(OS_OPT)
+- strip sniffit
+
+ sn_cfgfile.o: sn_cfgfile.h sn_cfgfile.c sn_defines.h sn_structs.h sn_config.h
+ $(CC) $(OBJ_FLAG) sn_cfgfile.c $(OBJ_OPT) $(DEFS)
diff --git a/net-analyzer/sniffit/files/sniffit-0.3.7-misc.patch b/net-analyzer/sniffit/files/sniffit-0.3.7-misc.patch
new file mode 100644
index 000000000000..ff84cd7d2259
--- /dev/null
+++ b/net-analyzer/sniffit/files/sniffit-0.3.7-misc.patch
@@ -0,0 +1,120 @@
+--- a/sn_cfgfile.h
++++ b/sn_cfgfile.h
+@@ -10,3 +10,4 @@
+ void make_nr_dot (char *);
+ void interprete_line (char *);
+ void read_cfg_file (char *);
++char *strlower (char *);
+--- a/sn_structs.h
++++ b/sn_structs.h
+@@ -67,7 +67,7 @@
+ struct snif_mask /* struct for mask */
+ {
+ _32_bit source_ip, destination_ip;
+- _32_bit short source_port, destination_port;
++ _32_bit source_port, destination_port;
+ };
+
+ /* (packet generation) */
+--- a/sn_analyse.c
++++ b/sn_analyse.c
+@@ -1,6 +1,9 @@
+ /* Analyse traffic for logging mode */
+ /* - by: Brecht Claerhout */
+
++#include <stdlib.h>
++#include <string.h>
++
+ const unsigned char *data;
+ memcpy(&tcphead,header,sizeof(struct TCP_header));
+
+--- a/sn_cfgfile.c
++++ b/sn_cfgfile.c
+@@ -3,6 +3,11 @@
+ /* - improvements: Shudoh Kazuyuki */
+
+ #include <stdio.h>
++#include <stdlib.h>
++#include "sn_interface.h"
++#include <string.h>
++#include <ctype.h>
++#include <time.h>
+ #include <netdb.h> /* for getservbyname() */
+
+ #include "sn_config.h"
+--- a/sn_conn_desc.c
++++ b/sn_conn_desc.c
+@@ -1,6 +1,8 @@
+ /* Connection description detection file */
+ /* - by: Brecht Claerhout */
+
++#include <ctype.h>
++#include <string.h>
+
+ /* Simple PORT BASED detection */
+
+--- a/sn_generation.c
++++ b/sn_generation.c
+@@ -6,12 +6,16 @@
+ #ifdef INCLUDE_INTERFACE
+ #ifdef GENERATION
+ #include <unistd.h>
++#include <stdlib.h>
++#include <string.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include "sn_curses.h"
+ #include "sn_defines.h"
+ #include "sn_structs.h"
+ #include "sn_generation.h"
++#include "sn_interface.h" /* input_field() */
++#include "sn_packets.h" /* in_cksum() */
+
+ extern volatile int screen_busy;
+
+--- a/sniffit.0.3.7.c
++++ b/sniffit.0.3.7.c
+@@ -4,6 +4,9 @@
+ #include "sn_config.h" /* Config header file */
+
+ #include <unistd.h>
++#include <stdlib.h>
++#include <string.h>
++#include <ctype.h>
+ #include <signal.h>
+ #include <stdio.h>
+ #include <fcntl.h>
+--- a/sn_interface.c
++++ b/sn_interface.c
+@@ -6,6 +6,9 @@
+ #ifdef INCLUDE_INTERFACE
+ #include <signal.h>
+ #include <unistd.h>
++#include <stdlib.h>
++#include <string.h>
++#include <ctype.h>
+ #include <sys/ipc.h>
+ #include <sys/shm.h>
+ #include "sn_curses.h"
+--- a/sn_logfile.c
++++ b/sn_logfile.c
+@@ -4,6 +4,9 @@
+ #include "sn_config.h"
+
+ #include <stdio.h>
++#include <stdlib.h> /* exit() */
++#include <string.h> /* strcpy() */
++#include <time.h> /* time() ctime() */
+ #include <sys/stat.h>
+ #include <sys/time.h>
+ #include "sn_defines.h"
+--- a/sn_packets.c
++++ b/sn_packets.c
+@@ -5,6 +5,7 @@
+ #include "sn_defines.h"
+ #include "sn_structs.h"
+ #include <netinet/in.h>
++#include <string.h> /* memcpy() strcpy() */
+
+ extern int PROTO_HEAD;
+ extern char NO_CHKSUM;
diff --git a/net-analyzer/sniffit/files/sniffit-0.3.7-tinfo.patch b/net-analyzer/sniffit/files/sniffit-0.3.7-tinfo.patch
new file mode 100644
index 000000000000..b82835049687
--- /dev/null
+++ b/net-analyzer/sniffit/files/sniffit-0.3.7-tinfo.patch
@@ -0,0 +1,38 @@
+--- a/configure.in
++++ b/configure.in
+@@ -5,30 +5,15 @@
+
+ AC_INIT(sniffit.h)
+
+-dnl Config of libpcap
+-AC_CONFIG_SUBDIRS(libpcap)
+-
+ dnl Check the C compiler
+ AC_PROG_CC
+
+ dnl Check NCURSES availability
+-NCURSES_PATH=/usr/include:/usr/include/ncurses:/usr/include/curses:/usr/local/include:/usr/local/include/ncurses:/usr/local/include/curses:./:./ncurses.h
+-ncurses_warn=0
+-AC_CHECK_LIB(ncurses,main,,ncurses_warn=1)
+-
+-AC_PATH_PROGS(NCURSES_LOCATION,ncurses.h,no,$NCURSES_PATH)
+-if test "$NCURSES_LOCATION" != no; then
+- echo "#include \"$NCURSES_LOCATION\"" >sn_curses.h
+- AC_DEFINE(HAVE_NCURSES_H,1)
+-else
+- ncurses_warn=1
+-fi
+-
+-dnl Print warning for interactive mode
+-if test $ncurses_warn -ne 0; then
+- AC_MSG_WARN(Interactive mode (-i/-I) will NOT be supported.!)
+- AC_MSG_WARN(Install ncurses!)
+-fi
++PKG_CHECK_MODULES(ncurses,ncurses,main,
++ LIBS="$LIBS $ncurses_LIBS"
++ echo "#include <ncurses.h>" > sn_curses.h
++ AC_DEFINE(HAVE_NCURSES_H),
++ AC_MSG_ERROR([ncurses not found]))
+
+ dnl Check Shared Memory support
+ AC_CHECK_FUNCS(shmget)