diff options
author | Allan Stephens <Allan.Stephens@windriver.com> | 2010-12-31 18:59:16 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-01 13:57:47 -0800 |
commit | 51f98a8d70583b18cb08b19353aeed5efb0244af (patch) | |
tree | 96253d3cb394202b442e65f4d169bbf49b94c327 /net/tipc/net.c | |
parent | aa6027cacdd912ce884953714fcc7392b6155bc6 (diff) | |
download | linux-51f98a8d70583b18cb08b19353aeed5efb0244af.tar.gz linux-51f98a8d70583b18cb08b19353aeed5efb0244af.tar.xz |
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.c | 41 |
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 @@ #include "core.h" #include "net.h" -#include "zone.h" #include "name_table.h" #include "name_distr.h" #include "subscr.h" @@ -111,46 +110,56 @@ */ DEFINE_RWLOCK(tipc_net_lock); -static struct _zone *tipc_zones[256] = { NULL, }; -struct network tipc_net = { tipc_zones }; +struct network tipc_net; struct tipc_node *tipc_net_select_remote_node(u32 addr, u32 ref) { - return tipc_zone_select_remote_node(tipc_net.zones[tipc_zone(addr)], addr, ref); + struct cluster *c_ptr; + + c_ptr = tipc_net.clusters[1]; + if (!c_ptr) + return NULL; + return tipc_cltr_select_node(c_ptr, ref); } u32 tipc_net_select_router(u32 addr, u32 ref) { - return tipc_zone_select_router(tipc_net.zones[tipc_zone(addr)], addr, ref); + struct cluster *c_ptr; + + c_ptr = tipc_net.clusters[1]; + if (!c_ptr) + return 0; + return tipc_cltr_select_router(c_ptr, ref); } void tipc_net_remove_as_router(u32 router) { - u32 z_num; + u32 c_num; - for (z_num = 1; z_num <= tipc_max_zones; z_num++) { - if (!tipc_net.zones[z_num]) + for (c_num = 1; c_num <= tipc_max_clusters; c_num++) { + if (!tipc_net.clusters[c_num]) continue; - tipc_zone_remove_as_router(tipc_net.zones[z_num], router); + tipc_cltr_remove_as_router(tipc_net.clusters[c_num], router); } } void tipc_net_send_external_routes(u32 dest) { - u32 z_num; + u32 c_num; - for (z_num = 1; z_num <= tipc_max_zones; z_num++) { - if (tipc_net.zones[z_num]) - tipc_zone_send_external_routes(tipc_net.zones[z_num], dest); + for (c_num = 1; c_num <= tipc_max_clusters; c_num++) { + if (tipc_net.clusters[c_num]) + tipc_cltr_send_ext_routes(tipc_net.clusters[c_num], + dest); } } static void net_stop(void) { - u32 z_num; + u32 c_num; - for (z_num = 1; z_num <= tipc_max_zones; z_num++) - tipc_zone_delete(tipc_net.zones[z_num]); + for (c_num = 1; c_num <= tipc_max_clusters; c_num++) + tipc_cltr_delete(tipc_net.clusters[c_num]); } static void net_route_named_msg(struct sk_buff *buf) |