aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/core.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/core.h')
-rw-r--r--net/tipc/core.h35
1 files changed, 20 insertions, 15 deletions
diff --git a/net/tipc/core.h b/net/tipc/core.h
index b69b60b2cc86..1f2e8b27a13f 100644
--- a/net/tipc/core.h
+++ b/net/tipc/core.h
@@ -37,6 +37,11 @@
37#ifndef _TIPC_CORE_H 37#ifndef _TIPC_CORE_H
38#define _TIPC_CORE_H 38#define _TIPC_CORE_H
39 39
40#include <linux/tipc.h>
41#include <linux/tipc_config.h>
42#include <net/tipc/tipc_msg.h>
43#include <net/tipc/tipc_port.h>
44#include <net/tipc/tipc_bearer.h>
40#include <net/tipc/tipc.h> 45#include <net/tipc/tipc.h>
41#include <linux/types.h> 46#include <linux/types.h>
42#include <linux/kernel.h> 47#include <linux/kernel.h>
@@ -60,9 +65,9 @@
60#define assert(i) BUG_ON(!(i)) 65#define assert(i) BUG_ON(!(i))
61 66
62struct tipc_msg; 67struct tipc_msg;
63extern struct print_buf *CONS, *LOG; 68extern struct print_buf *TIPC_CONS, *TIPC_LOG;
64extern struct print_buf *TEE(struct print_buf *, struct print_buf *); 69extern struct print_buf *TIPC_TEE(struct print_buf *, struct print_buf *);
65void msg_print(struct print_buf*,struct tipc_msg *,const char*); 70void tipc_msg_print(struct print_buf*,struct tipc_msg *,const char*);
66void tipc_printf(struct print_buf *, const char *fmt, ...); 71void tipc_printf(struct print_buf *, const char *fmt, ...);
67void tipc_dump(struct print_buf*,const char *fmt, ...); 72void tipc_dump(struct print_buf*,const char *fmt, ...);
68 73
@@ -79,7 +84,7 @@ void tipc_dump(struct print_buf*,const char *fmt, ...);
79#define info(fmt, arg...) tipc_printf(TIPC_OUTPUT, KERN_NOTICE "TIPC: " fmt, ## arg) 84#define info(fmt, arg...) tipc_printf(TIPC_OUTPUT, KERN_NOTICE "TIPC: " fmt, ## arg)
80 85
81#define dbg(fmt, arg...) do {if (DBG_OUTPUT) tipc_printf(DBG_OUTPUT, fmt, ## arg);} while(0) 86#define dbg(fmt, arg...) do {if (DBG_OUTPUT) tipc_printf(DBG_OUTPUT, fmt, ## arg);} while(0)
82#define msg_dbg(msg, txt) do {if (DBG_OUTPUT) msg_print(DBG_OUTPUT, msg, txt);} while(0) 87#define msg_dbg(msg, txt) do {if (DBG_OUTPUT) tipc_msg_print(DBG_OUTPUT, msg, txt);} while(0)
83#define dump(fmt, arg...) do {if (DBG_OUTPUT) tipc_dump(DBG_OUTPUT, fmt, ##arg);} while(0) 88#define dump(fmt, arg...) do {if (DBG_OUTPUT) tipc_dump(DBG_OUTPUT, fmt, ##arg);} while(0)
84 89
85 90
@@ -89,15 +94,15 @@ void tipc_dump(struct print_buf*,const char *fmt, ...);
89 * here, or on a per .c file basis, by redefining these symbols. The following 94 * here, or on a per .c file basis, by redefining these symbols. The following
90 * print buffer options are available: 95 * print buffer options are available:
91 * 96 *
92 * NULL : Output to null print buffer (i.e. print nowhere) 97 * NULL : Output to null print buffer (i.e. print nowhere)
93 * CONS : Output to system console 98 * TIPC_CONS : Output to system console
94 * LOG : Output to TIPC log buffer 99 * TIPC_LOG : Output to TIPC log buffer
95 * &buf : Output to user-defined buffer (struct print_buf *) 100 * &buf : Output to user-defined buffer (struct print_buf *)
96 * TEE(&buf_a,&buf_b) : Output to two print buffers (eg. TEE(CONS,LOG) ) 101 * TIPC_TEE(&buf_a,&buf_b) : Output to two print buffers (eg. TIPC_TEE(TIPC_CONS,TIPC_LOG) )
97 */ 102 */
98 103
99#ifndef TIPC_OUTPUT 104#ifndef TIPC_OUTPUT
100#define TIPC_OUTPUT TEE(CONS,LOG) 105#define TIPC_OUTPUT TIPC_TEE(TIPC_CONS,TIPC_LOG)
101#endif 106#endif
102 107
103#ifndef DBG_OUTPUT 108#ifndef DBG_OUTPUT
@@ -162,10 +167,10 @@ extern atomic_t tipc_user_count;
162 * Routines available to privileged subsystems 167 * Routines available to privileged subsystems
163 */ 168 */
164 169
165extern int start_core(void); 170extern int tipc_core_start(void);
166extern void stop_core(void); 171extern void tipc_core_stop(void);
167extern int start_net(void); 172extern int tipc_core_start_net(void);
168extern void stop_net(void); 173extern void tipc_core_stop_net(void);
169 174
170static inline int delimit(int val, int min, int max) 175static inline int delimit(int val, int min, int max)
171{ 176{
@@ -183,7 +188,7 @@ static inline int delimit(int val, int min, int max)
183 188
184typedef void (*Handler) (unsigned long); 189typedef void (*Handler) (unsigned long);
185 190
186u32 k_signal(Handler routine, unsigned long argument); 191u32 tipc_k_signal(Handler routine, unsigned long argument);
187 192
188/** 193/**
189 * k_init_timer - initialize a timer 194 * k_init_timer - initialize a timer