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.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/net/tipc/msg.h b/net/tipc/msg.h
index b4ba1b4f9ae7..a4e944d59394 100644
--- a/net/tipc/msg.h
+++ b/net/tipc/msg.h
@@ -550,6 +550,8 @@ static inline void msg_set_nameupper(struct tipc_msg *m, u32 n)
550 */ 550 */
551#define DSC_REQ_MSG 0 551#define DSC_REQ_MSG 0
552#define DSC_RESP_MSG 1 552#define DSC_RESP_MSG 1
553#define DSC_TRIAL_MSG 2
554#define DSC_TRIAL_FAIL_MSG 3
553 555
554/* 556/*
555 * Group protocol message types 557 * Group protocol message types
@@ -627,7 +629,6 @@ static inline void msg_set_bcgap_to(struct tipc_msg *m, u32 n)
627 msg_set_bits(m, 2, 0, 0xffff, n); 629 msg_set_bits(m, 2, 0, 0xffff, n);
628} 630}
629 631
630
631/* 632/*
632 * Word 4 633 * Word 4
633 */ 634 */
@@ -925,6 +926,26 @@ static inline bool msg_is_reset(struct tipc_msg *hdr)
925 return (msg_user(hdr) == LINK_PROTOCOL) && (msg_type(hdr) == RESET_MSG); 926 return (msg_user(hdr) == LINK_PROTOCOL) && (msg_type(hdr) == RESET_MSG);
926} 927}
927 928
929static inline u32 msg_sugg_node_addr(struct tipc_msg *m)
930{
931 return msg_word(m, 14);
932}
933
934static inline void msg_set_sugg_node_addr(struct tipc_msg *m, u32 n)
935{
936 msg_set_word(m, 14, n);
937}
938
939static inline void msg_set_node_id(struct tipc_msg *hdr, u8 *id)
940{
941 memcpy(msg_data(hdr), id, 16);
942}
943
944static inline u8 *msg_node_id(struct tipc_msg *hdr)
945{
946 return (u8 *)msg_data(hdr);
947}
948
928struct sk_buff *tipc_buf_acquire(u32 size, gfp_t gfp); 949struct sk_buff *tipc_buf_acquire(u32 size, gfp_t gfp);
929bool tipc_msg_validate(struct sk_buff **_skb); 950bool tipc_msg_validate(struct sk_buff **_skb);
930bool tipc_msg_reverse(u32 own_addr, struct sk_buff **skb, int err); 951bool tipc_msg_reverse(u32 own_addr, struct sk_buff **skb, int err);