summaryrefslogtreecommitdiffstats
path: root/net/tipc/node.h
diff options
context:
space:
mode:
authorTuong Lien <tuong.t.lien@dektech.com.au>2019-11-08 12:05:09 +0700
committerDavid S. Miller <davem@davemloft.net>2019-11-08 14:01:59 -0800
commit4cbf8ac2fe5a0846508fe02b95a5de1a90fa73f4 (patch)
treec19f3b0bd1614976b7334ac624f9d074cc8b254c /net/tipc/node.h
parent2a7ee696f7b000a970dcce0cb06fdcd0a9e6ee76 (diff)
downloadlinux-4cbf8ac2fe5a0846508fe02b95a5de1a90fa73f4.tar.gz
linux-4cbf8ac2fe5a0846508fe02b95a5de1a90fa73f4.tar.bz2
linux-4cbf8ac2fe5a0846508fe02b95a5de1a90fa73f4.zip
tipc: enable creating a "preliminary" node
When user sets RX key for a peer not existing on the own node, a new node entry is needed to which the RX key will be attached. However, since the peer node address (& capabilities) is unknown at that moment, only the node-ID is provided, this commit allows the creation of a node with only the data that we call as “preliminary”. A preliminary node is not the object of the “tipc_node_find()” but the “tipc_node_find_by_id()”. Once the first message i.e. LINK_CONFIG comes from that peer, and is successfully decrypted by the own node, the actual peer node data will be properly updated and the node will function as usual. In addition, the node timer always starts when a node object is created so if a preliminary node is not used, it will be cleaned up. The later encryption functions will also use the node timer and be able to create a preliminary node automatically when needed. Acked-by: Ying Xue <ying.xue@windreiver.com> Acked-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: Tuong Lien <tuong.t.lien@dektech.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/node.h')
-rw-r--r--net/tipc/node.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/tipc/node.h b/net/tipc/node.h
index c39cd861c07d..50f8838b32c2 100644
--- a/net/tipc/node.h
+++ b/net/tipc/node.h
@@ -75,6 +75,7 @@ enum {
void tipc_node_stop(struct net *net);
bool tipc_node_get_id(struct net *net, u32 addr, u8 *id);
u32 tipc_node_get_addr(struct tipc_node *node);
+char *tipc_node_get_id_str(struct tipc_node *node);
u32 tipc_node_try_addr(struct net *net, u8 *id, u32 addr);
void tipc_node_check_dest(struct net *net, u32 onode, u8 *peer_id128,
struct tipc_bearer *bearer,