This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: [ECOS] IPv6 on synth over TAP interface
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- To: Bart Veer <bartv at ecoscentric dot com>
- Cc: eCos Patches <ecos-patches at sources dot redhat dot com>
- Date: Tue, 1 Apr 2003 09:50:11 +0200
- Subject: Re: [ECOS] IPv6 on synth over TAP interface
- References: <20030331131129.GQ18641@biferten.ma.tech.ascom.ch> <20030331133828.3F064EC6F1@delenn.bartv.net>
> IPv6 requires multicast support, i.e. it needs additional
> functionality from the ethernet device driver.
>
....
> Not all real
> ethernet cards will support multicasts, so during initialization there
> is a message from rawether to the eCos ecosynth driver containing a
> multicast_supported flag (plus other info like the MAC address). The
> eCos driver then uses that information when processing the SET_MC_ALL
> ioctl(). IIRC the tap device should always support multicasts.
I found part of the problem...
//
// This function supports "I/O control" operations on an interface.
//
static int
eth_drv_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
{
...
case SIOCDELMULTI:
{
struct ifmultiaddr *ifma;
struct eth_drv_mc_list mc_list;
int mode = (ifp->if_flags & IFF_ALLMULTI) ? ETH_DRV_SET_MC_ALL :
ETH_DRV_SET_MC_LIST;
So the eth_drv layer decided to either use *MC_ALL or *MC_LIST
depending on the interface flags. The synth driver only supports
*MC_ALL, so needs to set IFF_ALLMULTI in the flags. Without this, the
eth_drv uses the *MC_LIST option which the synth driver returns with
an error.
Andrew
Index: devs/eth/synth//ecosynth/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/eth/synth/ecosynth/current/ChangeLog,v
retrieving revision 1.8
diff -u -r1.8 ChangeLog
--- devs/eth/synth//ecosynth/current/ChangeLog 25 Feb 2003 16:46:23 -0000 1.8
+++ devs/eth/synth//ecosynth/current/ChangeLog 1 Apr 2003 07:44:43 -0000
@@ -1,3 +1,9 @@
+2003-04-01 Andrew Lunn <andrew dot lunn at ascom dot ch>
+
+ * src/syntheth.c (synth_eth_init): Set the flag IFF_ALLMULTI so
+ eth_drv correctly sets mutlicast filtering.
+ * cdl/syntheth.cdl: This driver implements multicast.
+
2003-02-25 Jonathan Larmour <jifl at eCosCentric dot com>
* doc/syntheth.sgml: Declare as <part> not <reference> to get
Index: devs/eth/synth//ecosynth/current/cdl/syntheth.cdl
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/eth/synth/ecosynth/current/cdl/syntheth.cdl,v
retrieving revision 1.4
diff -u -r1.4 syntheth.cdl
--- devs/eth/synth//ecosynth/current/cdl/syntheth.cdl 24 Feb 2003 14:09:19 -0000 1.4
+++ devs/eth/synth//ecosynth/current/cdl/syntheth.cdl 1 Apr 2003 07:44:44 -0000
@@ -64,6 +64,7 @@
parent CYGPKG_IO_ETH_DRIVERS
active_if CYGPKG_IO_ETH_DRIVERS
active_if CYGPKG_HAL_SYNTH
+ implements CYGINT_IO_ETH_MULTICAST
cdl_option CYGVAR_DEVS_ETH_ECOSYNTH_ETH0 {
display "Provide eth0 device"
Index: devs/eth/synth/ecosynth/current/src/syntheth.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/eth/synth/ecosynth/current/src/syntheth.c,v
retrieving revision 1.2
diff -u -r1.2 syntheth.c
--- devs/eth/synth/ecosynth/current/src/syntheth.c 13 Feb 2003 22:25:16 -0000 1.2
+++ devs/eth/synth/ecosynth/current/src/syntheth.c 1 Apr 2003 07:48:48 -0000
@@ -451,5 +451,9 @@
}
}
(*sc->funs->eth_drv->init)(sc, eth->MAC);
+
+#ifdef CYGPKG_NET
+ sc->arpcom->ac_if |= IFF_ALLMULTI;
+#endif
return result;
}