diff options
author | Allan Stephens <allan.stephens@windriver.com> | 2008-03-06 18:05:07 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-06 18:05:07 -0500 |
commit | 8c8696553aa3895c2ad4289537e4af45a8877b62 (patch) | |
tree | 652981cb99b1300cc56d939f8f5c2997f4054b52 /net | |
parent | f59d43899e279c77924a7ada4bec8c70e5aeca06 (diff) |
[TIPC]: Removal of message header option code
This patch removes code associated with optional, user-specified
fields of the TIPC message header. Such fields were never
utilized by TIPC, and have now been removed from the protocol
specification.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/tipc/core.c | 1 | ||||
-rw-r--r-- | net/tipc/msg.h | 23 | ||||
-rw-r--r-- | net/tipc/port.c | 7 |
3 files changed, 0 insertions, 31 deletions
diff --git a/net/tipc/core.c b/net/tipc/core.c index d2d7d32c02c7..9a5eb97684a2 100644 --- a/net/tipc/core.c +++ b/net/tipc/core.c | |||
@@ -277,7 +277,6 @@ EXPORT_SYMBOL(tipc_register_media); | |||
277 | /* TIPC API for external APIs (see tipc_port.h) */ | 277 | /* TIPC API for external APIs (see tipc_port.h) */ |
278 | 278 | ||
279 | EXPORT_SYMBOL(tipc_createport_raw); | 279 | EXPORT_SYMBOL(tipc_createport_raw); |
280 | EXPORT_SYMBOL(tipc_set_msg_option); | ||
281 | EXPORT_SYMBOL(tipc_reject_msg); | 280 | EXPORT_SYMBOL(tipc_reject_msg); |
282 | EXPORT_SYMBOL(tipc_send_buf_fast); | 281 | EXPORT_SYMBOL(tipc_send_buf_fast); |
283 | EXPORT_SYMBOL(tipc_acknowledge); | 282 | EXPORT_SYMBOL(tipc_acknowledge); |
diff --git a/net/tipc/msg.h b/net/tipc/msg.h index e9ef6df26562..12f8945e8a54 100644 --- a/net/tipc/msg.h +++ b/net/tipc/msg.h | |||
@@ -190,18 +190,6 @@ static inline void msg_set_lookup_scope(struct tipc_msg *m, u32 n) | |||
190 | msg_set_bits(m, 1, 19, 0x3, n); | 190 | msg_set_bits(m, 1, 19, 0x3, n); |
191 | } | 191 | } |
192 | 192 | ||
193 | static inline void msg_set_options(struct tipc_msg *m, const char *opt, u32 sz) | ||
194 | { | ||
195 | u32 hsz = msg_hdr_sz(m); | ||
196 | char *to = (char *)&m->hdr[hsz/4]; | ||
197 | |||
198 | if ((hsz < DIR_MSG_H_SIZE) || ((hsz + sz) > MAX_H_SIZE)) | ||
199 | return; | ||
200 | msg_set_bits(m, 1, 16, 0x7, (hsz - 28)/4); | ||
201 | msg_set_hdr_sz(m, hsz + sz); | ||
202 | memcpy(to, opt, sz); | ||
203 | } | ||
204 | |||
205 | static inline u32 msg_bcast_ack(struct tipc_msg *m) | 193 | static inline u32 msg_bcast_ack(struct tipc_msg *m) |
206 | { | 194 | { |
207 | return msg_bits(m, 1, 0, 0xffff); | 195 | return msg_bits(m, 1, 0, 0xffff); |
@@ -330,17 +318,6 @@ static inline struct tipc_msg *msg_get_wrapped(struct tipc_msg *m) | |||
330 | return (struct tipc_msg *)msg_data(m); | 318 | return (struct tipc_msg *)msg_data(m); |
331 | } | 319 | } |
332 | 320 | ||
333 | static inline void msg_expand(struct tipc_msg *m, u32 destnode) | ||
334 | { | ||
335 | if (!msg_short(m)) | ||
336 | return; | ||
337 | msg_set_hdr_sz(m, LONG_H_SIZE); | ||
338 | msg_set_orignode(m, msg_prevnode(m)); | ||
339 | msg_set_destnode(m, destnode); | ||
340 | memset(&m->hdr[8], 0, 12); | ||
341 | } | ||
342 | |||
343 | |||
344 | 321 | ||
345 | /* | 322 | /* |
346 | TIPC internal message header format, version 2 | 323 | TIPC internal message header format, version 2 |
diff --git a/net/tipc/port.c b/net/tipc/port.c index f508614ca59b..2a16ca43e953 100644 --- a/net/tipc/port.c +++ b/net/tipc/port.c | |||
@@ -413,13 +413,6 @@ static struct sk_buff *port_build_proto_msg(u32 destport, u32 destnode, | |||
413 | return buf; | 413 | return buf; |
414 | } | 414 | } |
415 | 415 | ||
416 | int tipc_set_msg_option(struct tipc_port *tp_ptr, const char *opt, const u32 sz) | ||
417 | { | ||
418 | msg_expand(&tp_ptr->phdr, msg_destnode(&tp_ptr->phdr)); | ||
419 | msg_set_options(&tp_ptr->phdr, opt, sz); | ||
420 | return TIPC_OK; | ||
421 | } | ||
422 | |||
423 | int tipc_reject_msg(struct sk_buff *buf, u32 err) | 416 | int tipc_reject_msg(struct sk_buff *buf, u32 err) |
424 | { | 417 | { |
425 | struct tipc_msg *msg = buf_msg(buf); | 418 | struct tipc_msg *msg = buf_msg(buf); |