hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/net/tipc/core.h
....@@ -59,6 +59,13 @@
5959 #include <net/netns/generic.h>
6060 #include <linux/rhashtable.h>
6161 #include <net/genetlink.h>
62
+#include <net/netns/hash.h>
63
+
64
+#ifdef pr_fmt
65
+#undef pr_fmt
66
+#endif
67
+
68
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
6269
6370 struct tipc_node;
6471 struct tipc_bearer;
....@@ -67,6 +74,9 @@
6774 struct tipc_name_table;
6875 struct tipc_topsrv;
6976 struct tipc_monitor;
77
+#ifdef CONFIG_TIPC_CRYPTO
78
+struct tipc_crypto;
79
+#endif
7080
7181 #define TIPC_MOD_VER "2.0.0"
7282
....@@ -122,6 +132,21 @@
122132 /* Topology subscription server */
123133 struct tipc_topsrv *topsrv;
124134 atomic_t subscription_count;
135
+
136
+ /* Cluster capabilities */
137
+ u16 capabilities;
138
+
139
+ /* Tracing of node internal messages */
140
+ struct packet_type loopback_pt;
141
+
142
+#ifdef CONFIG_TIPC_CRYPTO
143
+ /* TX crypto handler */
144
+ struct tipc_crypto *crypto_tx;
145
+#endif
146
+ /* Work item for net finalize */
147
+ struct work_struct work;
148
+ /* The numbers of work queues in schedule */
149
+ atomic_t wq_count;
125150 };
126151
127152 static inline struct tipc_net *tipc_net(struct net *net)
....@@ -179,6 +204,11 @@
179204 return !less(val, min) && !more(val, max);
180205 }
181206
207
+static inline u32 tipc_net_hash_mixes(struct net *net, int tn_rand)
208
+{
209
+ return net_hash_mix(&init_net) ^ net_hash_mix(net) ^ tn_rand;
210
+}
211
+
182212 #ifdef CONFIG_SYSCTL
183213 int tipc_register_sysctl(void);
184214 void tipc_unregister_sysctl(void);