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


Time to chip my two pence worth in.

1) I think having the ability to statically defined IP addresses
inside the binary is a bad idea. Its so easy to get the same binary
running on two boards at once. The two boards then have the same IP
addresses active on the network. At best one will fail with an panic,
at worst all sorts of flaky things happen. Id remove this feature all
together. If people want to build static addresses in they can bring
the interfaces up themselfs with the addresses.

2) Until recently, build_bootp_record has not been available becasue
it was declared static and only compiled if you did want to use bootp
to get IP addresses. I pointed this out and i beleave this will be fix
in the next release. This made it messy to use so i just cut&pasted it
into my own code and then modified it to my own needs. I think this is
one area you need to do some more testing. From your tests it looks
like you never test bringing up interfaces with application supplied
addresses. 

>  * how is what you are using different than the code in "init_all_network..."
>    when non-BOOTP mode is selected?

First re-read the message i posted about this last week.

init_all_network interfaces assums you want to do one off...

1) Use bootp
2) Use static ip addresses which are configured by the config tool.

It has problems when you want to use the logical third option

3) The application supplies its own addresses.

and is impossible if you want to

4) application supplies some addresses and bootp is used for others.

In my case i get them from flash, so they are board specific, not
binary specific. As i said in my last message, it not so easy to get
it right, especially when init_all_network... keeps changing with
every release. Thats why i asked for a review off all this when DHCP
is added. init_all_network... should be
init_all_unintializes_network...

        Andrew
 


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