[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libnet
Subject:    Re: libnet_write problem
From:       mike schiffman <mike () infonexus ! com>
Date:       2002-08-20 13:59:13
[Download RAW message or body]

1) Grab the newest, non-beta libnet 1.1.0.
2) You're probably hitting the kernel's high watermark and running out of
   memory for packets.  Try inserting a call to sleep(); or usleep(); after the
   write.  Increase the values until you get to a point that works.

On Tue, Aug 20, 2002 at 01:29:05PM -0000, m.jemec@iskratel.si wrote:
> 
> 
> Hi!
> 
> I have some problems with the new release 
> (1.1.0-beta7b).
> 
> I am trying to do a UDP packet generator, so I took 
> the sample code udp2.c under the examples. I just add 
> the loop in front of the libnet_write call so that my 
> code looks like:
> 
> ...
> for(;;) {
> 	c = libnet_write(l);
> 	if (c == -1 ) {
> 		fprintf(stderr, ...
> 		break;
> 	}
> }
> ...
> When I start the program, I get the following error 
> (usually after 200 - 500 packets that are transmited 
> ok):
> write error: libnet_write_link: only -1 bytes written 
> (No buffer space available)
> 
> If I comment the break command I still get many 
> errors but the packets are transmited and the other 
> PC gets them. What's going wrong?
> 
> Thanks,
> Miha.
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: libnet-unsubscribe@securityfocus.com
> For additional commands, e-mail: libnet-help@securityfocus.com
> 

-- 
Network packets at bargain basement rates -- ask me how.

---------------------------------------------------------------------
To unsubscribe, e-mail: libnet-unsubscribe@securityfocus.com
For additional commands, e-mail: libnet-help@securityfocus.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic