aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/addr.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/addr.h')
-rw-r--r--net/tipc/addr.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/tipc/addr.h b/net/tipc/addr.h
index bebb347803ce..2ecf5a5d40dd 100644
--- a/net/tipc/addr.h
+++ b/net/tipc/addr.h
@@ -60,6 +60,16 @@ static inline u32 tipc_cluster_mask(u32 addr)
60 return addr & TIPC_ZONE_CLUSTER_MASK; 60 return addr & TIPC_ZONE_CLUSTER_MASK;
61} 61}
62 62
63static inline int tipc_node2scope(u32 node)
64{
65 return node ? TIPC_NODE_SCOPE : TIPC_CLUSTER_SCOPE;
66}
67
68static inline int tipc_scope2node(struct net *net, int sc)
69{
70 return sc != TIPC_NODE_SCOPE ? 0 : tipc_own_addr(net);
71}
72
63u32 tipc_own_addr(struct net *net); 73u32 tipc_own_addr(struct net *net);
64int in_own_cluster(struct net *net, u32 addr); 74int in_own_cluster(struct net *net, u32 addr);
65int in_own_cluster_exact(struct net *net, u32 addr); 75int in_own_cluster_exact(struct net *net, u32 addr);