aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/msg.c
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/msg.c
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/msg.c')
-rw-r--r--net/tipc/msg.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/tipc/msg.c b/net/tipc/msg.c
index 83d50967910c..3e4d3e29be61 100644
--- a/net/tipc/msg.c
+++ b/net/tipc/msg.c
@@ -333,11 +333,14 @@ void tipc_msg_dbg(struct print_buf *buf, struct tipc_msg *msg, const char *str)
333 } 333 }
334 334
335 if (msg_user(msg) == LINK_CONFIG) { 335 if (msg_user(msg) == LINK_CONFIG) {
336 u32 *raw = (u32 *)msg; 336 struct tipc_media_addr orig;
337 struct tipc_media_addr *orig = (struct tipc_media_addr *)&raw[5]; 337
338 tipc_printf(buf, ":DDOM(%x):", msg_dest_domain(msg)); 338 tipc_printf(buf, ":DDOM(%x):", msg_dest_domain(msg));
339 tipc_printf(buf, ":NETID(%u):", msg_bc_netid(msg)); 339 tipc_printf(buf, ":NETID(%u):", msg_bc_netid(msg));
340 tipc_media_addr_printf(buf, orig); 340 memcpy(orig.value, msg_media_addr(msg), sizeof(orig.value));
341 orig.media_id = 0;
342 orig.broadcast = 0;
343 tipc_media_addr_printf(buf, &orig);
341 } 344 }
342 if (msg_user(msg) == BCAST_PROTOCOL) { 345 if (msg_user(msg) == BCAST_PROTOCOL) {
343 tipc_printf(buf, "BCNACK:AFTER(%u):", msg_bcgap_after(msg)); 346 tipc_printf(buf, "BCNACK:AFTER(%u):", msg_bcgap_after(msg));