|
|||||||||||
|
Re: Packet rate limiting
From: Aaron Turner <aturner(at)pobox.com>
Date: Fri Jul 11 2003 - 20:27:04 EDT On Fri, Jul 11, 2003 at 04:43:01PM -0700, Dan Kaminsky wrote: [snip] > BTW, Aaron -- does Libnet 1.0's send fuctions return before the packet
Well on Linux and BSD at least (and prolly any POSIX system in the world), you're really writing to a buffer rather then directly to the device driver. Hence the OS is buffering packets to be sent, and considering the buffer size is adjustable by the administator (see the tcpreplay FAQ for info on how to do this on Linux and BSD) would make libnet_adv_write_link() both non-atomic and non-blocking when the buffer has sufficent space for the packet. See the send(2) manpage for details. This means that libnet_adv_write_link() can and may return before the packet has been passed to the NIC driver, let alone be placed on the wire. I have actually seen cases when tcpreplay has quit and packets are still being sent because the buffer was significantly large and full. If you really need that level of timing, your best best is a RTOS IMHO. -- Aaron Turner
This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:02:24 EDT |
||||||||||
|
|||||||||||