[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE : [lwip-users] Join Multicast Group
From: |
Frédéric BERNON |
Subject: |
RE : [lwip-users] Join Multicast Group |
Date: |
Wed, 15 Jul 2009 18:00:54 +0200 |
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 : address@hidden
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 : address@hidden [mailto:address@hidden 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: address@hidden
[mailto:address@hidden 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
address@hidden http://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________
lwip-users mailing list
address@hidden http://lists.nongnu.org/mailman/listinfo/lwip-users
Frédéric BERNON.vcf
Description: Frédéric BERNON.vcf
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- RE : [lwip-users] Join Multicast Group,
Frédéric BERNON <=