summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boman <mboman@gentoo.org>2004-03-04 17:00:39 +0000
committerMichael Boman <mboman@gentoo.org>2004-03-04 17:00:39 +0000
commit8d2b4381d891cf3d18cac8d035ab0b9fb0d4c1c8 (patch)
tree98b18319affd28d091e380624e7aa08b9cd43daa /net-analyzer/ttt
parentMarked stable on sparc. If you have any problems on sparc, check gentoo bug ... (diff)
downloadgentoo-2-8d2b4381d891cf3d18cac8d035ab0b9fb0d4c1c8.tar.gz
gentoo-2-8d2b4381d891cf3d18cac8d035ab0b9fb0d4c1c8.tar.bz2
gentoo-2-8d2b4381d891cf3d18cac8d035ab0b9fb0d4c1c8.zip
New ebuild, submitted by Jochen <jochen.eisinger@gmx.de>. Closes 40958.
Diffstat (limited to 'net-analyzer/ttt')
-rw-r--r--net-analyzer/ttt/ChangeLog10
-rw-r--r--net-analyzer/ttt/Manifest3
-rw-r--r--net-analyzer/ttt/files/digest-ttt-1.81
-rw-r--r--net-analyzer/ttt/files/ttt-1.8-linux-sll.patch79
-rw-r--r--net-analyzer/ttt/files/ttt-1.8-pcap.patch11
-rw-r--r--net-analyzer/ttt/metadata.xml11
-rw-r--r--net-analyzer/ttt/ttt-1.8.ebuild48
7 files changed, 163 insertions, 0 deletions
diff --git a/net-analyzer/ttt/ChangeLog b/net-analyzer/ttt/ChangeLog
new file mode 100644
index 000000000000..a1c185cf68a9
--- /dev/null
+++ b/net-analyzer/ttt/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for net-analyzer/ttt
+# Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ttt/ChangeLog,v 1.1 2004/03/04 17:00:39 mboman Exp $
+
+*ttt-1.8 (05 Mar 2004)
+
+ 05 Mar 2004; Michael Boman <mboman@gentoo.org> ttt-1.8.ebuild,
+ files/ttt-1.8-linux-sll.patch, files/ttt-1.8-pcap.patch:
+ New ebuild, submitted by Jochen <jochen.eisinger@gmx.de>. Closes 40958.
+
diff --git a/net-analyzer/ttt/Manifest b/net-analyzer/ttt/Manifest
new file mode 100644
index 000000000000..79a3231aaff2
--- /dev/null
+++ b/net-analyzer/ttt/Manifest
@@ -0,0 +1,3 @@
+MD5 15a0c0b97b3101920327b91e3b74bfb6 ttt-1.8.ebuild 979
+MD5 731900a46e4de27b97ffefca6b161c37 files/ttt-1.8-pcap.patch 297
+MD5 525b88bccd59588c935e7951ad328ffe files/digest-ttt-1.8 59
diff --git a/net-analyzer/ttt/files/digest-ttt-1.8 b/net-analyzer/ttt/files/digest-ttt-1.8
new file mode 100644
index 000000000000..5944854b816b
--- /dev/null
+++ b/net-analyzer/ttt/files/digest-ttt-1.8
@@ -0,0 +1 @@
+MD5 b4e36fd166ba00d68899961b0610f6e0 ttt-1.8.tar.gz 134687
diff --git a/net-analyzer/ttt/files/ttt-1.8-linux-sll.patch b/net-analyzer/ttt/files/ttt-1.8-linux-sll.patch
new file mode 100644
index 000000000000..4bdc3a2932cb
--- /dev/null
+++ b/net-analyzer/ttt/files/ttt-1.8-linux-sll.patch
@@ -0,0 +1,79 @@
+--- ttt-1.8/net_read.c 2003-10-16 13:55:18.000000000 +0200
++++ ttt-1.8/net_read.c.new 2004-02-09 19:40:31.000000000 +0100
+@@ -172,6 +172,10 @@
+ static void pflog_if_read(u_char *user, const struct pcap_pkthdr *h,
+ const u_char *p);
+ #endif
++#ifdef DLT_LINUX_SLL /* linux specific */
++static void linux_sll_if_read(u_char *user, const struct pcap_pkthdr *h,
++ const u_char *p);
++#endif
+ static int ether_encap_read(u_short ethtype, const u_char *p,
+ int length, int caplen);
+ static int llc_read(const u_char *p, const int length, const int caplen);
+@@ -664,6 +668,55 @@
+ }
+ #endif
+
++#ifdef DLT_LINUX_SLL
++
++#define SLL_HEADER_SIZE 16
++#define SLL_ADDRLEN 8 /* length of address field */
++
++struct sll_header {
++ u_int16_t sll_pkttype; /* packet type */
++ u_int16_t sll_hatype; /* link-layer address type */
++ u_int16_t sll_halen; /* link-layer address length */
++ u_int8_t sll_addr[SLL_ADDRLEN]; /* link-layer address */
++ u_int16_t sll_protocol; /* protocol */
++};
++
++#define LINUX_SLL_P_802_2 0x0004
++
++static void
++linux_sll_if_read(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
++{
++ int caplen = h->caplen;
++ int length = h->len;
++ struct sll_header *hdr = (struct sll_header *)p;
++ int protocol;
++
++ packet_length = length; /* save data link level packet length */
++ if (caplen < SLL_HEADER_SIZE) {
++ return;
++ }
++
++ p += SLL_HEADER_SIZE;
++ length -= SLL_HEADER_SIZE;
++ caplen -= SLL_HEADER_SIZE;
++
++ protocol = ntohs(hdr->sll_protocol);
++
++ if (protocol <= 1536) {
++
++ switch (protocol) {
++
++ case LINUX_SLL_P_802_2:
++ llc_read(p, length, caplen);
++ break;
++
++ }
++ } else
++ ether_encap_read(protocol, p, length, caplen);
++}
++
++#endif
++
+ #ifdef PFLOG_HDRLEN
+
+ static void
+@@ -1094,6 +1147,9 @@
+ #ifdef PFLOG_HDRLEN
+ { pflog_if_read, DLT_PFLOG },
+ #endif
++#ifdef DLT_LINUX_SLL
++ { linux_sll_if_read, DLT_LINUX_SLL },
++#endif
+ { NULL, 0 },
+ };
+
diff --git a/net-analyzer/ttt/files/ttt-1.8-pcap.patch b/net-analyzer/ttt/files/ttt-1.8-pcap.patch
new file mode 100644
index 000000000000..93e1437fb5b3
--- /dev/null
+++ b/net-analyzer/ttt/files/ttt-1.8-pcap.patch
@@ -0,0 +1,11 @@
+--- pcap_inet.c.orig 2004-02-09 14:01:54.000000000 +0100
++++ pcap_inet.c 2004-02-09 14:02:02.000000000 +0100
+@@ -150,7 +150,7 @@
+
+ int
+ pcap_lookupnet(device, netp, maskp, errbuf)
+- register char *device;
++ register const char *device;
+ register u_int *netp, *maskp;
+ register char *errbuf;
+ {
diff --git a/net-analyzer/ttt/metadata.xml b/net-analyzer/ttt/metadata.xml
new file mode 100644
index 000000000000..8c8ed01b61b6
--- /dev/null
+++ b/net-analyzer/ttt/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<maintainer>
+ <email>mboman@gentoo.org</email>
+ <name>Michael Boman</name>
+ <description>Interim Maintainer</description>
+</maintainer>
+<longdescription>Tele Traffic Taper (ttt) - Real-time Graphical Remote Traffic Monitor</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/ttt/ttt-1.8.ebuild b/net-analyzer/ttt/ttt-1.8.ebuild
new file mode 100644
index 000000000000..76bf1bd95b6f
--- /dev/null
+++ b/net-analyzer/ttt/ttt-1.8.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ttt/ttt-1.8.ebuild,v 1.1 2004/03/04 17:00:39 mboman Exp $
+
+DESCRIPTION="Tele Traffic Taper (ttt) - Real-time Graphical Remote Traffic Monitor"
+SRC_URI="ftp://ftp.csl.sony.co.jp/pub/kjc/${P}.tar.gz"
+HOMEPAGE="http://www.csl.sony.co.jp/person/kjc/kjc/software.html"
+
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="~x86"
+IUSE="ipv6"
+
+DEPEND="virtual/glibc
+ virtual/x11
+ dev-lang/tcl
+ dev-lang/tk
+ >=dev-tcltk/blt-2.4
+ >=net-libs/libpcap-0.7.1
+ sys-apps/grep"
+
+src_unpack() {
+ unpack ${A}
+
+ cd ${S}
+ grep -q 'pcap_lookupnet.*const' /usr/include/pcap.h &&
+ epatch ${FILESDIR}/${P}-pcap.patch
+
+ epatch ${FILESDIR}/${P}-linux-sll.patch
+}
+
+src_compile() {
+ local myconf
+ use ipv6 && myconf="${myconf} --enable-ipv6"
+
+ econf ${myconf} || die "./configure failed"
+
+ emake || die "make failed"
+}
+
+src_install() {
+ dodoc README
+ dodir /usr/bin
+ dodir /usr/lib/ttt
+ dodir /usr/share/man/man1
+ einstall exec_prefix=${D}/usr install-man || die "make install failed"
+ prepall
+}