Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 May 2006 19:34:01 -0700
From:      Julian Elischer <julian@elischer.org>
To:        benjamin@cactus.org
Cc:        freebsd-net@freebsd.org
Subject:   Re: Blocking N consecutive packets with netgraph
Message-ID:  <44751799.8020405@elischer.org>
In-Reply-To: <20060524233846.GA8189@linux.cactus.org>
References:  <20060524233846.GA8189@linux.cactus.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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"
>  
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44751799.8020405>