nRF5 IoT SDK  v0.9.0
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
IPv6 Medium

IPv6 Medium Interface. More...

Data Structures

struct  ipv6_medium_instance_t
 IPv6 medium instance type. More...
 
struct  eui48_t
 EUI-48 value type. More...
 
struct  ipv6_medium_evt_t
 Type of IPv6 medium event parameters. More...
 
struct  ipv6_medium_error_t
 Type of IPv6 medium error parameters. More...
 
struct  ipv6_medium_init_params_t
 Structure for initialization parameters of the IPv6 medium. More...
 

Macros

#define EUI_48_SIZE   6
 
#define IPV6_MEDIUM_ID_ANY   0x00
 
#define IPV6_MEDIUM_ID_BLE   0x01
 
#define IPV6_MEDIUM_ID_802154   0x02
 
#define IPV6_MEDIUM_EVT_CONN_DOWN   0x01
 
#define IPV6_MEDIUM_EVT_CONN_UP   0x02
 
#define IPV6_MEDIUM_EVT_CONNECTABLE_MODE_ENTER   0x01
 
#define IPV6_MEDIUM_EVT_CONNECTABLE_MODE_EXIT   0x02
 
#define IPV6_MEDIUM_EVT_MAC_ADDRESS_CHANGED   0x03
 
#define IPV6_MEDIUM_EVT_PHY_SPECIFIC   0xFF
 

Typedefs

typedef uint32_t ipv6_medium_instance_id_t
 IPv6 medium instance identifier type.
 
typedef uint8_t ipv6_medium_type_t
 Type of IPv6 medium type.
 
typedef void(* ipv6_medium_evt_handler_t )(ipv6_medium_evt_t *p_ipv6_medium_evt)
 IPv6 medium event handler type.
 
typedef void(* ipv6_medium_error_handler_t )(ipv6_medium_error_t *p_ipv6_medium_error)
 IPv6 medium error handler type.
 

Functions

uint32_t ipv6_medium_init (ipv6_medium_init_params_t *p_init_param, ipv6_medium_type_t desired_medium_type, ipv6_medium_instance_t *p_new_medium_instance)
 Function for initializing the IPv6 medium. More...
 
uint32_t ipv6_medium_connectable_mode_enter (ipv6_medium_instance_id_t ipv6_medium_instance_id)
 Function for entering connectible mode. More...
 
uint32_t ipv6_medium_connectable_mode_exit (ipv6_medium_instance_id_t ipv6_medium_instance_id)
 Function for exiting connectible mode. More...
 
uint32_t ipv6_medium_eui48_get (ipv6_medium_instance_id_t ipv6_medium_instance_id, eui48_t *p_ipv6_medium_eui48)
 Function for getting the 48-bit Extended Unique Identifier. More...
 
uint32_t ipv6_medium_eui48_set (ipv6_medium_instance_id_t ipv6_medium_instance_id, eui48_t *p_ipv6_medium_eui48)
 Function for setting the 48-bit Extended Unique Identifier. More...
 
uint32_t ipv6_medium_eui64_get (ipv6_medium_instance_id_t ipv6_medium_instance_id, eui64_t *p_ipv6_medium_eui64)
 Function for getting the 64-bit Extended Unique Identifier. More...
 
uint32_t ipv6_medium_eui64_set (ipv6_medium_instance_id_t ipv6_medium_instance_id, eui64_t *p_ipv6_medium_eui64)
 Function for setting the 64-bit Extended Unique Identifier. More...
 

Detailed Description

IPv6 Medium Interface.

Implementation-agnostic interface of the physical transport that facilitates IPv6 traffic.

Macro Definition Documentation

#define EUI_48_SIZE   6

Size of a 48-bit Extended Unique Identifier in bytes.

#define IPV6_MEDIUM_EVT_CONN_DOWN   0x01

Indicates that a connection is established.

#define IPV6_MEDIUM_EVT_CONN_UP   0x02

Indicates that a connection is torn down.

#define IPV6_MEDIUM_EVT_CONNECTABLE_MODE_ENTER   0x01

Indicates that the medium entered connectable mode.

#define IPV6_MEDIUM_EVT_CONNECTABLE_MODE_EXIT   0x02

