aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/core.c')
-rw-r--r--net/tipc/core.c38
1 files changed, 9 insertions, 29 deletions
diff --git a/net/tipc/core.c b/net/tipc/core.c
index 696468117985..e2a09eb8efd4 100644
--- a/net/tipc/core.c
+++ b/net/tipc/core.c
@@ -96,13 +96,8 @@ int tipc_net_id;
96int tipc_remote_management; 96int tipc_remote_management;
97 97
98 98
99int tipc_get_mode(void)
100{
101 return tipc_mode;
102}
103
104/** 99/**
105 * buf_acquire - creates a TIPC message buffer 100 * tipc_buf_acquire - creates a TIPC message buffer
106 * @size: message size (including TIPC header) 101 * @size: message size (including TIPC header)
107 * 102 *
108 * Returns a new buffer with data pointers set to the specified size. 103 * Returns a new buffer with data pointers set to the specified size.
@@ -111,7 +106,7 @@ int tipc_get_mode(void)
111 * There may also be unrequested tailroom present at the buffer's end. 106 * There may also be unrequested tailroom present at the buffer's end.
112 */ 107 */
113 108
114struct sk_buff *buf_acquire(u32 size) 109struct sk_buff *tipc_buf_acquire(u32 size)
115{ 110{
116 struct sk_buff *skb; 111 struct sk_buff *skb;
117 unsigned int buf_size = (BUF_HEADROOM + size + 3) & ~3u; 112 unsigned int buf_size = (BUF_HEADROOM + size + 3) & ~3u;
@@ -129,7 +124,7 @@ struct sk_buff *buf_acquire(u32 size)
129 * tipc_core_stop_net - shut down TIPC networking sub-systems 124 * tipc_core_stop_net - shut down TIPC networking sub-systems
130 */ 125 */
131 126
132void tipc_core_stop_net(void) 127static void tipc_core_stop_net(void)
133{ 128{
134 tipc_eth_media_stop(); 129 tipc_eth_media_stop();
135 tipc_net_stop(); 130 tipc_net_stop();
@@ -154,7 +149,7 @@ int tipc_core_start_net(unsigned long addr)
154 * tipc_core_stop - switch TIPC from SINGLE NODE to NOT RUNNING mode 149 * tipc_core_stop - switch TIPC from SINGLE NODE to NOT RUNNING mode
155 */ 150 */
156 151
157void tipc_core_stop(void) 152static void tipc_core_stop(void)
158{ 153{
159 if (tipc_mode != TIPC_NODE_MODE) 154 if (tipc_mode != TIPC_NODE_MODE)
160 return; 155 return;
@@ -169,13 +164,14 @@ void tipc_core_stop(void)
169 tipc_nametbl_stop(); 164 tipc_nametbl_stop();
170 tipc_ref_table_stop(); 165 tipc_ref_table_stop();
171 tipc_socket_stop(); 166 tipc_socket_stop();
167 tipc_log_resize(0);
172} 168}
173 169
174/** 170/**
175 * tipc_core_start - switch TIPC from NOT RUNNING to SINGLE NODE mode 171 * tipc_core_start - switch TIPC from NOT RUNNING to SINGLE NODE mode
176 */ 172 */
177 173
178int tipc_core_start(void) 174static int tipc_core_start(void)
179{ 175{
180 int res; 176 int res;
181 177
@@ -203,7 +199,9 @@ static int __init tipc_init(void)
203{ 199{
204 int res; 200 int res;
205 201
206 tipc_log_resize(CONFIG_TIPC_LOG); 202 if (tipc_log_resize(CONFIG_TIPC_LOG) != 0)
203 warn("Unable to create log buffer\n");
204
207 info("Activated (version " TIPC_MOD_VER 205 info("Activated (version " TIPC_MOD_VER
208 " compiled " __DATE__ " " __TIME__ ")\n"); 206 " compiled " __DATE__ " " __TIME__ ")\n");
209 207
@@ -230,7 +228,6 @@ static void __exit tipc_exit(void)
230 tipc_core_stop_net(); 228 tipc_core_stop_net();
231 tipc_core_stop(); 229 tipc_core_stop();
232 info("Deactivated\n"); 230 info("Deactivated\n");
233 tipc_log_resize(0);
234} 231}
235 232
236module_init(tipc_init); 233module_init(tipc_init);
@@ -244,8 +241,6 @@ MODULE_VERSION(TIPC_MOD_VER);
244 241
245EXPORT_SYMBOL(tipc_attach); 242EXPORT_SYMBOL(tipc_attach);
246EXPORT_SYMBOL(tipc_detach); 243EXPORT_SYMBOL(tipc_detach);
247EXPORT_SYMBOL(tipc_get_addr);
248EXPORT_SYMBOL(tipc_get_mode);
249EXPORT_SYMBOL(tipc_createport); 244EXPORT_SYMBOL(tipc_createport);
250EXPORT_SYMBOL(tipc_deleteport); 245EXPORT_SYMBOL(tipc_deleteport);
251EXPORT_SYMBOL(tipc_ownidentity); 246EXPORT_SYMBOL(tipc_ownidentity);
@@ -260,23 +255,10 @@ EXPORT_SYMBOL(tipc_withdraw);
260EXPORT_SYMBOL(tipc_connect2port); 255EXPORT_SYMBOL(tipc_connect2port);
261EXPORT_SYMBOL(tipc_disconnect); 256EXPORT_SYMBOL(tipc_disconnect);
262EXPORT_SYMBOL(tipc_shutdown); 257EXPORT_SYMBOL(tipc_shutdown);
263EXPORT_SYMBOL(tipc_isconnected);
264EXPORT_SYMBOL(tipc_peer);
265EXPORT_SYMBOL(tipc_ref_valid);
266EXPORT_SYMBOL(tipc_send); 258EXPORT_SYMBOL(tipc_send);
267EXPORT_SYMBOL(tipc_send_buf);
268EXPORT_SYMBOL(tipc_send2name); 259EXPORT_SYMBOL(tipc_send2name);
269EXPORT_SYMBOL(tipc_forward2name);
270EXPORT_SYMBOL(tipc_send_buf2name);
271EXPORT_SYMBOL(tipc_forward_buf2name);
272EXPORT_SYMBOL(tipc_send2port); 260EXPORT_SYMBOL(tipc_send2port);
273EXPORT_SYMBOL(tipc_forward2port);
274EXPORT_SYMBOL(tipc_send_buf2port);
275EXPORT_SYMBOL(tipc_forward_buf2port);
276EXPORT_SYMBOL(tipc_multicast); 261EXPORT_SYMBOL(tipc_multicast);
277/* EXPORT_SYMBOL(tipc_multicast_buf); not available yet */
278EXPORT_SYMBOL(tipc_ispublished);
279EXPORT_SYMBOL(tipc_available_nodes);
280 262
281/* TIPC API for external bearers (see tipc_bearer.h) */ 263/* TIPC API for external bearers (see tipc_bearer.h) */
282 264
@@ -293,6 +275,4 @@ EXPORT_SYMBOL(tipc_createport_raw);
293EXPORT_SYMBOL(tipc_reject_msg); 275EXPORT_SYMBOL(tipc_reject_msg);
294EXPORT_SYMBOL(tipc_send_buf_fast); 276EXPORT_SYMBOL(tipc_send_buf_fast);
295EXPORT_SYMBOL(tipc_acknowledge); 277EXPORT_SYMBOL(tipc_acknowledge);
296EXPORT_SYMBOL(tipc_get_port);
297EXPORT_SYMBOL(tipc_get_handle);
298 278