aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/bearer.h
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2010-11-30 07:00:53 -0500
committerDavid S. Miller <davem@davemloft.net>2010-12-02 16:34:01 -0500
commitd265fef6ddf9042195aae551e1fde211c2a1588b (patch)
treeb9c45caac6e191f6c68df3cc215831ee7e8f1e21 /net/tipc/bearer.h
parentdca9b2404a6d6579828da2425c051462701efd3f (diff)
tipc: Remove obsolete native API files and exports
As part of the removal of TIPC's native API support it is no longer necessary for TIPC to export symbols for routines that can be called by kernel-based applications, nor for it to have header files that kernel-based applications can include to access the declarations for those routines. This commit eliminates the exporting of symbols by TIPC and migrates the contents of each obsolete native API include file into its corresponding non-native API equivalent. The code which was migrated in this commit was migrated intact, in that there are no technical changes combined with the relocation. 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/bearer.h')
-rw-r--r--net/tipc/bearer.h69
1 files changed, 68 insertions, 1 deletions
diff --git a/net/tipc/bearer.h b/net/tipc/bearer.h
index a850b389663e..49af7fae8b5a 100644
--- a/net/tipc/bearer.h
+++ b/net/tipc/bearer.h
@@ -43,6 +43,45 @@
43#define MAX_BEARERS 8 43#define MAX_BEARERS 8
44#define MAX_MEDIA 4 44#define MAX_MEDIA 4
45 45
46/*
47 * Identifiers of supported TIPC media types
48 */
49#define TIPC_MEDIA_TYPE_ETH 1
50
51/*
52 * Destination address structure used by TIPC bearers when sending messages
53 *
54 * IMPORTANT: The fields of this structure MUST be stored using the specified
55 * byte order indicated below, as the structure is exchanged between nodes
56 * as part of a link setup process.
57 */
58struct tipc_media_addr {
59 __be32 type; /* bearer type (network byte order) */
60 union {
61 __u8 eth_addr[6]; /* 48 bit Ethernet addr (byte array) */
62 } dev_addr;
63};
64
65/**
66 * struct tipc_bearer - TIPC bearer info available to media code
67 * @usr_handle: pointer to additional media-specific information about bearer
68 * @mtu: max packet size bearer can support
69 * @blocked: non-zero if bearer is blocked
70 * @lock: spinlock for controlling access to bearer
71 * @addr: media-specific address associated with bearer
72 * @name: bearer name (format = media:interface)
73 *
74 * Note: TIPC initializes "name" and "lock" fields; media code is responsible
75 * for initialization all other fields when a bearer is enabled.
76 */
77struct tipc_bearer {
78 void *usr_handle;
79 u32 mtu;
80 int blocked;
81 spinlock_t lock;
82 struct tipc_media_addr addr;
83 char name[TIPC_MAX_BEARER_NAME];
84};
46 85
47/** 86/**
48 * struct media - TIPC media information available to internal users 87 * struct media - TIPC media information available to internal users
@@ -55,7 +94,7 @@
55 * @priority: default link (and bearer) priority 94 * @priority: default link (and bearer) priority
56 * @tolerance: default time (in ms) before declaring link failure 95 * @tolerance: default time (in ms) before declaring link failure
57 * @window: default window (in packets) before declaring link congestion 96 * @window: default window (in packets) before declaring link congestion
58 * @type_id: TIPC media identifier [defined in tipc_bearer.h] 97 * @type_id: TIPC media identifier
59 * @name: media name 98 * @name: media name
60 */ 99 */
61 100
@@ -116,6 +155,34 @@ struct link;
116 155
117extern struct bearer tipc_bearers[]; 156extern struct bearer tipc_bearers[];
118 157
158/*
159 * TIPC routines available to supported media types
160 */
161int tipc_register_media(u32 media_type,
162 char *media_name, int (*enable)(struct tipc_bearer *),
163 void (*disable)(struct tipc_bearer *),
164 int (*send_msg)(struct sk_buff *,
165 struct tipc_bearer *, struct tipc_media_addr *),
166 char *(*addr2str)(struct tipc_media_addr *a,
167 char *str_buf, int str_size),
168 struct tipc_media_addr *bcast_addr, const u32 bearer_priority,
169 const u32 link_tolerance, /* [ms] */
170 const u32 send_window_limit);
171
172void tipc_recv_msg(struct sk_buff *buf, struct tipc_bearer *tb_ptr);
173
174int tipc_block_bearer(const char *name);
175void tipc_continue(struct tipc_bearer *tb_ptr);
176
177int tipc_enable_bearer(const char *bearer_name, u32 bcast_scope, u32 priority);
178int tipc_disable_bearer(const char *name);
179
180/*
181 * Routines made available to TIPC by supported media types
182 */
183int tipc_eth_media_start(void);
184void tipc_eth_media_stop(void);
185
119void tipc_media_addr_printf(struct print_buf *pb, struct tipc_media_addr *a); 186void tipc_media_addr_printf(struct print_buf *pb, struct tipc_media_addr *a);
120struct sk_buff *tipc_media_get_names(void); 187struct sk_buff *tipc_media_get_names(void);
121 188