summaryrefslogtreecommitdiff
path: root/net-analyzer/tcpstat
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-01-15 15:51:32 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-01-15 15:51:32 +0000
commit21435953e16cda318a82334ddbadb3b5c36d9ea7 (patch)
treee1810a4b135afce04b34862ef0fab2bfaeb8aeca /net-analyzer/tcpstat
parent7bc9c63c9da678a7e6fceb095d56c634afd22c56 (diff)
gentoo resync : 15.01.2020
Diffstat (limited to 'net-analyzer/tcpstat')
-rw-r--r--net-analyzer/tcpstat/Manifest9
-rw-r--r--net-analyzer/tcpstat/files/tcpstat-1.5_p8-_DEFAULT_SOURCE.patch11
-rw-r--r--net-analyzer/tcpstat/files/tcpstat-1.5_p8-ipv6.patch30
-rw-r--r--net-analyzer/tcpstat/files/tcpstat-1.5_p8-libpcap.patch11
-rw-r--r--net-analyzer/tcpstat/files/tcpstat-1.5_p8-off-by-one.patch50
-rw-r--r--net-analyzer/tcpstat/files/tcpstat-1.5_p8-unused.patch99
-rw-r--r--net-analyzer/tcpstat/tcpstat-1.5-r3.ebuild2
-rw-r--r--net-analyzer/tcpstat/tcpstat-1.5_p8.ebuild59
8 files changed, 269 insertions, 2 deletions
diff --git a/net-analyzer/tcpstat/Manifest b/net-analyzer/tcpstat/Manifest
index 85886c991b06..c2fdd612d431 100644
--- a/net-analyzer/tcpstat/Manifest
+++ b/net-analyzer/tcpstat/Manifest
@@ -1,5 +1,12 @@
AUX tcpstat-1.5-_DEFAULT_SOURCE.patch 428 BLAKE2B ee4ac925f6baa2728cdc5ec2d31fe9ddfa555465f3386ff0413a851541c06d160270f56896c715c136849776b7233482a0de359c616e73ed4be0755ed05da199 SHA512 471309ad08b0a10f18b34a3d69a81ff19223787f375ea652fb12a96b3166432a55efb091d255aee4388262e44af0d4b3ea2a644ddc6cfaf8201b57194511a1d9
AUX tcpstat-1.5-db.patch 4691 BLAKE2B 1c135688c7197144f6add6ccca007a70141033a16a6b3c24cf4d9769f43b651fc5cfc2bad875c010d7b888e5533af49aca7eab2c691bb716e2c389435136ab0d SHA512 03de51e86bd0aa1bf2d29097871fe8409498050100c4adefde7d8aae7bdd752455af6ce13b490f4e596ea90557b37c95b974705cbaece35d9b465571fdb31d6d
+AUX tcpstat-1.5_p8-_DEFAULT_SOURCE.patch 510 BLAKE2B 37197b4cbd2c957ad06f8f9813675678b1105e5e63664885dc8346ab96a07e3ca55485a472ea7b6c027518be031669ead178c438bb315ae813e47e7d982f4c46 SHA512 36f92f585e044695eaec96c557bcdd42be170d8d2827c31ff1d310931a7f7aaabe8cf0495ce70b110534872d155af9b9934106ac001bac16662cea8c74e257f4
+AUX tcpstat-1.5_p8-ipv6.patch 1031 BLAKE2B 140174a7dc761c1a9c3183919fd3594e61f866282ccbef95840adeba9dab062d73652335761c13183f9df291b854cae2801001ed32be7571c9f744176bbe90a4 SHA512 65bd5be8498317c7a778d56582d716433ae1eeabbccb0ae6b5deab7de067927db23e4cce0115bf7ece5e410851cd9d74c9523a1ec802bcea4cd7933bc9121095
+AUX tcpstat-1.5_p8-libpcap.patch 191 BLAKE2B 2bc5d3cb2abf84459e4eb0869ff41b295415c9075b69faa97c27eb604658dd9ff8a7a8f8b0f8515cb26f3554672bd3222a8cce0a4538dbd3e1931df6506d07a8 SHA512 e94799b018178c92541e33afaf297fe60039344392fe2629bc82af691df5c14f3e629e2728d87f323ccb191a1dd7d0d501967d73f0d2142e20b4d13bc93467df
+AUX tcpstat-1.5_p8-off-by-one.patch 1299 BLAKE2B 651fddce0312ecf6c7c6d55f1bf7d6504f76c1df0dd4f3386dd2e9a9075a60524ba74d46f531bb0916451ef9b37a1b31cb71eb95e75821d8f95ba9028d203e98 SHA512 85aaf4d129e2c5afdbdc4eead9cbda3fc54c91923500df5a3cd1ca692ef3c7f3862f60dc30f3809104237c0ec349bab12eb7e8db742aca83479c47bceaca7bfb
+AUX tcpstat-1.5_p8-unused.patch 2731 BLAKE2B d1d120953a68cd5fa1dddaf3b6521c953fcf3772fd5d52cafca2fbbceffa0c1245a4e882b6cad17464ecc003642efd54fe00413eade52cf16adc1985c0c0431a SHA512 5c9a058dc299b04e8cd7b875643200efbcdfa99cfbd33b5527bf4b0960cdeb44767bd3da3df91c4ba8b4ec9dcbd1d5a313c880c7d32ed5ded9201432ff871c09
DIST tcpstat-1.5.tar.gz 93102 BLAKE2B 39a570fe6176fda0e8a6539417ece268183a1ebed6fa956b8ec5556b8bbd2508829e7d0861ef39b551bd6070df70cfdaf3dbf694a42ad00be4ea0f3e5c757ce5 SHA512 f1399365e754e4d9e19657c455a580294a7b4002a0d02ff05791a45574dcb1d0e75dc492157ef595066502b1553702481c67b20ad24267a50d7293766c39a5ab
-EBUILD tcpstat-1.5-r3.ebuild 855 BLAKE2B 330c2133eabd9397e71e7cdc2bb81525c4021883597abca48344e66b70652d2988ade3ad476a856c11f7971ef443bf4732f0e89910dbbd7764ef55087e55569f SHA512 1d1564553cddcfd07aa05e11f15be0dc9b07a7754024626f5429330ee9ca2d812721e9d7b666bdba5567fa13dacee1cda1e4cebf491dc35340f8c9f4b0622634
+DIST tcpstat_1.5-8.debian.tar.xz 7844 BLAKE2B d74e3fd6a274d5e4e0963741bcfe870cfa300281706f965ac1c61ab7e6eb9aa2ea06566649fb3ae8d6071464cfa4bc037e58f64bf32f71ad8b3006976a515417 SHA512 f54546a9191feddc5410c7abb6764533ce89de4bd93fdc480e1a8f7473b405ca914482e6b950ead39d78d235caf093aaa663c683df346417070b97fc3e4f5c41
+EBUILD tcpstat-1.5-r3.ebuild 885 BLAKE2B 35118eac1848752b7df5ad245b938d5194a31e29392ea23569d0097c4b1233ca17c46b1fa85f1f08b8a2ca88ea502a4a79dd3ee4bd450360768f9da865fcd260 SHA512 d4d010e9564ae72d50776b6a7e3fc7d618e7c198efebdf66a8f36c07cd1b9e055ff7dca0452132863cd9b752cdf1be7d1e12a68f0049b59c8de826836f7470d3
+EBUILD tcpstat-1.5_p8.ebuild 1271 BLAKE2B 968e4940b1cceb0d22f04eda3bb18ceac3147ae87963120a6e92bc72febb4a79207052804617733c4157474a82bf2eee7056adda9de72523f16a8ff68541d848 SHA512 21c914fc0ff09e5039858f58fb57baa23bdf6443155c44e4fcc256b91e0909fd141605063e5449f76698ceb2d1327a2f87932983618abd3902b42945755f6ba0
MISC metadata.xml 276 BLAKE2B e21811549278e73aa9a14acfe242fd022106a39ac1300caa00615772d7f54d08a433052659a271f9ac0d453c7776fc2b9e8d86e6d3f637817c214174dde52cb2 SHA512 f0e6c6bc89659e01e157d9bf30d0a2f3fd2d71bc26c8d12489c4a44fc5237159946e25b46e7295ab4676aea63559194977a0b1e76aced31d81cf6387dd0f4250
diff --git a/net-analyzer/tcpstat/files/tcpstat-1.5_p8-_DEFAULT_SOURCE.patch b/net-analyzer/tcpstat/files/tcpstat-1.5_p8-_DEFAULT_SOURCE.patch
new file mode 100644
index 000000000000..3ea38d7bac02
--- /dev/null
+++ b/net-analyzer/tcpstat/files/tcpstat-1.5_p8-_DEFAULT_SOURCE.patch
@@ -0,0 +1,11 @@
+--- a/configure.in
++++ b/configure.in
+@@ -68,7 +68,7 @@
+ case $my_build_os in
+ aix*) AC_DEFINE(AIX_STRANGENESS, 1, [ defined on AIX systems. ]) ;;
+ osf1*) AC_DEFINE(TRU64_STRANGENESS, 1, [ defined on OSF systems. ]) ;;
+- linux*) AC_DEFINE(_BSD_SOURCE, 1, [ defined usually on linux systems ] ) ;;
++ linux*) AC_DEFINE(_DEFAULT_SOURCE, 1, [ defined usually on linux systems ] ) ;;
+ gnu/kfreebsd*) AC_DEFINE(_BSD_SOURCE, 1, [ defined usually on debian kfreebsd systems ] ) ;;
+ bsd/os*) ;;
+ freebsd*) ;;
diff --git a/net-analyzer/tcpstat/files/tcpstat-1.5_p8-ipv6.patch b/net-analyzer/tcpstat/files/tcpstat-1.5_p8-ipv6.patch
new file mode 100644
index 000000000000..f26268f7a93f
--- /dev/null
+++ b/net-analyzer/tcpstat/files/tcpstat-1.5_p8-ipv6.patch
@@ -0,0 +1,30 @@
+--- 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
diff --git a/net-analyzer/tcpstat/files/tcpstat-1.5_p8-libpcap.patch b/net-analyzer/tcpstat/files/tcpstat-1.5_p8-libpcap.patch
new file mode 100644
index 000000000000..54554890416a
--- /dev/null
+++ b/net-analyzer/tcpstat/files/tcpstat-1.5_p8-libpcap.patch
@@ -0,0 +1,11 @@
+--- a/configure.in
++++ b/configure.in
+@@ -47,7 +47,7 @@
+ fi
+ done
+ else
+- LDFLAGS=" -L${with_pcap_lib} "${LDFLAGS}
++ LDFLAGS="${with_pcap_lib} "${LDFLAGS}
+ fi
+
+ AC_ARG_ENABLE(fdesc,
diff --git a/net-analyzer/tcpstat/files/tcpstat-1.5_p8-off-by-one.patch b/net-analyzer/tcpstat/files/tcpstat-1.5_p8-off-by-one.patch
new file mode 100644
index 000000000000..4029ddb7d407
--- /dev/null
+++ b/net-analyzer/tcpstat/files/tcpstat-1.5_p8-off-by-one.patch
@@ -0,0 +1,50 @@
+--- a/src/catpcap.c
++++ b/src/catpcap.c
+@@ -156,10 +156,10 @@
+ return Usage(1, argv[0]);
+ break;
+ case 'f':
+- strncpy(filterexpr, optarg, BUF_SIZ);
++ strncpy(filterexpr, optarg, BUF_SIZ - 1);
+ break;
+ case 'r':
+- strncpy(filename, optarg, BUF_SIZ);
++ strncpy(filename, optarg, BUF_SIZ - 1);
+ break;
+ default:
+ return Usage(1, argv[0]);
+--- a/src/dump.c
++++ b/src/dump.c
+@@ -109,10 +109,10 @@
+ get_tcp_flags |= GET_TCPD_COUNT_LINKSIZE;
+ break;
+ case 'f':
+- strncpy(filterexpr, optarg, BUF_SIZ);
++ strncpy(filterexpr, optarg, BUF_SIZ - 1);
+ break;
+ case 'r':
+- strncpy(filename, optarg, BUF_SIZ);
++ strncpy(filename, optarg, BUF_SIZ - 1);
+ break;
+ case 's':
+ what_to_show |= parse_show_types(optarg);
+--- a/src/tcpprof.c
++++ b/src/tcpprof.c
+@@ -126,14 +126,14 @@
+ src_dest_split = 1;
+ break;
+ case 'f':
+- strncpy(filterexpr, optarg, BUF_SIZ);
++ strncpy(filterexpr, optarg, BUF_SIZ - 1);
+ break;
+ case 'i':
+- strncpy(filename, optarg, BUF_SIZ);
++ strncpy(filename, optarg, BUF_SIZ - 1);
+ flags |= GET_TCPD_DO_LIVE;
+ break;
+ case 'r':
+- strncpy(filename, optarg, BUF_SIZ);
++ strncpy(filename, optarg, BUF_SIZ - 1);
+ flags &= ~GET_TCPD_DO_LIVE;
+ break;
+ case 'n':
diff --git a/net-analyzer/tcpstat/files/tcpstat-1.5_p8-unused.patch b/net-analyzer/tcpstat/files/tcpstat-1.5_p8-unused.patch
new file mode 100644
index 000000000000..c255f52dbe85
--- /dev/null
+++ b/net-analyzer/tcpstat/files/tcpstat-1.5_p8-unused.patch
@@ -0,0 +1,99 @@
+--- 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
+@@ -52,13 +52,12 @@
+ 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;
++ u_char *r;
+ char c;
+
+ r = (u_char *)p;
+- s = (u_char *)p;
+ step = 22;
+ printf("%u: %lu.%.6lu, caplen %u, len %u\n",
+ p_number++,
+@@ -92,7 +91,7 @@
+ * 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];
+--- 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/tcpstat-1.5-r3.ebuild b/net-analyzer/tcpstat/tcpstat-1.5-r3.ebuild
index 422bd5d082da..203f75b73a01 100644
--- a/net-analyzer/tcpstat/tcpstat-1.5-r3.ebuild
+++ b/net-analyzer/tcpstat/tcpstat-1.5-r3.ebuild
@@ -6,7 +6,7 @@ inherit autotools flag-o-matic
DESCRIPTION="Reports network interface statistics"
HOMEPAGE="https://www.frenchfries.net/paul/tcpstat/"
-SRC_URI="${HOMEPAGE}${P}.tar.gz"
+SRC_URI="https://www.frenchfries.net/paul/tcpstat/${P}.tar.gz"
LICENSE="BSD-2"
SLOT="0"
diff --git a/net-analyzer/tcpstat/tcpstat-1.5_p8.ebuild b/net-analyzer/tcpstat/tcpstat-1.5_p8.ebuild
new file mode 100644
index 000000000000..017454e4ac7d
--- /dev/null
+++ b/net-analyzer/tcpstat/tcpstat-1.5_p8.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools flag-o-matic
+
+DESCRIPTION="Reports network interface statistics"
+HOMEPAGE="https://www.frenchfries.net/paul/tcpstat/"
+SRC_URI="
+ https://www.frenchfries.net/paul/tcpstat/${P/_p*}.tar.gz
+ mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV/_p*}-$(ver_cut 4).debian.tar.xz
+"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="ipv6"
+
+DEPEND="
+ net-libs/libpcap
+ sys-libs/db:*
+"
+RDEPEND="
+ ${DEPEND}
+"
+DOCS=( AUTHORS ChangeLog NEWS README doc/Tips_and_Tricks.txt )
+PATCHES=(
+ "${FILESDIR}"/${P}-_DEFAULT_SOURCE.patch
+ "${FILESDIR}"/${P}-ipv6.patch
+ "${FILESDIR}"/${P}-libpcap.patch
+ "${FILESDIR}"/${P}-off-by-one.patch
+ "${FILESDIR}"/${P}-unused.patch
+)
+S=${WORKDIR}/${P/_p*}
+
+src_prepare() {
+ eapply $(
+ for patch in $(cat "${WORKDIR}"/debian/patches/series)
+ do echo "${WORKDIR}"/debian/patches/${patch}
+ done
+ ) ${PATCHES[@]}
+ eapply_user
+
+ eautoreconf
+}
+
+src_configure() {
+ append-cflags -Wall -Wextra
+ econf \
+ $(use_enable ipv6) \
+ --with-pcap-include='' \
+ --with-pcap-lib="$( $(tc-getPKG_CONFIG) --libs libpcap)"
+}
+
+src_install() {
+ default
+ dobin src/{catpcap,packetdump}
+ newdoc src/README README.src
+}