Nordic's IPv6 stack. Currently, only a Host role is supported. More...
Data Structures |
|
| struct | ipv6_addr_conf_t |
|
IPv6 address configuration.
More...
|
|
| struct | ipv6_data_rx_t |
|
Event parameters associated with the IPV6_EVT_INTERFACE_RX_DATA event.
More...
|
|
| union | ipv6_event_param_t |
|
Asynchronous event parameter type.
More...
|
|
| struct | ipv6_event_t |
|
Asynchronous event type.
More...
|
|
| struct | ipv6_init_t |
|
Initialization parameters type.
More...
|
|
Typedefs |
|
| typedef void(* | ipv6_evt_handler_t )( iot_interface_t *p_interface, ipv6_event_t *p_event) |
|
Asynchronous event notification callback type.
|
|
Enumerations |
|
| enum |
ipv6_event_id_t
{
IPV6_EVT_INTERFACE_ADD , IPV6_EVT_INTERFACE_DELETE , IPV6_EVT_INTERFACE_RX_DATA } |
|
Asynchronous event identifiers type.
More...
|
|
Functions |
|
| uint32_t | ipv6_init (const ipv6_init_t *p_init) |
|
Initializes the IPv6 stack module.
More...
|
|
| uint32_t | ipv6_address_set (const iot_interface_t *p_interface, const ipv6_addr_conf_t *p_addr) |
|
Sets address to specific interface.
More...
|
|
| uint32_t | ipv6_address_remove (const iot_interface_t *p_interface, const ipv6_addr_t *p_addr) |
|
Removes address from specific interface.
More...
|
|
| uint32_t | ipv6_address_check (const iot_interface_t *p_interface, const ipv6_addr_t *p_addr) |
|
Checks if given unicast address has been registered.
More...
|
|
| uint32_t | ipv6_address_find_best_match ( iot_interface_t **pp_interface, ipv6_addr_t *p_addr_r, const ipv6_addr_t *p_addr_f) |
|
Finds the best matched address and interface.
More...
|
|
| uint32_t | ipv6_send (const iot_interface_t *p_interface, iot_pbuffer_t *p_packet) |
|
Sends IPv6 packet.
More...
|
|
Detailed Description
Nordic's IPv6 stack. Currently, only a Host role is supported.
Nordic's IPv6 stack provides minimal implementations of ICMP, UDP for a Host, and IPv6 Neighbor Discovery for Host. Router, neighbor, and prefix cache are not maintained across BLE link disconnections or power cycles.
Enumeration Type Documentation
| enum ipv6_event_id_t |
Asynchronous event identifiers type.
Function Documentation
| uint32_t ipv6_address_check | ( | const iot_interface_t * | p_interface , |
| const ipv6_addr_t * | p_addr | ||
| ) |
Checks if given unicast address has been registered.
- Parameters
-
[in] p_interface The interface on which IPv6 address wil be checked. [in] p_addr IPv6 address to be checked.
- Return values
-
NRF_SUCCESS If the operation was successful. NRF_ERROR_NOT_FOUND If no address was found.
| uint32_t ipv6_address_find_best_match | ( | iot_interface_t ** | pp_interface , |
| ipv6_addr_t * | p_addr_r , | ||
| const ipv6_addr_t * | p_addr_f | ||
| ) |
Finds the best matched address and interface.
API used to find the most suitable interface and address to a given destination address.
To look only for the interface, set p_addr_r to NULL.
To find the best matched address, IPV6_ADDR_STATE_PREFERRED state of address is required.
- Parameters
-
[out] pp_interface Interface to be found. [out] p_addr_r Best matching address if procedure succeeded and this value was not NULL. [in,out] p_addr_f IPv6 address for which best matching interface and/or address are requested.
- Return values
-
NRF_SUCCESS If the operation was successful. NRF_ERROR_NOT_FOUND If no interface was found. NRF_ERROR_NOT_SUPPORTED If the operation was not supported.
| uint32_t ipv6_address_remove | ( | const iot_interface_t * | p_interface , |
| const ipv6_addr_t * | p_addr | ||
| ) |
Removes address from specific interface.
API used to remove an IPv6 address from an interface.
- Parameters
-
[in] p_interface The interface from which the address must be removed. [in] p_addr IPv6 address to remove.
- Return values
-
NRF_SUCCESS If the operation was successful. NRF_ERROR_NOT_FOUND If no address was found.
| uint32_t ipv6_address_set | ( | const iot_interface_t * | p_interface , |
| const ipv6_addr_conf_t * | p_addr | ||
| ) |
Sets address to specific interface.
API used to add or update an IPv6 address on an interface. The address can have three specific states that determine transmitting capabilities.
- Parameters
-
[in] p_interface The interface on which the address must be assigned. [in] p_addr IPv6 address and state to be assigned/updated.
- Return values
-
NRF_SUCCESS If the operation was successful. NRF_ERROR_NO_MEM If no memory was available.
| uint32_t ipv6_init | ( | const ipv6_init_t * | p_init | ) |
Initializes the IPv6 stack module.
- Parameters
-
[in] p_init Initialization parameters.
- Return values
-
NRF_SUCCESS If initialization was successful. Otherwise, an error code is returned.
| uint32_t ipv6_send | ( | const iot_interface_t * | p_interface , |
| iot_pbuffer_t * | p_packet | ||
| ) |
Sends IPv6 packet.
API used to send an IPv6 packet. Which interface that packet must be sent to is determined by analyzing the destination address.
- Parameters
-
[in] p_interface The interface to which the packet is to be sent. [in] p_packet IPv6 packet to send. The packet should be allocated using iot_pbuffer_allocate , to give stack control and to release the memory buffer.
- Return values
-
NRF_SUCCESS If the send request was successful. NRF_ERROR_NOT_FOUND If there was a failure while looking for the interface. NRF_ERROR_INVALID_PARAM If there was an error in processing the IPv6 packet. NRF_ERROR_NO_MEM If no memory was available in the transport interface.