This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to add multicast route?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]