summaryrefslogtreecommitdiff
path: root/net/tipc/bearer.h
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-10-07 19:19:11 (GMT)
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-12-27 16:33:36 (GMT)
commit3d749a6a26b0811b4b2bb4ec2c47cd630a6bbf88 (patch)
tree57616bd9e10a70b9146cb46ccd8905ee2a75475d /net/tipc/bearer.h
parent4d163a326fa4868cce1bb75dd95855d40e5497c6 (diff)
downloadlinux-fsl-qoriq-3d749a6a26b0811b4b2bb4ec2c47cd630a6bbf88.tar.xz
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 41a61d2..54a5a57 100644
--- a/net/tipc/bearer.h
+++ b/net/tipc/bearer.h
@@ -59,17 +59,16 @@
#define TIPC_MEDIA_TYPE_ETH 1
/*
- * Destination address structure used by TIPC bearers when sending messages
- *
- * IMPORTANT: The fields of this structure MUST be stored using the specified
- * byte order indicated below, as the structure is exchanged between nodes
- * as part of a link setup process.
+ * struct tipc_media_addr - destination address used by TIPC bearers
+ * @value: address info (format defined by media)
+ * @media_id: TIPC media type identifier
+ * @broadcast: non-zero if address is a broadcast address
*/
+
struct tipc_media_addr {
- __be32 type; /* bearer type (network byte order) */
- union {
- __u8 eth_addr[6]; /* 48 bit Ethernet addr (byte array) */
- } dev_addr;
+ u8 value[TIPC_MEDIA_ADDR_SIZE];
+ u8 media_id;
+ u8 broadcast;
};
struct tipc_bearer;