Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting
From: Matt Bing <mbing(at)nfr.net>
Date: Sat Mar 29 2003 - 22:03:14 EST

Shai Rubin said:
> 1. What do I miss? Should I really get 100Mb/Sec from my card?

There are a lot of factors to keep in mind here: copying the packets from user to kernel space, kernel buffers, packets-per-second vs MBps, etc, etc.

> 2. Why libnet_write does not return an error even though not all the

It should return an error. I'm guessing your kernel buffers are filling quickly. This is something we run into a lot with tcpreplay. Check this snippet:

do {

	ret = libnet_adv_write_link(l, pktdata, pkthdr.caplen); 
	if (ret == -1) { 
		/* Make note of failed writes due to full buffers */ 
		if (errno == ENOBUFS) { 
			failed++; 
		} else { 
			err(1, "libnet_adv_write_link(): %s", strerror(errno)); 
		} 
	}

} while (ret == -1);

You may try tweaking your kernel buffers as described at:

http://tcpreplay.sourceforge.net/FAQ.html#SECTION02050000000000000000
-- 
Matt Bing
NFR Security
Rapid Response Team

---------------------------------------------------------------------
To unsubscribe, e-mail: libnet-unsubscribe@securityfocus.com
For additional commands, e-mail: libnet-help@securityfocus.com
Received on Sat Mar 29 22:03:44 2003

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

Do you need help?X

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