This is the mail archive of the ecos-discuss@sources.redhat.com 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]

Re: Help reqd for TCP/IP stack on ecos


Hi,
    I saw the bridge code. The bridge code does the route only within the bridge ports. 
I think, I need to have one IP interface (using init_net) and 24 bridge ports(using bridge_add() and interface_up() calls). eCos will see all the 25 ports.

In the code, If the packet has come from IP interface, then the packet will not go thru any of the physical ports.
code in ether_output is...

#if NBRIDGE > 0
    /*
     * Interfaces that are bridge members need special handling
     * for output.
     */
    if (ifp->if_bridge) {
        bridge_output(ifp, m, NULL, NULL);
        return (error);
    }
#endif  


In the above code, ifp->if_bridge is NULL and it will not go inside the bridge_output().


In the receive side, same problem will come. If the packet has come bridge ports(24 virtual ports), it will not go to IP interface.

I am not sure, the initialization what I am doing is correct...(24 bridge ports and one IP interface)

thanks
sujith


On Tue, 30 Oct 2001 15:39:01 +0100 Andrew Lunn <andrew.lunn@ascom.ch> wrote:
>On Tue, Oct 30, 2001 at 02:26:38PM -0000, sujith k wrote:
>
>> My problem is, I can not put bridge code inside my box. becos,
>> bridging functionality is done by the ASIC in my box. I have 24
>> ethernet interfaces and need to have only one IP interface. That
>> means, all the 24 ports should have the same IP address in my case.
>> Is there any other way to solve this problem(without using the
>> bridge code)?  
>
>How do the ports look like to eCos?
>
>When you use eCos's bridge code you only bring up one interface and
>assign it an IP address. The other ethernet devices you simply add to
>the bridge using an IOCTL call. You do not initialize these interfaces
>and they do not have IP addresses. When eCos sends a packet, routing
>is simple since there is only one interface. The bridge then passes
>the packet out the correct device, or floods it when it does not know
>where to send it.
>
>You say your bridge is inside an ASIC. So i expect that all ecos sees
>is one 'virtual' ethernet device, not 24 devices. You just need to
>bring up the one virtual device and assign it an IP address. 
>
>      Andrew
>

--------------------------------------------------

Totally Amazing Search Results - Just C4 Yourself!

http://www.C4.com - Total Search Technology


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