Revision: 70313 http://trac.macports.org/changeset/70313 Author: ryandesign@macports.org Date: 2010-08-05 16:30:02 -0700 (Thu, 05 Aug 2010) Log Message: ----------- tcpdstat: new port, version "1.0"; see #25902 Added Paths: ----------- trunk/dports/net/tcpdstat/ trunk/dports/net/tcpdstat/Portfile trunk/dports/net/tcpdstat/files/ trunk/dports/net/tcpdstat/files/patch-Makefile.diff trunk/dports/net/tcpdstat/files/patch-net_read.c.diff Added: trunk/dports/net/tcpdstat/Portfile =================================================================== --- trunk/dports/net/tcpdstat/Portfile (rev 0) +++ trunk/dports/net/tcpdstat/Portfile 2010-08-05 23:30:02 UTC (rev 70313) @@ -0,0 +1,53 @@ +# $Id$ + +PortSystem 1.0 + +name tcpdstat +version 1.0 +categories net security +platforms darwin +maintainers yahoo.fr:jul_bsd + +description network traffic pattern analysis tool + +long_description ${name} produces a per-protocol breakdown of traffic \ + by bytes and packets, with average and maximum transfer \ + rates, for a given libpcap file (e.g., from tcpdump, \ + ethereal, snort, etc.). Useful for getting a high-level \ + view of traffic patterns. + +homepage http://staff.washington.edu/dittrich/talks/core02/tools/tools.html +master_sites http://staff.washington.edu/dittrich/talks/core02/tools/ + +dist_subdir ${name}/${version} +distname ${name}-uw +extract.suffix .tar +extract.cmd tar +extract.pre_args -xf + +checksums md5 64b246fb0a4ee47ae37e83d721b205df \ + sha1 3f0d95499bd33118bbcf86752a2d524eb2802fa7 \ + rmd160 6b03265d2b075e3f85b4c0e93c42bc05d010fc5e + +depends_lib port:libpcap + +patchfiles patch-Makefile.diff \ + patch-net_read.c.diff + +post-patch { + reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/Makefile +} + +use_configure no + +build.args CC="${configure.cc}" + +variant universal {} +if {[variant_isset universal]} { + set archflags ${configure.universal_cflags} +} else { + set archflags ${configure.cc_archflags} +} +build.args-append CFLAGS="${archflags}" + +destroot.destdir PREFIX=${destroot}${prefix} Property changes on: trunk/dports/net/tcpdstat/Portfile ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Added: trunk/dports/net/tcpdstat/files/patch-Makefile.diff =================================================================== --- trunk/dports/net/tcpdstat/files/patch-Makefile.diff (rev 0) +++ trunk/dports/net/tcpdstat/files/patch-Makefile.diff 2010-08-05 23:30:02 UTC (rev 70313) @@ -0,0 +1,13 @@ +--- Makefile.orig 2003-01-08 15:30:56.000000000 -0600 ++++ Makefile 2010-08-05 18:17:08.000000000 -0500 +@@ -4,8 +4,8 @@ + PWD=tcpdstat-uw + + SYS_DEFINES= -DLINUX -D__FAVOR_BSD -D_LARGEFILE_SOURCE=1 \ +- -D_FILE_OFFSET_BITS=64 -L../libpcap-0.7.1 +-SYS_INCLUDES= -I../libpcap-0.7.1 ++ -D_FILE_OFFSET_BITS=64 -L@PREFIX@/lib ++SYS_INCLUDES= -I@PREFIX@/include + + FLAGS= -g -Wall + DEFINES= $(SYS_DEFINES) Added: trunk/dports/net/tcpdstat/files/patch-net_read.c.diff =================================================================== --- trunk/dports/net/tcpdstat/files/patch-net_read.c.diff (rev 0) +++ trunk/dports/net/tcpdstat/files/patch-net_read.c.diff 2010-08-05 23:30:02 UTC (rev 70313) @@ -0,0 +1,11 @@ +--- net_read.c.orig 2002-05-21 19:39:20.000000000 -0500 ++++ net_read.c 2010-08-05 18:12:29.000000000 -0500 +@@ -146,7 +146,7 @@ + pcap_t *pd; + int pcapfd; + +-static int packet_length; /* length of current packet */ ++int packet_length; /* length of current packet */ + + #define STAT_ADD(name) \ + { tcpdstat[(name)].packets++; tcpdstat[(name)].bytes += packet_length; }
participants (1)
-
ryandesign@macports.org