aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/msg.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/msg.h')
-rw-r--r--net/tipc/msg.h64
1 files changed, 3 insertions, 61 deletions
diff --git a/net/tipc/msg.h b/net/tipc/msg.h
index 92c4c4fd7b3f..de02339fc175 100644
--- a/net/tipc/msg.h
+++ b/net/tipc/msg.h
@@ -2,7 +2,7 @@
2 * net/tipc/msg.h: Include file for TIPC message header routines 2 * net/tipc/msg.h: Include file for TIPC message header routines
3 * 3 *
4 * Copyright (c) 2000-2007, Ericsson AB 4 * Copyright (c) 2000-2007, Ericsson AB
5 * Copyright (c) 2005-2008, Wind River Systems 5 * Copyright (c) 2005-2008, 2010-2011, Wind River Systems
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
@@ -421,13 +421,6 @@ static inline int msg_is_dest(struct tipc_msg *m, u32 d)
421 return msg_short(m) || (msg_destnode(m) == d); 421 return msg_short(m) || (msg_destnode(m) == d);
422} 422}
423 423
424static inline u32 msg_routed(struct tipc_msg *m)
425{
426 if (likely(msg_short(m)))
427 return 0;
428 return (msg_destnode(m) ^ msg_orignode(m)) >> 11;
429}
430
431static inline u32 msg_nametype(struct tipc_msg *m) 424static inline u32 msg_nametype(struct tipc_msg *m)
432{ 425{
433 return msg_word(m, 8); 426 return msg_word(m, 8);
@@ -438,26 +431,6 @@ static inline void msg_set_nametype(struct tipc_msg *m, u32 n)
438 msg_set_word(m, 8, n); 431 msg_set_word(m, 8, n);
439} 432}
440 433
441static inline u32 msg_transp_seqno(struct tipc_msg *m)
442{
443 return msg_word(m, 8);
444}
445
446static inline void msg_set_timestamp(struct tipc_msg *m, u32 n)
447{
448 msg_set_word(m, 8, n);
449}
450
451static inline u32 msg_timestamp(struct tipc_msg *m)
452{
453 return msg_word(m, 8);
454}
455
456static inline void msg_set_transp_seqno(struct tipc_msg *m, u32 n)
457{
458 msg_set_word(m, 8, n);
459}
460
461static inline u32 msg_nameinst(struct tipc_msg *m) 434static inline u32 msg_nameinst(struct tipc_msg *m)
462{ 435{
463 return msg_word(m, 9); 436 return msg_word(m, 9);
@@ -545,7 +518,6 @@ static inline struct tipc_msg *msg_get_wrapped(struct tipc_msg *m)
545#define NAME_DISTRIBUTOR 11 518#define NAME_DISTRIBUTOR 11
546#define MSG_FRAGMENTER 12 519#define MSG_FRAGMENTER 12
547#define LINK_CONFIG 13 520#define LINK_CONFIG 13
548#define DSC_H_SIZE 40
549 521
550/* 522/*
551 * Connection management protocol messages 523 * Connection management protocol messages
@@ -577,16 +549,6 @@ static inline void msg_set_seq_gap(struct tipc_msg *m, u32 n)
577 msg_set_bits(m, 1, 16, 0x1fff, n); 549 msg_set_bits(m, 1, 16, 0x1fff, n);
578} 550}
579 551
580static inline u32 msg_req_links(struct tipc_msg *m)
581{
582 return msg_bits(m, 1, 16, 0xfff);
583}
584
585static inline void msg_set_req_links(struct tipc_msg *m, u32 n)
586{
587 msg_set_bits(m, 1, 16, 0xfff, n);
588}
589
590 552
591/* 553/*
592 * Word 2 554 * Word 2
@@ -749,14 +711,9 @@ static inline u32 msg_redundant_link(struct tipc_msg *m)
749 return msg_bits(m, 5, 12, 0x1); 711 return msg_bits(m, 5, 12, 0x1);
750} 712}
751 713
752static inline void msg_set_redundant_link(struct tipc_msg *m) 714static inline void msg_set_redundant_link(struct tipc_msg *m, u32 r)
753{ 715{
754 msg_set_bits(m, 5, 12, 0x1, 1); 716 msg_set_bits(m, 5, 12, 0x1, r);
755}
756
757static inline void msg_clear_redundant_link(struct tipc_msg *m)
758{
759 msg_set_bits(m, 5, 12, 0x1, 0);
760} 717}
761 718
762 719
@@ -805,21 +762,6 @@ static inline void msg_set_link_tolerance(struct tipc_msg *m, u32 n)
805} 762}
806 763
807/* 764/*
808 * Routing table message data
809 */
810
811
812static inline u32 msg_remote_node(struct tipc_msg *m)
813{
814 return msg_word(m, msg_hdr_sz(m)/4);
815}
816
817static inline void msg_set_remote_node(struct tipc_msg *m, u32 a)
818{
819 msg_set_word(m, msg_hdr_sz(m)/4, a);
820}
821
822/*
823 * Segmentation message types 765 * Segmentation message types
824 */ 766 */
825 767