aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/net.c
diff options
context:
space:
mode:
authorAllan Stephens <Allan.Stephens@windriver.com>2010-12-31 13:59:16 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-01 16:57:47 -0500
commit51f98a8d70583b18cb08b19353aeed5efb0244af (patch)
tree96253d3cb394202b442e65f4d169bbf49b94c327 /net/tipc/net.c
parentaa6027cacdd912ce884953714fcc7392b6155bc6 (diff)
tipc: Remove prototype code for supporting multiple zones
Eliminates routines, data structures, and files that were intended to allows TIPC to support a network containing multiple zones. Currently, TIPC supports only networks consisting of a single cluster within a single zone, so this code is unnecessary. Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/net.c')
-rw-r--r--net/tipc/net.c41
1 files changed, 25 insertions, 16 deletions
diff --git a/net/tipc/net.c b/net/tipc/net.c
index c2b4b86c2e6a..a25f8bb1e1d9 100644
--- a/net/tipc/net.c
+++ b/net/tipc/net.c
@@ -36,7 +36,6 @@
36 36
37#include "core.h" 37#include "core.h"
38#include "net.h" 38#include "net.h"
39#include "zone.h"
40#include "name_table.h" 39#include "name_table.h"
41#include "name_distr.h" 40#include "name_distr.h"
42#include "subscr.h" 41#include "subscr.h"
@@ -111,46 +110,56 @@
111*/ 110*/
112 111
113DEFINE_RWLOCK(tipc_net_lock); 112DEFINE_RWLOCK(tipc_net_lock);
114static struct _zone *tipc_zones[256] = { NULL, }; 113struct network tipc_net;
115struct network tipc_net = { tipc_zones };
116 114
117struct tipc_node *tipc_net_select_remote_node(u32 addr, u32 ref) 115struct tipc_node *tipc_net_select_remote_node(u32 addr, u32 ref)
118{ 116{
119 return tipc_zone_select_remote_node(tipc_net.zones[tipc_zone(addr)], addr, ref); 117 struct cluster *c_ptr;
118
119 c_ptr = tipc_net.clusters[1];
120 if (!c_ptr)
121 return NULL;
122 return tipc_cltr_select_node(c_ptr, ref);
120} 123}
121 124
122u32 tipc_net_select_router(u32 addr, u32 ref) 125u32 tipc_net_select_router(u32 addr, u32 ref)
123{ 126{
124 return tipc_zone_select_router(tipc_net.zones[tipc_zone(addr)], addr, ref); 127 struct cluster *c_ptr;
128
129 c_ptr = tipc_net.clusters[1];
130 if (!c_ptr)
131 return 0;
132 return tipc_cltr_select_router(c_ptr, ref);
125} 133}
126 134
127void tipc_net_remove_as_router(u32 router) 135void tipc_net_remove_as_router(u32 router)
128{ 136{
129 u32 z_num; 137 u32 c_num;
130 138
131 for (z_num = 1; z_num <= tipc_max_zones; z_num++) { 139 for (c_num = 1; c_num <= tipc_max_clusters; c_num++) {
132 if (!tipc_net.zones[z_num]) 140 if (!tipc_net.clusters[c_num])
133 continue; 141 continue;
134 tipc_zone_remove_as_router(tipc_net.zones[z_num], router); 142 tipc_cltr_remove_as_router(tipc_net.clusters[c_num], router);
135 } 143 }
136} 144}
137 145
138void tipc_net_send_external_routes(u32 dest) 146void tipc_net_send_external_routes(u32 dest)
139{ 147{
140 u32 z_num; 148 u32 c_num;
141 149
142 for (z_num = 1; z_num <= tipc_max_zones; z_num++) { 150 for (c_num = 1; c_num <= tipc_max_clusters; c_num++) {
143 if (tipc_net.zones[z_num]) 151 if (tipc_net.clusters[c_num])
144 tipc_zone_send_external_routes(tipc_net.zones[z_num], dest); 152 tipc_cltr_send_ext_routes(tipc_net.clusters[c_num],
153 dest);
145 } 154 }
146} 155}
147 156
148static void net_stop(void) 157static void net_stop(void)
149{ 158{
150 u32 z_num; 159 u32 c_num;
151 160
152 for (z_num = 1; z_num <= tipc_max_zones; z_num++) 161 for (c_num = 1; c_num <= tipc_max_clusters; c_num++)
153 tipc_zone_delete(tipc_net.zones[z_num]); 162 tipc_cltr_delete(tipc_net.clusters[c_num]);
154} 163}
155 164
156static void net_route_named_msg(struct sk_buff *buf) 165static void net_route_named_msg(struct sk_buff *buf)