Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MAX44000 PWM_Tone_Library nexpaq_mdk
Fork of LED_Demo by
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
typedef struct thread_border_router_info_t thread_border_router_info_t |
Structure specifying the prefix service.
Function Documentation
int thread_border_router_delete_all | ( | int8_t | interface_id ) |
Clear the local service list.
- Parameters:
-
interface_id Network 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_id Network interface ID. prefix_ptr Pointer prefix. prefix_len Length of prefix. prefix_info_ptr Prefix 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_id Network interface ID. prefix_ptr Pointer prefix. prefix_len Length 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_id Network 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_id Network interface ID. prefix_ptr Pointer prefix. Can be NULL for the default route. prefix_len Length of prefix. stable This data is stable and expected to be available at least 48h. prf Route 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_id Network interface ID. prefix_ptr Pointer prefix. prefix_len Length 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_id Network interface ID. service_ptr Pointer to service data. service_len Length of service. thread_enteprise True if Thread enterprise number is used. sid Service identifier. enterprise_number If 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_id Network interface ID. service_ptr Pointer to service data. service_len Length of service.
- Returns:
- 0, Set OK.
- <0 Set not OK.
Generated on Tue Jul 12 2022 12:29:03 by
