Mbed OS Reference
|
Wi-SUN Border Router class. More...
#include <WisunBorderRouter.h>
Public Member Functions | |
WisunBorderRouter () | |
Create WisunBorderRouter. More... | |
mesh_error_t | start (WisunInterface *mesh_if, NetworkInterface *backbone_if) |
Start Wi-SUN Border Router. More... | |
mesh_error_t | start (NetworkInterface *mesh_if, NetworkInterface *backbone_if) |
Start Wi-SUN Border Router. More... | |
mesh_error_t | start (WisunInterface *mesh_if, OnboardNetworkStack::Interface *backbone_if) |
Start Wi-SUN Border Router. More... | |
mesh_error_t | start (NetworkInterface *mesh_if, OnboardNetworkStack::Interface *backbone_if) |
Start Wi-SUN Border Router. More... | |
void | stop () |
Stop Wi-SUN Border Router. More... | |
mesh_error_t | set_rpl_parameters (uint8_t dio_interval_min, uint8_t dio_interval_doublings, uint8_t dio_redundancy_constant) |
Set Wi-SUN RPL DIO trickle parameters. More... | |
mesh_error_t | get_rpl_parameters (uint8_t *dio_interval_min, uint8_t *dio_interval_doublings, uint8_t *dio_redundancy_constant) |
Get Wi-SUN RPL DIO trickle parameters. More... | |
mesh_error_t | validate_rpl_parameters (uint8_t dio_interval_min, uint8_t dio_interval_doublings, uint8_t dio_redundancy_constant) |
Validate Wi-SUN RPL DIO trickle parameters. More... | |
mesh_error_t | set_pan_configuration (uint16_t pan_id) |
Set Wi-SUN PAN configuration parameters. More... | |
mesh_error_t | get_pan_configuration (uint16_t *pan_id) |
Get Wi-SUN PAN configuration parameters. More... | |
mesh_error_t | validate_pan_configuration (uint16_t pan_id) |
Validate Wi-SUN PAN configuration parameters. More... | |
mesh_error_t | info_get (ws_br_info_t *info_ptr) |
Get Wi-SUN Border Router information. More... | |
int | routing_table_get (ws_br_route_info_t *table_ptr, uint16_t table_len) |
Get Wi-SUN neighbor table information. More... | |
mesh_error_t | set_radius_server_ipv6_address (const char *address) |
Set Wi-SUN RADIUS server IPv6 address. More... | |
mesh_error_t | get_radius_server_ipv6_address (char *address) |
Get Wi-SUN RADIUS server IPv6 address. More... | |
mesh_error_t | set_radius_shared_secret (uint16_t shared_secret_len, const uint8_t *shared_secret) |
Set Wi-SUN RADIUS shared secret. More... | |
mesh_error_t | get_radius_shared_secret (uint16_t *shared_secret_len, uint8_t *shared_secret) |
Get Wi-SUN RADIUS shared secret. More... | |
mesh_error_t | set_radius_timing (ws_br_radius_timing_t *timing) |
Set Wi-SUN RADIUS timing parameters. More... | |
mesh_error_t | get_radius_timing (ws_br_radius_timing_t *timing) |
Get Wi-SUN RADIUS timing parameters. More... | |
mesh_error_t | validate_radius_timing (ws_br_radius_timing_t *timing) |
Validate Wi-SUN RADIUS timing parameters. More... | |
mesh_error_t | set_dns_query_result (SocketAddress *address, char *domain_name) |
Set DNS query result to Nanostack cache. More... | |
Wi-SUN Border Router class.
Class can be used to start, stop and configure Wi-SUN Border Router.
Definition at line 69 of file WisunBorderRouter.h.
Create WisunBorderRouter.
mesh_error_t start | ( | WisunInterface * | mesh_if, |
NetworkInterface * | backbone_if | ||
) |
Start Wi-SUN Border Router.
Starts Wi-SUN Border Router and routing between the mesh and backbone interfaces. Network interfaces must be initialized and connected before calling the start. Backbone interface can be either Ethernet (EMAC) or Cellular.
mesh_if | Wi-SUN mesh network interface |
backbone_if | Backbone network interface |
mesh_error_t start | ( | NetworkInterface * | mesh_if, |
NetworkInterface * | backbone_if | ||
) |
Start Wi-SUN Border Router.
Starts Wi-SUN Border Router and routing between the mesh and backbone interfaces. Network interfaces must be initialized and connected before calling the start. Backbone interface can be either Ethernet (EMAC) or Cellular.
mesh_if | Wi-SUN mesh network interface |
backbone_if | Backbone network interface |
mesh_error_t start | ( | WisunInterface * | mesh_if, |
OnboardNetworkStack::Interface * | backbone_if | ||
) |
Start Wi-SUN Border Router.
Starts Wi-SUN Border Router and routing between the mesh and backbone interfaces. Mesh network interface must be initialized and connected before calling the start. Backbone OnboardNetworkStack::Interface must be brought up before calling the start. Backbone interface can be either Ethernet (EMAC) or Cellular (PPP).
mesh_if | Wi-SUN mesh network interface |
backbone_if | Backbone OnboardNetworkStack::Interface interface |
mesh_error_t start | ( | NetworkInterface * | mesh_if, |
OnboardNetworkStack::Interface * | backbone_if | ||
) |
Start Wi-SUN Border Router.
Starts Wi-SUN Border Router and routing between the mesh and backbone interfaces. Mesh network interface must be initialized and connected before calling the start. Backbone OnboardNetworkStack::Interface must be brought up before calling the start. Backbone interface can be either Ethernet (EMAC) or Cellular (PPP).
mesh_if | Wi-SUN mesh network interface |
backbone_if | Backbone OnboardNetworkStack::Interface interface |
void stop | ( | ) |
Stop Wi-SUN Border Router.
Stops Wi-SUN Border Router.
mesh_error_t set_rpl_parameters | ( | uint8_t | dio_interval_min, |
uint8_t | dio_interval_doublings, | ||
uint8_t | dio_redundancy_constant | ||
) |
Set Wi-SUN RPL DIO trickle parameters.
Function stores new parameters to Border Router and uses them when mesh interface connect() is called next time. If device is already connected to the Wi-SUN network then device will restart Wi-SUN network after changing the RPL DIO trickle parameters. Mesh interface must be initialized before calling this function.
dio_interval_min | DIO trickle timer Imin parameter. Use 0x00 to use leave parameter unchanged. |
dio_interval_doublings | DIO trickle timer Imax parameter as doublings of Imin. Use 0x00 to use leave parameter unchanged. |
dio_redundancy_constant | DIO trickle timer redundancy constant. Use 0xff to use leave parameter unchanged. |
mesh_error_t get_rpl_parameters | ( | uint8_t * | dio_interval_min, |
uint8_t * | dio_interval_doublings, | ||
uint8_t * | dio_redundancy_constant | ||
) |
Get Wi-SUN RPL DIO trickle parameters.
Function reads DIO trickle timer Imin, DIO trickle timer Imax and DIO trickle timer redundancy constant from Border Router. Mesh interface must be initialized before calling this function.
dio_interval_min | DIO trickle timer Imin parameter. |
dio_interval_doublings | DIO trickle timer Imax parameter as doublings of Imin. |
dio_redundancy_constant | DIO trickle timer redundancy constant. |
mesh_error_t validate_rpl_parameters | ( | uint8_t | dio_interval_min, |
uint8_t | dio_interval_doublings, | ||
uint8_t | dio_redundancy_constant | ||
) |
Validate Wi-SUN RPL DIO trickle parameters.
Function validates DIO trickle timer Imin, DIO trickle timer Imax and DIO trickle timer redundancy constant. Function can be used to test that values that will be used on set function are valid. Mesh interface must be initialized before the calling this function.
dio_interval_min | DIO trickle timer Imin parameter. |
dio_interval_doublings | DIO trickle timer Imax parameter as doublings of Imin. |
dio_redundancy_constant | DIO trickle timer redundancy constant. |
mesh_error_t set_pan_configuration | ( | uint16_t | pan_id | ) |
Set Wi-SUN PAN configuration parameters.
Function stores new parameters to Border Router and uses them when mesh interface connect() is called next time. If device is already connected to the Wi-SUN network then device will restart Wi-SUN network after changing the PAN configuration parameters. Mesh interface must be initialized before calling this function.
pan_id | PAN ID. 0xffff will generate the PAN ID on the mesh interface connect() call if not already generated. |
mesh_error_t get_pan_configuration | ( | uint16_t * | pan_id | ) |
Get Wi-SUN PAN configuration parameters.
Function reads PAN ID from Border Router. Mesh interface must be initialized before calling this function.
pan_id | PAN ID. |
mesh_error_t validate_pan_configuration | ( | uint16_t | pan_id | ) |
Validate Wi-SUN PAN configuration parameters.
Function validates PAN ID. Function can be used to test that values that will be used on set function are valid. Mesh interface must be initialized before calling this function.
pan_id | PAN ID. |
mesh_error_t info_get | ( | ws_br_info_t * | info_ptr | ) |
Get Wi-SUN Border Router information.
Function reads RPL information from Border Router. Mesh interface must be initialized before calling this function.
info_ptr | Structure given to stack where information will be stored |
int routing_table_get | ( | ws_br_route_info_t * | table_ptr, |
uint16_t | table_len | ||
) |
Get Wi-SUN neighbor table information.
Function reads Routing Table information from Border Router. Table is Parent child relation using the Global address IID of the devices. To get the full IPv6 address of the device, IPv6 = Global Prefix + IID. Mesh interface must be initialized before calling this function.
table_ptr | Application allocated memory block where routing table is written. |
table_len | Length of the table allocated by application given as amount of entries. |
mesh_error_t set_radius_server_ipv6_address | ( | const char * | address | ) |
Set Wi-SUN RADIUS server IPv6 address.
Function sets external RADIUS server IPv6 address to Border Router. Setting the address enables external RADIUS server interface on Border Router. To disable external RADIUS server interface, call the function with address set to NULL. The RADIUS shared secret must be set before address is set using set_radius_shared_secret() call.
address | Pointer to IPv6 address string or NULL to disable RADIUS. Address string format is e.g. 2001:1234::1 and it is NUL terminated. |
mesh_error_t get_radius_server_ipv6_address | ( | char * | address | ) |
Get Wi-SUN RADIUS server IPv6 address.
Function gets external RADIUS server IPv6 address from Border Router.
address | Pointer to buffer where to write IPv6 address string. Must have space at least for 39 characters and NUL terminator. |
mesh_error_t set_radius_shared_secret | ( | uint16_t | shared_secret_len, |
const uint8_t * | shared_secret | ||
) |
Set Wi-SUN RADIUS shared secret.
Function sets RADIUS shared secret to Border Router. Shared secret may be an ASCII string. Check the format and length constraints for the shared secret from the documentation of RADIUS server you are connecting to.
shared_secret_len | The length of the shared secret in bytes. |
shared_secret | Pointer to shared secret. Can be 8-bit ASCII string or byte array. Is not NUL terminated. |
mesh_error_t get_radius_shared_secret | ( | uint16_t * | shared_secret_len, |
uint8_t * | shared_secret | ||
) |
Get Wi-SUN RADIUS shared secret.
Function gets RADIUS shared secret from Border Router.
shared_secret_len | On function call, is the size of the shared secret write buffer in bytes, on return is the shared secret length in bytes. |
shared_secret | Pointer to buffer where to write shared secret or NULL. At maximum, bytes set by the length parameter are written. If NULL only buffer length is returned. |
mesh_error_t set_radius_timing | ( | ws_br_radius_timing_t * | timing | ) |
Set Wi-SUN RADIUS timing parameters.
Function sets RADIUS timing parameters to Border Router. For RADIUS retry trickle timer default settings are that the first retry is done between 1 to 3 seconds after the initial attempt and all retries are done in maximum in 9 seconds.
timing | Timing parameters. |
mesh_error_t get_radius_timing | ( | ws_br_radius_timing_t * | timing | ) |
Get Wi-SUN RADIUS timing parameters.
Function gets RADIUS timing parameters from Border Router.
timing | Timing parameters. |
mesh_error_t validate_radius_timing | ( | ws_br_radius_timing_t * | timing | ) |
Validate Wi-SUN RADIUS timing parameters.
Function validates RADIUS timing parameters on Border Router.
timing | Timing parameters. |
mesh_error_t set_dns_query_result | ( | SocketAddress * | address, |
char * | domain_name | ||
) |
Set DNS query result to Nanostack cache.
Function sets DNS query result to Nanostack cache to get distributed to the devices in the Wi-SUN network. Function must be called for a running Wi-SUN Border Router instance.
address | resolved address of domain_name. |
domain_name | name of the domain. Must be non-NULL. |