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.
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 |
Border router network data structure. More... | |
Typedefs | |
typedef struct thread_border_router_info_t | thread_border_router_info_t |
Border router network data structure. | |
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. | |
int | thread_border_router_recursive_dns_server_option_set (int8_t interface_id, uint8_t *recursive_dns_server_option, uint16_t recursive_dns_server_option_len) |
Set Recursive DNS server (RDNSS) option that is encoded according to RFC6106. | |
int | thread_border_router_dns_search_list_option_set (int8_t interface_id, uint8_t *dns_search_list_option, uint16_t search_list_option_len) |
Set DNS server search list (DNSSL) option that is encoded according to RFC6106. |
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 |
Border router network data structure.
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_dns_search_list_option_set | ( | int8_t | interface_id, |
uint8_t * | dns_search_list_option, | ||
uint16_t | search_list_option_len | ||
) |
Set DNS server search list (DNSSL) option that is encoded according to RFC6106.
Setting a new DNSSL will overwrite previous DNSSL option. Set DNSSL will be used until it is cleared.
- Parameters:
-
interface_id Network interface ID. dns_search_list_option DNS search list option encoded according to rfc6106, can be NULL to clear existing DNSSL. search_list_option_len Length of the dns_search_list_option in bytes.
- Returns:
- 0, Option saved OK.
- <0 when error occurs during option processing.
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_recursive_dns_server_option_set | ( | int8_t | interface_id, |
uint8_t * | recursive_dns_server_option, | ||
uint16_t | recursive_dns_server_option_len | ||
) |
Set Recursive DNS server (RDNSS) option that is encoded according to RFC6106.
Setting a new RDNSS will overwrite previous RDNSS option. Set RNDDS will be used until it is cleared.
- Parameters:
-
interface_id Network interface ID. recursive_dns_server_option Recursive DNS server option encoded according to rfc6106, can be NULL to clear existing RDNSS. recursive_dns_server_option_len Length of the recursive_dns_server_option in bytes.
- Returns:
- 0, Option saved OK.
- <0 when error occurs during option processing.
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 18:19:37 by
