This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: How to add multicast route?
- From: Grant Edwards <grant dot b dot edwards at gmail dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Fri, 1 Apr 2011 14:59:38 +0000 (UTC)
- Subject: [ECOS] Re: How to add multicast route?
- References: <in2gt5$tk$1@dough.gmane.org> <in2hgb$tk$2@dough.gmane.org> <in2sin$5g2$1@dough.gmane.org> <20110401051308.GR17979@lunn.ch> <in4m6s$661$1@dough.gmane.org>
On 2011-04-01, Grant Edwards <grant.b.edwards@gmail.com> wrote:
> I think next I'll try passing either my own address (10.0.0.102, or
> the local network 10.0.0.0 and see what happens).
Specifying 10.0.0.0 as the gateway address works. Oddly, the
resulting routing table looks like this:
Destination Gateway Mask Flags Interface
10.0.0.0 10.0.0.0 255.0.0.0 U eth0
224.0.0.0 224.0.0.0 240.0.0.0 U eth0
Specifying 10.0.0.0 as the gateway results in the route I wanted with
224.0.0.0 as the gateway. Specifying 224.0.0.0 as the gateway fails.
IMO, that's a bug, but whatever...
So for posterity's sake, the initial routing table looked like this:
Destination Gateway Mask Flags Interface
10.0.0.0 10.0.0.0 255.0.0.0 U eth0
And the contents of rtentry to add the multicast route were:
rt_dst = 224.0.0.0
rt_genmask = 240.0.0.0
rt_gateway = 10.0.0.0
rt_flags = RTF_UP
It turns out that the rt_dev field is ignored (or at least redundant).
That's different than the way Linux works: if you specify a device,
you don't specify a gateway. I'm not sure what the rt_dev field is
for with the FreeBSD stack...
--
Grant Edwards grant.b.edwards Yow! Are we THERE yet?
at
gmail.com
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss