summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/tipc/addr.c7
-rw-r--r--net/tipc/addr.h8
-rw-r--r--net/tipc/bearer.h2
-rw-r--r--net/tipc/core.h17
-rw-r--r--net/tipc/net.c1
-rw-r--r--net/tipc/node.c1
-rw-r--r--net/tipc/node.h2
-rw-r--r--net/tipc/socket.c1
8 files changed, 22 insertions, 17 deletions
diff --git a/net/tipc/addr.c b/net/tipc/addr.c
index ba7daa864d44..48fd3b5a73fb 100644
--- a/net/tipc/addr.c
+++ b/net/tipc/addr.c
@@ -38,13 +38,6 @@
38#include "addr.h" 38#include "addr.h"
39#include "core.h" 39#include "core.h"
40 40
41u32 tipc_own_addr(struct net *net)
42{
43 struct tipc_net *tn = net_generic(net, tipc_net_id);
44
45 return tn->own_addr;
46}
47
48/** 41/**
49 * in_own_cluster - test for cluster inclusion; <0.0.0> always matches 42 * in_own_cluster - test for cluster inclusion; <0.0.0> always matches
50 */ 43 */
diff --git a/net/tipc/addr.h b/net/tipc/addr.h
index 7ba6d5c8ae40..93f7c983be33 100644
--- a/net/tipc/addr.h
+++ b/net/tipc/addr.h
@@ -41,10 +41,18 @@
41#include <linux/tipc.h> 41#include <linux/tipc.h>
42#include <net/net_namespace.h> 42#include <net/net_namespace.h>
43#include <net/netns/generic.h> 43#include <net/netns/generic.h>
44#include "core.h"
44 45
45#define TIPC_ZONE_MASK 0xff000000u 46#define TIPC_ZONE_MASK 0xff000000u
46#define TIPC_CLUSTER_MASK 0xfffff000u 47#define TIPC_CLUSTER_MASK 0xfffff000u
47 48
49static inline u32 tipc_own_addr(struct net *net)
50{
51 struct tipc_net *tn = net_generic(net, tipc_net_id);
52
53 return tn->own_addr;
54}
55
48static inline u32 tipc_zone_mask(u32 addr) 56static inline u32 tipc_zone_mask(u32 addr)
49{ 57{
50 return addr & TIPC_ZONE_MASK; 58 return addr & TIPC_ZONE_MASK;
diff --git a/net/tipc/bearer.h b/net/tipc/bearer.h
index 5cad243ee8fc..dc714d977768 100644
--- a/net/tipc/bearer.h
+++ b/net/tipc/bearer.h
@@ -38,9 +38,9 @@
38#define _TIPC_BEARER_H 38#define _TIPC_BEARER_H
39 39
40#include "netlink.h" 40#include "netlink.h"
41#include "core.h"
41#include <net/genetlink.h> 42#include <net/genetlink.h>
42 43
43#define MAX_BEARERS 2
44#define MAX_MEDIA 3 44#define MAX_MEDIA 3
45#define MAX_NODES 4096 45#define MAX_NODES 4096
46#define WSIZE 32 46#define WSIZE 32
diff --git a/net/tipc/core.h b/net/tipc/core.h
index 3dc68c7a966d..53e8146b14e0 100644
--- a/net/tipc/core.h
+++ b/net/tipc/core.h
@@ -60,16 +60,19 @@
60#include <net/netns/generic.h> 60#include <net/netns/generic.h>
61#include <linux/rhashtable.h> 61#include <linux/rhashtable.h>
62 62
63#include "node.h" 63struct tipc_node;
64#include "bearer.h" 64struct tipc_bearer;
65#include "bcast.h" 65struct tipc_bcbearer;
66#include "netlink.h" 66struct tipc_bclink;
67#include "link.h" 67struct tipc_link;
68#include "node.h" 68struct tipc_name_table;
69#include "msg.h" 69struct tipc_server;
70 70
71#define TIPC_MOD_VER "2.0.0" 71#define TIPC_MOD_VER "2.0.0"
72 72
73#define NODE_HTABLE_SIZE 512
74#define MAX_BEARERS 3
75
73extern int tipc_net_id __read_mostly; 76extern int tipc_net_id __read_mostly;
74extern int sysctl_tipc_rmem[3] __read_mostly; 77extern int sysctl_tipc_rmem[3] __read_mostly;
75extern int sysctl_tipc_named_timeout __read_mostly; 78extern int sysctl_tipc_named_timeout __read_mostly;
diff --git a/net/tipc/net.c b/net/tipc/net.c
index a54f3cbe2246..d6d1399ae229 100644
--- a/net/tipc/net.c
+++ b/net/tipc/net.c
@@ -40,6 +40,7 @@
40#include "subscr.h" 40#include "subscr.h"
41#include "socket.h" 41#include "socket.h"
42#include "node.h" 42#include "node.h"
43#include "bcast.h"
43 44
44static const struct nla_policy tipc_nl_net_policy[TIPC_NLA_NET_MAX + 1] = { 45static const struct nla_policy tipc_nl_net_policy[TIPC_NLA_NET_MAX + 1] = {
45 [TIPC_NLA_NET_UNSPEC] = { .type = NLA_UNSPEC }, 46 [TIPC_NLA_NET_UNSPEC] = { .type = NLA_UNSPEC },
diff --git a/net/tipc/node.c b/net/tipc/node.c
index 22c059ad2999..eb3856bb8c5a 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -39,6 +39,7 @@
39#include "node.h" 39#include "node.h"
40#include "name_distr.h" 40#include "name_distr.h"
41#include "socket.h" 41#include "socket.h"
42#include "bcast.h"
42 43
43static void node_lost_contact(struct tipc_node *n_ptr); 44static void node_lost_contact(struct tipc_node *n_ptr);
44static void node_established_contact(struct tipc_node *n_ptr); 45static void node_established_contact(struct tipc_node *n_ptr);
diff --git a/net/tipc/node.h b/net/tipc/node.h
index 02d5c20dc551..5a834cf142c8 100644
--- a/net/tipc/node.h
+++ b/net/tipc/node.h
@@ -45,8 +45,6 @@
45/* Out-of-range value for node signature */ 45/* Out-of-range value for node signature */
46#define INVALID_NODE_SIG 0x10000 46#define INVALID_NODE_SIG 0x10000
47 47
48#define NODE_HTABLE_SIZE 512
49
50/* Flags used to take different actions according to flag type 48/* Flags used to take different actions according to flag type
51 * TIPC_WAIT_PEER_LINKS_DOWN: wait to see that peer's links are down 49 * TIPC_WAIT_PEER_LINKS_DOWN: wait to see that peer's links are down
52 * TIPC_WAIT_OWN_LINKS_DOWN: wait until peer node is declared down 50 * TIPC_WAIT_OWN_LINKS_DOWN: wait until peer node is declared down
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 8f3c8e2cef8e..9370f953e16f 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -41,6 +41,7 @@
41#include "link.h" 41#include "link.h"
42#include "name_distr.h" 42#include "name_distr.h"
43#include "socket.h" 43#include "socket.h"
44#include "bcast.h"
44 45
45#define SS_LISTENING -1 /* socket is listening */ 46#define SS_LISTENING -1 /* socket is listening */
46#define SS_READY -2 /* socket is connectionless */ 47#define SS_READY -2 /* socket is connectionless */