lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] Behaviour of netifapi_netif_set_addr()


From: Dirk Ziegelmeier
Subject: Re: [lwip-devel] Behaviour of netifapi_netif_set_addr()
Date: Tue, 5 Apr 2016 13:11:12 +0200

I think it's a good idea. So far noone seems to have objections. May I ask you for a patch ;-)


Ciao
Dirk

--
Dirk Ziegelmeier * address@hidden * http://www.ziegelmeier.net

On Fri, Apr 1, 2016 at 10:17 AM, Freddie Chopin <address@hidden> wrote:
Hello!

I have a small suggestion for the behaviour
of netifapi_netif_set_addr() function. This function takes three IP
addresses as pointers. If any argument is NULL, then it is replaced
with the address of IP4_ADDR_ANY. Now the problem here is that netifapi
misses functions to set just the IP, just the gateway or just the
netmask. Solution nr 1 would be to either add three functions
(netifapi_netif_set_ipaddr(), netifapi_netif_set_netmask() and
netifapi_netif_set_gw()). Another option is to modify behaviour
of netifapi_netif_set_addr(), so that it would not modify given value
if the argument was NULL, so for example:

netifapi_netif_set_addr(&myNetif, &ipAddress, NULL, NULL);

would set just the IP address and leave netmask and gw unchanged.

Any opinions? Maybe I'm trying to be too universal, and there's no use
for function to modify just one of the 3 addresses?

Regards,
FCh

_______________________________________________
lwip-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-devel


reply via email to

[Prev in Thread] Current Thread [Next in Thread]