[Midnightbsd-cvs] mports [22020] trunk/net-mgmt/tcptrack: tcptrack 1.4.2
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Oct 30 12:35:37 EDT 2016
Revision: 22020
http://svnweb.midnightbsd.org/mports/?rev=22020
Author: laffer1
Date: 2016-10-30 12:35:37 -0400 (Sun, 30 Oct 2016)
Log Message:
-----------
tcptrack 1.4.2
Modified Paths:
--------------
trunk/net-mgmt/tcptrack/Makefile
trunk/net-mgmt/tcptrack/distinfo
trunk/net-mgmt/tcptrack/pkg-descr
Added Paths:
-----------
trunk/net-mgmt/tcptrack/files/
trunk/net-mgmt/tcptrack/files/patch-IPAddress.h
trunk/net-mgmt/tcptrack/files/patch-IPv6Address.cc
trunk/net-mgmt/tcptrack/files/patch-const
trunk/net-mgmt/tcptrack/files/patch-headers.h
trunk/net-mgmt/tcptrack/files/patch-no-stack-limits
trunk/net-mgmt/tcptrack/files/patch-util.cc
Modified: trunk/net-mgmt/tcptrack/Makefile
===================================================================
--- trunk/net-mgmt/tcptrack/Makefile 2016-10-30 16:34:05 UTC (rev 22019)
+++ trunk/net-mgmt/tcptrack/Makefile 2016-10-30 16:35:37 UTC (rev 22020)
@@ -1,25 +1,20 @@
# $MidnightBSD$
-PORTNAME= tcptrack
-PORTVERSION= 1.3.0
-CATEGORIES= net-mgmt
-MASTER_SITES= http://www.rhythm.cx/~steve/devel/tcptrack/%SUBDIR%/
-MASTER_SITE_SUBDIR= release/${PORTVERSION}/source
+PORTNAME= tcptrack
+PORTVERSION= 1.4.2
+PORTREVISION= 3
+CATEGORIES= net-mgmt
+MASTER_SITES= http://BSDforge.com/projects/source/net-mgmt/tcptrack/ \
+ http://pkgs.fedoraproject.org/repo/pkgs/tcptrack/tcptrack-1.4.2.tar.gz/dacf71a6b5310caf1203a2171b598610/
MAINTAINER= ports at MidnightBSD.org
COMMENT= Packet sniffer which displays TCP information like top(1)
-LICENSE= gpl2
+LICENSE= lgpl2.1
+
+USES= ncurses
GNU_CONFIGURE= yes
-PLIST_FILES= bin/tcptrack
-MAN1= tcptrack.1
-PORTDOCS= AUTHORS ChangeLog INSTALL NEWS README TODO
+PLIST_FILES= bin/tcptrack man/man1/tcptrack.1.gz
-.if !defined(NOPORTDOCS)
-post-install:
- @${MKDIR} ${DOCSDIR}
- cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
-.endif
-
.include <bsd.port.mk>
Modified: trunk/net-mgmt/tcptrack/distinfo
===================================================================
--- trunk/net-mgmt/tcptrack/distinfo 2016-10-30 16:34:05 UTC (rev 22019)
+++ trunk/net-mgmt/tcptrack/distinfo 2016-10-30 16:35:37 UTC (rev 22020)
@@ -1,2 +1,2 @@
-SHA256 (tcptrack-1.3.0.tar.gz) = a46a5ba3132ebc9a7a98929dcf860cdff7966ba6f144f47ec8399c1c60c2ef2b
-SIZE (tcptrack-1.3.0.tar.gz) = 116725
+SHA256 (tcptrack-1.4.2.tar.gz) = 6607b1e1c778c49d3e8795e119065cf66eb2db28b3255dbc56b1612527107049
+SIZE (tcptrack-1.4.2.tar.gz) = 120569
Added: trunk/net-mgmt/tcptrack/files/patch-IPAddress.h
===================================================================
--- trunk/net-mgmt/tcptrack/files/patch-IPAddress.h (rev 0)
+++ trunk/net-mgmt/tcptrack/files/patch-IPAddress.h 2016-10-30 16:35:37 UTC (rev 22020)
@@ -0,0 +1,11 @@
+--- src/IPAddress.h.orig 2010-09-29 03:23:24.000000000 +0200
++++ src/IPAddress.h 2015-08-20 23:35:26.583907000 +0200
+@@ -16,7 +16,7 @@ public:
+
+ virtual int GetType() const = 0;
+ virtual bool operator==( const IPAddress & ) const = 0;
+- virtual bool operator!=( const IPAddress & addr ) const { return !operator!=(addr); }
++ virtual bool operator!=( const IPAddress & addr ) const { return !operator==(addr); }
+ virtual char * ptr() const = 0;
+ virtual uint32_t hash() const = 0;
+ virtual IPAddress* Clone() const = 0;
Property changes on: trunk/net-mgmt/tcptrack/files/patch-IPAddress.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/net-mgmt/tcptrack/files/patch-IPv6Address.cc
===================================================================
--- trunk/net-mgmt/tcptrack/files/patch-IPv6Address.cc (rev 0)
+++ trunk/net-mgmt/tcptrack/files/patch-IPv6Address.cc 2016-10-30 16:35:37 UTC (rev 22020)
@@ -0,0 +1,11 @@
+--- src/IPv6Address.cc.orig 2010-09-28 03:35:16.000000000 +0200
++++ src/IPv6Address.cc 2014-07-18 10:19:48.000000000 +0200
+@@ -7,6 +7,8 @@
+ #include "IPv6Address.h"
+ #include "util.h"
+
++#define s6_addr16 __u6_addr.__u6_addr16
++
+ uint16_t IPv6Address::GetShort( int index ) const
+ {
+ assert(index >= 0);
Property changes on: trunk/net-mgmt/tcptrack/files/patch-IPv6Address.cc
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/net-mgmt/tcptrack/files/patch-const
===================================================================
--- trunk/net-mgmt/tcptrack/files/patch-const (rev 0)
+++ trunk/net-mgmt/tcptrack/files/patch-const 2016-10-30 16:35:37 UTC (rev 22020)
@@ -0,0 +1,22 @@
+Const is good...
+
+ -mi
+
+--- src/Guesser.h 2010-09-27 19:02:01.000000000 -0400
++++ src/Guesser.h 2015-03-23 11:42:51.000000000 -0400
+@@ -20,5 +20,5 @@
+ {
+ public:
+- bool operator()( const SocketPair &sp1, const SocketPair & sp2 )
++ bool operator()( const SocketPair &sp1, const SocketPair & sp2 ) const
+ {
+ if( sp1==sp2 )
+--- src/TCContainer.h 2010-09-27 19:02:01.000000000 -0400
++++ src/TCContainer.h 2015-03-23 11:40:43.000000000 -0400
+@@ -58,5 +58,5 @@
+ {
+ public:
+- bool operator()( const SocketPair &sp1, const SocketPair &sp2 )
++ bool operator()( const SocketPair &sp1, const SocketPair &sp2 ) const
+ {
+ if( sp1==sp2 )
Property changes on: trunk/net-mgmt/tcptrack/files/patch-const
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/net-mgmt/tcptrack/files/patch-headers.h
===================================================================
--- trunk/net-mgmt/tcptrack/files/patch-headers.h (rev 0)
+++ trunk/net-mgmt/tcptrack/files/patch-headers.h 2016-10-30 16:35:37 UTC (rev 22020)
@@ -0,0 +1,10 @@
+--- src/headers.h-orig 2014-07-18 09:58:12.000000000 +0200
++++ src/headers.h 2014-07-18 09:58:31.000000000 +0200
+@@ -120,7 +120,6 @@
+ #define TH_URG 0x20
+ #define TH_ECE 0x40
+ #define TH_CWR 0x80
+- #define TH_FLAGS (TH_FIN|TH_SYN|TH_RST|TH_ACK|TH_URG|TH_ECE|TH_CWR)
+ u_short th_win; /* window */
+ u_short th_sum; /* checksum */
+ u_short th_urp; /* urgent pointer */
Property changes on: trunk/net-mgmt/tcptrack/files/patch-headers.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/net-mgmt/tcptrack/files/patch-no-stack-limits
===================================================================
--- trunk/net-mgmt/tcptrack/files/patch-no-stack-limits (rev 0)
+++ trunk/net-mgmt/tcptrack/files/patch-no-stack-limits 2016-10-30 16:35:37 UTC (rev 22020)
@@ -0,0 +1,160 @@
+Remove attempts to set arbitrary limits on stack-sizes for different
+threads, which cause segfaults (due, presumably, to the limits being
+too low).
+
+ -mi
+
+--- src/defs.h 2010-09-27 19:02:01.000000000 -0400
++++ src/defs.h 2015-03-23 16:39:53.000000000 -0400
+@@ -30,8 +30,2 @@
+ //#define FASTMODE_INTERVAL 250000000 // one quarter of a second
+ #define FASTMODE_INTERVAL 100000000 // one tenth of a second
+-
+-// stack sizes for the different threads
+-#define SS_PB 2048 // PacketBuffer
+-#define SS_S 4096 // Sniffer 2048 -> segfault on freebsd
+-#define SS_TCC 4096 // TCContainer
+-#define SS_TUI 5120 // TextUI. 4096 -> segfault on solaris
+--- src/PacketBuffer.cc 2010-09-27 19:02:01.000000000 -0400
++++ src/PacketBuffer.cc 2015-03-23 16:23:36.000000000 -0400
+@@ -53,14 +53,6 @@
+ // Start up maintenence thread
+ //
+- pthread_attr_t attr;
+- if( pthread_attr_init( &attr ) != 0 )
+- throw GenericError("pthread_attr_init() failed");
+-
+- // TODO: there is no man page for this call on linux. Not sure what it
+- // may return. On some systems it may not be supported at all
+- // (should return ENOSYS). Should be safe to ignore return val.
+- pthread_attr_setstacksize( &attr, SS_PB );
+
+- if( pthread_create(&maint_thread_tid,&attr,pbmaint_thread_func,this) != 0 )
++ if (pthread_create(&maint_thread_tid, NULL, pbmaint_thread_func, this) != 0)
+ throw GenericError("pthread_create() returned an error");
+
+--- src/Sniffer.cc 2010-09-27 19:02:22.000000000 -0400
++++ src/Sniffer.cc 2015-03-23 16:25:10.000000000 -0400
+@@ -55,5 +66,5 @@
+ }
+
+-void Sniffer::init(char *iface, char *fexp, char *test_file)
++void Sniffer::init(const char *iface, const char *fexp, const char *test_file)
+ {
+ assert(pcap_initted==false);
+@@ -89,6 +102,4 @@
+ // prepare the filter
+ //
+- struct bpf_program filter; // the filter for the sniffer
+- char *filter_app = fexp; // The filter expression
+ bpf_u_int32 mask; // The netmask of our sniffing device
+ bpf_u_int32 net; // The IP of our sniffing device
+@@ -102,28 +113,23 @@
+ mask = 0;
+ }
+- if( pcap_compile(handle, &filter, filter_app, 0, net) == -1 )
+- {
+- pcap_close(handle);
+- throw PcapError("pcap_compile",pcap_geterr(handle));
+- }
+- if( pcap_setfilter(handle, &filter) ) // apply filter to sniffer
+- {
+- pcap_freecode(&filter);
+- pcap_close(handle);
+- throw PcapError("pcap_setfilter",pcap_geterr(handle));
++ if (fexp != NULL && fexp[0] != '\0') {
++ struct bpf_program filter; // the filter for the sniffer
++ if (pcap_compile(handle, &filter, fexp, 0, net) == -1)
++ {
++ pcap_close(handle);
++ throw PcapError("pcap_compile", pcap_geterr(handle));
++ }
++ if (pcap_setfilter(handle, &filter)) // apply filter to sniffer
++ {
++ pcap_freecode(&filter);
++ pcap_close(handle);
++ throw PcapError("pcap_setfilter", pcap_geterr(handle));
++ }
++ pcap_freecode(&filter); // filter code not needed after setfilter
+ }
+- pcap_freecode(&filter); // filter code not needed after setfilter
+-
+- pcap_initted=true;
+-
+
+- pthread_attr_t attr;
+-
+- if( pthread_attr_init( &attr ) != 0 )
+- throw GenericError("pthread_attr_init() failed");
+-
+- pthread_attr_setstacksize( &attr, SS_S );
++ pcap_initted=true;
+
+- if( pthread_create(&sniffer_tid,&attr,sniffer_thread_func,this) != 0 )
++ if (pthread_create(&sniffer_tid, NULL, sniffer_thread_func, this) != 0)
+ throw GenericError("pthread_create() failed.");
+
+@@ -163,9 +170,11 @@
+ void Sniffer::processPacket( const pcap_pkthdr *header, const u_char *packet )
+ {
+- assert( pthread_mutex_lock(&pb_mutex)==0 );
++
++ if (pthread_mutex_lock(&pb_mutex) != 0)
++ return;
+
+ if( pb==NULL )
+ {
+- assert( pthread_mutex_unlock(&pb_mutex) == 0 );
++ pthread_mutex_unlock(&pb_mutex);
+ return;
+ }
+@@ -193,5 +202,5 @@
+ pb->pushPacket(n);
+
+- assert( pthread_mutex_unlock(&pb_mutex) == 0 );
++ pthread_mutex_unlock(&pb_mutex);
+ }
+
+--- src/Sniffer.h 2010-09-27 19:02:22.000000000 -0400
++++ src/Sniffer.h 2015-03-23 15:07:57.000000000 -0400
+@@ -43,5 +43,5 @@
+ // init performs some constructor-like activity. It is separate
+ // so that exceptions don't have to be thrown in the constructor.
+- void init(char *iface, char *fexp, char *test_file);
++ void init(const char *iface, const char *fexp, const char *test_file);
+
+ // set the place where sniffed packets are sent for further
+--- src/TCContainer.cc 2010-09-27 19:02:01.000000000 -0400
++++ src/TCContainer.cc 2015-03-23 16:23:05.000000000 -0400
+@@ -47,15 +47,8 @@
+ state=TSTATE_IDLE;
+
+- pthread_attr_t attr;
+-
+ pthread_mutex_init( &conlist_lock, NULL );
+ pthread_mutex_init( &state_mutex, NULL );
+
+- if( pthread_attr_init( &attr ) != 0 )
+- throw GenericError("pthread_attr_init() failed");
+-
+- pthread_attr_setstacksize( &attr, SS_TCC );
+-
+- if( pthread_create(&maint_thread_tid,&attr,maint_thread_func,this) != 0 )
++ if( pthread_create(&maint_thread_tid, NULL, maint_thread_func, this) != 0 )
+ throw GenericError("pthread_create() failed.");
+
+--- src/TextUI.cc 2011-08-03 13:34:45.000000000 -0400
++++ src/TextUI.cc 2015-03-23 16:24:20.000000000 -0400
+@@ -80,11 +80,5 @@
+ run_displayer = true;
+
+- pthread_attr_t attr;
+- if( pthread_attr_init( &attr ) != 0 )
+- throw GenericError("pthread_attr_init() failed");
+-
+- pthread_attr_setstacksize( &attr, SS_TUI );
+-
+- if( pthread_create(&displayer_tid,&attr,displayer_thread_func,this) != 0 )
++ if (pthread_create(&displayer_tid, NULL, displayer_thread_func, this) != 0)
+ throw GenericError("pthread_create() returned an error.");
+
Property changes on: trunk/net-mgmt/tcptrack/files/patch-no-stack-limits
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/net-mgmt/tcptrack/files/patch-util.cc
===================================================================
--- trunk/net-mgmt/tcptrack/files/patch-util.cc (rev 0)
+++ trunk/net-mgmt/tcptrack/files/patch-util.cc 2016-10-30 16:35:37 UTC (rev 22020)
@@ -0,0 +1,10 @@
+--- src/util.cc-orig 2014-07-18 09:55:37.000000000 +0200
++++ src/util.cc 2014-07-18 09:56:11.000000000 +0200
+@@ -22,6 +22,7 @@
+ #include "util.h"
+ #include <stdio.h>
+ #include <cstring>
++#include <string>
+ #include "headers.h"
+ #ifdef HAVE_HASH_MAP
+ # include <hash_map>
Property changes on: trunk/net-mgmt/tcptrack/files/patch-util.cc
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Modified: trunk/net-mgmt/tcptrack/pkg-descr
===================================================================
--- trunk/net-mgmt/tcptrack/pkg-descr 2016-10-30 16:34:05 UTC (rev 22019)
+++ trunk/net-mgmt/tcptrack/pkg-descr 2016-10-30 16:35:37 UTC (rev 22020)
@@ -1,8 +1,8 @@
-tcptrack is a sniffer which displays information about TCP connections it
+tcptrack is a sniffer that displays information about TCP connections it
sees on a network interface. It passively watches for connections on the
-network interface, keeps track of their state and displays a list of
-connections in a manner similar to the unix 'top' command. It displays
-source and destination addresses and ports, connection state, idle time, and
+network interface, keeps track of their state, and displays a list of
+connections in a manner similar to the UNIX top(1) command. It displays
+source and destination addresses, ports, connection state, idle time, and
bandwidth usage.
-WWW: http://www.rhythm.cx/~steve/devel/tcptrack/
+WWW: http://BSDforge.com/projects/net-mgmt/tcptrack/
More information about the Midnightbsd-cvs
mailing list