tipc: make tipc random value aware of net namespace
[cascardo/linux.git] / net / tipc / core.h
index 75a332b..817b2e9 100644 (file)
 #include <linux/rtnetlink.h>
 #include <linux/etherdevice.h>
 #include <net/netns/generic.h>
+#include <linux/rhashtable.h>
 
 #include "node.h"
 #include "bearer.h"
+#include "bcast.h"
+#include "netlink.h"
+#include "link.h"
+#include "node.h"
+#include "msg.h"
 
 #define TIPC_MOD_VER "2.0.0"
 
 int tipc_snprintf(char *buf, int len, const char *fmt, ...);
 
-/*
- * Global configuration variables
- */
-extern u32 tipc_own_addr __read_mostly;
 extern int tipc_net_id __read_mostly;
 extern int sysctl_tipc_rmem[3] __read_mostly;
 extern int sysctl_tipc_named_timeout __read_mostly;
 
-/*
- * Other global variables
- */
-extern int tipc_random __read_mostly;
-
 struct tipc_net {
+       u32 own_addr;
        int net_id;
+       int random;
 
        /* Node table and node list */
        spinlock_t node_list_lock;
@@ -91,6 +90,22 @@ struct tipc_net {
 
        /* Bearer list */
        struct tipc_bearer __rcu *bearer_list[MAX_BEARERS + 1];
+
+       /* Broadcast link */
+       struct tipc_bcbearer *bcbearer;
+       struct tipc_bclink *bclink;
+       struct tipc_link *bcl;
+
+       /* Socket hash table */
+       struct rhashtable sk_rht;
+
+       /* Name table */
+       spinlock_t nametbl_lock;
+       struct name_table *nametbl;
+
+       /* Topology subscription server */
+       struct tipc_server *topsrv;
+       atomic_t subscription_count;
 };
 
 #ifdef CONFIG_SYSCTL