aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2020-01-21 20:42:17 +0000
committerStefan Eßer <se@FreeBSD.org>2020-01-21 20:42:17 +0000
commit777c1c0e4c187de4969a8275214f6cfb11c0234d (patch)
tree4cb649390660f5a4f5f107dd9c35617ae23476b1 /net
parented09885fec597eb62cafff8e5505b7fd558cf8a9 (diff)
downloadports-777c1c0e4c187de4969a8275214f6cfb11c0234d.tar.gz
ports-777c1c0e4c187de4969a8275214f6cfb11c0234d.zip
Resurrect tcptrace
This port has been deleted on 2019-10-16 as un-fetchable, but there is a repository on GitHub that provides a slightly later version than that of the deleted port. Approved by: antoine (mentor)
Notes
Notes: svn path=/head/; revision=523739
Diffstat (limited to 'net')
-rw-r--r--net/Makefile1
-rw-r--r--net/tcptrace/Makefile41
-rw-r--r--net/tcptrace/distinfo3
-rw-r--r--net/tcptrace/files/patch-mod_traffic.c11
-rw-r--r--net/tcptrace/files/patch-tcpdump.c17
-rw-r--r--net/tcptrace/files/patch-tcpdump.h34
-rw-r--r--net/tcptrace/files/patch-tcptrace.h13
-rw-r--r--net/tcptrace/pkg-descr15
8 files changed, 135 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile
index d70d9c2db42f..b2c858a12a03 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -1446,6 +1446,7 @@
SUBDIR += tcpsplit
SUBDIR += tcpstat
SUBDIR += tcptestsuite
+ SUBDIR += tcptrace
SUBDIR += tcptraceroute
SUBDIR += tcpview
SUBDIR += tcpwatch
diff --git a/net/tcptrace/Makefile b/net/tcptrace/Makefile
new file mode 100644
index 000000000000..de5682d6a24c
--- /dev/null
+++ b/net/tcptrace/Makefile
@@ -0,0 +1,41 @@
+# Created by: fenner
+# $FreeBSD$
+
+PORTNAME= tcptrace
+PORTVERSION= 6.6.8
+CATEGORIES= net
+#MASTER_SITES= http://www.tcptrace.org/download/
+
+MAINTAINER= se@FreeBSD.org
+COMMENT= TCP dump file analysis tool
+
+LICENSE= GPLv2+
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+USES= bison
+GNU_CONFIGURE= yes
+ALL_TARGET= tcptrace
+USE_GITHUB= yes
+GH_ACCOUNT= blitz
+GH_TAGNAME= 508f73a
+
+PLIST_FILES= bin/tcptrace \
+ bin/xpl2gpl \
+ man/man1/tcptrace.1.gz
+
+PORTDOCS= ARGS CHANGES FAQ README README.mailing_list \
+ README.modules README.tline_graphs README.tput_graphs \
+ README.version README.xpl2gpl THANKS dot_tcptracerc
+
+OPTIONS_DEFINE= DOCS
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/tcptrace ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/xpl2gpl ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.man ${STAGEDIR}${MAN1PREFIX}/man/man1/${PORTNAME}.1
+
+do-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
diff --git a/net/tcptrace/distinfo b/net/tcptrace/distinfo
new file mode 100644
index 000000000000..ea70de6c701d
--- /dev/null
+++ b/net/tcptrace/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1579553429
+SHA256 (blitz-tcptrace-6.6.8-508f73a_GH0.tar.gz) = 91b8f947ff7b238d0e757e94a30a3a5ed09d1555e312725f2903442cf5885954
+SIZE (blitz-tcptrace-6.6.8-508f73a_GH0.tar.gz) = 3755441
diff --git a/net/tcptrace/files/patch-mod_traffic.c b/net/tcptrace/files/patch-mod_traffic.c
new file mode 100644
index 000000000000..a1108d43a144
--- /dev/null
+++ b/net/tcptrace/files/patch-mod_traffic.c
@@ -0,0 +1,11 @@
+--- mod_traffic.c.orig 2013-07-01 18:43:14 UTC
++++ mod_traffic.c
+@@ -291,7 +291,7 @@ IncludePorts(
+
+
+
+-static int
++static void
+ traffic_init_files(void)
+ {
+ static int created = 0;
diff --git a/net/tcptrace/files/patch-tcpdump.c b/net/tcptrace/files/patch-tcpdump.c
new file mode 100644
index 000000000000..f82fb83b2b38
--- /dev/null
+++ b/net/tcptrace/files/patch-tcpdump.c
@@ -0,0 +1,17 @@
+--- tcpdump.c.orig 2013-07-01 18:43:14 UTC
++++ tcpdump.c
+@@ -114,10 +114,13 @@ static int callback(
+ /* for some reason, the windows version of tcpdump is using */
+ /* this. It looks just like ethernet to me */
+ case PCAP_DLT_EN10MB:
+- offset = find_ip_eth(buf); /* Here we check if we are dealing with Straight Ethernet encapsulation or PPPoE */
++ offset = find_ip_eth(buf); /* Here we check if we are dealing with Straight Ethernet encapsulation, PPPoE or .1q VLAN encapsulation */
+ memcpy(&eth_header, buf, EH_SIZE); /* save ether header */
+ switch (offset)
+ {
++ case EH_SIZE + ETHER_VLAN_ENCAP_LEN:
++ memcpy(&eth_header.ether_type, buf+EH_SIZE+2, 2);
++ /* FALLTHROUGH */
+ case EH_SIZE: /* straight Ethernet encapsulation */
+ memcpy((char *)ip_buf,buf+offset,iplen-offset);
+ callback_plast = ip_buf+iplen-offset-1;
diff --git a/net/tcptrace/files/patch-tcpdump.h b/net/tcptrace/files/patch-tcpdump.h
new file mode 100644
index 000000000000..5d62d0eb35ba
--- /dev/null
+++ b/net/tcptrace/files/patch-tcpdump.h
@@ -0,0 +1,34 @@
+--- tcpdump.h.orig 2013-07-01 18:43:14 UTC
++++ tcpdump.h
+@@ -179,7 +179,7 @@ static int find_ip_fddi(char* buf, int iplen) {
+ }
+
+ /* This function determine the offset for the IP packet in an Ethernet frame */
+-/* We handle two cases : straight Ethernet encapsulation or PPPoE encapsulation */
++/* We handle three cases : straight Ethernet, PPPoE, or .1q VLAN encapsulation */
+ /* Written by Yann Samama (ysamama@nortelnetworks.com) on july 18th, 2003 */
+ static int find_ip_eth(char* buf)
+ {
+@@ -192,16 +192,19 @@ static int find_ip_eth(char* buf)
+ switch (eth_proto_type)
+ {
+ case ETHERTYPE_IPV6: /* it's pure IPv6 over ethernet */
+- offset = 14;
+- break;
++ /* FALLTHROUGH */
+ case ETHERTYPE_IP: /* it's pure IPv4 over ethernet */
+- offset = 14;
++ offset = sizeof(struct ether_header);
+ break;
+ case ETHERTYPE_PPPOE_SESSION: /* it's a PPPoE session */
+ memcpy(&ppp_proto_type, buf+20, 2);
+ ppp_proto_type = ntohs(ppp_proto_type);
+ if (ppp_proto_type == 0x0021) /* it's IP over PPPoE */
+ offset = PPPOE_SIZE;
++ break;
++ case ETHERTYPE_VLAN:
++ offset = sizeof(struct ether_header) +
++ ETHER_VLAN_ENCAP_LEN;
+ break;
+ default: /* well, this is not an IP packet */
+ offset = -1;
diff --git a/net/tcptrace/files/patch-tcptrace.h b/net/tcptrace/files/patch-tcptrace.h
new file mode 100644
index 000000000000..11baaab86770
--- /dev/null
+++ b/net/tcptrace/files/patch-tcptrace.h
@@ -0,0 +1,13 @@
+--- tcptrace.h.orig 2013-07-01 18:43:14 UTC
++++ tcptrace.h
+@@ -1188,6 +1188,10 @@ struct ipaddr *IPV6ADDR2ADDR(struct in6_addr *addr6);
+ #define ETHERTYPE_VLAN 0x8100
+ #endif /* 802.1Q Virtual LAN */
+
++#ifndef ETHER_VLAN_ENCAP_LEN
++#define ETHER_VLAN_ENCAP_LEN 4
++#endif /* 802.1Q tag header length */
++
+ /* support for PPPoE encapsulation added by Yann Samama (ysamama@nortelnetworks.com)*/
+ #ifndef ETHERTYPE_PPPOE_SESSION
+ #define ETHERTYPE_PPPOE_SESSION 0x8864
diff --git a/net/tcptrace/pkg-descr b/net/tcptrace/pkg-descr
new file mode 100644
index 000000000000..34e364fe651a
--- /dev/null
+++ b/net/tcptrace/pkg-descr
@@ -0,0 +1,15 @@
+tcptrace is a TCP connection analysis tool. It can tell you detailed
+information about TCP connections by sifting through dump files.
+The dump file formats supported are:
+ Standard tcpdump format (you need the pcap library)
+ Sun's snoop format
+ Macintosh Etherpeek format
+ HP/NetMetrix protocol analysis format
+ NS simulator output format
+ NetScout
+ NLANR Tsh Format
+
+To see the graphs, you'll also need Tim Shepard's xplot program,
+available at http://www.xplot.org
+
+WWW: http://www.tcptrace.org/