[En-Nut-Discussion] NutUdpSetSockOpt problem?

Ulrich Prinz uprinz2 at netscape.net
Fri Jun 3 23:08:13 CEST 2011

Hi Mingshu,

Am 02.06.2011 22:07, schrieb Mingshu Wang:
> Hi all,
> I am running Nut/OS on AT91SAM7X256. In my application, I create a
> socket to receive UDP messages and set a UDP buffer size of 256 by
> calling NutUdpSetSockOpt(). When I test the application, I found the
> application can't receive any messages on that UDP port after a
> broadcast storm. 

Right, I get the same issue if there is a second media receiver using
multicast in my network. My switch doesn't know anything of IGMP so he
forwards multicast TV streams to any port. If that happens the Nut/OS
can't even get an IP address via DHCP but hangs up after opening the
network stack.
Can you check if we're talkin about the same problem and try to boot up
your application with enabled DHCP? It should fail and might even hang
up completely.

> If I comment out NutUdpSetSockOpt(), the application
> survives the storm. But without the buffer, the application works much
> slower. I check the heap with function NutHeapAvailable(). I have 5k
> available during the storm. Other threads like webpage are still
> working. It seems only that UDP socket is broken. Can anyone help me
> with this problem?

Bernd and some others are investigating this during the work of
implementation of IPv6. I myself started investigation but had to shift
cause lots of work and not much time left.

Bernd, Ole, Harald? Any update on that?


More information about the En-Nut-Discussion mailing list