aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/msg.h
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-10-28 16:26:41 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2012-02-24 17:05:13 -0500
commitfc0eea691a06ba8516795fb7a198239fb9db1cfc (patch)
treedfdcf4a88224cb919cc95641788b5eba58d0bd10 /net/tipc/msg.h
parentdavinci_mdio: Correct bitmask for clock divider value (diff)
downloadlinux-dev-fc0eea691a06ba8516795fb7a198239fb9db1cfc.tar.xz
linux-dev-fc0eea691a06ba8516795fb7a198239fb9db1cfc.zip
tipc: Introduce node signature field in neighbor discovery message
Adds support for the new "node signature" in neighbor discovery messages, which is a 16 bit identifier chosen randomly when TIPC is initialized. This field makes it possible for nodes receiving a neighbor discovery message to detect if multiple neighboring nodes are using the same network address (i.e. <Z.C.N>), even when the messages are arriving on different interfaces. This first phase of node signature support creates the signature, incorporates it into outgoing neighbor discovery messages, and tracks the signature used by valid neighbors. An upcoming patch builds on this foundation to implement the improved duplicate neighbor detection checking. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/msg.h')
-rw-r--r--net/tipc/msg.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/tipc/msg.h b/net/tipc/msg.h
index 7b0cda167107..2ec13b731811 100644
--- a/net/tipc/msg.h
+++ b/net/tipc/msg.h
@@ -517,6 +517,16 @@ static inline void msg_set_seq_gap(struct tipc_msg *m, u32 n)
msg_set_bits(m, 1, 16, 0x1fff, n);
}
+static inline u32 msg_node_sig(struct tipc_msg *m)
+{
+ return msg_bits(m, 1, 0, 0xffff);
+}
+
+static inline void msg_set_node_sig(struct tipc_msg *m, u32 n)
+{
+ msg_set_bits(m, 1, 0, 0xffff, n);
+}
+
/*
* Word 2