diff options
author | Brian Gix <brian.gix@intel.com> | 2019-12-13 12:15:05 -0800 |
---|---|---|
committer | Brian Gix <brian.gix@intel.com> | 2019-12-16 08:18:20 -0800 |
commit | 9955657fa222ba892c52daff910044dca019dadb (patch) | |
tree | 695dc54afbdaba83f94e0979ad47992b6671d2b3 /mesh/net-keys.h | |
parent | 3ed6e9f90c301536c332b52946347d6b70fb8d3c (diff) | |
download | bluez-9955657fa222ba892c52daff910044dca019dadb.tar.gz |
mesh: Refactor Secure Network Beaconing
The daemon handles multiple nodes, that may or may not be on the same
mesh network. While each node my be seperately configured to beacon or
not beacon, there is nothing gained (except redundent traffic) for each
node to beacon seperately. Beaconing is therefore centralized with the
Network Key the SNB represents, with each *received* beacon delivered
to each node. But for SNBs generated, we keep a count of how many nodes
want beacons sent for a specific key. If 1 or more, we beacon, if 0
nodes want the beacon sent, then we do not beacon.
Diffstat (limited to 'mesh/net-keys.h')
-rw-r--r-- | mesh/net-keys.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mesh/net-keys.h b/mesh/net-keys.h index d54c52156..3c2c4d0da 100644 --- a/mesh/net-keys.h +++ b/mesh/net-keys.h @@ -17,6 +17,10 @@ * */ +#define BEACON_TYPE_SNB 0x01 +#define KEY_REFRESH 0x01 +#define IV_INDEX_UPDATE 0x02 + bool net_key_confirm(uint32_t id, const uint8_t master[16]); bool net_key_retrieve(uint32_t id, uint8_t *master); uint32_t net_key_add(const uint8_t master[16]); @@ -31,3 +35,7 @@ bool net_key_snb_check(uint32_t id, uint32_t iv_index, bool kr, bool ivu, uint64_t cmac); bool net_key_snb_compose(uint32_t id, uint32_t iv_index, bool kr, bool ivu, uint8_t *snb); +void net_key_beacon_seen(uint32_t id); +void net_key_beacon_enable(uint32_t id); +bool net_key_beacon_refresh(uint32_t id, uint32_t iv_index, bool kr, bool ivu); +void net_key_beacon_disable(uint32_t id); |