[En-Nut-Discussion] Attempting to fix network config API.

Thiago A. Corrêa thiago.correa at gmail.com
Tue Aug 19 22:28:02 CEST 2014


Hi,

    Our functions for network configuration have more responsabilities
than they should. They make assumptions that that simplify a sample
application but actually makes it harder for a finished product that
would usually let the user say he wants DHCP or he wants fixed IP
settings.

    For instance, NutDhcpIfConfig will load fixed settings if they are
found in NVMEM or NutNetIfSetup that calls NutNetSaveConfig.

    We also have no NutNvMemClear to erase all NVMEM and effectively
reset everything to factory.



    I propose we introduce alternative functions that does what they
advertise and let the caller decide what to do if it fails, or if he
wants to save settings that may be default settings.
   Also, I've extended the "Network Configuration" entries to include
a "Use Hard-coded Default Values" to load hard coded defaults if NVMEM
is empty.

    I would appreciate any comments as well as name suggestions for
those functions :)

Kind Regards,
     Thiago A. Correa


More information about the En-Nut-Discussion mailing list