Add a dynamically-configured IPv4 host address, subnet mask, and default gateway to an interface.
Files
net_ipv4.h/net_ipv4.c
Prototype
Arguments
if_nbr
Interface number to configure.
...
NET_IPv4_ERR_NONE
NET_IPv4_ERR_INVALID_ADDR_HOST
NET_IPv4_ERR_INVALID_ADDR_GATEWAY
NET_IPv4_ERR_ADDR_CFG_STATE
NET_IPv4_ERR_ADDR_CFG_IN_USE
NET_IF_ERR_INVALID_IF
NET_ERR_INIT_INCOMPLETE
NET_ERR_FAULT_LOCK_ACQUIRE
Returned Value
DEF_OK
,
if valid IPv4 address, subnet mask, and default gateway dynamically configured;
DEF_FAIL
,
otherwise.
Required Configuration
None.
Notes / Warnings
IPv4 addresses must be configured in host-order.
...