1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-06 11:41:52 +00:00

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)
This commit is contained in:
Stefan Eßer 2020-01-21 20:42:17 +00:00
parent ed09885fec
commit 777c1c0e4c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=523739
9 changed files with 135 additions and 1 deletions

1
MOVED
View File

@ -13268,7 +13268,6 @@ net/py-netstring||2019-10-16|Has expired: Unfetchable, unmaintained
net/radiusd-cistron||2019-10-16|Has expired: Unfetchable, unmaintained
net/rtptools||2019-10-16|Has expired: Unfetchable, unmaintained
net/smbldap-tools||2019-10-16|Has expired: Unfetchable, unmaintained
net/tcptrace||2019-10-16|Has expired: Unfetchable, unmaintained
net/wackford-squeers||2019-10-16|Has expired: Unfetchable, unmaintained
net/wmnet2||2019-10-16|Has expired: Unfetchable, unmaintained
net-im/pidgin-birthday-reminder||2019-10-16|Has expired: Unfetchable, unmaintained

View File

@ -1446,6 +1446,7 @@
SUBDIR += tcpsplit
SUBDIR += tcpstat
SUBDIR += tcptestsuite
SUBDIR += tcptrace
SUBDIR += tcptraceroute
SUBDIR += tcpview
SUBDIR += tcpwatch

41
net/tcptrace/Makefile Normal file
View File

@ -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>

3
net/tcptrace/distinfo Normal file
View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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

15
net/tcptrace/pkg-descr Normal file
View File

@ -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/