summaryrefslogtreecommitdiff
path: root/net-analyzer/sniffit
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-analyzer/sniffit
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-analyzer/sniffit')
-rw-r--r--net-analyzer/sniffit/Manifest1
-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.xml5
-rw-r--r--net-analyzer/sniffit/sniffit-0.3.7-r4.ebuild41
6 files changed, 236 insertions, 0 deletions
diff --git a/net-analyzer/sniffit/Manifest b/net-analyzer/sniffit/Manifest
new file mode 100644
index 00000000000..1dc84a5982e
--- /dev/null
+++ b/net-analyzer/sniffit/Manifest
@@ -0,0 +1 @@
+DIST sniffit.0.3.7.beta.tar.gz 212419 SHA256 78b5137be45bdff738525dee351908ae0b8a79e2d999e33b34278a4a7fc08ca0 SHA512 b32d1f17d589ee1d1afc7986640a2b9f451cdb26ee2d077db1eaec1bb77ed353bbbb6a79bd25f915b3a40b7a279f9fc7855706150ec3a24f8937a152ac91b8d1 WHIRLPOOL 834c3c6a177851d219bc593fe1ca4052641aa85a610aa76b5bd65bbd47848280bb5c55b74402b96c61bd7fd980e92137c27c324c9c4fc9259e2cf137ab3afd41
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 00000000000..c226b6f00d4
--- /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 00000000000..ff84cd7d225
--- /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 00000000000..b8283504968
--- /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 00000000000..03aa50bab7e
--- /dev/null
+++ b/net-analyzer/sniffit/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</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 00000000000..32b54e2670c
--- /dev/null
+++ b/net-analyzer/sniffit/sniffit-0.3.7-r4.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+}