From owner-freebsd-net@FreeBSD.ORG Thu May 25 02:34:11 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DAA5016A420 for ; Thu, 25 May 2006 02:34:11 +0000 (UTC) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E3D443D4C for ; Thu, 25 May 2006 02:34:11 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.23.205]) ([10.251.23.205]) by a50.ironport.com with ESMTP; 24 May 2006 19:34:02 -0700 Message-ID: <44751799.8020405@elischer.org> Date: Wed, 24 May 2006 19:34:01 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.13) Gecko/20060414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: benjamin@cactus.org References: <20060524233846.GA8189@linux.cactus.org> In-Reply-To: <20060524233846.GA8189@linux.cactus.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: Blocking N consecutive packets with netgraph X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2006 02:34:11 -0000 benjamin@cactus.org wrote: >I need to test a multicast streaming media application by selectively >dropping packets in the network connecting the source to the viewer. > >The capability I need is to drop N consecutive packets, where N ranges >from 1 to 50 and is chosen via the command line. > >I had hoped to do this with dummynet and ipfw, but apparently I can >only drop packets with a specified probablity. The network topology >for this method was to bridge two ethernet nics, then use dummynet pipes >to vary the bandwith and packet loss rate. > >I also tested a method using ipfw to temporarily enable packet block >rules using a short sleep interval, but there was only very coarse >control of the number of packets blocked. > >Is it feasible to do this with netgraph? Please outline how this may >be accomplihsed. > > Certainly it is as long as you are happy to write your own node. Now, don't be scared.. nodes are relatively simple to write. They can be loaded dynamically once written. check out all the nodes available at: http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netgraph/ you can start easily with the "sample" node. change its name and compile it by adding a directory in the /sys/modules.netgraph directory, copying the Makefile from another one and modifying it accordingly. start hacking.. documantation is in: http://www.freebsd.org/cgi/man.cgi?query=netgraph&apropos=0&sektion=4&manpath=FreeBSD+7.0-current&format=html and all the other man pages for netgraph modules, >TIA > >Tom Benjamin >_______________________________________________ >freebsd-net@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-net >To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > >