joey shelton / LED_Demo

Dependencies:   MAX44000 PWM_Tone_Library nexpaq_mdk

Fork of LED_Demo by Maxim nexpaq

Embed: (wiki syntax)

« Back to documentation index

thread_border_router_api.h File Reference

thread_border_router_api.h File Reference

Thread border router application interface. More...

Go to the source code of this file.

Data Structures

struct  thread_border_router_info_t
 Structure specifying the prefix service. More...

Typedefs

typedef struct
thread_border_router_info_t 
thread_border_router_info_t
 Structure specifying the prefix service.

Functions

int thread_border_router_prefix_add (int8_t interface_id, uint8_t *prefix_ptr, uint8_t prefix_len, thread_border_router_info_t *prefix_info_ptr)
 Create local service that is provided to the Thread network.
int thread_border_router_prefix_delete (int8_t interface_id, uint8_t *prefix_ptr, uint8_t prefix_len)
 Delete local service.
int thread_border_router_route_add (int8_t interface_id, uint8_t *prefix_ptr, uint8_t prefix_len, bool stable, int8_t prf)
 Add a new route to the Thread network.
int thread_border_router_route_delete (int8_t interface_id, uint8_t *prefix_ptr, uint8_t prefix_len)
 Delete locally served route.
int thread_border_router_service_add (int8_t interface_id, uint8_t *service_ptr, uint8_t service_len, bool thread_enteprise, uint8_t sid, uint32_t enterprise_number)
 Add local service.
int thread_border_router_service_delete (int8_t interface_id, uint8_t *service_ptr, uint8_t service_len)
 Delete local service.
int thread_border_router_publish (int8_t interface_id)
 Publish local services to Thread network.
int thread_border_router_delete_all (int8_t interface_id)
 Clear the local service list.

Detailed Description

Thread border router application interface.

This file contains functions for managing Thread border router features. Border routers can set up services in the Thread network including routes, DHCPv6 servers, on-mesh prefixes and services.

Definition in file thread_border_router_api.h.


Typedef Documentation

Structure specifying the prefix service.


Function Documentation

int thread_border_router_delete_all ( int8_t  interface_id )

Clear the local service list.

Parameters:
interface_idNetwork interface ID.
Returns:
0, Push OK.
<0 Push not OK.
int thread_border_router_prefix_add ( int8_t  interface_id,
uint8_t *  prefix_ptr,
uint8_t  prefix_len,
thread_border_router_info_t prefix_info_ptr 
)

Create local service that is provided to the Thread network.

If a prefix exists it is updated. For example, when removing SLAAC (Stateless Address Autoconfiguration) you should modify the prefix first to remove the creation of new addresses and after a while, remove the prefix.

When you have configured the services locally, you need to call thread_border_router_publish to make the services available in the network.

Parameters:
interface_idNetwork interface ID.
prefix_ptrPointer prefix.
prefix_lenLength of prefix.
prefix_info_ptrPrefix service structure configuring the published service.
Returns:
0, Set OK.
<0 Set not OK.
int thread_border_router_prefix_delete ( int8_t  interface_id,
uint8_t *  prefix_ptr,
uint8_t  prefix_len 
)

Delete local service.

Parameters:
interface_idNetwork interface ID.
prefix_ptrPointer prefix.
prefix_lenLength of prefix.
Returns:
0, Set OK.
<0 Set not OK.
int thread_border_router_publish ( int8_t  interface_id )

Publish local services to Thread network.

If local services are deleted before calling this, all services are deregistered from the network.

Parameters:
interface_idNetwork interface ID.
Returns:
0, Push OK.
<0 Push not OK.
int thread_border_router_route_add ( int8_t  interface_id,
uint8_t *  prefix_ptr,
uint8_t  prefix_len,
bool  stable,
int8_t  prf 
)

Add a new route to the Thread network.

Other devices can use the route. For example, 0::0/0 means that this device provides the default route. For example, 2001::0/64 means that this device provides a more specific route.

If a prefix exists it is updated.

Parameters:
interface_idNetwork interface ID.
prefix_ptrPointer prefix. Can be NULL for the default route.
prefix_lenLength of prefix.
stableThis data is stable and expected to be available at least 48h.
prfRoute preference, 01 = High, 00 = Default, 11 = Low, 10 = Reserved.
Returns:
0, Set OK.
<0 Set not OK.
int thread_border_router_route_delete ( int8_t  interface_id,
uint8_t *  prefix_ptr,
uint8_t  prefix_len 
)

Delete locally served route.

Parameters:
interface_idNetwork interface ID.
prefix_ptrPointer prefix.
prefix_lenLength of prefix.
Returns:
0, Set OK.
<0 Set not OK.
int thread_border_router_service_add ( int8_t  interface_id,
uint8_t *  service_ptr,
uint8_t  service_len,
bool  thread_enteprise,
uint8_t  sid,
uint32_t  enterprise_number 
)

Add local service.

Parameters:
interface_idNetwork interface ID.
service_ptrPointer to service data.
service_lenLength of service.
thread_entepriseTrue if Thread enterprise number is used.
sidService identifier.
enterprise_numberIf thread_enteprise is false this must be given.
Returns:
0, Set OK.
<0 Set not OK.
int thread_border_router_service_delete ( int8_t  interface_id,
uint8_t *  service_ptr,
uint8_t  service_len 
)

Delete local service.

Parameters:
interface_idNetwork interface ID.
service_ptrPointer to service data.
service_lenLength of service.
Returns:
0, Set OK.
<0 Set not OK.