Unfortunately, I can't help you much there, as I don't really use IGMP... However, your code does seem correct. Do other packets have trailing zeros? What does wireshark say to those zeros?
> [..]
> Also, xemac_add calls netif_add, and within which there is the following
> code:
>
> netif->flags = 0;
>
> // ...
>
> #if LWIP_IGMP
> /* start IGMP processing */
> if (netif->flags & NETIF_FLAG_IGMP) {
> igmp_start( netif);
> }
> #endif /* LWIP_IGMP */
>
> How does igmp_start ever get called? I don't see any code in the file
> (where I write //... above) that could reset the flag to include
> NETIF_FLAG_IGMP.
The init function of your netif (passed to netif_add) should set the flags (ARP if supported, IGMP if supported, etc). It gets called between the lines you pasted above (at the place of "// ...").
Simon
--
GRATIS f�r alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
_______________________________________________
lwip-users mailing list
lwip-...@nongnu.org
http://lists.nongnu.org/mailman/listinfo/lwip-users
What I think I really need is someone telling me I'm doing everything right or I'm doing something wrong so I know where to focus my efforts at the moment. I think I see some multicast messages going to my device in wireshark, but I thought that I would get the message by listening via UDP on the interface for IP_ADDR_ANY and the port that the multicast packet is being sent to, but my udp_recv function is never called.
Supposing I did successfully subscribe to a multicast group, where would the data being multicast be found?
Thanks,
Jonathan
On Dec 17, 2009, at 1:43 AM, Simon Goldschmidt wrote:
>
> Jonathan Ross wrote:
>> [..]
>> Did I do something wrong?
>
> Unfortunately, I can't help you much there, as I don't really use IGMP... However, your code does seem correct. Do other packets have trailing zeros? What does wireshark say to those zeros?
>
>> [..]
>> Also, xemac_add calls netif_add, and within which there is the following
>> code:
>>
>> netif->flags = 0;
>>
>> // ...
>>
>> #if LWIP_IGMP
>> /* start IGMP processing */
>> if (netif->flags & NETIF_FLAG_IGMP) {
>> igmp_start( netif);
>> }
>> #endif /* LWIP_IGMP */
>>
>> How does igmp_start ever get called? I don't see any code in the file
>> (where I write //... above) that could reset the flag to include
>> NETIF_FLAG_IGMP.
>
> The init function of your netif (passed to netif_add) should set the flags (ARP if supported, IGMP if supported, etc). It gets called between the lines you pasted above (at the place of "// ...").
>
> Simon
> --
> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_LINK_UP | NETIF_FLAG_IGMP;
In low_level_init() [ethernetif.c]
You have to have the IGMP flag set somewhere.
- Joe
> >> Also, xemac_add calls netif_add, and within which there is the
> following
> >> code:
> >>
> >> netif->flags = 0;
> >>
> >> // ...
> >>
> >> #if LWIP_IGMP
> >> /* start IGMP processing */
> >> if (netif->flags & NETIF_FLAG_IGMP) {
> >> igmp_start( netif);
> >> }
> >> #endif /* LWIP_IGMP */
I did this, and now I can subscribe, but my implementation is ignoring IGMP membership queries from the router and so gets dropped after a couple of minutes. Is there something I'm supposed to do to get this to work, or is my (Xilinx) implementation broken?
Also, I'm not sure how to get data being sent to the group I've joined. What function gets called when I receive a UDP packet sent to the group I'm subscribed to? I see it in wireshark as a packet sent to the group I'm listening to in UDP form to a specific port, but my udp_recv function, which is bound to IP_ADDR_ANY, and that port, is never called.
Thanks!
Jonathan