summaryrefslogtreecommitdiff
path: root/network/iptraf-ng
diff options
context:
space:
mode:
Diffstat (limited to 'network/iptraf-ng')
-rw-r--r--network/iptraf-ng/Makefile.am.patch48
-rw-r--r--network/iptraf-ng/README16
-rw-r--r--network/iptraf-ng/dirs.h.patch43
-rw-r--r--network/iptraf-ng/iptraf-ng.SlackBuild116
-rw-r--r--network/iptraf-ng/iptraf-ng.info10
-rw-r--r--network/iptraf-ng/slack-desc19
6 files changed, 252 insertions, 0 deletions
diff --git a/network/iptraf-ng/Makefile.am.patch b/network/iptraf-ng/Makefile.am.patch
new file mode 100644
index 0000000000..1c2b0c026f
--- /dev/null
+++ b/network/iptraf-ng/Makefile.am.patch
@@ -0,0 +1,48 @@
+--- iptraf-ng-1.0.2.orig/src/Makefile.am 2010-03-24 15:19:47.000000000 +0200
++++ iptraf-ng-1.0.2/src/Makefile.am 2011-01-26 21:36:14.433000336 +0200
+@@ -1,6 +1,6 @@
+-bin_PROGRAMS = iptraf rvnamed rawtime
++bin_PROGRAMS = iptraf-ng rvnamed-ng rawtime-ng
+
+-iptraf_SOURCES = iptraf.c \
++iptraf_ng_SOURCES = iptraf.c \
+ itrafmon.c \
+ packet.c packet.h \
+ tcptable.c tcptable.h \
+@@ -36,28 +36,28 @@
+ addproto.h links.h tcptimeout.h \
+ arphdr.h descrec.h externs.h ospf.h attrs.h fltdefs.h logvars.h
+
+-iptraf_CFLAGS = $(CFLAGS) \
++iptraf_ng_CFLAGS = $(CFLAGS) \
+ -Wall \
+ -std=gnu99 \
+ -pedantic \
+ -I$(srcdir)/../support
+
+-iptraf_LDFLAGS = -l$(ncurses_lib) -l$(panel_lib)
+-iptraf_LDADD = ../support/libtextbox.la
++iptraf_ng_LDFLAGS = -l$(ncurses_lib) -l$(panel_lib)
++iptraf_ng_LDADD = ../support/libtextbox.la
+
+-man_MANS = iptraf.8 rvnamed.8
++man_MANS = iptraf-ng.8 rvnamed-ng.8
+
+-rvnamed_SOURCES = rvnamed.c rvnamed.h getpath.c dirs.h getpath.h
++rvnamed_ng_SOURCES = rvnamed.c rvnamed.h getpath.c dirs.h getpath.h
+
+-rvnamed_CFLAGS = $(CFLAGS) \
++rvnamed_ng_CFLAGS = $(CFLAGS) \
+ -Wall \
+ -std=gnu99 \
+ -pedantic \
+ -I$(srcdir)/../support
+
+-rawtime_SOURCES = rawtime.c
++rawtime_ng_SOURCES = rawtime.c
+
+-rawtime_CFLAGS = $(CFLAGS) \
++rawtime_ng_CFLAGS = $(CFLAGS) \
+ -Wall \
+ -std=gnu99 \
+ -pedantic \
diff --git a/network/iptraf-ng/README b/network/iptraf-ng/README
new file mode 100644
index 0000000000..9f6b16fe6a
--- /dev/null
+++ b/network/iptraf-ng/README
@@ -0,0 +1,16 @@
+IPTraf-ng is a console-based network monitoring utility. IPTraf-ng gathers data
+like TCP connection packet and byte counts, interface statistics and activity
+indicators, TCP/UDP traffic breakdowns,and LAN station packet and byte counts.
+IPTraf-ng features include an IP traffic monitor which shows TCP flag information,
+packet and byte counts, ICMP details, OSPF packet types, and oversized IP packet
+warnings; interface statistics showing IP, TCP, UDP, ICMP, non-IP and other IP
+packet counts, IP checksum errors, interface activity and packet size counts;
+a TCP and UDP service monitor showing counts of incoming and outgoing packets for
+common TCP and UDP application ports, a LAN statistics module that discovers active
+hosts and displays statistics about their activity; TCP, UDP and other protocol
+display filters so you can view just the traffic you want; logging; support for
+Ethernet, FDDI, ISDN, SLIP, PPP, and loopback interfaces; and utilization of the
+built-in raw socket interface of the Linux kernel, so it can be used on a wide
+variety of supported network cards.
+
+iptraf-ng is a fork of the original iptraf.
diff --git a/network/iptraf-ng/dirs.h.patch b/network/iptraf-ng/dirs.h.patch
new file mode 100644
index 0000000000..fcf1357422
--- /dev/null
+++ b/network/iptraf-ng/dirs.h.patch
@@ -0,0 +1,43 @@
+diff --git a/src/dirs.h b/src/dirs.h
+index e57a4c8..1698f50 100644
+--- a/src/dirs.h
++++ b/src/dirs.h
+@@ -26,11 +26,11 @@
+ */
+
+ #ifndef WORKDIR
+-#define WORKDIR "/var/lib/iptraf"
++#define WORKDIR "/var/lib/iptraf-ng"
+ #endif
+
+ #ifndef LOGDIR
+-#define LOGDIR "/var/log/iptraf"
++#define LOGDIR "/var/log/iptraf-ng"
+ #endif
+
+ #ifndef EXECDIR
+@@ -46,7 +46,7 @@
+ */
+
+ #ifndef LOCKDIR
+-#define LOCKDIR "/var/lock/iptraf"
++#define LOCKDIR "/var/lock/iptraf-ng"
+ #endif
+
+ /***
+@@ -161,13 +161,13 @@
+ * The rvnamed program file
+ */
+
+-#define RVNDFILE get_path(T_EXECDIR, "rvnamed")
++#define RVNDFILE get_path(T_EXECDIR, "rvnamed-ng")
+
+ /*
+ * The rvnamed log file
+ */
+
+-#define RVNDLOGFILE get_path(T_LOGDIR, "rvnamed.log")
++#define RVNDLOGFILE get_path(T_LOGDIR, "rvnamed-ng.log")
+
+ /*
+ * File to contain the current TCP filter data file name. UDP filter
diff --git a/network/iptraf-ng/iptraf-ng.SlackBuild b/network/iptraf-ng/iptraf-ng.SlackBuild
new file mode 100644
index 0000000000..90f78d9052
--- /dev/null
+++ b/network/iptraf-ng/iptraf-ng.SlackBuild
@@ -0,0 +1,116 @@
+#!/bin/sh
+
+# Slackware build script for iptraf-ng
+
+# Copyright 2011 Grigorios Bouzakis <grbzks@xsmail.com>
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for any purpose
+# with or without fee is hereby granted, provided that the above copyright
+# notice and this permission notice appear in all copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# AUTHORS AND COPYRIGHT HOLDERS AND THEIR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=iptraf-ng
+VERSION=${VERSION:-1.0.2}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+DOCS="CHANGES FAQ INSTALL LICENSE README RELEASE-NOTES Documentation"
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# patches to rename iptraf to iptraf-ng (binaries, mans) http://goo.gl/lAXf9
+patch -Np1 < $CWD/Makefile.am.patch
+patch -Np1 < $CWD/dirs.h.patch
+
+# needed to build -ng manpages
+mv src/iptraf.8 src/iptraf-ng.8
+mv src/rvnamed.8 src/rvnamed-ng.8
+
+autoreconf # since we changed Makefile.am
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+# taken from Slackware's iptraf.SlackBuild
+( cd $PKG/usr/doc/$PRGNAM-$VERSION/Documentation
+ rm -rf manual.aux manual.dvi manual.rtf manual.sgml manual.template .xvpics
+)
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/network/iptraf-ng/iptraf-ng.info b/network/iptraf-ng/iptraf-ng.info
new file mode 100644
index 0000000000..9ac28b3b16
--- /dev/null
+++ b/network/iptraf-ng/iptraf-ng.info
@@ -0,0 +1,10 @@
+PRGNAM="iptraf-ng"
+VERSION="1.0.2"
+HOMEPAGE="https://fedorahosted.org/iptraf-ng"
+DOWNLOAD="https://fedorahosted.org/releases/i/p/iptraf-ng/iptraf-ng-1.0.2.tar.gz"
+MD5SUM="b2adbbbee4c269fb97a1951981c9047c"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Grigorios Bouzakis"
+EMAIL="grbzks@gmail.com"
+APPROVED="rworkman"
diff --git a/network/iptraf-ng/slack-desc b/network/iptraf-ng/slack-desc
new file mode 100644
index 0000000000..8196d33c9f
--- /dev/null
+++ b/network/iptraf-ng/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler----------------------------------------------------|
+iptraf-ng: iptraf-ng (console-based network monitoring program)
+iptraf-ng:
+iptraf-ng: iptraf-ng is a console-based network monitoring program for Linux
+iptraf-ng: that displays information about IP traffic such as:
+iptraf-ng:
+iptraf-ng: Current TCP connections, types of IP packets, packet and byte
+iptraf-ng: counts, TCP/UDP counts by ports, packet counts by packet sizes,
+iptraf-ng: packet and byte counts by IP address, interface activity, flag
+iptraf-ng: statuses on TCP packets, and other LAN station statistics.
+iptraf-ng:
+iptraf-ng: Homepage: https://fedorahosted.org/iptraf-ng