aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tipc_config.h
diff options
context:
space:
mode:
authorAllan Stephens <Allan.Stephens@windriver.com>2010-12-31 13:59:32 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-01 16:57:56 -0500
commit0e65967e33be61e5f67727edd4ea829b47676fc0 (patch)
tree1135d631e0cb88af3f8b060b8c32a130315542d8 /include/linux/tipc_config.h
parent25860c3bd5bd1db236d4fd5826d76127d677dc28 (diff)
tipc: cleanup various cosmetic whitespace issues
Cleans up TIPC's source code to eliminate deviations from generally accepted coding conventions relating to leading/trailing white space and white space around commas, braces, cases, and sizeof. These changes are purely cosmetic and do not alter the operation of TIPC in any way. 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 'include/linux/tipc_config.h')
-rw-r--r--include/linux/tipc_config.h59
1 files changed, 29 insertions, 30 deletions
diff --git a/include/linux/tipc_config.h b/include/linux/tipc_config.h
index 677aa13dc5d7..7d42460a5e3c 100644
--- a/include/linux/tipc_config.h
+++ b/include/linux/tipc_config.h
@@ -1,6 +1,6 @@
1/* 1/*
2 * include/linux/tipc_config.h: Include file for TIPC configuration interface 2 * include/linux/tipc_config.h: Include file for TIPC configuration interface
3 * 3 *
4 * Copyright (c) 2003-2006, Ericsson AB 4 * Copyright (c) 2003-2006, Ericsson AB
5 * Copyright (c) 2005-2007, Wind River Systems 5 * Copyright (c) 2005-2007, Wind River Systems
6 * All rights reserved. 6 * All rights reserved.
@@ -54,19 +54,19 @@
54 * which specify parameters or results for the operation. 54 * which specify parameters or results for the operation.
55 * 55 *
56 * For many operations, the request and reply messages have a fixed number 56 * For many operations, the request and reply messages have a fixed number
57 * of TLVs (usually zero or one); however, some reply messages may return 57 * of TLVs (usually zero or one); however, some reply messages may return
58 * a variable number of TLVs. A failed request is denoted by the presence 58 * a variable number of TLVs. A failed request is denoted by the presence
59 * of an "error string" TLV in the reply message instead of the TLV(s) the 59 * of an "error string" TLV in the reply message instead of the TLV(s) the
60 * reply should contain if the request succeeds. 60 * reply should contain if the request succeeds.
61 */ 61 */
62 62
63/* 63/*
64 * Public commands: 64 * Public commands:
65 * May be issued by any process. 65 * May be issued by any process.
66 * Accepted by own node, or by remote node only if remote management enabled. 66 * Accepted by own node, or by remote node only if remote management enabled.
67 */ 67 */
68 68
69#define TIPC_CMD_NOOP 0x0000 /* tx none, rx none */ 69#define TIPC_CMD_NOOP 0x0000 /* tx none, rx none */
70#define TIPC_CMD_GET_NODES 0x0001 /* tx net_addr, rx node_info(s) */ 70#define TIPC_CMD_GET_NODES 0x0001 /* tx net_addr, rx node_info(s) */
71#define TIPC_CMD_GET_MEDIA_NAMES 0x0002 /* tx none, rx media_name(s) */ 71#define TIPC_CMD_GET_MEDIA_NAMES 0x0002 /* tx none, rx media_name(s) */
72#define TIPC_CMD_GET_BEARER_NAMES 0x0003 /* tx none, rx bearer_name(s) */ 72#define TIPC_CMD_GET_BEARER_NAMES 0x0003 /* tx none, rx bearer_name(s) */
@@ -83,11 +83,11 @@
83#define TIPC_CMD_GET_LINK_PEER 0x000D /* tx link_name, rx ? */ 83#define TIPC_CMD_GET_LINK_PEER 0x000D /* tx link_name, rx ? */
84#endif 84#endif
85 85
86/* 86/*
87 * Protected commands: 87 * Protected commands:
88 * May only be issued by "network administration capable" process. 88 * May only be issued by "network administration capable" process.
89 * Accepted by own node, or by remote node only if remote management enabled 89 * Accepted by own node, or by remote node only if remote management enabled
90 * and this node is zone manager. 90 * and this node is zone manager.
91 */ 91 */
92 92
93#define TIPC_CMD_GET_REMOTE_MNG 0x4003 /* tx none, rx unsigned */ 93#define TIPC_CMD_GET_REMOTE_MNG 0x4003 /* tx none, rx unsigned */
@@ -116,10 +116,10 @@
116#define TIPC_CMD_UNBLOCK_LINK 0x4106 /* tx link_name, rx none */ 116#define TIPC_CMD_UNBLOCK_LINK 0x4106 /* tx link_name, rx none */
117#endif 117#endif
118 118
119/* 119/*
120 * Private commands: 120 * Private commands:
121 * May only be issued by "network administration capable" process. 121 * May only be issued by "network administration capable" process.
122 * Accepted by own node only; cannot be used on a remote node. 122 * Accepted by own node only; cannot be used on a remote node.
123 */ 123 */
124 124
125#define TIPC_CMD_SET_NODE_ADDR 0x8001 /* tx net_addr, rx none */ 125#define TIPC_CMD_SET_NODE_ADDR 0x8001 /* tx net_addr, rx none */
@@ -156,20 +156,20 @@
156#define TIPC_TLV_ULTRA_STRING 5 /* char[32768] (max) */ 156#define TIPC_TLV_ULTRA_STRING 5 /* char[32768] (max) */
157 157
158#define TIPC_TLV_ERROR_STRING 16 /* char[128] containing "error code" */ 158#define TIPC_TLV_ERROR_STRING 16 /* char[128] containing "error code" */
159#define TIPC_TLV_NET_ADDR 17 /* 32-bit integer denoting <Z.C.N> */ 159#define TIPC_TLV_NET_ADDR 17 /* 32-bit integer denoting <Z.C.N> */
160#define TIPC_TLV_MEDIA_NAME 18 /* char[TIPC_MAX_MEDIA_NAME] */ 160#define TIPC_TLV_MEDIA_NAME 18 /* char[TIPC_MAX_MEDIA_NAME] */
161#define TIPC_TLV_BEARER_NAME 19 /* char[TIPC_MAX_BEARER_NAME] */ 161#define TIPC_TLV_BEARER_NAME 19 /* char[TIPC_MAX_BEARER_NAME] */
162#define TIPC_TLV_LINK_NAME 20 /* char[TIPC_MAX_LINK_NAME] */ 162#define TIPC_TLV_LINK_NAME 20 /* char[TIPC_MAX_LINK_NAME] */
163#define TIPC_TLV_NODE_INFO 21 /* struct tipc_node_info */ 163#define TIPC_TLV_NODE_INFO 21 /* struct tipc_node_info */
164#define TIPC_TLV_LINK_INFO 22 /* struct tipc_link_info */ 164#define TIPC_TLV_LINK_INFO 22 /* struct tipc_link_info */
165#define TIPC_TLV_BEARER_CONFIG 23 /* struct tipc_bearer_config */ 165#define TIPC_TLV_BEARER_CONFIG 23 /* struct tipc_bearer_config */
166#define TIPC_TLV_LINK_CONFIG 24 /* struct tipc_link_config */ 166#define TIPC_TLV_LINK_CONFIG 24 /* struct tipc_link_config */
167#define TIPC_TLV_NAME_TBL_QUERY 25 /* struct tipc_name_table_query */ 167#define TIPC_TLV_NAME_TBL_QUERY 25 /* struct tipc_name_table_query */
168#define TIPC_TLV_PORT_REF 26 /* 32-bit port reference */ 168#define TIPC_TLV_PORT_REF 26 /* 32-bit port reference */
169 169
170/* 170/*
171 * Maximum sizes of TIPC bearer-related names (including terminating NUL) 171 * Maximum sizes of TIPC bearer-related names (including terminating NUL)
172 */ 172 */
173 173
174#define TIPC_MAX_MEDIA_NAME 16 /* format = media */ 174#define TIPC_MAX_MEDIA_NAME 16 /* format = media */
175#define TIPC_MAX_IF_NAME 16 /* format = interface */ 175#define TIPC_MAX_IF_NAME 16 /* format = interface */
@@ -234,7 +234,7 @@ struct tipc_name_table_query {
234}; 234};
235 235
236/* 236/*
237 * The error string TLV is a null-terminated string describing the cause 237 * The error string TLV is a null-terminated string describing the cause
238 * of the request failure. To simplify error processing (and to save space) 238 * of the request failure. To simplify error processing (and to save space)
239 * the first character of the string can be a special error code character 239 * the first character of the string can be a special error code character
240 * (lying by the range 0x80 to 0xFF) which represents a pre-defined reason. 240 * (lying by the range 0x80 to 0xFF) which represents a pre-defined reason.
@@ -258,7 +258,7 @@ struct tipc_link_create {
258 258
259/* 259/*
260 * A TLV consists of a descriptor, followed by the TLV value. 260 * A TLV consists of a descriptor, followed by the TLV value.
261 * TLV descriptor fields are stored in network byte order; 261 * TLV descriptor fields are stored in network byte order;
262 * TLV values must also be stored in network byte order (where applicable). 262 * TLV values must also be stored in network byte order (where applicable).
263 * TLV descriptors must be aligned to addresses which are multiple of 4, 263 * TLV descriptors must be aligned to addresses which are multiple of 4,
264 * so up to 3 bytes of padding may exist at the end of the TLV value area. 264 * so up to 3 bytes of padding may exist at the end of the TLV value area.
@@ -294,7 +294,7 @@ static inline int TLV_OK(const void *tlv, __u16 space)
294 294
295static inline int TLV_CHECK(const void *tlv, __u16 space, __u16 exp_type) 295static inline int TLV_CHECK(const void *tlv, __u16 space, __u16 exp_type)
296{ 296{
297 return TLV_OK(tlv, space) && 297 return TLV_OK(tlv, space) &&
298 (ntohs(((struct tlv_desc *)tlv)->tlv_type) == exp_type); 298 (ntohs(((struct tlv_desc *)tlv)->tlv_type) == exp_type);
299} 299}
300 300
@@ -313,7 +313,7 @@ static inline int TLV_SET(void *tlv, __u16 type, void *data, __u16 len)
313} 313}
314 314
315/* 315/*
316 * A TLV list descriptor simplifies processing of messages 316 * A TLV list descriptor simplifies processing of messages
317 * containing multiple TLVs. 317 * containing multiple TLVs.
318 */ 318 */
319 319
@@ -322,15 +322,15 @@ struct tlv_list_desc {
322 __u32 tlv_space; /* # bytes from curr TLV to list end */ 322 __u32 tlv_space; /* # bytes from curr TLV to list end */
323}; 323};
324 324
325static inline void TLV_LIST_INIT(struct tlv_list_desc *list, 325static inline void TLV_LIST_INIT(struct tlv_list_desc *list,
326 void *data, __u32 space) 326 void *data, __u32 space)
327{ 327{
328 list->tlv_ptr = (struct tlv_desc *)data; 328 list->tlv_ptr = (struct tlv_desc *)data;
329 list->tlv_space = space; 329 list->tlv_space = space;
330} 330}
331 331
332static inline int TLV_LIST_EMPTY(struct tlv_list_desc *list) 332static inline int TLV_LIST_EMPTY(struct tlv_list_desc *list)
333{ 333{
334 return (list->tlv_space == 0); 334 return (list->tlv_space == 0);
335} 335}
336 336
@@ -348,7 +348,7 @@ static inline void TLV_LIST_STEP(struct tlv_list_desc *list)
348{ 348{
349 __u16 tlv_space = TLV_ALIGN(ntohs(list->tlv_ptr->tlv_len)); 349 __u16 tlv_space = TLV_ALIGN(ntohs(list->tlv_ptr->tlv_len));
350 350
351 list->tlv_ptr = (struct tlv_desc *)((char *)list->tlv_ptr + tlv_space); 351 list->tlv_ptr = (struct tlv_desc *)((char *)list->tlv_ptr + tlv_space);
352 list->tlv_space -= tlv_space; 352 list->tlv_space -= tlv_space;
353} 353}
354 354
@@ -372,15 +372,14 @@ struct tipc_genlmsghdr {
372#define TIPC_GENL_HDRLEN NLMSG_ALIGN(sizeof(struct tipc_genlmsghdr)) 372#define TIPC_GENL_HDRLEN NLMSG_ALIGN(sizeof(struct tipc_genlmsghdr))
373 373
374/* 374/*
375 * Configuration messages exchanged via TIPC sockets use the TIPC configuration 375 * Configuration messages exchanged via TIPC sockets use the TIPC configuration
376 * message header, which is defined below. This structure is analogous 376 * message header, which is defined below. This structure is analogous
377 * to the Netlink message header, but fields are stored in network byte order 377 * to the Netlink message header, but fields are stored in network byte order
378 * and no padding is permitted between the header and the message data 378 * and no padding is permitted between the header and the message data
379 * that follows. 379 * that follows.
380 */ 380 */
381 381
382struct tipc_cfg_msg_hdr 382struct tipc_cfg_msg_hdr {
383{
384 __be32 tcm_len; /* Message length (including header) */ 383 __be32 tcm_len; /* Message length (including header) */
385 __be16 tcm_type; /* Command type */ 384 __be16 tcm_type; /* Command type */
386 __be16 tcm_flags; /* Additional flags */ 385 __be16 tcm_flags; /* Additional flags */