diff options
author | Brian Gix <brian.gix@intel.com> | 2019-01-18 09:39:44 -0800 |
---|---|---|
committer | Brian Gix <brian.gix@intel.com> | 2019-01-22 12:39:51 -0800 |
commit | cca48f305b6053300790dcf93f842a543c71fdbc (patch) | |
tree | 603c62ae19d0751f2c7376d2c84da65a1acc5560 /mesh/mesh-defs.h | |
parent | c7c30ac0f588629cc6ca4f437f01e4207c08befe (diff) | |
download | bluez-cca48f305b6053300790dcf93f842a543c71fdbc.tar.gz |
mesh: Fix Relaying for multiple nodes
Relay is now a cooperation between all the nodes on the daemon.
If any one or more nodes have relay enabled and a received packet
is addressed to a Group, or a non-present Unicast address, then the
packet's TTL is decremented and it is resent.
Diffstat (limited to 'mesh/mesh-defs.h')
-rw-r--r-- | mesh/mesh-defs.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mesh/mesh-defs.h b/mesh/mesh-defs.h index d40fc43e8..c30041e4a 100644 --- a/mesh/mesh-defs.h +++ b/mesh/mesh-defs.h @@ -62,7 +62,9 @@ #define VIRTUAL_ADDRESS_LOW 0x8000 #define VIRTUAL_ADDRESS_HIGH 0xbfff #define GROUP_ADDRESS_LOW 0xc000 -#define GROUP_ADDRESS_HIGH 0xff00 +#define GROUP_ADDRESS_HIGH 0xfeff +#define FIXED_GROUP_LOW 0xff00 +#define FIXED_GROUP_HIGH 0xffff #define NODE_IDENTITY_STOPPED 0x00 #define NODE_IDENTITY_RUNNING 0x01 @@ -79,6 +81,7 @@ ((x) < VIRTUAL_ADDRESS_LOW)) #define IS_VIRTUAL(x) (((x) >= VIRTUAL_ADDRESS_LOW) && \ ((x) <= VIRTUAL_ADDRESS_HIGH)) -#define IS_GROUP(x) (((x) >= GROUP_ADDRESS_LOW) && \ - ((x) <= GROUP_ADDRESS_HIGH)) +#define IS_GROUP(x) ((((x) >= GROUP_ADDRESS_LOW) && \ + ((x) < FIXED_GROUP_HIGH)) || \ + ((x) == ALL_NODES_ADDRESS)) #define IS_ALL_NODES(x) ((x) == ALL_NODES_ADDRESS) |