aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/bearer.h
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-10-07 15:19:11 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-12-27 11:33:36 -0500
commit3d749a6a26b0811b4b2bb4ec2c47cd630a6bbf88 (patch)
tree57616bd9e10a70b9146cb46ccd8905ee2a75475d /net/tipc/bearer.h
parent4d163a326fa4868cce1bb75dd95855d40e5497c6 (diff)
tipc: Hide media-specific addressing details from generic bearer code
Reworks TIPC's media address data structure and associated processing routines to transfer all media-specific details of address conversion to the associated TIPC media adaptation code. TIPC's generic bearer code now only needs to know which media type an address is associated with and whether or not it is a broadcast address, and totally ignores the "value" field that contains the actual media-specific addressing info. These changes eliminate the need for a number of endianness conversion operations and will make it easier for TIPC to support new media types in the future. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/bearer.h')
-rw-r--r--net/tipc/bearer.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/net/tipc/bearer.h b/net/tipc/bearer.h
index 41a61d219c38..54a5a575d69a 100644
--- a/net/tipc/bearer.h
+++ b/net/tipc/bearer.h
@@ -59,17 +59,16 @@
59#define TIPC_MEDIA_TYPE_ETH 1 59#define TIPC_MEDIA_TYPE_ETH 1
60 60
61/* 61/*
62 * Destination address structure used by TIPC bearers when sending messages 62 * struct tipc_media_addr - destination address used by TIPC bearers
63 * 63 * @value: address info (format defined by media)
64 * IMPORTANT: The fields of this structure MUST be stored using the specified 64 * @media_id: TIPC media type identifier
65 * byte order indicated below, as the structure is exchanged between nodes 65 * @broadcast: non-zero if address is a broadcast address
66 * as part of a link setup process.
67 */ 66 */
67
68struct tipc_media_addr { 68struct tipc_media_addr {
69 __be32 type; /* bearer type (network byte order) */ 69 u8 value[TIPC_MEDIA_ADDR_SIZE];
70 union { 70 u8 media_id;
71 __u8 eth_addr[6]; /* 48 bit Ethernet addr (byte array) */ 71 u8 broadcast;
72 } dev_addr;
73}; 72};
74 73
75struct tipc_bearer; 74struct tipc_bearer;