TCPIP_IPV6_UnicastAddressAdd Function

C

IPV6_ADDR_STRUCT * TCPIP_IPV6_UnicastAddressAdd(
    TCPIP_NET_HANDLE netH, 
    IPV6_ADDR * address, 
    int prefixLen, 
    uint8_t skipProcessing
);

Description

Adds a unicast address to a specified interface. Starts duplicate address detection if necessary.

Preconditions

TCPIP_IPV6_Initialize() is required. TCPIP_IPV6_InterfaceIsReady should be true.

Parameters

ParametersDescription
netHThe interface to which the address is to be added.
addressThe address to add.
prefixLenThe prefix length associated to this static address (providing the subnet prefix length). If 0, the default value of 64 will be used.
skipProcessingTrue to skip duplicate address detection; otherwise, false.

Returns

IPV6_ADDR_STRUCT *

  • On Success - Pointer to the structure of the newly allocated address.

  • On Failure - NULL.

Remarks

The RFC (4291) requires the interface ID for all unicast addresses, (except those that start with the binary value 000) to be 64 bits long and to be constructed in Modified EUI-64 format. Therefore the prefixLen parameter should probably always be 64.