summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/nettop')
-rw-r--r--net-analyzer/nettop/Manifest1
-rw-r--r--net-analyzer/nettop/files/nettop-0.2.3-gcc411.patch49
-rw-r--r--net-analyzer/nettop/files/nettop-0.2.3-offbyone.patch29
-rw-r--r--net-analyzer/nettop/metadata.xml5
-rw-r--r--net-analyzer/nettop/nettop-0.2.3-r2.ebuild33
5 files changed, 117 insertions, 0 deletions
diff --git a/net-analyzer/nettop/Manifest b/net-analyzer/nettop/Manifest
new file mode 100644
index 000000000000..e915ab0a21a8
--- /dev/null
+++ b/net-analyzer/nettop/Manifest
@@ -0,0 +1 @@
+DIST nettop-0.2.3.tar.gz 22797 SHA256 4dbb2bdb506c4a5a49d67fbd7bcc860008a881abe55271cf3651316620143556 SHA512 96e0bff2b0c317636a303c5eb1e27b5ee862e94dad507ce756ef24e2cad7bbe2ebb5fcb46294b790c32b5fd6189381d1c1d0835a522a06b02522d093c15c6ece WHIRLPOOL 1deca1671dfe173a4fc95b0bb66359883d7fd510bb4abeba51e9341098cfb9094de6c88c768902f657e04e5ee9cb709bb3d96d64ce075621c82d2384efe02354
diff --git a/net-analyzer/nettop/files/nettop-0.2.3-gcc411.patch b/net-analyzer/nettop/files/nettop-0.2.3-gcc411.patch
new file mode 100644
index 000000000000..5e516eab0907
--- /dev/null
+++ b/net-analyzer/nettop/files/nettop-0.2.3-gcc411.patch
@@ -0,0 +1,49 @@
+--- a/nettop.c
++++ b/nettop.c
+@@ -70,6 +70,7 @@
+ #include <time.h>
+ #include <stdlib.h>
+ #include <netdb.h>
++#include <string.h>
+
+ #include "node.h"
+ #include "ent.h"
+@@ -216,22 +217,26 @@
+ }
+ }
+
+- ether.count = ether.size = (int) ether.l = (int) ether.r = 0;
++ ether.count = ether.size = 0;
++ ether.l = ether.r = 0;
+ ether.type = -1;
+ for (i = 0; i < HISTORY_SIZE; i++)
+ ether.size_h[i] = 0;
+
+- ip.count = ip.size = (int) ip.l = (int) ip.r = 0;
++ ip.count = ip.size = 0;
++ ip.l = ip.r = 0;
+ ip.type = -1;
+ for (i = 0; i < HISTORY_SIZE; i++)
+ ip.size_h[i] = 0;
+
+- tcp.count = tcp.size = (int) tcp.l = (int) tcp.r = 0;
++ tcp.count = tcp.size = 0;
++ tcp.l = tcp.r = 0;
+ tcp.type = -1;
+ for (i = 0; i < HISTORY_SIZE; i++)
+ tcp.size_h[i] = 0;
+
+- udp.count = udp.size = (int) udp.l = (int) udp.r = 0;
++ udp.count = udp.size = 0;
++ udp.l = udp.r = 0;
+ udp.type = -1;
+ for (i = 0; i < HISTORY_SIZE; i++)
+ udp.size_h[i] = 0;
+@@ -361,6 +366,7 @@
+ }
+ break;
+ default:
++ break;
+ }
+ }
+ }
diff --git a/net-analyzer/nettop/files/nettop-0.2.3-offbyone.patch b/net-analyzer/nettop/files/nettop-0.2.3-offbyone.patch
new file mode 100644
index 000000000000..32ab3d64ad4c
--- /dev/null
+++ b/net-analyzer/nettop/files/nettop-0.2.3-offbyone.patch
@@ -0,0 +1,29 @@
+--- a/nettop.c
++++ b/nettop.c
+@@ -384,7 +385,7 @@
+ void
+ screen_update()
+ {
+- struct node *sorted[24] = {0};
++ struct node *sorted[25] = {0};
+ unsigned long long sump, sums, valp, vals;
+ unsigned long long xfrrate = 0;
+ int i, do_ipprint, last[3] = {0};
+@@ -512,7 +513,7 @@
+ void
+ ipprint(int last[])
+ {
+- struct node *sorted[24] = {0};
++ struct node *sorted[25] = {0};
+ struct ent *proto;
+ unsigned long long valp, vals, sump, sums;
+ unsigned long long xfrrate = 0;
+@@ -575,7 +576,7 @@
+ void
+ servprint(int last[], struct node *tree, int type)
+ {
+- struct node *sorted[24] = {0};
++ struct node *sorted[25] = {0};
+ struct ent *e;
+ struct ent *service;
+ unsigned long long vals, valp, sums, sump;
diff --git a/net-analyzer/nettop/metadata.xml b/net-analyzer/nettop/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/nettop/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/nettop/nettop-0.2.3-r2.ebuild b/net-analyzer/nettop/nettop-0.2.3-r2.ebuild
new file mode 100644
index 000000000000..d1bc2d0b49f2
--- /dev/null
+++ b/net-analyzer/nettop/nettop-0.2.3-r2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="top like program for network activity"
+SRC_URI="http://srparish.net/scripts/${P}.tar.gz"
+HOMEPAGE="http://srparish.net/software/"
+
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="amd64 ~arm ppc x86"
+
+DEPEND="
+ sys-libs/slang
+ net-libs/libpcap
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-gcc411.patch \
+ "${FILESDIR}"/${P}-offbyone.patch
+ tc-export CC
+}
+
+src_install() {
+ dosbin nettop
+ dodoc ChangeLog README THANKS
+}