From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Mar 21 14:10:21 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 582B716A41F for ; Tue, 21 Mar 2006 14:10:21 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3BD6D43D5D for ; Tue, 21 Mar 2006 14:10:15 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k2LEAE37005275 for ; Tue, 21 Mar 2006 14:10:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k2LEAEux005274; Tue, 21 Mar 2006 14:10:14 GMT (envelope-from gnats) Resent-Date: Tue, 21 Mar 2006 14:10:14 GMT Resent-Message-Id: <200603211410.k2LEAEux005274@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ben Allen Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2045416A400 for ; Tue, 21 Mar 2006 14:03:56 +0000 (UTC) (envelope-from benjamin@kryten.oitsec.umn.edu) Received: from mail.oitsec.umn.edu (mail.oitsec.umn.edu [128.101.238.120]) by mx1.FreeBSD.org (Postfix) with ESMTP id 71C4443D48 for ; Tue, 21 Mar 2006 14:03:55 +0000 (GMT) (envelope-from benjamin@kryten.oitsec.umn.edu) Received: from localhost (localhost [127.0.0.1]) by mail.oitsec.umn.edu (Postfix) with ESMTP id CE3F11CC097; Tue, 21 Mar 2006 08:03:54 -0600 (CST) Received: from mail.oitsec.umn.edu ([127.0.0.1]) by localhost (mail.oitsec.umn.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 30869-04-4; Tue, 21 Mar 2006 08:03:53 -0600 (CST) Received: from kryten.oitsec.umn.edu (kryten.oitsec.umn.edu [160.94.247.227]) by mail.oitsec.umn.edu (Postfix) with ESMTP id D69101CC09E; Tue, 21 Mar 2006 08:03:49 -0600 (CST) Received: by kryten.oitsec.umn.edu (Postfix, from userid 1001) id D057D844AC; Mon, 20 Mar 2006 13:42:54 -0600 (CST) Message-Id: <20060321140349.D057D844AC@kryten.oitsec.umn.edu> Date: Mon, 20 Mar 2006 13:42:54 -0600 (CST) From: Ben Allen To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Ben Allen Subject: ports/94777: [patch] Add --zero-delay option to net-mgmt/etherape X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ben Allen List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Mar 2006 14:10:21 -0000 >Number: 94777 >Category: ports >Synopsis: [patch] Add --zero-delay option to net-mgmt/etherape >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Tue Mar 21 14:10:14 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Ben Allen >Release: FreeBSD 5.4-RELEASE-p11 i386 >Organization: University of Minnesota >Environment: System: FreeBSD kryten.oitsec.umn.edu 5.4-RELEASE-p11 FreeBSD 5.4-RELEASE-p11 #9: Fri Feb 17 12:28:15 CST 2006 root@kryten.oitsec.umn.edu:/usr/obj/usr/src/sys/OITSEC-5_4-BEN i386 CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (2394.01-MHz 686-class CPU) libraries: libgnome-2.12.0.1 & friends >Description: When using etherape to analyze long packet captures, the "real-time" mode is frustrating. This patch adds a command line option to disable the inter-packet timing analysis, and just read the capture file as fast as possible, and then draw the diagram once. This provides a fast way to analyze conversations occuring in long packet captures. >How-To-Repeat: Using tcpdump, capture an hour's worth of low, volume traffic - DNS/SMTP/HTTP traffic on one workstation should suffice - to a file. Open the capture file in etherape, and watch it draw the graph. Note, this will take an hour. The patch below will cause the graph to be drawn as quickly as possible when the "-z" or "--zero-delay" flag is added on the command line. >Fix: The patch below applies to /usr/ports/net-mgmt/etherape/work/etherape-0.9.1/src . ie: # cd /usr/ports/net-mgmt/etherape # make extract # cd work/etherape-0.9.1/src # patch < the_patch_below # cd /usr/ports/net-mgmt/etherape # make install The patch below has been submitted to the etherape developers as well. However, based on their project at sourceforge, it seems that the main project seems to be moving rather slowly at the moment. --- patch.etherape.zero_delay begins here --- --- capture.c.orig Mon Mar 20 11:08:13 2006 +++ capture.c Mon Mar 20 11:08:53 2006 @@ -527,7 +527,16 @@ this_time.tv_usec = phdr.ts.tv_usec; diff = substract_times (this_time, last_time); - ms_to_next = diff.tv_sec * 1000 + diff.tv_usec / 1000; + + if (pref.zero_delay) + { + ms_to_next = 0; + } + else + { + ms_to_next = diff.tv_sec * 1000 + diff.tv_usec / 1000; + } + last_time = this_time; --- globals.h.orig Mon Mar 20 11:06:35 2006 +++ globals.h Mon Mar 20 11:07:16 2006 @@ -342,6 +342,8 @@ gchar *interface; /* Network interface to listen to */ gchar *filter; /* Pcap filter to be used */ + gboolean zero_delay; /* no delay processing tcpdump files */ + } pref; --- main.c.orig Mon Mar 20 11:07:35 2006 +++ main.c Mon Mar 20 11:07:56 2006 @@ -60,6 +60,9 @@ N_("set the node color"), N_("color")}, {"text-color", 'T', POPT_ARG_STRING, &(pref.text_color), 0, N_("set the text color"), N_("color")}, + {"zero-delay", 'z', POPT_ARG_NONE, &(pref.zero_delay), 0, + N_("zero delay for reading capture files [cli only]"), NULL}, + POPT_AUTOHELP {NULL, 0, 0, NULL, 0} }; --- patch.etherape.zero_delay ends here --- >Release-Note: >Audit-Trail: >Unformatted: