diff options
Diffstat (limited to 'net/tipc/msg.h')
-rw-r--r-- | net/tipc/msg.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/net/tipc/msg.h b/net/tipc/msg.h index 503511903d1d..41a05fa8d608 100644 --- a/net/tipc/msg.h +++ b/net/tipc/msg.h | |||
@@ -463,6 +463,11 @@ static inline struct tipc_msg *msg_get_wrapped(struct tipc_msg *m) | |||
463 | #define FRAGMENT 1 | 463 | #define FRAGMENT 1 |
464 | #define LAST_FRAGMENT 2 | 464 | #define LAST_FRAGMENT 2 |
465 | 465 | ||
466 | /* Bundling protocol message types | ||
467 | */ | ||
468 | #define BUNDLE_OPEN 0 | ||
469 | #define BUNDLE_CLOSED 1 | ||
470 | |||
466 | /* | 471 | /* |
467 | * Link management protocol message types | 472 | * Link management protocol message types |
468 | */ | 473 | */ |
@@ -706,12 +711,30 @@ static inline void msg_set_link_tolerance(struct tipc_msg *m, u32 n) | |||
706 | msg_set_bits(m, 9, 0, 0xffff, n); | 711 | msg_set_bits(m, 9, 0, 0xffff, n); |
707 | } | 712 | } |
708 | 713 | ||
709 | u32 tipc_msg_tot_importance(struct tipc_msg *m); | 714 | static inline u32 tipc_msg_tot_importance(struct tipc_msg *m) |
715 | { | ||
716 | if ((msg_user(m) == MSG_FRAGMENTER) && (msg_type(m) == FIRST_FRAGMENT)) | ||
717 | return msg_importance(msg_get_wrapped(m)); | ||
718 | return msg_importance(m); | ||
719 | } | ||
720 | |||
721 | static inline u32 msg_tot_origport(struct tipc_msg *m) | ||
722 | { | ||
723 | if ((msg_user(m) == MSG_FRAGMENTER) && (msg_type(m) == FIRST_FRAGMENT)) | ||
724 | return msg_origport(msg_get_wrapped(m)); | ||
725 | return msg_origport(m); | ||
726 | } | ||
727 | |||
710 | void tipc_msg_init(struct tipc_msg *m, u32 user, u32 type, u32 hsize, | 728 | void tipc_msg_init(struct tipc_msg *m, u32 user, u32 type, u32 hsize, |
711 | u32 destnode); | 729 | u32 destnode); |
730 | |||
712 | int tipc_msg_build(struct tipc_msg *hdr, struct iovec const *msg_sect, | 731 | int tipc_msg_build(struct tipc_msg *hdr, struct iovec const *msg_sect, |
713 | unsigned int len, int max_size, struct sk_buff **buf); | 732 | unsigned int len, int max_size, struct sk_buff **buf); |
714 | 733 | ||
715 | int tipc_buf_append(struct sk_buff **headbuf, struct sk_buff **buf); | 734 | int tipc_buf_append(struct sk_buff **headbuf, struct sk_buff **buf); |
716 | 735 | ||
736 | bool tipc_msg_bundle(struct sk_buff *bbuf, struct sk_buff *buf, u32 mtu); | ||
737 | |||
738 | bool tipc_msg_make_bundle(struct sk_buff **buf, u32 mtu, u32 dnode); | ||
739 | |||
717 | #endif | 740 | #endif |