pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/xplot Fixes to tcpdump2xplot:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/05c17f0e008d
branches:  trunk
changeset: 520056:05c17f0e008d
user:      bad <bad%pkgsrc.org@localhost>
date:      Sat Oct 14 09:13:14 2006 +0000

description:
Fixes to tcpdump2xplot:
- Strip output added by modern tcpdump versions in verbose mode from
input lines (IP options, tcp checksum status).
- Split sack ranges on consecutive spaces instead of just a single space.

diffstat:

 graphics/xplot/Makefile         |   4 ++--
 graphics/xplot/distinfo         |   4 ++--
 graphics/xplot/patches/patch-ab |  25 +++++++++++++++++++++----
 3 files changed, 25 insertions(+), 8 deletions(-)

diffs (67 lines):

diff -r 89480b49643d -r 05c17f0e008d graphics/xplot/Makefile
--- a/graphics/xplot/Makefile   Sat Oct 14 09:11:25 2006 +0000
+++ b/graphics/xplot/Makefile   Sat Oct 14 09:13:14 2006 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.22 2006/07/08 17:34:02 bad Exp $
+# $NetBSD: Makefile,v 1.23 2006/10/14 09:13:14 bad Exp $
 
 DISTNAME=      xplot-0.90.7.1
-PKGREVISION=   4
+PKGREVISION=   5
 CATEGORIES=    graphics x11
 MASTER_SITES=  http://www.xplot.org/xplot/
 HOMEPAGE=      http://www.xplot.org/
diff -r 89480b49643d -r 05c17f0e008d graphics/xplot/distinfo
--- a/graphics/xplot/distinfo   Sat Oct 14 09:11:25 2006 +0000
+++ b/graphics/xplot/distinfo   Sat Oct 14 09:13:14 2006 +0000
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.7 2006/07/08 17:34:02 bad Exp $
+$NetBSD: distinfo,v 1.8 2006/10/14 09:13:14 bad Exp $
 
 SHA1 (xplot-0.90.7.1.tar.gz) = 164074206addaeb971d2fa65069c7c7be654efc5
 RMD160 (xplot-0.90.7.1.tar.gz) = 166915e138ea52e58a67e80cb20d42005fa54621
 Size (xplot-0.90.7.1.tar.gz) = 60166 bytes
 SHA1 (patch-aa) = 48a475a550a2ea9d2bc50f2782d598830802817e
-SHA1 (patch-ab) = bdc80f5e4c2e00f38e1d9a88f48687d5a85212c5
+SHA1 (patch-ab) = 97c7b292a1c1f8d9294c69d4cc2eacbbff411d2e
 SHA1 (patch-ac) = 671b63a8db7c41df4e9f14147988d81ff921aca7
 SHA1 (patch-ad) = fd19823030badf91734fde92b45fcaecc06cf0f8
diff -r 89480b49643d -r 05c17f0e008d graphics/xplot/patches/patch-ab
--- a/graphics/xplot/patches/patch-ab   Sat Oct 14 09:11:25 2006 +0000
+++ b/graphics/xplot/patches/patch-ab   Sat Oct 14 09:13:14 2006 +0000
@@ -1,14 +1,31 @@
-$NetBSD: patch-ab,v 1.6 2006/07/08 17:34:02 bad Exp $
+$NetBSD: patch-ab,v 1.7 2006/10/14 09:13:14 bad Exp $
 
 --- tcpdump2xplot.pl.orig      2000-05-03 20:08:19.000000000 +0200
-+++ tcpdump2xplot.pl   2006-07-08 19:23:12.000000000 +0200
-@@ -229,6 +229,9 @@
++++ tcpdump2xplot.pl
+@@ -226,9 +226,16 @@ for ($lineNo = 1; <$Tcpdump>; $lineNo++)
+     local(%opts);
+ 
+     chop;
++    # strip unwanted output added by modern tcdump versions in verbose mode
++    #
++    s/\(tos.*?\)//;     # (tos 0x0, ttl ... length: \d+)
++    s/ \[(?:bad )?tcp (?:ck)?sum.*?\]//; # [tcp sum ok]/[bad tcp cksum ....]
      $opts = $_;   # save this for later 
  
-     split(/ /);
+-    split(/ /);
++    split(/ +/);
 +    # Sometime after version 3.7.1 tcpdump started to print 'IP'
 +    # as the second field in the output. Get rid of it again.
 +    splice @_, 1, 1 if $_[1] eq 'IP';
      $time = $_[0];
      $from = $_[1];
      $to = $_[3];
+@@ -412,7 +419,7 @@ for ($lineNo = 1; <$Tcpdump>; $lineNo++)
+ 
+               # print stderr "SACKS after : $sacks \n";
+ 
+-              @sacks = split(/ /, $sacks);
++              @sacks = split(/ +/, $sacks);
+               
+               for ($i = 0; $i <= $#sacks; $i++) {
+                   local($start);



Home | Main Index | Thread Index | Old Index