Rtos API example

Embed: (wiki syntax)

« Back to documentation index

IPv6 address handling

IPv6 address handling
[Network interface (NETIF)]

Functions

void netif_ip6_addr_set (struct netif *netif, s8_t addr_idx, const ip6_addr_t *addr6)
 Change an IPv6 address of a network interface.
void netif_ip6_addr_set_state (struct netif *netif, s8_t addr_idx, u8_t state)
 Change the state of an IPv6 address of a network interface (INVALID, TEMPTATIVE, PREFERRED, DEPRECATED, where TEMPTATIVE includes the number of checks done, see ip6_addr.h)
void netif_create_ip6_linklocal_address (struct netif *netif, u8_t from_mac_48bit)
 Create a link-local IPv6 address on a netif (stored in slot 0)
err_t netif_add_ip6_address (struct netif *netif, const ip6_addr_t *ip6addr, s8_t *chosen_idx)
 This function allows for the easy addition of a new IPv6 address to an interface.

Function Documentation

err_t netif_add_ip6_address ( struct netif netif,
const ip6_addr_t ip6addr,
s8_t *  chosen_idx 
)

This function allows for the easy addition of a new IPv6 address to an interface.

It takes care of finding an empty slot and then sets the address tentative (to make sure that all the subsequent processing happens).

Parameters:
netifnetif to add the address on
ip6addraddress to add
chosen_idxif != NULL, the chosen IPv6 address index will be stored here

Definition at line 1228 of file lwip_netif.c.

void netif_create_ip6_linklocal_address ( struct netif netif,
u8_t  from_mac_48bit 
)

Create a link-local IPv6 address on a netif (stored in slot 0)

Parameters:
netifthe netif to create the address on
from_mac_48bitif != 0, assume hwadr is a 48-bit MAC address (std conversion) if == 0, use hwaddr directly as interface ID

Definition at line 1174 of file lwip_netif.c.

void netif_ip6_addr_set ( struct netif netif,
s8_t  addr_idx,
const ip6_addr_t addr6 
)

Change an IPv6 address of a network interface.

Parameters:
netifthe network interface to change
addr_idxindex of the IPv6 address
addr6the new IPv6 address
Note:
call netif_ip6_addr_set_state() to set the address valid/temptative

Definition at line 1018 of file lwip_netif.c.

void netif_ip6_addr_set_state ( struct netif netif,
s8_t  addr_idx,
u8_t  state 
)

Change the state of an IPv6 address of a network interface (INVALID, TEMPTATIVE, PREFERRED, DEPRECATED, where TEMPTATIVE includes the number of checks done, see ip6_addr.h)

Parameters:
netifthe network interface to change
addr_idxindex of the IPv6 address
statethe new IPv6 address state

Definition at line 1090 of file lwip_netif.c.