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>
This commit is contained in:

committed by
David S. Miller

parent
5f1764ddfe
commit
7764d6e83d
@@ -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
|
||||
|
Reference in New Issue
Block a user