lkml.org 
[lkml]   [1997]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Dropping packets, general kernel hacking (newbie questions)
Date
> IP forwarding code for a linux router occasionally drop packets
> and/or delay them some number of milliseconds. My first attempt

I use a 3c501 ethernet card for this. Hardware crap network support.

> will be to add the code somewhere at the end of ip_forward.c,
> before the packets get put on the interface queue.

Delaying packets is extremely tricky. Tossing them is quite easy. To
toss the packet just add code to dev_queue_xmit and free the buffer
(following the path as if the driver failed the transmit). To delay
it needs some driver level tweaks - sometimes after a tx complete
leave dev->tbusy set and reset it on a timer.

Alan


\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.046 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site