UDP error

Ian Caddy ianc at microsol.iinet.net.au
Fri Jul 9 01:56:49 UTC 2004


Hi,

The if_stats and mbuf_stats can be called at anytime and will print out 
the statistics to your default console, I assume you have one of these.

Depending on how quickly you get this no buffers error, I would setup a 
test task (or use one that is already in a loop) that called these 
functions every x seconds (minutes, depending on time between errors). 
You could then see how your buffers were progressing.

Once you get the no buffers error, it is too late to see as you know you 
have none left.

In this way you can see if you have a gradual buffer problem, with you 
constantly having less buffers, or something happens to sort of make 
everything stop and suddenly you run out of buffers.

Talk to you soon,

Ian Caddy


Angelo Fraietta wrote:

> 
> Thomas Rauscher wrote:
> 
>> If this error occurs, try dumping the IP interface and mbuf statistics
>> to find out where the limit is.
>>
>> rtems_bsdnet_show_if_stats();
>> rtems_bsdnet_show_mbuf_stats();
>>
> Do I do this when the error orrcurs? My application does not have a 
> keyboard input.
> 
>> Did you set the SO_BROADCAST option on your sending socket?
>> I think I needed this:
>>   int broadcast = 1;
>>   if(setsockopt(fd, SOL_SOCKET, SO_BROADCAST, &broadcast,
>> sizeof(broadcast)) != 0)
>>   {
>>     printf("setsockopt failed: %s!\n", strerror(errno));
>>   }
>>
> Yes - I did that. That part is fine.
> 
>>
> 
> Thanks
> 
> Warmest regards



More information about the users mailing list