|
From: | Dirk Ziegelmeier |
Subject: | Re: [lwip-devel] Behaviour of netifapi_netif_set_addr() |
Date: | Tue, 5 Apr 2016 13:11:12 +0200 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |