This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Using multicast (EtherAddMCast, EtherDelMCast,...)

I have old code using earlier versions of NDK that calls the functions EtherAddMCast, EtherDelMCast and EtherClearMCast.

Writing new code, I want to reuse as much as possible from the old code, but I get "undefined symbol" errors when linking my program.

I can see in the NDK Reference Guide (SPRU524H) that these functions are mentioned in the appendix A, "Internal Stack Funcions", but how do I reach them?

Is there a lib I can link to my program?

Thanks.

 

  • Hi OH,

    which version of the "old" NDK are you using and can describe your "new code" environment (SYS/BIOS and NDK versions)?

  • Hi Tom

    The "old" NDK is version 1.8, and the current environment I use is NDK 2.21.something and SYS/BIOS 6.33.something.

    I was hoping I would be able to use a piece of old network code as is, but I as I wrote, the libs I link with doesn't seem to have these functions.

    /OH

  • Hi OH,

    these API's go deep into the NDK stack.

    In NDK 2.21, we suggest you to use IGMP (3.6 Internet Group Management Protocol) protocol instead calling the multicast APIs directly.

  • Ok.

    Reading the "3.6 Internet Group Management Protocol" paragraph I see that uring the "usual" setsockopt is the preferred way of joining a multicast group. This should be a good thing, since then the coude would look vitually identical to the (working) Linux version of the code.

    However, the code doesn't work. The setsockopt call returns with a EINVAL error.

    I'm using INADDR_ANY in the imr_interface field in the ip_mreq. That should work, right? Or do I need to use an actual address when using NDK?

    Do I need to "enable" multicast somwhere during the setup for this call to work?

    /OH

  • Hi OH,

    A customer had multicast issues last summer so I thought I'd point you to that thread:

    http://e2e.ti.com/support/embedded/bios/f/355/p/202568/738604.aspx#738604

    I was able to successfully receive multicast packets with the attached code (updated helloWorld.c, see 'mcTask()').

    1323.helloWorld.c

    Steve