~vcs-imports/bluez/master

« back to all changes in this revision

Viewing changes to mesh/net.h

  • Committer: Brian Gix
  • Author(s): Inga Stotland
  • Date: 2019-02-12 23:30:53 UTC
  • Revision ID: git-v1:c1551f20270f5a3cf43729645a1f1fd15a11c0c8
mesh: Separate functions for net key add and update

This splits mesh_net_key_add() into two separate functions:
mesh_net_key_add() and mesh_net_key_update().
mesh_net_key_update() essentially replaces mesh_net_kr_phase_one()
since switching to Key Refresh phase one can only be triggered
by successful network key update.

Show diffs side-by-side

added added

removed removed

Lines of Context:
280
280
                                                        uint8_t interval);
281
281
bool mesh_net_set_friend_mode(struct mesh_net *net, bool enable);
282
282
int mesh_net_del_key(struct mesh_net *net, uint16_t net_idx);
283
 
int mesh_net_add_key(struct mesh_net *net, bool update,
284
 
                                        uint16_t net_idx, const void *key);
 
283
int mesh_net_add_key(struct mesh_net *net, uint16_t net_idx,
 
284
                                                        const uint8_t *key);
 
285
int mesh_net_update_key(struct mesh_net *net, uint16_t net_idx,
 
286
                                                        const uint8_t *key);
285
287
uint32_t mesh_net_get_iv_index(struct mesh_net *net);
286
288
void mesh_net_get_snb_state(struct mesh_net *net,
287
289
                                        uint8_t *flags, uint32_t *iv_index);
335
337
                                                        uint8_t transition);
336
338
uint8_t mesh_net_key_refresh_phase_get(struct mesh_net *net, uint16_t net_idx,
337
339
                                                        uint8_t *phase);
338
 
int mesh_net_kr_phase_one(struct mesh_net *net, uint16_t net_idx,
339
 
                                                        const uint8_t *key);
340
340
int mesh_net_key_refresh_phase_two(struct mesh_net *net, uint16_t net_idx);
341
341
int mesh_net_key_refresh_finish(struct mesh_net *net, uint16_t net_idx);
342
342
void mesh_net_send_seg(struct mesh_net *net, uint32_t key_id,