| .. | .. |
|---|
| 59 | 59 | #include <net/netns/generic.h> |
|---|
| 60 | 60 | #include <linux/rhashtable.h> |
|---|
| 61 | 61 | #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 |
|---|
| 62 | 69 | |
|---|
| 63 | 70 | struct tipc_node; |
|---|
| 64 | 71 | struct tipc_bearer; |
|---|
| .. | .. |
|---|
| 67 | 74 | struct tipc_name_table; |
|---|
| 68 | 75 | struct tipc_topsrv; |
|---|
| 69 | 76 | struct tipc_monitor; |
|---|
| 77 | +#ifdef CONFIG_TIPC_CRYPTO |
|---|
| 78 | +struct tipc_crypto; |
|---|
| 79 | +#endif |
|---|
| 70 | 80 | |
|---|
| 71 | 81 | #define TIPC_MOD_VER "2.0.0" |
|---|
| 72 | 82 | |
|---|
| .. | .. |
|---|
| 122 | 132 | /* Topology subscription server */ |
|---|
| 123 | 133 | struct tipc_topsrv *topsrv; |
|---|
| 124 | 134 | 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; |
|---|
| 125 | 150 | }; |
|---|
| 126 | 151 | |
|---|
| 127 | 152 | static inline struct tipc_net *tipc_net(struct net *net) |
|---|
| .. | .. |
|---|
| 179 | 204 | return !less(val, min) && !more(val, max); |
|---|
| 180 | 205 | } |
|---|
| 181 | 206 | |
|---|
| 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 | + |
|---|
| 182 | 212 | #ifdef CONFIG_SYSCTL |
|---|
| 183 | 213 | int tipc_register_sysctl(void); |
|---|
| 184 | 214 | void tipc_unregister_sysctl(void); |
|---|