Indicates that the medium exited connectable mode.

#define IPV6_MEDIUM_EVT_MAC_ADDRESS_CHANGED   0x03

Indicates that the device has a new MAC address.

#define IPV6_MEDIUM_EVT_PHY_SPECIFIC   0xFF

Indicates miscellaneous event from the physical layer.

#define IPV6_MEDIUM_ID_802154   0x02

Indicates that the physical transport is 802.15.4.

#define IPV6_MEDIUM_ID_ANY   0x00

Indicates invalid physical transport type.

#define IPV6_MEDIUM_ID_BLE   0x01

Indicates that the physical transport is BLE.

Function Documentation

uint32_t ipv6_medium_connectable_mode_enter ( ipv6_medium_instance_id_t  ipv6_medium_instance_id)

Function for entering connectible mode.

Requests the IPv6 medium to enter connectible mode.

Parameters
[in]ipv6_medium_instance_idSpecifies the IPv6 medium instance.
Return values
NRF_SUCCESSIf the procedure was successful. Otherwise, a propagated error code is returned.
uint32_t ipv6_medium_connectable_mode_exit ( ipv6_medium_instance_id_t  ipv6_medium_instance_id)

Function for exiting connectible mode.

Requests the IPv6 medium to exit connectible mode.

Parameters
[in]ipv6_medium_instance_idSpecifies the IPv6 medium instance.
Return values
NRF_SUCCESSIf the procedure was successful. Otherwise, a propagated error code is returned.
uint32_t ipv6_medium_eui48_get ( ipv6_medium_instance_id_t  ipv6_medium_instance_id,
eui48_t p_ipv6_medium_eui48 
)

Function for getting the 48-bit Extended Unique Identifier.

Parameters
[in]ipv6_medium_instance_idSpecifies the IPv6 medium instance.
[out]p_ipv6_medium_eui48Pointer to the EUI-48 value.
Return values
NRF_SUCCESSIf the procedure was successful. Otherwise, a propagated error code is returned.
uint32_t ipv6_medium_eui48_set ( ipv6_medium_instance_id_t  ipv6_medium_instance_id,
eui48_t p_ipv6_medium_eui48 
)

Function for setting the 48-bit Extended Unique Identifier.

Parameters
[in]ipv6_medium_instance_idSpecifies the IPv6 medium instance.
[in]p_ipv6_medium_eui48Pointer to the EUI-48 value.
Return values
NRF_SUCCESSIf the procedure was successful. Otherwise, a propagated error code is returned.
uint32_t ipv6_medium_eui64_get ( ipv6_medium_instance_id_t  ipv6_medium_instance_id,
eui64_t p_ipv6_medium_eui64 
)

Function for getting the 64-bit Extended Unique Identifier.

Parameters
[in]ipv6_medium_instance_idSpecifies the IPv6 medium instance.
[out]p_ipv6_medium_eui64Pointer to the EUI-64 value.
Return values
NRF_SUCCESSIf the procedure was successful. Otherwise, a propagated error code is returned.
uint32_t ipv6_medium_eui64_set ( ipv6_medium_instance_id_t  ipv6_medium_instance_id,
eui64_t p_ipv6_medium_eui64 
)

Function for setting the 64-bit Extended Unique Identifier.

Parameters
[in]ipv6_medium_instance_idSpecifies the IPv6 medium instance.
[in]p_ipv6_medium_eui64Pointer to the EUI-64 value.
Return values
NRF_SUCCESSIf the procedure was successful. Otherwise, a propagated error code is returned.
uint32_t ipv6_medium_init ( ipv6_medium_init_params_t p_init_param,
ipv6_medium_type_t  desired_medium_type,
ipv6_medium_instance_t p_new_medium_instance 
)

Function for initializing the IPv6 medium.

Initializes the IPv6 medium module. Performs all setup necessary that is specific to the implementation.

Parameters
[in]p_init_paramPointer to the initialization parameters.
[in]desired_medium_typeValue of the desired medium type.
[out]p_new_medium_instancePointer to the new medium instance initalized.
Return values
NRF_SUCCESSIf initialization was successful. Otherwise, a propagated error code is returned.