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, | |||
84 | msg_set_non_seq(msg, 1); | 84 | msg_set_non_seq(msg, 1); |
85 | msg_set_dest_domain(msg, dest_domain); | 85 | msg_set_dest_domain(msg, dest_domain); |
86 | msg_set_bc_netid(msg, tipc_net_id); | 86 | msg_set_bc_netid(msg, tipc_net_id); |
87 | msg_set_media_addr(msg, &b_ptr->addr); | 87 | b_ptr->media->addr2msg(&b_ptr->addr, msg_media_addr(msg)); |
88 | } | 88 | } |
89 | return buf; | 89 | return buf; |
90 | } | 90 | } |
@@ -130,7 +130,7 @@ void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr) | |||
130 | u32 type = msg_type(msg); | 130 | u32 type = msg_type(msg); |
131 | int link_fully_up; | 131 | int link_fully_up; |
132 | 132 | ||
133 | msg_get_media_addr(msg, &media_addr); | 133 | b_ptr->media->msg2addr(&media_addr, msg_media_addr(msg)); |
134 | buf_discard(buf); | 134 | buf_discard(buf); |
135 | 135 | ||
136 | /* Validate discovery message from requesting node */ | 136 | /* Validate discovery message from requesting node */ |