Loading...
Searching...
No Matches
IPv6 address handling
APIs » "raw" APIs » Network interface (NETIF)

## Functions

void | netif_ip6_addr_set (struct netif *netif, s8_t addr_idx, const ip6_addr_t *addr6)
void | netif_ip6_addr_set_state (struct netif *netif, s8_t addr_idx, u8_t state)
void | netif_create_ip6_linklocal_address (struct netif *netif, u8_t from_mac_48bit)
err_t | netif_add_ip6_address (struct netif *netif, const ip6_addr_t *ip6addr, s8_t *chosen_idx)

## Detailed Description

## Function Documentation

## netif_add_ip6_address()

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

  netif | netif to add the address on
  ip6addr | address to add
  chosen_idx | if != NULL, the chosen IPv6 address index will be stored here

## netif_create_ip6_linklocal_address()

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

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

## netif_ip6_addr_set()

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

  netif | the network interface to change
  addr_idx | index of the IPv6 address
  addr6 | the new IPv6 address

Note
  call netif_ip6_addr_set_state() to set the address valid/temptative

## netif_ip6_addr_set_state()

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

  netif | the network interface to change
  addr_idx | index of the IPv6 address
  state | the new IPv6 address state