diff options
author | Inga Stotland <inga.stotland@intel.com> | 2019-02-06 19:55:34 -0800 |
---|---|---|
committer | Brian Gix <brian.gix@intel.com> | 2019-02-12 15:30:53 -0800 |
commit | d69e29af66f43e853a45b0285cd07601decab4be (patch) | |
tree | 7c478e4aa59f6eccb1520ae79cc862890c7223d3 /mesh/net.h | |
parent | c1551f20270f5a3cf43729645a1f1fd15a11c0c8 (diff) | |
download | bluez-d69e29af66f43e853a45b0285cd07601decab4be.tar.gz |
mesh: Add function to restore net key state from storage
This creates subnet state based on saved network key state:
current keys and, if present, updated keys.
Secure network beacon is generated according to key refresh phase.
Diffstat (limited to 'mesh/net.h')
-rw-r--r-- | mesh/net.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mesh/net.h b/mesh/net.h index b27a4e614..591a6898e 100644 --- a/mesh/net.h +++ b/mesh/net.h @@ -284,6 +284,8 @@ int mesh_net_add_key(struct mesh_net *net, uint16_t net_idx, const uint8_t *key); int mesh_net_update_key(struct mesh_net *net, uint16_t net_idx, const uint8_t *key); +bool mesh_net_set_key(struct mesh_net *net, uint16_t idx, const uint8_t *key, + const uint8_t *new_key, uint8_t phase); uint32_t mesh_net_get_iv_index(struct mesh_net *net); void mesh_net_get_snb_state(struct mesh_net *net, uint8_t *flags, uint32_t *iv_index); |