aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/bearer.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/bearer.h')
-rw-r--r--net/tipc/bearer.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/net/tipc/bearer.h b/net/tipc/bearer.h
index 39f1192d04bf..09c869adcfcf 100644
--- a/net/tipc/bearer.h
+++ b/net/tipc/bearer.h
@@ -56,6 +56,7 @@
56 * Identifiers of supported TIPC media types 56 * Identifiers of supported TIPC media types
57 */ 57 */
58#define TIPC_MEDIA_TYPE_ETH 1 58#define TIPC_MEDIA_TYPE_ETH 1
59#define TIPC_MEDIA_TYPE_IB 2
59 60
60/** 61/**
61 * struct tipc_media_addr - destination address used by TIPC bearers 62 * struct tipc_media_addr - destination address used by TIPC bearers
@@ -77,7 +78,6 @@ struct tipc_bearer;
77 * @enable_bearer: routine which enables a bearer 78 * @enable_bearer: routine which enables a bearer
78 * @disable_bearer: routine which disables a bearer 79 * @disable_bearer: routine which disables a bearer
79 * @addr2str: routine which converts media address to string 80 * @addr2str: routine which converts media address to string
80 * @str2addr: routine which converts media address from string
81 * @addr2msg: routine which converts media address to protocol message area 81 * @addr2msg: routine which converts media address to protocol message area
82 * @msg2addr: routine which converts media address from protocol message area 82 * @msg2addr: routine which converts media address from protocol message area
83 * @bcast_addr: media address used in broadcasting 83 * @bcast_addr: media address used in broadcasting
@@ -94,10 +94,9 @@ struct tipc_media {
94 int (*enable_bearer)(struct tipc_bearer *b_ptr); 94 int (*enable_bearer)(struct tipc_bearer *b_ptr);
95 void (*disable_bearer)(struct tipc_bearer *b_ptr); 95 void (*disable_bearer)(struct tipc_bearer *b_ptr);
96 int (*addr2str)(struct tipc_media_addr *a, char *str_buf, int str_size); 96 int (*addr2str)(struct tipc_media_addr *a, char *str_buf, int str_size);
97 int (*str2addr)(struct tipc_media_addr *a, char *str_buf);
98 int (*addr2msg)(struct tipc_media_addr *a, char *msg_area); 97 int (*addr2msg)(struct tipc_media_addr *a, char *msg_area);
99 int (*msg2addr)(struct tipc_media_addr *a, char *msg_area); 98 int (*msg2addr)(const struct tipc_bearer *b_ptr,
100 struct tipc_media_addr bcast_addr; 99 struct tipc_media_addr *a, char *msg_area);
101 u32 priority; 100 u32 priority;
102 u32 tolerance; 101 u32 tolerance;
103 u32 window; 102 u32 window;
@@ -136,6 +135,7 @@ struct tipc_bearer {
136 char name[TIPC_MAX_BEARER_NAME]; 135 char name[TIPC_MAX_BEARER_NAME];
137 spinlock_t lock; 136 spinlock_t lock;
138 struct tipc_media *media; 137 struct tipc_media *media;
138 struct tipc_media_addr bcast_addr;
139 u32 priority; 139 u32 priority;
140 u32 window; 140 u32 window;
141 u32 tolerance; 141 u32 tolerance;
@@ -175,6 +175,14 @@ int tipc_disable_bearer(const char *name);
175int tipc_eth_media_start(void); 175int tipc_eth_media_start(void);
176void tipc_eth_media_stop(void); 176void tipc_eth_media_stop(void);
177 177
178#ifdef CONFIG_TIPC_MEDIA_IB
179int tipc_ib_media_start(void);
180void tipc_ib_media_stop(void);
181#else
182static inline int tipc_ib_media_start(void) { return 0; }
183static inline void tipc_ib_media_stop(void) { return; }
184#endif
185
178int tipc_media_set_priority(const char *name, u32 new_value); 186int tipc_media_set_priority(const char *name, u32 new_value);
179int tipc_media_set_window(const char *name, u32 new_value); 187int tipc_media_set_window(const char *name, u32 new_value);
180void tipc_media_addr_printf(char *buf, int len, struct tipc_media_addr *a); 188void tipc_media_addr_printf(char *buf, int len, struct tipc_media_addr *a);