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: Notes on static configuration of an eCos network inte



On 17-Jul-2000 Grant Edwards wrote:
> 
>> Notes on static configuration of an eCos network interface
> 
>> The siaddr and giaddr fields of a BOOTP message are irrelevant to
>> configuring a network interface: they are used for talking to the
>> BOOTP server (e.g. for TFTPing a kernel).
> 
> Aaargh.  That's why my routing table isn't getting initialized.
> 
>> init_net() should initialize the interface as follows:
>> 
>> SIOCSIFADDR, yiaddr
>> SIOCSIFNETMASK, TAG_SUBNET_MASK
>> SIOCSIFBRDADDR, TAG_IP_BROADCAST
>> SIOCADDRT, 0, 0, TAG_GATEWAY
> 
> Right now, I'm building a fake bootp record and passing it to
> init_net().  This seems to be way more work than it's worth
> (especially since it's not right), so I'm going to throw out
> all of the fake bootp stuff and just duplicate the code in
> net_init(), passing the right IP addresses in the ioctl() calls.
> 
> It will end up being a lot smaller and simpler that way. Is
> there any reason I shouldn't do that?

The reason that init_net() is based on BOOTP now is for flexibility.
By having the numbers hard coded [somehow] in the routine, you loose
all of that.

I always vote for flexible; I've been bitten by "fixed" implementations
too many times in the past.

As for your pain:
 * why do you think the current way of creating BOOTP data is more
   work than coding the values directly?
 * how is what you are using different than the code in "init_all_network..."
   when non-BOOTP mode is selected?
 * if things aren't working, ask for help.  Nick [Barnes] seems to be
   getting quite a lot [of feedback at least] by doing so.

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