diff options
author | Jon Paul Maloy <jon.maloy@ericsson.com> | 2015-03-13 16:08:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-14 14:38:32 -0400 |
commit | 7764d6e83d2c3b50d9282f12144ebb10418c056e (patch) | |
tree | 0d795d365ae5ca2a78983e87c4c27c6d1f573ec1 /net/tipc/msg.h | |
parent | 5f1764ddfeb038decfe2b2fda030d0bed43fa36a (diff) | |
download | blackbird-obmc-linux-7764d6e83d2c3b50d9282f12144ebb10418c056e.tar.gz blackbird-obmc-linux-7764d6e83d2c3b50d9282f12144ebb10418c056e.zip |
tipc: add framework for node capabilities exchange
The TIPC protocol spec has defined a 13 bit capability bitmap in
the neighbor discovery header, as a means to maintain compatibility
between different code and protocol generations. Until now this field
has been unused.
We now introduce the basic framework for exchanging capabilities
between nodes at first contact. After exchange, a peer node's
capabilities are stored as a 16 bit bitmap in struct tipc_node.
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/msg.h')
-rw-r--r-- | net/tipc/msg.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/net/tipc/msg.h b/net/tipc/msg.h index fa167846d1ab..7cece647394c 100644 --- a/net/tipc/msg.h +++ b/net/tipc/msg.h @@ -510,7 +510,6 @@ static inline struct tipc_msg *msg_get_wrapped(struct tipc_msg *m) #define DSC_REQ_MSG 0 #define DSC_RESP_MSG 1 - /* * Word 1 */ @@ -534,6 +533,16 @@ static inline void msg_set_node_sig(struct tipc_msg *m, u32 n) msg_set_bits(m, 1, 0, 0xffff, n); } +static inline u32 msg_node_capabilities(struct tipc_msg *m) +{ + return msg_bits(m, 1, 15, 0x1fff); +} + +static inline void msg_set_node_capabilities(struct tipc_msg *m, u32 n) +{ + msg_set_bits(m, 1, 15, 0x1fff, n); +} + /* * Word 2 |