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

Thiago A. Corrêa thiago.correa at gmail.com
Fri Aug 22 21:39:48 CEST 2014

> On 20.08.2014 16:23, Thiago A. Corrêa wrote:
>>     NutDhcpIfSetup works but we already have NutIfSetup for static
>> config, how does NutStaticIfSetup sound to you?
> In general, yes.
> I usually try to create groups of API calls with the same prefixes. If
> more NutStatic... functions are coming, this is fine. If more
> Nut...IfSetup is coming, NutIfSetupStatic would make more sense to me.
> Why Nut.. and not NutNet... or simply Net..?

The Nut prefix is quite common in our public API. It could be said
that Nut functions are public API while non-Nut functions are private
API, whether it's intentional or not, I can't think of public API
without the prefix (excluding the libc functions we provide). Perhaps
we could make that official :)

In that case I was attempting to make it match NutDhcpIfSetup (since
we have NutDhcpIfConfig and we are considering a Setup sister).

If we choose to prefix with NutNet then the new Dhcp function should
get the Net prefix too. Even thou we treat DHCP as a protocol, it's
fundamentally just a setup option for the user code as no one uses
DHCP directly, it's just an step to bring the IP interface online.

Also I think Nut[Net]Setup[Dhcp|Static] is odd as it places an
adjective at the end "of the sentence".

How about the pair:
NutNetStaticIfSetup and NutNetDhcpIfSetup?

Kind Regards,
     Thiago A. Correa

More information about the En-Nut-Discussion mailing list