From owner-freebsd-ipfw@FreeBSD.ORG Fri Mar 4 19:35:52 2011 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04173106564A for ; Fri, 4 Mar 2011 19:35:52 +0000 (UTC) (envelope-from michael.scheidell@secnap.com) Received: from mx1.secnap.com.ionspam.net (mx1.secnap.com.ionspam.net [204.89.241.253]) by mx1.freebsd.org (Postfix) with ESMTP id B4E458FC0C for ; Fri, 4 Mar 2011 19:35:51 +0000 (UTC) Received: from mx1.secnap.com.ionspam.net (mx1.secnap.com.ionspam.net [10.70.1.253]) by mx1.secnap.com.ionspam.net (Postfix) with ESMTP id 0B0F42B7C91; Fri, 4 Mar 2011 14:35:51 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secnap.com; h= content-type:content-type:in-reply-to:references:subject:subject :mime-version:user-agent:from:from:date:date:message-id; s=dkim; t=1299267350; x=1301081750; bh=CqJgczrS7aMKFq6ijhWJXXw5cpQ979jj /wqj6Ghfh/s=; b=LmIw0eVogJdTGaOhQqDX/vtmABjMAwb7e7kFGl6VdlsVsPjK MmeldVIQSnGCRZZx2hoQkL/TLMAtfgIScgxfg77iaBRFU8jQl56kTODZTLcUBvMY hPAngxp+OV3nBLUKptLFq0C6bn58coo8l8oNMHnvESjTyQ1AZT5XbdTNaJ4= X-Amavis-Modified: Mail body modified (using disclaimer) - mx1.secnap.com.ionspam.net X-Virus-Scanned: SpammerTrap(r) VPS-1500 2.14 at mx1.secnap.com.ionspam.net Received: from USBCTDC001.secnap.com (usbctdc001.secnap.com [10.70.1.1]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.secnap.com.ionspam.net (Postfix) with ESMTPS id 23ECB2B7C8C; Fri, 4 Mar 2011 14:35:50 -0500 (EST) Received: from macintosh.secnap.com (10.70.3.3) by USBCTDC001.secnap.com (10.70.1.1) with Microsoft SMTP Server (TLS) id 14.0.722.0; Fri, 4 Mar 2011 14:35:49 -0500 Message-ID: <4D713F25.6020909@secnap.com> Date: Fri, 4 Mar 2011 14:36:05 -0500 From: Michael Scheidell User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.14) Gecko/20110221 Thunderbird/3.1.8 MIME-Version: 1.0 To: JJC References: In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-ipfw@freebsd.org Subject: Re: if_bridge and ipdivert oddity? X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Mar 2011 19:35:52 -0000 Hey, thats a nice, clean looking test :-) I suspect SOME of the latency is the unbuffered printf. two printfs to &2 for every packet that flows. On 3/4/11 2:01 PM, JJC wrote > inline transparently on fBSD > > ** begin perl snippet** > #!/usr/bin/perl -w > use Net::Divert; > > select STDERR; $| = 1; > > my $divobj = Net::Divert->new('localhost',8000); > > printf(STDERR "open new divobj\n"); > > $divobj->getPackets(\&alterPacket); > > sub alterPacket { my($packet,$fwtag) = @_; > printf(STDERR "i"); > $divobj->putPacket($packet,$fwtag); > printf(STDERR "o"); > } > _______________________________________________ > freebsd-ipfw@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw > To unsubscribe, send any mail to "freebsd-ipfw-unsubscribe@freebsd.org" -- Michael Scheidell, CTO o: 561-999-5000 d: 561-948-2259 ISN: 1259*1300 >*| *SECNAP Network Security Corporation * Certified SNORT Integrator * 2008-9 Hot Company Award Winner, World Executive Alliance * Five-Star Partner Program 2009, VARBusiness * Best in Email Security,2010: Network Products Guide * King of Spam Filters, SC Magazine 2008 ______________________________________________________________________ This email has been scanned and certified safe by SpammerTrap(r). For Information please see http://www.secnap.com/products/spammertrap/ ______________________________________________________________________