Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

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
> actually hits the wire?

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   
http://synfin.net/aturner
They that can give up essential liberty to obtain a little temporary 
safety deserve neither liberty nor safety. -- Benjamin Franklin
All emails are PGP signed; a lack of a signature indicates a forgery.

  • application/pgp-signature attachment: stored
Received on Fri Jul 11 20:37:10 2003
Do you need help?X

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:02:24 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library