From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- net-analyzer/tcpstat/Manifest | 8 ++ net-analyzer/tcpstat/files/tcpstat-1.5-db.patch | 165 ++++++++++++++++++++++++ net-analyzer/tcpstat/metadata.xml | 8 ++ net-analyzer/tcpstat/tcpstat-1.5-r1.ebuild | 36 ++++++ net-analyzer/tcpstat/tcpstat-1.5-r2.ebuild | 34 +++++ net-analyzer/tcpstat/tcpstat-1.5.ebuild | 24 ++++ 6 files changed, 275 insertions(+) create mode 100644 net-analyzer/tcpstat/Manifest create mode 100644 net-analyzer/tcpstat/files/tcpstat-1.5-db.patch create mode 100644 net-analyzer/tcpstat/metadata.xml create mode 100644 net-analyzer/tcpstat/tcpstat-1.5-r1.ebuild create mode 100644 net-analyzer/tcpstat/tcpstat-1.5-r2.ebuild create mode 100644 net-analyzer/tcpstat/tcpstat-1.5.ebuild (limited to 'net-analyzer/tcpstat') diff --git a/net-analyzer/tcpstat/Manifest b/net-analyzer/tcpstat/Manifest new file mode 100644 index 000000000000..7b44cc4a49d2 --- /dev/null +++ b/net-analyzer/tcpstat/Manifest @@ -0,0 +1,8 @@ +AUX tcpstat-1.5-db.patch 4691 SHA256 d77717dc7144f0be4019fbf1b695650ed4a33520cdc714e00b8fb2686e2ad291 SHA512 03de51e86bd0aa1bf2d29097871fe8409498050100c4adefde7d8aae7bdd752455af6ce13b490f4e596ea90557b37c95b974705cbaece35d9b465571fdb31d6d WHIRLPOOL af6b886eb6c59b3ac9c1850b4c31b959e9b88c9009eded0f3e48c8ed097caba397660df5030de874a22cb5ec98d9311b77571032b4c48d6927f2ccda0fcf6aa0 +DIST tcpstat-1.5.tar.gz 93102 SHA256 46fde9458cc5678264b0c5f2197f84ada9101951197fdeec5f04b0801fcff0ba SHA512 f1399365e754e4d9e19657c455a580294a7b4002a0d02ff05791a45574dcb1d0e75dc492157ef595066502b1553702481c67b20ad24267a50d7293766c39a5ab WHIRLPOOL 386e777ff42a4a61e73e22630ef4ea83e8ce23da0fd165e7d3363530033819f12da3df3891e67da29be9afba5fb43d88397c519c6c7e2fea4a6d624b61ab6522 +EBUILD tcpstat-1.5-r1.ebuild 855 SHA256 928e5f4d17381a21793261684f0026fee8719c773eab17df6b563a4300b43510 SHA512 9aafc7493ad6121fe32344ddc3b63c5f12247f04604bc9b1917828113d421519da3bf7be2ae40771db7d5b394b89c930b2762045b4005ca7ee36c1b74b664652 WHIRLPOOL cd3acbf837d476c2eb34bc6f3e09f1bd3af718e07db8daa4e3fa52591d2cbb39da2e6a45fc7a3f5ce85bdcf2e246268f917921d2a0f5ad5971a36a9cf0cd273f +EBUILD tcpstat-1.5-r2.ebuild 723 SHA256 32319ce46c8f30d8d69d2d6df01d9147f02b672bfbe1e5e51c8658c7ee5e544c SHA512 e6dc72f08fcb172c3ddb72ff79bf9d4b23d502a0c630d3438d054892b38c047946bc4b77a2f21e6cfda7cb61191bea0b58129461d8df8cf9e3c09c56cc0b67eb WHIRLPOOL f8fd5a25f7fb6c07a3694eed65d486a644c9ff2af7995b87c7a5d8004f9f6ce11e5472f7e89b8bc328f12203c354e18a84a5c1603639fa126378de98e04a73b6 +EBUILD tcpstat-1.5.ebuild 551 SHA256 ef8ddf040425ad72146876bbc6b1e3e2e0abad80bb6879c0e3a2657150765afe SHA512 961013e1968dc7c43e372615b4a5f2900dad32e1365d69516e63e639b2fa430c746fe8ce1068c4fa1317717777f80f62badca29f5235bd460081e9c1c5b292b2 WHIRLPOOL cf72a18dc0e4c50caa28d4e0eeb8ed21a9d5f3a4ad46a1afec2ec217363a36da35d344d12e92bf595515a4cb593e8a3762da2a3fbcb6de7e49c3c557d29c6664 +MISC ChangeLog 2566 SHA256 48f4fb432175c5525c45268b41b7d1d7881c342d3053a60ff0a51c3e2147bff7 SHA512 1d9898b0dc87186f10c3eeddd964fa0309d2ad382e67498561906b88084db1c7fc1af2ddccc03b3da75571e480d4efcd88af3b321a0ca5928cdb489547daa320 WHIRLPOOL 67ad6280d37a65386ecb1f0deb31cb442c2990aa6095d5670dce6cc910f88d19af0c100af101aee026eda4c21bb132b26dbed0bb019a7ab920942d9e6ee37fb3 +MISC ChangeLog-2015 3055 SHA256 a2dc55384d656d97fb9b641d265f1810ee6e819c4829c92536e5f8e31631a1ec SHA512 507b4cb836c38121d27e812c744660f415b9c31f659c0416d67c19005ed1a557e42a2ec2aead33886ccdbaf787e53f080913742f550d8f0530f7d882e957b6ad WHIRLPOOL d4936bd5f889ad0cf7a822fa8f70b80ed6fac9ed9f458a2667563618113bf80498f00f38ea345a1a65830de343da165ab5a23df99da98434d56ba395b675e002 +MISC metadata.xml 276 SHA256 d15d6b6bd9ffc8a642c7469d01788ba9158efb4ca27fcf3324d9e52d1b70ec93 SHA512 f0e6c6bc89659e01e157d9bf30d0a2f3fd2d71bc26c8d12489c4a44fc5237159946e25b46e7295ab4676aea63559194977a0b1e76aced31d81cf6387dd0f4250 WHIRLPOOL 26b9e81575f613b751f76234013c30a8da84a1c0dd75c12b8df32706ee753691bbc889a2dec5001cc8c4b05c47aca49ed9fabbb5a6fefed74aaa86d6c3f56cee 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..74c2baebb4ec --- /dev/null +++ b/net-analyzer/tcpstat/metadata.xml @@ -0,0 +1,8 @@ + + + + + netmon@gentoo.org + Gentoo network monitoring and analysis project + + 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..6c1492869042 --- /dev/null +++ b/net-analyzer/tcpstat/tcpstat-1.5-r1.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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..d9762afda9d3 --- /dev/null +++ b/net-analyzer/tcpstat/tcpstat-1.5-r2.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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..5a8dcf9dc27c --- /dev/null +++ b/net-analyzer/tcpstat/tcpstat-1.5.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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? (