11/*
22 * include/linux/tipc_config.h: Include file for TIPC configuration interface
3- *
3+ *
44 * Copyright (c) 2003-2006, Ericsson AB
55 * Copyright (c) 2005-2007, Wind River Systems
66 * All rights reserved.
5454 * which specify parameters or results for the operation.
5555 *
5656 * 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
5858 * a variable number of TLVs. A failed request is denoted by the presence
5959 * of an "error string" TLV in the reply message instead of the TLV(s) the
6060 * reply should contain if the request succeeds.
6161 */
62-
63- /*
62+
63+ /*
6464 * Public commands:
6565 * 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.
6767 */
68-
69- #define TIPC_CMD_NOOP 0x0000 /* tx none, rx none */
68+
69+ #define TIPC_CMD_NOOP 0x0000 /* tx none, rx none */
7070#define TIPC_CMD_GET_NODES 0x0001 /* tx net_addr, rx node_info(s) */
7171#define TIPC_CMD_GET_MEDIA_NAMES 0x0002 /* tx none, rx media_name(s) */
7272#define TIPC_CMD_GET_BEARER_NAMES 0x0003 /* tx none, rx bearer_name(s) */
8383#define TIPC_CMD_GET_LINK_PEER 0x000D /* tx link_name, rx ? */
8484#endif
8585
86- /*
86+ /*
8787 * Protected commands:
8888 * May only be issued by "network administration capable" process.
8989 * 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.
9191 */
9292
9393#define TIPC_CMD_GET_REMOTE_MNG 0x4003 /* tx none, rx unsigned */
116116#define TIPC_CMD_UNBLOCK_LINK 0x4106 /* tx link_name, rx none */
117117#endif
118118
119- /*
119+ /*
120120 * Private commands:
121121 * 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.
123123 */
124124
125125#define TIPC_CMD_SET_NODE_ADDR 0x8001 /* tx net_addr, rx none */
156156#define TIPC_TLV_ULTRA_STRING 5 /* char[32768] (max) */
157157
158158#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> */
160160#define TIPC_TLV_MEDIA_NAME 18 /* char[TIPC_MAX_MEDIA_NAME] */
161161#define TIPC_TLV_BEARER_NAME 19 /* char[TIPC_MAX_BEARER_NAME] */
162162#define TIPC_TLV_LINK_NAME 20 /* char[TIPC_MAX_LINK_NAME] */
163163#define TIPC_TLV_NODE_INFO 21 /* struct tipc_node_info */
164164#define TIPC_TLV_LINK_INFO 22 /* struct tipc_link_info */
165- #define TIPC_TLV_BEARER_CONFIG 23 /* struct tipc_bearer_config */
166- #define TIPC_TLV_LINK_CONFIG 24 /* struct tipc_link_config */
165+ #define TIPC_TLV_BEARER_CONFIG 23 /* struct tipc_bearer_config */
166+ #define TIPC_TLV_LINK_CONFIG 24 /* struct tipc_link_config */
167167#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 */
169169
170170/*
171171 * Maximum sizes of TIPC bearer-related names (including terminating NUL)
172- */
172+ */
173173
174174#define TIPC_MAX_MEDIA_NAME 16 /* format = media */
175175#define TIPC_MAX_IF_NAME 16 /* format = interface */
@@ -234,7 +234,7 @@ struct tipc_name_table_query {
234234};
235235
236236/*
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
238238 * of the request failure. To simplify error processing (and to save space)
239239 * the first character of the string can be a special error code character
240240 * (lying by the range 0x80 to 0xFF) which represents a pre-defined reason.
@@ -258,7 +258,7 @@ struct tipc_link_create {
258258
259259/*
260260 * 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;
262262 * TLV values must also be stored in network byte order (where applicable).
263263 * TLV descriptors must be aligned to addresses which are multiple of 4,
264264 * 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)
294294
295295static inline int TLV_CHECK (const void * tlv , __u16 space , __u16 exp_type )
296296{
297- return TLV_OK (tlv , space ) &&
297+ return TLV_OK (tlv , space ) &&
298298 (ntohs (((struct tlv_desc * )tlv )-> tlv_type ) == exp_type );
299299}
300300
@@ -313,7 +313,7 @@ static inline int TLV_SET(void *tlv, __u16 type, void *data, __u16 len)
313313}
314314
315315/*
316- * A TLV list descriptor simplifies processing of messages
316+ * A TLV list descriptor simplifies processing of messages
317317 * containing multiple TLVs.
318318 */
319319
@@ -322,15 +322,15 @@ struct tlv_list_desc {
322322 __u32 tlv_space ; /* # bytes from curr TLV to list end */
323323};
324324
325- static inline void TLV_LIST_INIT (struct tlv_list_desc * list ,
325+ static inline void TLV_LIST_INIT (struct tlv_list_desc * list ,
326326 void * data , __u32 space )
327327{
328328 list -> tlv_ptr = (struct tlv_desc * )data ;
329329 list -> tlv_space = space ;
330330}
331-
331+
332332static inline int TLV_LIST_EMPTY (struct tlv_list_desc * list )
333- {
333+ {
334334 return (list -> tlv_space == 0 );
335335}
336336
@@ -348,7 +348,7 @@ static inline void TLV_LIST_STEP(struct tlv_list_desc *list)
348348{
349349 __u16 tlv_space = TLV_ALIGN (ntohs (list -> tlv_ptr -> tlv_len ));
350350
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 );
352352 list -> tlv_space -= tlv_space ;
353353}
354354
@@ -372,15 +372,14 @@ struct tipc_genlmsghdr {
372372#define TIPC_GENL_HDRLEN NLMSG_ALIGN(sizeof(struct tipc_genlmsghdr))
373373
374374/*
375- * Configuration messages exchanged via TIPC sockets use the TIPC configuration
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
378- * and no padding is permitted between the header and the message data
375+ * Configuration messages exchanged via TIPC sockets use the TIPC configuration
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
378+ * and no padding is permitted between the header and the message data
379379 * that follows.
380380 */
381381
382- struct tipc_cfg_msg_hdr
383- {
382+ struct tipc_cfg_msg_hdr {
384383 __be32 tcm_len ; /* Message length (including header) */
385384 __be16 tcm_type ; /* Command type */
386385 __be16 tcm_flags ; /* Additional flags */
0 commit comments