diff options
author | Allan Stephens <allan.stephens@windriver.com> | 2011-10-07 15:19:11 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-12-27 11:33:36 -0500 |
commit | 3d749a6a26b0811b4b2bb4ec2c47cd630a6bbf88 (patch) | |
tree | 57616bd9e10a70b9146cb46ccd8905ee2a75475d /net/tipc/discover.c | |
parent | 4d163a326fa4868cce1bb75dd95855d40e5497c6 (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/discover.c')
-rw-r--r-- | net/tipc/discover.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/tipc/discover.c b/net/tipc/discover.c index f2fb96e86ee8..1ea2d44bbc36 100644 --- a/net/tipc/discover.c +++ b/net/tipc/discover.c @@ -84,7 +84,7 @@ static struct sk_buff *tipc_disc_init_msg(u32 type, msg_set_non_seq(msg, 1); msg_set_dest_domain(msg, dest_domain); msg_set_bc_netid(msg, tipc_net_id); - msg_set_media_addr(msg, &b_ptr->addr); + b_ptr->media->addr2msg(&b_ptr->addr, msg_media_addr(msg)); } return buf; } @@ -130,7 +130,7 @@ void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr) u32 type = msg_type(msg); int link_fully_up; - msg_get_media_addr(msg, &media_addr); + b_ptr->media->msg2addr(&media_addr, msg_media_addr(msg)); buf_discard(buf); /* Validate discovery message from requesting node */ |