diff options
author | Per Liden <per.liden@ericsson.com> | 2006-01-17 18:38:21 -0500 |
---|---|---|
committer | Per Liden <per.liden@ericsson.com> | 2006-01-17 18:45:16 -0500 |
commit | 4323add67792ced172d0d93b8b2e6187023115f1 (patch) | |
tree | 13224010f6f18029fb710a1e0b48392aea90b486 /net/tipc/zone.c | |
parent | 1e63e681e06d438fdc542d40924a4f155d461bbd (diff) |
[TIPC] Avoid polluting the global namespace
This patch adds a tipc_ prefix to all externally visible symbols.
Signed-off-by: Per Liden <per.liden@ericsson.com>
Diffstat (limited to 'net/tipc/zone.c')
-rw-r--r-- | net/tipc/zone.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/net/tipc/zone.c b/net/tipc/zone.c index 4eaef662d568..7c11f7f83a21 100644 --- a/net/tipc/zone.c +++ b/net/tipc/zone.c | |||
@@ -42,12 +42,12 @@ | |||
42 | #include "cluster.h" | 42 | #include "cluster.h" |
43 | #include "node.h" | 43 | #include "node.h" |
44 | 44 | ||
45 | struct _zone *zone_create(u32 addr) | 45 | struct _zone *tipc_zone_create(u32 addr) |
46 | { | 46 | { |
47 | struct _zone *z_ptr = 0; | 47 | struct _zone *z_ptr = 0; |
48 | u32 z_num; | 48 | u32 z_num; |
49 | 49 | ||
50 | if (!addr_domain_valid(addr)) | 50 | if (!tipc_addr_domain_valid(addr)) |
51 | return 0; | 51 | return 0; |
52 | 52 | ||
53 | z_ptr = (struct _zone *)kmalloc(sizeof(*z_ptr), GFP_ATOMIC); | 53 | z_ptr = (struct _zone *)kmalloc(sizeof(*z_ptr), GFP_ATOMIC); |
@@ -55,24 +55,24 @@ struct _zone *zone_create(u32 addr) | |||
55 | memset(z_ptr, 0, sizeof(*z_ptr)); | 55 | memset(z_ptr, 0, sizeof(*z_ptr)); |
56 | z_num = tipc_zone(addr); | 56 | z_num = tipc_zone(addr); |
57 | z_ptr->addr = tipc_addr(z_num, 0, 0); | 57 | z_ptr->addr = tipc_addr(z_num, 0, 0); |
58 | net.zones[z_num] = z_ptr; | 58 | tipc_net.zones[z_num] = z_ptr; |
59 | } | 59 | } |
60 | return z_ptr; | 60 | return z_ptr; |
61 | } | 61 | } |
62 | 62 | ||
63 | void zone_delete(struct _zone *z_ptr) | 63 | void tipc_zone_delete(struct _zone *z_ptr) |
64 | { | 64 | { |
65 | u32 c_num; | 65 | u32 c_num; |
66 | 66 | ||
67 | if (!z_ptr) | 67 | if (!z_ptr) |
68 | return; | 68 | return; |
69 | for (c_num = 1; c_num <= tipc_max_clusters; c_num++) { | 69 | for (c_num = 1; c_num <= tipc_max_clusters; c_num++) { |
70 | cluster_delete(z_ptr->clusters[c_num]); | 70 | tipc_cltr_delete(z_ptr->clusters[c_num]); |
71 | } | 71 | } |
72 | kfree(z_ptr); | 72 | kfree(z_ptr); |
73 | } | 73 | } |
74 | 74 | ||
75 | void zone_attach_cluster(struct _zone *z_ptr, struct cluster *c_ptr) | 75 | void tipc_zone_attach_cluster(struct _zone *z_ptr, struct cluster *c_ptr) |
76 | { | 76 | { |
77 | u32 c_num = tipc_cluster(c_ptr->addr); | 77 | u32 c_num = tipc_cluster(c_ptr->addr); |
78 | 78 | ||
@@ -82,19 +82,19 @@ void zone_attach_cluster(struct _zone *z_ptr, struct cluster *c_ptr) | |||
82 | z_ptr->clusters[c_num] = c_ptr; | 82 | z_ptr->clusters[c_num] = c_ptr; |
83 | } | 83 | } |
84 | 84 | ||
85 | void zone_remove_as_router(struct _zone *z_ptr, u32 router) | 85 | void tipc_zone_remove_as_router(struct _zone *z_ptr, u32 router) |
86 | { | 86 | { |
87 | u32 c_num; | 87 | u32 c_num; |
88 | 88 | ||
89 | for (c_num = 1; c_num <= tipc_max_clusters; c_num++) { | 89 | for (c_num = 1; c_num <= tipc_max_clusters; c_num++) { |
90 | if (z_ptr->clusters[c_num]) { | 90 | if (z_ptr->clusters[c_num]) { |
91 | cluster_remove_as_router(z_ptr->clusters[c_num], | 91 | tipc_cltr_remove_as_router(z_ptr->clusters[c_num], |
92 | router); | 92 | router); |
93 | } | 93 | } |
94 | } | 94 | } |
95 | } | 95 | } |
96 | 96 | ||
97 | void zone_send_external_routes(struct _zone *z_ptr, u32 dest) | 97 | void tipc_zone_send_external_routes(struct _zone *z_ptr, u32 dest) |
98 | { | 98 | { |
99 | u32 c_num; | 99 | u32 c_num; |
100 | 100 | ||
@@ -102,12 +102,12 @@ void zone_send_external_routes(struct _zone *z_ptr, u32 dest) | |||
102 | if (z_ptr->clusters[c_num]) { | 102 | if (z_ptr->clusters[c_num]) { |
103 | if (in_own_cluster(z_ptr->addr)) | 103 | if (in_own_cluster(z_ptr->addr)) |
104 | continue; | 104 | continue; |
105 | cluster_send_ext_routes(z_ptr->clusters[c_num], dest); | 105 | tipc_cltr_send_ext_routes(z_ptr->clusters[c_num], dest); |
106 | } | 106 | } |
107 | } | 107 | } |
108 | } | 108 | } |
109 | 109 | ||
110 | struct node *zone_select_remote_node(struct _zone *z_ptr, u32 addr, u32 ref) | 110 | struct node *tipc_zone_select_remote_node(struct _zone *z_ptr, u32 addr, u32 ref) |
111 | { | 111 | { |
112 | struct cluster *c_ptr; | 112 | struct cluster *c_ptr; |
113 | struct node *n_ptr; | 113 | struct node *n_ptr; |
@@ -118,7 +118,7 @@ struct node *zone_select_remote_node(struct _zone *z_ptr, u32 addr, u32 ref) | |||
118 | c_ptr = z_ptr->clusters[tipc_cluster(addr)]; | 118 | c_ptr = z_ptr->clusters[tipc_cluster(addr)]; |
119 | if (!c_ptr) | 119 | if (!c_ptr) |
120 | return 0; | 120 | return 0; |
121 | n_ptr = cluster_select_node(c_ptr, ref); | 121 | n_ptr = tipc_cltr_select_node(c_ptr, ref); |
122 | if (n_ptr) | 122 | if (n_ptr) |
123 | return n_ptr; | 123 | return n_ptr; |
124 | 124 | ||
@@ -127,14 +127,14 @@ struct node *zone_select_remote_node(struct _zone *z_ptr, u32 addr, u32 ref) | |||
127 | c_ptr = z_ptr->clusters[c_num]; | 127 | c_ptr = z_ptr->clusters[c_num]; |
128 | if (!c_ptr) | 128 | if (!c_ptr) |
129 | return 0; | 129 | return 0; |
130 | n_ptr = cluster_select_node(c_ptr, ref); | 130 | n_ptr = tipc_cltr_select_node(c_ptr, ref); |
131 | if (n_ptr) | 131 | if (n_ptr) |
132 | return n_ptr; | 132 | return n_ptr; |
133 | } | 133 | } |
134 | return 0; | 134 | return 0; |
135 | } | 135 | } |
136 | 136 | ||
137 | u32 zone_select_router(struct _zone *z_ptr, u32 addr, u32 ref) | 137 | u32 tipc_zone_select_router(struct _zone *z_ptr, u32 addr, u32 ref) |
138 | { | 138 | { |
139 | struct cluster *c_ptr; | 139 | struct cluster *c_ptr; |
140 | u32 c_num; | 140 | u32 c_num; |
@@ -143,14 +143,14 @@ u32 zone_select_router(struct _zone *z_ptr, u32 addr, u32 ref) | |||
143 | if (!z_ptr) | 143 | if (!z_ptr) |
144 | return 0; | 144 | return 0; |
145 | c_ptr = z_ptr->clusters[tipc_cluster(addr)]; | 145 | c_ptr = z_ptr->clusters[tipc_cluster(addr)]; |
146 | router = c_ptr ? cluster_select_router(c_ptr, ref) : 0; | 146 | router = c_ptr ? tipc_cltr_select_router(c_ptr, ref) : 0; |
147 | if (router) | 147 | if (router) |
148 | return router; | 148 | return router; |
149 | 149 | ||
150 | /* Links to any other clusters within the zone? */ | 150 | /* Links to any other clusters within the zone? */ |
151 | for (c_num = 1; c_num <= tipc_max_clusters; c_num++) { | 151 | for (c_num = 1; c_num <= tipc_max_clusters; c_num++) { |
152 | c_ptr = z_ptr->clusters[c_num]; | 152 | c_ptr = z_ptr->clusters[c_num]; |
153 | router = c_ptr ? cluster_select_router(c_ptr, ref) : 0; | 153 | router = c_ptr ? tipc_cltr_select_router(c_ptr, ref) : 0; |
154 | if (router) | 154 | if (router) |
155 | return router; | 155 | return router; |
156 | } | 156 | } |
@@ -158,12 +158,12 @@ u32 zone_select_router(struct _zone *z_ptr, u32 addr, u32 ref) | |||
158 | } | 158 | } |
159 | 159 | ||
160 | 160 | ||
161 | u32 zone_next_node(u32 addr) | 161 | u32 tipc_zone_next_node(u32 addr) |
162 | { | 162 | { |
163 | struct cluster *c_ptr = cluster_find(addr); | 163 | struct cluster *c_ptr = tipc_cltr_find(addr); |
164 | 164 | ||
165 | if (c_ptr) | 165 | if (c_ptr) |
166 | return cluster_next_node(c_ptr, addr); | 166 | return tipc_cltr_next_node(c_ptr, addr); |
167 | return 0; | 167 | return 0; |
168 | } | 168 | } |
169 | 169 | ||