Fast sockets and multicast

Hi,I’m trying to get fast sockets to work with multicast (NETOS5.0/GNU environment). Whether the socket option IP_ADD_MEMBERSHIP has been set or not, the system crashes after the first multicast packet (IP 224.1.2.3) has been send out using fsendto(). Setting the socket option returns 0 (no error). The code works OK when sending unicast packets (IP 24.0.0.0). When I use the same code for a normal UDP socket it work OK, in uni- and multicast mode (just too slow for our purposes). Is there a limitation (or bug) in the combination fast sockets and multicast? Regards, Arie de Muynck

Since the question was posted extra tests were made. The sending of the multicast packet using a fast socket seems to trash the memory management. The following dump was obtained using a non-echoing ethernet link (multicast packet not echoed back to the module), a few seconds after the packet was send: (netsilicon-gdb) bt #0 0x170fc in h_malloc () <== always hangs here #1 0x12b10 in h_alloc () #2 0x177f0 in m_dup () #3 0x1702c in ip_frsend () #4 0x16b60 in ip_xmt3 () #5 0x16808 in ip_xmt2 () #6 0x16524 in ip_xmit () #7 0x164e8 in ip_send () #8 0x17dac in sm_msm () #9 0x337e4 in fs_udp_send () #10 0x33598 in fSendTo () #11 0x24ac in DataTxDataThread (thread_input=0x80) at ./…/datatx.c:689 #12 0x3b5f0 in _tx_thread_shell_entry ()

Have you checked http://www.netsilicon.com/support/sampleapps.jsp There are two sample applications that helps you to both receive and send multicast packets.

I did study the examples. They use standard sockets, and I know they work (see my original post). The problem is specific to fast sockets. But anyway, we measured the performance of standard and fast sockets: both are too slow (they both copy data and pass messages through the IP stack). We have now switched to sending raw ethernet packets directly using the Ethernet DMA controller by patching narmenet.c (in parallel with the standard packets). Regards, Arie de Muynck