summaryrefslogtreecommitdiff
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/tcpstat
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
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/tcpstat')
-rw-r--r--net-analyzer/tcpstat/Manifest1
-rw-r--r--net-analyzer/tcpstat/files/tcpstat-1.5-db.patch165
-rw-r--r--net-analyzer/tcpstat/metadata.xml5
-rw-r--r--net-analyzer/tcpstat/tcpstat-1.5-r1.ebuild37
-rw-r--r--net-analyzer/tcpstat/tcpstat-1.5-r2.ebuild35
-rw-r--r--net-analyzer/tcpstat/tcpstat-1.5.ebuild25
6 files changed, 268 insertions, 0 deletions
diff --git a/net-analyzer/tcpstat/Manifest b/net-analyzer/tcpstat/Manifest
new file mode 100644
index 000000000000..84a624f40fd6
--- /dev/null
+++ b/net-analyzer/tcpstat/Manifest
@@ -0,0 +1 @@
+DIST tcpstat-1.5.tar.gz 93102 SHA256 46fde9458cc5678264b0c5f2197f84ada9101951197fdeec5f04b0801fcff0ba SHA512 f1399365e754e4d9e19657c455a580294a7b4002a0d02ff05791a45574dcb1d0e75dc492157ef595066502b1553702481c67b20ad24267a50d7293766c39a5ab WHIRLPOOL 386e777ff42a4a61e73e22630ef4ea83e8ce23da0fd165e7d3363530033819f12da3df3891e67da29be9afba5fb43d88397c519c6c7e2fea4a6d624b61ab6522
diff --git a/net-analyzer/tcpstat/files/tcpstat-1.5-db.patch b/net-analyzer/tcpstat/files/tcpstat-1.5-db.patch
new file mode 100644
index 000000000000..88e668e1a4a5
--- /dev/null
+++ b/net-analyzer/tcpstat/files/tcpstat-1.5-db.patch
@@ -0,0 +1,165 @@
+--- a/configure.in
++++ b/configure.in
+@@ -84,15 +84,26 @@
+ dnl #######################
+ dnl Checks for header files
+ dnl #######################
+ AC_HEADER_STDC
+ AC_HEADER_SYS_WAIT
+-AC_CHECK_HEADERS(sys/time.h sys/stat.h unistd.h strings.h fcntl.h netinet/ip6.h)
++AC_CHECK_HEADERS(sys/time.h sys/stat.h unistd.h strings.h fcntl.h)
+
+ dnl BSD/OS Seems to not have a good ethernet header, so we gotta wing it
+ AC_CHECK_HEADERS(net/if.h net/ethernet.h netinet/if_ether.h net/ppp_defs.h)
+
++AC_ARG_ENABLE( ipv6, [ AC_HELP_STRING([--enable-ipv6], [s use IPv6?]) ], ip6=$enableval )
++if test "$ip6" = "yes"
++then
++ AC_CHECK_HEADER(netinet/ip6.h, , [AC_MSG_ERROR([I couldn't find netinet/ip6.h though you asked for ipv6 support.])] )
++elif test "$ip6" != "no"
++then
++ AC_CHECK_HEADER(netinet/ip6.h)
++
++fi
++
++
+ dnl #############################################################
+ dnl Checks for typedefs, structures, and compiler characteristics
+ dnl #############################################################
+ AC_C_CONST
+ AC_TYPE_SIZE_T
+@@ -147,34 +158,11 @@
+ If you already have... then please rerun configure with the option
+ --with-pcap-lib=DIR
+ with "DIR" being where libpcap is found.])
+ ])
+
+-dnl look for dbopen for tcpprof
+-TCPPROF=""
+-LD_TCPPROF=""
+-AC_CHECK_LIB(c, dbopen, [ TCPPROF=tcpprof ], [
+- AC_CHECK_LIB(db1, dbopen, [
+- TCPPROF=tcpprof
+- LD_TCPPROF="-ldb1"
+- AC_DEFINE(USE_DB1_LIBRARY, 1, [ Use the sleepycat DB library. ])
+- ], [
+- AC_MSG_WARN([
+-
+- *** WARNING ***
+- I couldn't locate the Berkeley DB library. The extra utility
+- "tcpprof" will not be built. THIS IS OK!!! "tcpstat" will
+- continue to be built as if this never happened.
+-
+- If you wish to use the extra "tcpprof" program, please install
+- the Berkeley DB library from:
+- ftp://ftp.cs.berkeley.edu/ucb/4bsd/db.tar.gz
+- ])
+- ])
+-])
+ AC_SUBST(TCPPROF)
+-AC_SUBST(LD_TCPPROF)
+ AC_SUBST(MATHLIB)
+
+ AC_CONFIG_FILES([
+ Makefile
+ doc/Makefile
+--- a/lib/process.c
++++ b/lib/process.c
+@@ -230,12 +230,12 @@
+ * calls a user function pointing to the data
+ *
+ * XXX: filter is not used. capture_seconds also isn't, but snoop is
+ * always read from a file.
+ */
+-int get_snoop_data(char *fname, char *filter, int flags,
+- Double capture_seconds, void (*hook)(packet_data *, void **),
++int get_snoop_data(char *fname, char *filter __attribute__((unused)), int flags,
++ Double capture_seconds __attribute__((unused)), void (*hook)(packet_data *, void **),
+ void **args) {
+
+ u_char *packet;
+ int fd, len, blen, ret = 0;
+ struct snoop_file_header fh;
+--- a/lib/tcpseq.c
++++ b/lib/tcpseq.c
+@@ -54,11 +54,10 @@
+ u_char flags;
+ struct tcpseq_ha test_ha;
+ struct tcphdr *tp = NULL;
+ struct ip *ip;
+ #ifdef INET6
+- int is_ip6 = 0;
+ struct ip6_hdr *ip6;
+
+ ip6 = (struct ip6_hdr *) &pd->data.ip6.hdr;
+ if (is_ip6_packet(pd))
+ tp= &(pd->data.ip6.body.tcphdr);
+--- a/src/catpcap.c
++++ b/src/catpcap.c
+@@ -50,11 +50,11 @@
+ if (c == ' ') return c;
+ if ((u_char)c > 0xa1 && SHOW_HIGH_BIT) return c;
+ return '.';
+ }
+
+-void proc_pcap(u_char *user, const struct pcap_pkthdr *h, const u_char *p) {
++void proc_pcap(u_char *user __attribute__((unused)), const struct pcap_pkthdr *h, const u_char *p) {
+ u_int length = h->caplen, i, j, k, step;
+ u_char *r, *s;
+ char c;
+
+ r = (u_char *)p;
+@@ -90,11 +90,11 @@
+ }
+ /*
+ * process_file() takes the output of tcpdump, saves packets, and displays
+ * statistics
+ */
+-void process_file(char *fname, u_int unused) {
++void process_file(char *fname, u_int unused __attribute__((unused))) {
+ int run = 1, i;
+ pcap_t *pd;
+ char ebuf[PCAP_ERRBUF_SIZE];
+ struct bpf_program bpf_prog;
+
+--- a/src/dump.c
++++ b/src/dump.c
+@@ -37,21 +37,21 @@
+ char filterexpr[BUF_SIZ] = "";
+ int get_tcp_flags = 0;
+ int what_to_show = 0;
+ int packet_number = 0;
+
+-void my_hook(packet_data *pd, void **args) {
++void my_hook(packet_data *pd) {
+ printf("PACKET NUMBER: %d\n", ++packet_number);
+ print_packet(pd, what_to_show);
+ printf("-------------------\n");
+ }
+
+ /*
+ * process_file() takes the output of tcpdump, saves packets, and displays
+ * statistics
+ */
+-void process_file(char *fname, u_int unused) {
++void process_file(char *fname, u_int unused __attribute__((unused))) {
+ get_dump_data(fname, filterexpr, get_tcp_flags,
+ -1.0, my_hook, NULL);
+ }
+
+ int parse_show_types(char *in) {
+--- a/src/tcpstat.c
++++ b/src/tcpstat.c
+@@ -421,11 +421,11 @@
+ }
+
+ /*
+ * process_file() gets the data, and then displays the statistics
+ */
+-void process_file(char *fname, u_int unused) {
++void process_file(char *fname, u_int unused __attribute__((unused))) {
+ void *argv[2];
+ statistics stats;
+ Double x;
+
+ signal(SIGUSR1, catch_signal);
diff --git a/net-analyzer/tcpstat/metadata.xml b/net-analyzer/tcpstat/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/tcpstat/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/tcpstat/tcpstat-1.5-r1.ebuild b/net-analyzer/tcpstat/tcpstat-1.5-r1.ebuild
new file mode 100644
index 000000000000..bd92dc5b2477
--- /dev/null
+++ b/net-analyzer/tcpstat/tcpstat-1.5-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils autotools flag-o-matic
+
+DESCRIPTION="Reports network interface statistics"
+SRC_URI="http://www.frenchfries.net/paul/tcpstat/${P}.tar.gz"
+HOMEPAGE="http://www.frenchfries.net/paul/tcpstat/"
+
+DEPEND="net-libs/libpcap"
+
+SLOT="0"
+LICENSE="BSD-2"
+KEYWORDS="amd64 ~ppc ~ppc64 sparc x86"
+
+IUSE="ipv6"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-db.patch"
+ eautoreconf
+}
+
+src_compile() {
+ append-flags -Wall -Wextra
+ econf $(use_enable ipv6) || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "emake install failed"
+ dobin src/{catpcap,packetdump} || die "dobin failed"
+ dodoc AUTHORS ChangeLog NEWS README doc/Tips_and_Tricks.txt
+ newdoc src/README README.src
+}
diff --git a/net-analyzer/tcpstat/tcpstat-1.5-r2.ebuild b/net-analyzer/tcpstat/tcpstat-1.5-r2.ebuild
new file mode 100644
index 000000000000..45e401da62e8
--- /dev/null
+++ b/net-analyzer/tcpstat/tcpstat-1.5-r2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils autotools flag-o-matic
+
+DESCRIPTION="Reports network interface statistics"
+SRC_URI="http://www.frenchfries.net/paul/tcpstat/${P}.tar.gz"
+HOMEPAGE="http://www.frenchfries.net/paul/tcpstat/"
+
+DEPEND="net-libs/libpcap"
+
+SLOT="0"
+LICENSE="BSD-2"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="ipv6"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-db.patch
+ eautoreconf
+}
+
+src_configure() {
+ append-flags -Wall -Wextra
+ econf $(use_enable ipv6)
+}
+
+DOCS=( AUTHORS ChangeLog NEWS README doc/Tips_and_Tricks.txt )
+
+src_install() {
+ default
+ dobin src/{catpcap,packetdump}
+ newdoc src/README README.src
+}
diff --git a/net-analyzer/tcpstat/tcpstat-1.5.ebuild b/net-analyzer/tcpstat/tcpstat-1.5.ebuild
new file mode 100644
index 000000000000..76251d576a47
--- /dev/null
+++ b/net-analyzer/tcpstat/tcpstat-1.5.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+IUSE="berkdb"
+
+DESCRIPTION="Reports network interface statistics"
+SRC_URI="http://www.frenchfries.net/paul/tcpstat/${P}.tar.gz"
+HOMEPAGE="http://www.frenchfries.net/paul/tcpstat/"
+
+DEPEND="net-libs/libpcap
+ berkdb? ( <sys-libs/db-2 )"
+
+SLOT="0"
+LICENSE="BSD-2"
+KEYWORDS="amd64 ~ppc ppc64 sparc x86"
+
+src_install () {
+
+ make DESTDIR=${D} install || die
+ use berkdb && dobin src/tcpprof
+
+ dodoc AUTHORS ChangeLog COPYING LICENSE NEWS README*
+
+}