To get multicast working (and I confirm you that it's work on lwIP 1.3.0), you have to set LWIP_IGMP=1 in your lwipopts.h file, AND, your netif should have the flag NETIF_FLAG_IGMP set in the "netif::flags".
It could be something like this in your driver code : netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_LINK_UP | NETIF_FLAG_IGMP; About SO_REUSEADDR, it's not supported yet, but it's not strictly necessary. The only problem you could got is you cannot have two sockets opened on the same port to receive twice one multicast stream. ==================================== Frédéric BERNON HYMATOM SA Chef de projet informatique Microsoft Certified Professional Tél. : +33 (0)4-67-87-61-10 Fax. : +33 (0)4-67-70-85-44 Email : [email protected] Web Site : http://www.hymatom.fr Plan d'accès au siège social ==================================== P Avant d'imprimer, penser à l'environnement -----Message d'origine----- De : [email protected] [mailto:[email protected]] De la part de Mathias Zenger Envoyé : mercredi 15 juillet 2009 13:53 À : Mailing list for lwIP users Objet : AW: [lwip-users] Join Multicast Group Hi Kieran, Regarding the reuse option you were right. I found the following entry in opt.h /* ---------- Socket Options ---------- */ /* Enable SO_REUSEADDR and SO_REUSEPORT options */ #ifdef SO_REUSE /* I removed the lot since this was an ugly hack. It broke the raw-API. It also came with many ugly goto's, Christiaan Simons. */ #error "SO_REUSE currently unavailable, this was a hack" #endif So this is the reason (missing SO_REUSE) why my call to setsockopt in socket.c failed: setsockopt(fd_socket, SOL_SOCKET, SO_REUSEADDR, &set_true, sizeof(set_true)) Any other version where this is implemented? (Although I am not sur if I really need it). Still unable to join a group - I continue with debugging... Regards, Mathias -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]]im Auftrag von Kieran Mansley Gesendet: Dienstag, 14. Juli 2009 16:47 An: Mailing list for lwIP users Betreff: Re: [lwip-users] Join Multicast Group On Tue, 2009-07-14 at 14:41 +0200, Mathias Zenger wrote: > Since it is possible to enable LWIP_IGMP I thought > this feature would be supported by lwIP. Does anybody have an > explanation for the failures or can somebody even provide me a working > example? lwIP should, I think, support IGMP multicast for UDP sockets. I haven't done this myself, so can't help directly with a working example, but I would first try it without binding multiple sockets to the same address. I.e. get rid of the SO_REUSEADDR stuff, in case that is causing a problem. Kieran _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
BEGIN:VCARD VERSION:2.1 N:BERNON;Frédéric;;M. FN:Frédéric BERNON ORG:HYMATOM SA;Recherche et Développement TITLE:Chef de projet informatique TEL;WORK;VOICE:04-67-87-61-10 TEL;WORK;FAX:04-67-70-85-44 ADR;WORK;ENCODING=QUOTED-PRINTABLE:;23;Zone Industrielle=0D=0A175 rue de Massacan;VENDARGUES;;34740;FRANCE; LABEL;WORK;ENCODING=QUOTED-PRINTABLE:23=0D=0AZone Industrielle=0D=0A175 rue de Massacan=0D=0AVENDARGUES 34740=0D= =0AFrance URL;WORK:http://www.hymatom.fr ROLE:Chef de projet informatique EMAIL;PREF;INTERNET:[email protected] REV:20020404T083210Z END:VCARD
_______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
