nRF5 IoT SDK  v0.9.0
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
IPv6 Core Application Interface for Nordic's IPv6 stack

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_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

Asynchronous event identifiers type.

Enumerator
IPV6_EVT_INTERFACE_ADD 

Notification of a new IPv6 interface added.

IPV6_EVT_INTERFACE_DELETE 

Notification of IPv6 interface deleted.

IPV6_EVT_INTERFACE_RX_DATA 

Notification of IPv6 data, depending on configuration. For example, IPV6_ENABLE_USNUPORTED_PROTOCOLS_TO_APPLICATION.

Function Documentation

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_interfaceInterface to be found.
[out]p_addr_rBest matching address if procedure succeeded and this value was not NULL.
[in,out]p_addr_fIPv6 address for which best matching interface and/or address are requested.
Return values
NRF_SUCCESSIf the operation was successful.
NRF_ERROR_NOT_FOUNDIf no interface was found.
NRF_ERROR_NOT_SUPPORTEDIf 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_interfaceThe interface from which the address must be removed.
[in]p_addrIPv6 address to remove.
Return values
NRF_SUCCESSIf the operation was successful.
NRF_ERROR_NOT_FOUNDIf 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_interfaceThe interface on which the address must be assigned.
[in]p_addrIPv6 address and state to be assigned/updated.
Return values
NRF_SUCCESSIf the operation was successful.
NRF_ERROR_NO_MEMIf no memory was available.
uint32_t ipv6_init ( const ipv6_init_t p_init)

Initializes the IPv6 stack module.

Parameters
[in]p_initInitialization parameters.
Return values
NRF_SUCCESSIf 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_interfaceThe interface to which the packet is to be sent.
[in]p_packetIPv6 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_SUCCESSIf the send request was successful.
NRF_ERROR_NOT_FOUNDIf there was a failure while looking for the interface.
NRF_ERROR_INVALID_PARAMIf there was an error in processing the IPv6 packet.
NRF_ERROR_NO_MEMIf no memory was available in the transport interface.