Dummynet and simulating random delay
peterjeremy at optushome.com.au
Wed Jan 24 07:10:25 UTC 2007
On Tue, 2007-Jan-23 14:22:54 -0500, Andresen, Jason R. wrote:
>I have a project that requires me to simulate a link with varying but
>well defined delay. The link is guarenteed to deliver packets in
>order, so I wish to maintain that behavior with Dummynet.
I don't think dummynet can do this in its current form. Based on
a quick look at the source, the packet delivery time is set to the
current time plus the current delay when the packet arrives (see
sys/netinet/ip_dummynet.c:move_pkt(). This means that changing
the delay will not affect existing queued packets.
Changing dummynet to allow variable delays whilst maintaining packet
order is not immediately trivial. The only option I can see would be
to change the dummynet curr_time (net.inet.ip.dummynet.curr_time)
to increment at variable rate instead of one count per tick. You
would probably need to do some fiddling to provide anything better
than very coarse delay variation.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20070124/a329583e/attachment.pgp
More information about the freebsd-stable