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 interface



> 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?

-- 
Grant Edwards
grante@visi.com

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