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


On Tue, Oct 30, 2001 at 11:28:01AM -0000, sujith k wrote:
> Hi ,
>          I have a query on TCP/IP stack initialization.
> 
> Say , that I have 2 physical interfaces eth0 and eth1.
> But, I have only one IP address for the box. This is nothing but, only one IP interface and 2 ethernet interfaces.
> 
> I am using the function init_net to init eth0 and eth1.
> i.e. init_net(eth0, bootp);
>      init_net(eth1, bootp);

> Here , the bootp record is updated with the IP address, say 
> 192.168.1.150. I am ignoring the error message from ioctl() for 
> setting the IP address for eth1 interface. I am not checking the
> return value of ioctl(). So, my init_net for eth0 and init_net for
> eth1 is a success.

Its returning an error for a reason. You cannot do this! Each
interface to the IP stack has to have a different IP address. Maybe
what you want is that the node acts as an ethernet bridge with two
ethernet ports? You then have one interface to the IP stack and so can
have one IP address. Just be careful of loops.

         Andrew
 


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