Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

net_ws_test.h File Reference

net_ws_test.h File Reference

Wi-SUN Library Test API. More...

Go to the source code of this file.

Functions

int ws_test_pan_size_set (int8_t interface_id, uint16_t pan_size)
 Set Pan size.
int ws_test_max_child_count_set (int8_t interface_id, uint16_t child_count)
 Set maximum child count.
int ws_test_gtk_set (int8_t interface_id, uint8_t *gtk[4])
 Sets Group Transient Keys.
int ws_test_active_key_set (int8_t interface_id, uint8_t index)
 Sets index of active key.
int ws_test_key_lifetime_set (int8_t interface_id, uint32_t gtk_lifetime, uint32_t pmk_lifetime, uint32_t ptk_lifetime)
 Sets lifetime for keys.
int ws_test_gtk_time_settings_set (int8_t interface_id, uint8_t revocat_lifetime_reduct, uint8_t new_activation_time, uint8_t new_install_req, uint32_t max_mismatch)
 Sets time configurations for GTK keys.
int ws_test_next_gtk_set (int8_t interface_id, uint8_t *gtk[4])
 Sets Next Group Transient Keys used during GTK life cycle.

Detailed Description

Wi-SUN Library Test API.

Warning:
NOTICE! This is test API must not be used externally.
This file is not part of the version number control and can change any time.

Definition in file net_ws_test.h.


Function Documentation

int ws_test_active_key_set ( int8_t  interface_id,
uint8_t  index 
)

Sets index of active key.

Sets index of active Group Transient Key (GTK) to border router. If index is set after bootstrap, initiates dissemination of new key index to network.

Parameters:
interface_idNetwork interface ID.
indexKey index
Returns:
0 Active key index has been set
<0 Active key index set has failed

Definition at line 165 of file ws_empty_functions.c.

int ws_test_gtk_set ( int8_t  interface_id,
uint8_t *  gtk[4] 
)

Sets Group Transient Keys.

Sets Group Transient Keys (GTKs). Up to four GTKs can be set (GTKs from index 0 to 3). At least one GTK must be set. GTKs provided in this function call are compared to current GTKs on node or border router GTK storage. If GTK is new or modified it is updated to GTK storage. If GTK is same as previous one, no changes are made. If GTK is NULL then it is removed from GTK storage. When a new GTK is inserted or GTK is modified, GTK lifetime is set to default. If GTKs are set to border router after bootstrap, border router initiates GTK update to network.

Parameters:
interface_idNetwork interface ID.
gtkGTK array, if GTK is not set, pointer for the index shall be NULL.
Returns:
0 GTKs are set
<0 GTK set has failed

Definition at line 157 of file ws_empty_functions.c.

int ws_test_gtk_time_settings_set ( int8_t  interface_id,
uint8_t  revocat_lifetime_reduct,
uint8_t  new_activation_time,
uint8_t  new_install_req,
uint32_t  max_mismatch 
)

Sets time configurations for GTK keys.

Sets GTK Revocation Lifetime Reduction and GTK New Activation Time values as parts of the GTK lifetime (e.g. value 3 is 1/3 * lifetime). Sets GTK maximum mismatch time in minutes.

Parameters:
interface_idNetwork interface ID.
revocat_lifetime_reductGTK Revocation Lifetime Reduction (1 / value * GTK lifetime) or zero if value is not changed
new_activation_timeGTK New Activation Time (1 / value * GTK lifetime) or zero if value is not changed
new_install_reqGTK New Install Required (percent * GTK lifetime) or zero if value is not changed
max_mismatchGTK maximum mismatch in minutes or zero if value is not changed
Returns:
0 Lifetimes are set
<0 Lifetime set has failed.

Definition at line 85 of file ws_test_api.c.

int ws_test_key_lifetime_set ( int8_t  interface_id,
uint32_t  gtk_lifetime,
uint32_t  pmk_lifetime,
uint32_t  ptk_lifetime 
)

Sets lifetime for keys.

Sets Group Transient Key (GTK), Pairwise Master Key (PMK) and Pairwise Transient Key (PTK) lifetimes.

Parameters:
interface_idNetwork interface ID.
gtk_lifetimeGTK lifetime in minutes or zero if value is not changed
pmk_lifetimePMK lifetime in minutes or zero if value is not changed
ptk_lifetimePTK lifetime in minutes or zero if value is not changed
Returns:
0 Lifetimes are set
<0 Lifetime set has failed

Definition at line 173 of file ws_empty_functions.c.

int ws_test_max_child_count_set ( int8_t  interface_id,
uint16_t  child_count 
)

Set maximum child count.

Maximum amount of children allowed for this device

Values above MAC neighbor table - RPL parents - temporary entries will cause undefined behaviour

Set child count to 0xffff to stop override

Parameters:
interface_idNetwork Interface
child_countPan size reported in advertisements
Returns:
0 OK
<0 Failure

Definition at line 150 of file ws_empty_functions.c.

int ws_test_next_gtk_set ( int8_t  interface_id,
uint8_t *  gtk[4] 
)

Sets Next Group Transient Keys used during GTK life cycle.

Sets next Group Transient Keys (GTKs) used during GTK life cycle. Up to four GTKs can be set (GTKs from index 0 to 3). When next GTK(s) are set, border router inserts GTKs from the next GTK list into use during GTK update procedure.

Parameters:
interface_idNetwork interface ID.
gtkGTK array, if GTK is not set, pointer for the index shall be NULL.
Returns:
0 GTKs are set
<0 GTK set has failed

Definition at line 193 of file ws_empty_functions.c.

int ws_test_pan_size_set ( int8_t  interface_id,
uint16_t  pan_size 
)

Set Pan size.

Pan size is reported to advertisement. Using this function actual value can be overridden.

Set pan_size to 0xffff to stop override

Parameters:
interface_idNetwork Interface
pan_sizePan size reported in advertisements
Returns:
0 OK
<0 Failure

Definition at line 144 of file ws_empty_functions.c.