summaryrefslogtreecommitdiff
path: root/net-analyzer/sniffit
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
reinit the tree, so we can have metadata
Diffstat (limited to 'net-analyzer/sniffit')
-rw-r--r--net-analyzer/sniffit/Manifest8
-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
-rw-r--r--net-analyzer/sniffit/metadata.xml8
-rw-r--r--net-analyzer/sniffit/sniffit-0.3.7-r4.ebuild40
6 files changed, 245 insertions, 0 deletions
diff --git a/net-analyzer/sniffit/Manifest b/net-analyzer/sniffit/Manifest
new file mode 100644
index 000000000000..56734a0616e6
--- /dev/null
+++ b/net-analyzer/sniffit/Manifest
@@ -0,0 +1,8 @@
+AUX sniffit-0.3.7-gentoo.patch 1164 SHA256 512f6a3b4b5da6169253a609b3d459fdb833b064d0f0c218f918bbb363c6a90c SHA512 e71684e0be70228c347fe61afdee7e6bf0f116b0ecb603ed4dd6838f457b5b480092ac735297ce64f84f9c8858b5b11d7a1e746c0790380fbf6f7cf8d9875865 WHIRLPOOL d4f674be3fec37861857af5f8ae07bd3a8da3733cd49b13785dbe431f58053596b8517ae8a6d6e6619f5198271b9027ba5d772db92391696c20ee07e280f3cc9
+AUX sniffit-0.3.7-misc.patch 2957 SHA256 536299d8b939c11751db2853741d591d8334eebf46d42e4adbf5898d13277213 SHA512 d07298642bab1903c7a93a2b076dcf2cf50a2a5ef5b05e7e9abacaa88cff3089c9028e7721cacbc403b992ad170f64976e83835e441b44e6ac69ee0753e2714e WHIRLPOOL 94dce9cad45c757ddf847b7c4db53fb66fa20c912c7e2b9f92a13e546b60d8ae958fe0a0756b29e307d4582ffa02918d41fe37b11c0300b960f26531304a22b7
+AUX sniffit-0.3.7-tinfo.patch 1063 SHA256 4f966dfb7fdaf78e571f79f11e5948a8eccd543f7ee039da742a37458116a665 SHA512 d4959d6c27928c3d3f85fdfdfb1afd4f7ad24000adb61f565fef68b46b46aba96b61572177db058875dc3a70154223cb620077e6681c8a7f62483e614f8e92c6 WHIRLPOOL 00713ff231028c6064280c9297524cfc979aa186d9b354bb8ff0cfda424ff368469e607d0893b7e7db362ad4ae288d82dedc091d26a1ba87ef2686be14e99022
+DIST sniffit.0.3.7.beta.tar.gz 212419 SHA256 78b5137be45bdff738525dee351908ae0b8a79e2d999e33b34278a4a7fc08ca0 SHA512 b32d1f17d589ee1d1afc7986640a2b9f451cdb26ee2d077db1eaec1bb77ed353bbbb6a79bd25f915b3a40b7a279f9fc7855706150ec3a24f8937a152ac91b8d1 WHIRLPOOL 834c3c6a177851d219bc593fe1ca4052641aa85a610aa76b5bd65bbd47848280bb5c55b74402b96c61bd7fd980e92137c27c324c9c4fc9259e2cf137ab3afd41
+EBUILD sniffit-0.3.7-r4.ebuild 792 SHA256 891a49068b15d19e5097e7912ac2b1688a33e4dce45c1a47389bdaceddf9b049 SHA512 2f44f2881473aa1744c62b68d6eab2f4eebf9470a17a069430bf9c2fdaef1c755de543c42d9153d975cc1bef7a848ae8b78398a56f1400c4d1280d5ddc344d35 WHIRLPOOL 845c400bc627e5c90cd6b6a16fc48aa8a445cee4b2e1b40f12ee49fd1feef893ff8060fd16c07bfd40501adab2fe8d44b21a54cb5f5b23a20ff752a076c8fa03
+MISC ChangeLog 2541 SHA256 5b7628abcfbfa5e9956e9cea597ddd30b2fbfb4dc22295fff282d41763c3f263 SHA512 b95a5ea0962a898d7d9655d4566040a2546509bf7119a02a26a544cce5974d0a974cde7ee1635c0705ba9cf2baceb4e0f9c5c03efcbafc696f9b118fbc86a532 WHIRLPOOL 44dc728d34608ced5872df24b67b09dfedd2366d0fd1156fc96faafe99485b2d00483a9ae5e269967d258e9a9c3394270e0e6be66171e017e93db3fdf375f48a
+MISC ChangeLog-2015 4006 SHA256 774ec7443fb0f6045a4bd10cbe6f88813f9bf6fb2b587eead461384bcd8f7272 SHA512 198c0617a22b20c43483d19e0dc2eb5306d5918e0f99ae1371008952c84fb625465c38614bfa822b9a5f2bcff2bb6b69cf1c504a6203c8970bb0ff4e84c9147d WHIRLPOOL eb7524f6ab73a7e38fb99932585e7538895f2d19d2b06705e07f715313662bc91bb1bbfb59b627757b28fe4046e0f6ad75902f31715dd28f95197f9f27cea2d8
+MISC metadata.xml 276 SHA256 d15d6b6bd9ffc8a642c7469d01788ba9158efb4ca27fcf3324d9e52d1b70ec93 SHA512 f0e6c6bc89659e01e157d9bf30d0a2f3fd2d71bc26c8d12489c4a44fc5237159946e25b46e7295ab4676aea63559194977a0b1e76aced31d81cf6387dd0f4250 WHIRLPOOL 26b9e81575f613b751f76234013c30a8da84a1c0dd75c12b8df32706ee753691bbc889a2dec5001cc8c4b05c47aca49ed9fabbb5a6fefed74aaa86d6c3f56cee
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)
diff --git a/net-analyzer/sniffit/metadata.xml b/net-analyzer/sniffit/metadata.xml
new file mode 100644
index 000000000000..74c2baebb4ec
--- /dev/null
+++ b/net-analyzer/sniffit/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>netmon@gentoo.org</email>
+ <name>Gentoo network monitoring and analysis project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/sniffit/sniffit-0.3.7-r4.ebuild b/net-analyzer/sniffit/sniffit-0.3.7-r4.ebuild
new file mode 100644
index 000000000000..404ae9f3cbc8
--- /dev/null
+++ b/net-analyzer/sniffit/sniffit-0.3.7-r4.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit autotools eutils toolchain-funcs
+
+MY_P="${P/-/.}.beta"
+S="${WORKDIR}/${MY_P}"
+DESCRIPTION="Interactive Packet Sniffer"
+SRC_URI="http://reptile.rug.ac.be/~coder/${PN}/files/${MY_P}.tar.gz"
+HOMEPAGE="http://reptile.rug.ac.be/~coder/sniffit/sniffit.html"
+
+RDEPEND="
+ net-libs/libpcap
+ >=sys-libs/ncurses-5.2
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="amd64 ppc sparc x86"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-misc.patch \
+ "${FILESDIR}"/${P}-tinfo.patch
+ eautoreconf
+ tc-export CC
+}
+
+src_install () {
+ dosbin sniffit
+
+ doman sniffit.5 sniffit.8
+ dodoc README* PLUGIN-HOWTO BETA* HISTORY
+}