NetIPv6_AddrAutoCfgEn

Description

Enables the IPv6 Stateless Address Auto-Configuation procedure. If the interface link state is UP when the function is called, the Auto-Configuration process will start, else it will start when the link becomes UP. Also, each time the interface link state changes and becomes UP again, if the Auto-Configuration was enabled, the IPv6 Auto-Configuration process will start automatically.

Files

net_ipv6.h/net_ipv6.c

Prototype


          CPU_BOOLEAN NetIPv6_AddrAutoCfgEn(NET_IF_NBR    if_nbr,
                                            CPU_BOOLEAN   dad_en,
                                            NET_ERR      *p_err);

Arguments

if_nbr

Interface number to configure.

dad_en

DEF_YES, Duplication Address Detection (DAD) will be perform with the Auto-Configuration process. 

DEF_NO,   otherwise.

p_err

Pointer to variable that will receive the error code from this function:

NET_IPv6_ERR_NONE
NET_IPv6_ERR_AUTO_CFG_STARTED
NET_IPv6_ERR_ADDR_CFG_IN_PROGRESS
NET_IPv6_ERR_ADDR_CFG_LINK_LOCAL
NET_INIT_ERR_NOT_COMPLETED

NET_IF_ERR_INVALID_IF
NET_ERR_FAULT_LOCK_ACQUIRE

(This list represents some common error codes that can be returned by the function but do not covers all the possible cases. Please refer to net_err.h file for more details on specific error codes.)

Returned Value

DEF_OK,     if IPv6 Stateless Auto-Configuration was successfully enabled.

DEF_FAIL, otherwise.

Required Configuration

NET_IPv6_CFG_ADDR_AUTO_CFG_EN must be enabled in the net_cfg.h file.

NET_IPv6_CFG_DAD_EN must also be enabled if Duplication Address Detection (DAD) is wanted with the IPv6 Auto-Configuration.

Notes / Warnings

None.